[Launch]
ProgramExecutable=Scribus\Scribus.exe
DirectoryMoveOK=yes
SupportsUNC=yes

[Activate]
Registry=true
XML=true
Ghostscript=find

[DirectoriesMove]
Scribus=%APPDATA%\Scribus

[QtKeysCleanup]
1=Qt Factory Cache 4.8\com.QtProject.Qt.QImageIOHandlerFactoryInterface:
2=Qt Factory Cache 4.8\com.QtProject.Qt.QIconEngineFactoryInterface:
3=Qt Factory Cache 4.8\com.QtProject.Qt.QIconEngineFactoryInterfaceV2:
4=Qt Plugin Cache 4.8.false

[RegistryValueBackupDelete]
;1=HKCU\Software\QtProject\OrganizationDefaults\filedialog
1=HKCU\Software\QtProject\OrganizationDefaults\customColors

[RegistryKeys]
-=HKCU\Software\QtProject\OrganizationDefaults\filedialog

[RegistryCleanupIfEmpty]
1=HKCU\Software\QtProject\OrganizationDefaults
2=HKCU\Software\QtProject

[FileWrite1]
File=%PAL:DataDir%\Scribus\scribus150.rc
Type=Replace
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir:ForwardSlash%/
Replace=%PAL:Drive%%PAL:PackagePartialDir:ForwardSlash%/

[FileWrite2]
File=%PAL:DataDir%\Scribus\scribus150.rc
Type=Replace
Find=%PAL:LastPortableAppsBaseDir:ForwardSlash%/
Replace=%PAL:PortableAppsBaseDir:ForwardSlash%/

[FileWrite3]
File=%PAL:DataDir%\Scribus\scribus150.rc
Type=Replace
Find=%PAL:LastDrive%/
Replace=%PAL:Drive%/

[FileWrite4]
File=%PAL:DataDir%\Scribus\prefs150.xml
Type=Replace
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir:ForwardSlash%/
Replace=%PAL:Drive%%PAL:PackagePartialDir:ForwardSlash%/

[FileWrite5]
File=%PAL:DataDir%\Scribus\prefs150.xml
Type=Replace
Find=%PAL:LastPortableAppsBaseDir:ForwardSlash%/
Replace=%PAL:PortableAppsBaseDir:ForwardSlash%/

[FileWrite6]
File=%PAL:DataDir%\Scribus\prefs150.xml
Type=Replace
Find=%PAL:LastDrive%/
Replace=%PAL:Drive%/

[FileWrite7]
File=%PAL:DataDir%\Scribus\checkfonts.xml
Type=Replace
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir:ForwardSlash%/
Replace=%PAL:Drive%%PAL:PackagePartialDir:ForwardSlash%/

[FileWrite8]
File=%PAL:DataDir%\Scribus\checkfonts.xml
Type=Replace
Find=%PAL:LastPortableAppsBaseDir:ForwardSlash%/
Replace=%PAL:PortableAppsBaseDir:ForwardSlash%/

[FileWrite9]
File=%PAL:DataDir%\Scribus\checkfonts.xml
Type=Replace
Find=%PAL:LastDrive%/
Replace=%PAL:Drive%/

[FileWrite10]
File=%PAL:DataDir%\Scribus\scribus150.rc
Type=XML Attribute
XPath=/SCRIBUSRC/ExternalTools
Attribute=Ghostscript
Value=%GS_PROG%

[FileWrite11]
File=%PAL:DataDir%\Scribus\prefs150.xml
Type=XML text
Value=%PAL:PortableAppsDir:ForwardSlash%/PortableApps.com/Data/Fonts
XPath=/preferences/level[@name="application"]/context[@name="Fonts"]/table[@name="ExtraFontDirs"]/row[@index="0"]/col[@index="0"]

[FileWrite12]
File=%PAL:DataDir%\Scribus\prefs150.xml
Type=XML Attribute
XPath=/preferences/level[@name="application"]/context[@name="user_preferences"]/attribute[@key="gui_language"]
Attribute=value
Value=%PAL:LanguageCustom%

[FileWrite13]
File=%PAL:DataDir%\Scribus\checkfonts.xml
Type=Replace
Find=DEFAULTSCRIBUSPORTABLEPATH
Replace=%PAL:AppDir:ForwardSlash%/Scribus

[FileWrite14]
File=%PAL:DataDir%\Scribus\scribus150.rc
Type=Replace
Find=DEFAULTSCRIBUSPORTABLEPATH
Replace=%PAL:AppDir%/Scribus

[FileWrite15]
File=%PAL:DataDir%\Scribus\scribus150.rc
Type=Replace
Find=DEFAULTSCRIBUSPORTABLEDATAPATH
Replace=%PAL:DataDir:ForwardSlash%

[FileWrite16]
File=%PAL:DataDir%\Scribus\scribus150.rc
Type=Replace
Find=DEFAULTPORTABLEDOCUMENTSPATH
Replace=%PortableApps.comDocuments%

[FileWrite17]
File=%PAL:DataDir%\Scribus\scribus150.rc
Type=Replace
Find=DEFAULTPORTABLEAPPSPATH
Replace=%PAL:PortableAppsDir:ForwardSlash%

[Language]
Base=%PortableApps.comLocaleglibc%
CheckIfExists=%PAL:AppDir%\Scribus\share\translations\scribus.%PAL:LanguageCustom%.qm
DefaultIfNotExists=en_US

[LanguageStrings]
cs_CZ=cs
da_DK=da
de_1901=de
de_CH=de
de_OL=de
en_AU=en_US
en_GB=en_US
es_ES=es
es_LA=es
lt=lt_LT
nb_NO=nb
pl_PL=pl
sk_SK=sk

[LanguageFile]
File=%PAL:DataDir%\Scribus\prefs150.xml
Type=XML attribute
XPath=/preferences/level[@name="application"]/context[@name="user_preferences"]/attribute[@key="gui_language"]
Attribute=value
;SaveAs=%PAL:LanguageCustom%