[Launch]
ProgramExecutable=Pencil2D\Pencil2D.exe
DirectoryMoveOK=yes
SupportsUNC=yes
MinOS=7

[Activate]
Registry=true

[RegistryKeys]
Pencil2D=HKCU\Software\Pencil\Pencil

[RegistryCleanupIfEmpty]
1=HKCU\Software\Pencil

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

[FileWrite2]
Type=Replace
File=%PAL:DataDir%\settings\Pencil2D.reg
Find=%PAL:LastDrive%%PAL:LastPortableAppsBaseDir:DoubleBackslash%\\
Replace=%PAL:Drive%%PAL:PortableAppsBaseDir:DoubleBackslash%\\

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

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

[FileWrite5]
Type=Replace
File=%PAL:DataDir%\settings\Pencil2D.reg
Find=%PAL:LastDrive%%PAL:LastPortableAppsBaseDir:ForwardSlash%/
Replace=%PAL:Drive%%PAL:PortableAppsBaseDir:ForwardSlash%/

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

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