[Launch]
ProgramExecutable=RetroShare\retroshare.exe
;CommandLineArguments=-settings=%PAL:DataDir%\
WorkingDirectory=%PAL:AppDir%\RetroShare
DirectoryMoveOK=yes
SupportsUNC=yes

[DirectoriesMove]
Data=%PAL:AppDir%\RetroShare\Data

[FileWrite1]
Type=Replace
File=%PAL:DataDir%\settings\appnameportableexample.config
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir%\
Replace=%PAL:Drive%%PAL:PackagePartialDir%\

[FileWrite2]
Type=Replace
File=%PAL:DataDir%\settings\appnameportableexample.config
Find=%PAL:LastDrive%%PAL:LastPortableAppsBaseDir%\
Replace=%PAL:Drive%%PAL:PortableAppsBaseDir%\

[FileWrite3]
Type=Replace
File=%PAL:DataDir%\settings\appnameportableexample.config
Find=%PAL:LastDrive%\
Replace=%PAL:Drive%\

;FileWrite4 to 6 will update the drive letter, relative path, and full path in a registry file
;Note that we use double backslashes for the paths instead of singles because that is the way a .reg file stores them

[FileWrite4]
Type=Replace
File=%PAL:DataDir%\settings\AppName.reg
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir:DoubleBackslash%\\
Replace=%PAL:Drive%%PAL:PackagePartialDir:DoubleBackslash%\\

[FileWrite5]
Type=Replace
File=%PAL:DataDir%\settings\AppName.reg
Find=%PAL:LastDrive%%PAL:LastPortableAppsBaseDir:DoubleBackslash%\\
Replace=%PAL:Drive%%PAL:PortableAppsBaseDir:DoubleBackslash%\\

[FileWrite6]
Type=Replace
File=%PAL:DataDir%\settings\AppName.reg
Find=%PAL:LastDrive%\\
Replace=%PAL:Drive%\\

;FileWrite 7 is an example of writing a value directly to a file, to specify a path to plugins for example

;[FileWrite7]
;Type=INI
;File=%PAL:DataDir%\settings\appnameportableexample.config
;Section=Paths
;Key=PluginsPath
;Value=%PAL:AppDir%\AppName\plugins






;Language switching is a bit beyond an example package such as this.  The PortableApps.com Launcher does support automatic language switching with the platform but it is not required for portable apps.
;Details: http://portableapps.com/manuals/PortableApps.comLauncher/ref/launcher.ini/language.html

;[Language]
;Base=%PortableApps.comLanguageCode%
;CheckIfExists=%PAL:AppDir%\Languages\%PAL:LanguageCustom%.locale
;DefaultIfNotExists=en

;[LanguageStrings]
;ar-sa=ar

;[LanguageFile]
;Type=INI
;File=%PAL:DataDir%\settings\appnameportableexample.config
;Section=Language
;Key=Language

;Lastly, we'd need to save our changes to the language setting back to the configuration file

;[FileWrite8]
;Type=INI
;File=%PAL:DataDir%\settings\appnameportableexample.config
;Section=Language
;Key=Language
;Value=%PAL:LanguageCustom%