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

[Activate]
Registry=true

[RegistryKeys]
Caesium=HKCU\Software\SaeraSoft\Caesium Image Compressor
QtFileDialog=HKCU\Software\QtProject\OrganizationDefaults\FileDialog

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

[DirectoriesMove]
CaesiumData=%APPDATA%\SaeraSoft\Caesium Image Compressor

[DirectoriesCleanupIfEmpty]
1=%APPDATA%\SaeraSoft

[FileWrite1]
Type=Replace
File=%PAL:DataDir%\settings\Caesium.reg
Find=%PAL:LastPackagePartialDir:DoubleBackslash%\\
Replace=%PAL:PackagePartialDir:DoubleBackslash%\\

[FileWrite2]
Type=Replace
File=%PAL:DataDir%\settings\Caesium.reg
Find=%PAL:LastPortableAppsBaseDir:DoubleBackslash%\\
Replace=%PAL:LastPortableAppsBaseDir:DoubleBackslash%\\

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

[FileWrite4]
Type=Replace
File=%PAL:DataDir%\settings\Caesium.reg
Find=%PAL:LastPackagePartialDir:ForwardSlash%/
Replace=%PAL:PackagePartialDir:ForwardSlash%/

[FileWrite5]
Type=Replace
File=%PAL:DataDir%\settings\Caesium.reg
Find=%PAL:LastPortableAppsBaseDir:ForwardSlash%/
Replace=%PAL:LastPortableAppsBaseDir:ForwardSlash%/

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

[FileWrite7]
Type=Replace
File=%PAL:DataDir%\settings\Caesium.reg
Find=@PLACEHOLDER_PICTURESFORWARDSLASH@
Replace=%PortableApps.comPictures:ForwardSlash%/

[FileWrite8]
Type=Replace
File=%PAL:DataDir%\settings\QtFileDialog.reg
Find=@PLACEHOLDER_PICTURESFORWARDSLASH@
Replace=%PortableApps.comPictures:ForwardSlash%/

[FileWrite9]
Type=INI
File=%PAL:DataDir%\settings\Caesium.reg
Section="HKEY_CURRENT_USER\Software\SaeraSoft\Caesium Image Compressor\preferences\general"
Key='"check_updates_at_startup"'
Value='"false"'
