[Launch]
ProgramExecutable=XnViewMP\xnviewmp.exe
WorkingDirectory=%PAL:AppDir%\XnViewMP
DirectoryMoveOK=yes
SupportsUNC=yes

[Activate]
Ghostscript=find
Registry=true

[Environment]
GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
XNVIEW_GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
XNVIEW_GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts

[FilesMove]
xnview.ini=%PAL:AppDir%\XnViewMP
*.db=%PAL:AppDir%\XnViewMP

[DirectoriesMove]
cache=%PAL:AppDir%\XnViewMP\cache

[Language]
Base=%PortableApps.comLocaleCode2%
CheckIfExists=%PAL:AppDir%\XnViewMP\language\xnview_%PAL:LanguageCustom%.qm
DefaultIfNotExists=en

[LanguageFile]
Type=INI
File=%PAL:DataDir%\xnview.ini
Section=Start
Key=Language

[FileWrite1]
Type=Replace
File=%PAL:DataDir%\xnview.ini
Find=DEFAULTXNVIEWPICTURESDIRECTORY
Replace=%PortableApps.comPictures:ForwardSlash%/

[FileWrite2]
Type=Replace
File=%PAL:DataDir%\xnview.ini
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir:ForwardSlash%/
Replace=%PAL:Drive%%PAL:PackagePartialDir:ForwardSlash%/

[FileWrite3]
Type=Replace
File=%PAL:DataDir%\xnview.ini
Find=%PAL:LastDrive%%PAL:LastPortableAppsBaseDir:ForwardSlash%/
Replace=%PAL:Drive%%PAL:PortableAppsBaseDir:ForwardSlash%/

[FileWrite4]
Type=Replace
File=%PAL:DataDir%\xnview.ini
Find=%PAL:LastDrive%/
Replace=%PAL:Drive%/

[FileWrite5]
Type=Replace
File=%PAL:DataDir%\bookmarks.ini
Find=%PAL:LastDrive%\
Replace=%PAL:Drive%\

;[FileWrite3]
;Type=INI
;File=%PAL:DataDir%\xnview.ini
;Section=Start
;Key=CustomIniPathFolder
;Value=%PAL:DataDir:ForwardSlash%

[FileWrite6]
Type=INI
File=%PAL:DataDir%\xnview.ini
Section=Start
Key=Language
Value=%PAL:LanguageCustom%
