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

[Activate]
Registry=true

[FilesMove]
settings\librecad.alias=%LOCALAPPDATA%\LibreCAD

[DirectoriesCleanupIfEmpty]
1=%LOCALAPPDATA%\LibreCAD

[RegistryKeys]
LibreCADPortable=HKCU\Software\LibreCAD

[RegistryValueBackupDelete]
1=HKCU\Software\QtProject\OrganizationDefaults\Qt\filedialog

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

[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\com.trolltech.Qt.QTextCodecFactoryInterface:
5=Qt Factory Cache 4.8
6=Qt Plugin Cache 4.8.false

[FileWrite1]
File=%PAL:DataDir%\settings\LibreCADPortable.reg
Type=INI
Section=HKEY_CURRENT_USER\Software\LibreCAD
Key='@'
Value='"%PAL:AppDir:DoubleBackslash%\\LibreCAD"'

[FileWrite2]
File=%PAL:DataDir%\settings\LibreCADPortable.reg
Type=INI
Section=HKEY_CURRENT_USER\Software\LibreCAD\/LibreCAD\Paths
Key='"Translations"'
Value='"%PAL:AppDir:DoubleBackslash%\\LibreCAD\\resources\\qm"'

[FileWrite3]
File=%PAL:DataDir%\settings\LibreCADPortable.reg
Type=INI
Section=HKEY_CURRENT_USER\Software\LibreCAD\/LibreCAD\Paths
Key='"Patterns"'
Value='"%PAL:AppDir:DoubleBackslash%\\LibreCAD\\resources\\patterns"'

[FileWrite4]
File=%PAL:DataDir%\settings\LibreCADPortable.reg
Type=INI
Section=HKEY_CURRENT_USER\Software\LibreCAD\/LibreCAD\Paths
Key='"Fonts"'
Value='"%PAL:AppDir:DoubleBackslash%\\LibreCAD\\resources\\fonts"'

[FileWrite5]
File=%PAL:DataDir%\settings\LibreCADPortable.reg
Type=INI
Section=HKEY_CURRENT_USER\Software\LibreCAD\/LibreCAD\Paths
Key='"Scripts"'
Value='"%PAL:AppDir:DoubleBackslash%\\LibreCAD\\resources\\doc"'

[FileWrite6]
File=%PAL:DataDir%\settings\LibreCADPortable.reg
Type=INI
Section=HKEY_CURRENT_USER\Software\LibreCAD\/LibreCAD\Paths
Key='"Library"'
Value='"%PAL:AppDir:DoubleBackslash%\\LibreCAD\\resources\\library"'

[FileWrite7]
File=%PAL:DataDir%\settings\LibreCADPortable.reg
Type=Replace
Find=DEFAULTSAVEPATHREPLACETHIS
Replace=%PortableApps.comDocuments:ForwardSlash%

[FileWrite7]
Type=Replace
File=%PAL:DataDir%\settings\LibreCADPortable.reg
Find=="%PAL:LastDrive%%PAL:LastPackagePartialDir:Forwardslash%/
Replace=="%PAL:Drive%%PAL:PackagePartialDir:Forwardslash%/

[FileWrite8]
Type=Replace
File=%PAL:DataDir%\settings\LibreCADPortable.reg
Find=="%PAL:LastPortableAppsBaseDir:Forwardslash%/
Replace=="%PAL:PortableAppsBaseDir:Forwardslash%/

[FileWrite9]
Type=Replace
File=%PAL:DataDir%\settings\LibreCADPortable.reg
Find=="%PAL:LastDrive%/
Replace=="%PAL:Drive%/
