Jump to content











Photo

How to create shortcuts for nativeEx & LiveXP


  • Please log in to reply
No replies to this topic

#1 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 21 April 2007 - 07:33 PM

How to create shortcuts

To create a shortcut you will need to understand that a few steps are needed to ensure that everything is done correctly, these are very simple steps and I will write everything that is needed:

1 - read the localized folder name - when the project is built it will read the name of your "Programs" folder under the language of your install CD, so this value is stored on a INI text file and we will read it into a variable

2 - Write a line for creating your shortcut - we will write a line inside a central text files wich will combine all requests and create all our needed shortcuts

--- Example:

[variables]

%ProgramName%=CD Writer

%ProgramFolder%=sCDWriter



[process]

echo,"Making new directories.."

IniRead,"%ProjectInfo%","TargetPaths","Program_Files",%WorkDir%

DirMake,"%targetDir%\%workDir%"

DirMake,"%targetDir%\%workDir%\%ProgramFolder%"

echo,"Extracting %ProgramName%.."

ExtractAllFiles,"%ScriptFile%","Folder","%targetDir%\%workDir%\%ProgramFolder%"

Run,%BuildModelScript%,Add-Shortcut,"DE","#$pSystemDrive#$p\%workDir%\%ProgramFolder%\scdwriter.exe","%ProgramName%"

Run,%BuildModelScript%,Add-Shortcut,"SM","#$pSystemDrive#$p\%workDir%\%ProgramFolder%\scdwriter.exe","%ProgramName%"

Look on the variables section, it will hold the title for the shortcut and the folder name where the program will be stored.

First we read the value from the %projectinfo% file (this is a variable pointing to the file that has all the details we need to read)
IniRead,"%ProjectInfo%","TargetPaths","Program_Files",%WorkDir%

And we get the "Program_Files" value stored on %WorkDir% - notice how it used on the following line:


Run,%BuildModelScript%,Add-Shortcut,"SM","#$pSystemDrive#$p\%workDir%\%ProgramFolder%\scdwriter.exe","%ProgramName%"
This line will add the shortcut on the Start Menu (SM) - if you want an icon on desktop just repeat the same line again but change the SM value to DE (Desktop)

There is also a complete and detailed manual inside the build model script, just press the help button inside the script to view the detailed documentation with some good tips.


On the main window, select from LiveXP or nativeEx:

Basic --> Build --> Build Model script


It might seem a bit confusing at first, but it's easy to use once you've understand these steps.

Questions can be placed here:
http://www.boot-land...orting-f33.html

And this topic will be updated to make this quick tutorial easier to follow..

:cheers:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users