You are here

NSIS script to make Ekiga portable

3 posts / 0 new
Last post
debianuser
Offline
Last seen: 6 years 12 months ago
Developer
Joined: 2012-11-07 07:07
NSIS script to make Ekiga portable

Hello,

I am new with portable apps and I am trying to write my first NSIS script. I would like the app Ekiga to be portable:

Section "Main"
ReadEnvStr $APPDATAPATH "APPDATA"
CopyFiles /FILESONLY $EXEDIR\Data\settings\ekiga.conf $APPDATAPATH\ekiga.conf
FileOpen $0 $EXEDIR\App\Ekiga\ekiga.bat w
FileWrite $0 "set PATH=%PATH%;$EXEDIR\GTK2-Runtime\bin$\n"
FileWrite $0 "cd App\Ekiga$\n"
FileWrite $0 "ekiga.exe$\n"
FileClose $0
StrCpy $EXECSTRING "$EXEDIR\App\Ekiga\ekiga.bat"
Exec $EXECSTRING
CopyFiles /FILESONLY $APPDATAPATH\ekiga.conf $EXEDIR\Data\settings
SectionEnd

The script works. But is there a better way to change the PATH variable to enable GTK2-Runtime in the EkigaPortable folder?

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 8 years 10 months ago
Joined: 2007-04-15 21:08
Use the PortableApps.com Launcher

Use the PortableApps.com Launcher. It does these things properly, taking care of these things plus quite a number of other things you haven't dealt with. Here is the approximate launcher configuration you would end up with:

[Launch]
ProgramExecutable=Ekiga\ekiga.exe
WorkingDirectory=%PAL:AppDir%\Ekiga

[FilesMove]
settings\ekiga.conf=%APPDATA%

[Environment]
PATH=%PATH%;%PAL:AppDir%\gtk

Note that this assumes moving GTK2-Runtime to App\gtk (the conventional location to put the GTK).

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

debianuser
Offline
Last seen: 6 years 12 months ago
Developer
Joined: 2012-11-07 07:07
Thanks for the information.

Thanks for the information. It works with

[Environment]
PATH=%PATH%;%PAL:AppDir%\gtk\bin

Log in or register to post comments