[Launch]
ProgramExecutable=Sigil\Sigil.exe
SingleAppInstance=true
DirectoryMoveOK=yes
SupportsUNC=yes
MinOS=7

[Environment]
SIGIL_PREFS_DIR=%PAL:DataDir%\SigilSettings\sigil

[Activate]
Registry=true

[RegistryKeys]
SigilPortable=HKCU\Software\Strahinja Markovic\Sigil

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

[RegistryCleanupIfEmpty]
1=HKCU\Software\Strahinja Markovic
2=HKCU\Software\QtProject\OrganizationDefaults\Qt
3=HKCU\Software\QtProject\OrganizationDefaults
4=HKCU\Software\QtProject

[DirectoriesMove]
SigilLocalData=%LOCALAPPDATA%\sigil-ebook

[FileWrite1]
Type=Replace
File=%PAL:DataDir%\SigilSettings\sigil\sigil.ini
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir:DoubleBackslash%\\
Replace=%PAL:Drive%%PAL:PackagePartialDir:DoubleBackslash%\\

[FileWrite2]
Type=Replace
File=%PAL:DataDir%\SigilSettings\sigil\sigil.ini
Find=%PAL:LastPortableAppsBaseDir:DoubleBackslash%\\
Replace=%PAL:PortableAppsBaseDir:DoubleBackslash%\\

[FileWrite3]
Type=Replace
File=%PAL:DataDir%\SigilSettings\sigil\sigil.ini
Find=%PAL:LastDrive%\\
Replace=%PAL:Drive%\\

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

[FileWrite5]
Type=Replace
File=%PAL:DataDir%\SigilSettings\sigil\sigil.ini
Find=%PAL:LastPortableAppsBaseDir:ForwardSlash%/
Replace=%PAL:PortableAppsBaseDir:ForwardSlash%/

[FileWrite6]
Type=Replace
File=%PAL:DataDir%\SigilSettings\sigil\sigil.ini
Find=%PAL:LastDrive%/
Replace=%PAL:Drive%/

[FileWrite7]
Type=Replace
File=%PAL:DataDir%\SigilSettings\sigil\sigil.ini
Find=DEFAULTFOLDERREPLACEME
Replace=%CustomPortableApps.comBooksForwardSlash%

[FileWrite8]
Type=INI
File=%PAL:DataDir%\SigilSettings\sigil\sigil.ini
Section=user_preferences
Key=ui_language
Value=%PAL:LanguageCustom%

;[FileWrite9]
;Type=ConfigWrite
;File=%PAL:AppDir%\Sigil\python3\pyvenv.cfg
;Entry='home'
;Value=' = %PAL:AppDir%\Sigil\python3'

[Language]
Base=%PortableApps.comLocaleglibc%
CheckIfExists=%PAL:AppDir%\Sigil\translations\sigil_%PAL:LanguageCustom%.qm
DefaultIfNotExists=en

[LanguageStrings]
ca=ca
cs=cs
da=da_DK
de=de
el=el_GR
en_US=en
es=es
fi=fi
fr=fr
gl=gl
hu=hu_HU
id=id_ID
it=it
ja=ja
ko=ko
lv=lv_LV
nl=nl
pl=pl
pt=pt
pt_BR=pt_BR
ro=ro_RO
ru=ru
sk=sk
tr=tr_TR
uk=uk
vi=vi
zh_CN=zh_CN
zh_TW=zh_TW

[LanguageFile]
Type=INI
File=%PAL:DataDir%\SigilSettings\sigil\sigil.ini
Section=user_preferences
Key=ui_language
