<Symbol>!</Symbol><Keyword>ifndef</Keyword><Normal Text> KRITA_INSTALLER_32 </Normal Text><Symbol>&</Symbol><Normal Text> KRITA_INSTALLER_64</Normal Text><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>error</Keyword><Normal Text> </Normal Text><String>"Either one of KRITA_INSTALLER_32 or KRITA_INSTALLER_64 must be defined."</String><br/>
<Symbol>!</Symbol><Keyword>endif</Keyword><br/>
<Symbol>!</Symbol><Keyword>ifdef</Keyword><Normal Text> KRITA_INSTALLER_32 </Normal Text><Symbol>&</Symbol><Normal Text> KRITA_INSTALLER_64</Normal Text><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>error</Keyword><Normal Text> </Normal Text><String>"Only one of KRITA_INSTALLER_32 or KRITA_INSTALLER_64 should be defined."</String><br/>
<Symbol>!</Symbol><Keyword>endif</Keyword><br/>
<Normal Text></Normal Text><br/>
<Symbol>!</Symbol><Keyword>ifndef</Keyword><Normal Text> KRITA_PACKAGE_ROOT</Normal Text><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>error</Keyword><Normal Text> </Normal Text><String>"KRITA_PACKAGE_ROOT should be defined and point to the root of the package files."</String><br/>
<Symbol>!</Symbol><Keyword>endif</Keyword><br/>
<Normal Text></Normal Text><br/>
<Symbol>!</Symbol><Keyword>ifdef</Keyword><Normal Text> KRITA_INSTALLER_64</Normal Text><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> KRITA_INSTALLER_BITNESS 64</Normal Text><br/>
<Symbol>!</Symbol><Keyword>else</Keyword><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> KRITA_INSTALLER_BITNESS 32</Normal Text><br/>
<Symbol>!</Symbol><Keyword>endif</Keyword><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Unicode</BaseFunc><Normal Text> true</Normal Text><br/>
<Normal Text># Enabling DPI awareness creates awful CJK text in some sizes</Normal Text><Symbol>,</Symbol><Normal Text> so don't enable it.</Normal Text><br/>
<BaseFunc>ManifestDPIAware</BaseFunc><Normal Text> false</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text># Krita constants </Normal Text><Symbol>(</Symbol><Normal Text>can be overridden in command line params</Normal Text><Symbol>)</Symbol><br/>
<Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> /</Normal Text><Keyword>ifndef</Keyword><Normal Text> KRITA_VERSION </Normal Text><String>"0.0.0.0"</String><br/>
<Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> /</Normal Text><Keyword>ifndef</Keyword><Normal Text> KRITA_VERSION_DISPLAY </Normal Text><String>"test-version"</String><br/>
<Normal Text>#</Normal Text><Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> /</Normal Text><Keyword>ifndef</Keyword><Normal Text> KRITA_VERSION_GIT </Normal Text><String>""</String><br/>
<Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> /</Normal Text><Keyword>ifndef</Keyword><Normal Text> KRITA_INSTALLER_OUTPUT_DIR </Normal Text><String>""</String><br/>
<Symbol>!</Symbol><Keyword>ifdef</Keyword><Normal Text> KRITA_INSTALLER_64</Normal Text><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> /</Normal Text><Keyword>ifndef</Keyword><Normal Text> KRITA_INSTALLER_OUTPUT_NAME </Normal Text><String>"krita_x64_setup.exe"</String><br/>
<Symbol>!</Symbol><Keyword>else</Keyword><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> /</Normal Text><Keyword>ifndef</Keyword><Normal Text> KRITA_INSTALLER_OUTPUT_NAME </Normal Text><String>"krita_x86_setup.exe"</String><br/>
<Symbol>!</Symbol><Keyword>endif</Keyword><br/>
<Normal Text></Normal Text><br/>
<Normal Text># Krita constants </Normal Text><Symbol>(</Symbol><Normal Text>fixed</Normal Text><Symbol>)</Symbol><br/>
<Symbol>!</Symbol><Keyword>if</Keyword><Normal Text> </Normal Text><String>"${KRITA_INSTALLER_OUTPUT_DIR}"</String><Normal Text> </Normal Text><Symbol>==</Symbol><Normal Text> </Normal Text><String>""</String><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> KRITA_INSTALLER_OUTPUT </Normal Text><String>"${KRITA_INSTALLER_OUTPUT_NAME}"</String><br/>
<Symbol>!</Symbol><Keyword>else</Keyword><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> KRITA_INSTALLER_OUTPUT </Normal Text><String>"${KRITA_INSTALLER_OUTPUT_DIR}\${KRITA_INSTALLER_OUTPUT_NAME}"</String><br/>
<Symbol>!</Symbol><Keyword>endif</Keyword><br/>
<Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> KRTIA_PUBLISHER </Normal Text><String>"Krita Foundation"</String><br/>
<Symbol>!</Symbol><Keyword>ifdef</Keyword><Normal Text> KRITA_INSTALLER_64</Normal Text><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> KRITA_PRODUCTNAME </Normal Text><String>"Krita (x64)"</String><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> KRITA_UNINSTALL_REGKEY </Normal Text><String>"Krita_x64"</String><br/>
<Symbol>!</Symbol><Keyword>else</Keyword><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> KRITA_PRODUCTNAME </Normal Text><String>"Krita (x86)"</String><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> KRITA_UNINSTALL_REGKEY </Normal Text><String>"Krita_x86"</String><br/>
<Symbol>!</Symbol><Keyword>endif</Keyword><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>VIProductVersion</BaseFunc><Normal Text> </Normal Text><String>"${KRITA_VERSION}"</String><br/>
<BaseFunc>VIAddVersionKey</BaseFunc><Normal Text> </Normal Text><String>"CompanyName"</String><Normal Text> </Normal Text><String>"${KRTIA_PUBLISHER}"</String><br/>
<BaseFunc>VIAddVersionKey</BaseFunc><Normal Text> </Normal Text><String>"FileDescription"</String><Normal Text> </Normal Text><String>"${KRITA_PRODUCTNAME} ${KRITA_VERSION_DISPLAY} Setup"</String><br/>
<BaseFunc>VIAddVersionKey</BaseFunc><Normal Text> </Normal Text><String>"FileVersion"</String><Normal Text> </Normal Text><String>"${KRITA_VERSION}"</String><br/>
<BaseFunc>VIAddVersionKey</BaseFunc><Normal Text> </Normal Text><String>"InternalName"</String><Normal Text> </Normal Text><String>"${KRITA_INSTALLER_OUTPUT_NAME}"</String><br/>
<BaseFunc>VIAddVersionKey</BaseFunc><Normal Text> </Normal Text><String>"LegalCopyright"</String><Normal Text> </Normal Text><String>"${KRTIA_PUBLISHER}"</String><br/>
<BaseFunc>VIAddVersionKey</BaseFunc><Normal Text> </Normal Text><String>"OriginalFileName"</String><Normal Text> </Normal Text><String>"${KRITA_INSTALLER_OUTPUT_NAME}"</String><br/>
<BaseFunc>VIAddVersionKey</BaseFunc><Normal Text> </Normal Text><String>"ProductName"</String><Normal Text> </Normal Text><String>"${KRITA_PRODUCTNAME} ${KRITA_VERSION_DISPLAY} Setup"</String><br/>
<BaseFunc>VIAddVersionKey</BaseFunc><Normal Text> </Normal Text><String>"ProductVersion"</String><Normal Text> </Normal Text><String>"${KRITA_VERSION}"</String><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>BrandingText</BaseFunc><Normal Text> </Normal Text><String>"[NSIS ${NSIS_VERSION}]  ${KRITA_PRODUCTNAME} ${KRITA_VERSION}"</String><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Name</BaseFunc><Normal Text> </Normal Text><String>"${KRITA_PRODUCTNAME} ${KRITA_VERSION_DISPLAY}"</String><br/>
<BaseFunc>OutFile</BaseFunc><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>KRITA_INSTALLER_OUTPUT</Normal Text><Symbol>}</Symbol><br/>
<Symbol>!</Symbol><Keyword>ifdef</Keyword><Normal Text> KRITA_INSTALLER_64</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>InstallDir</BaseFunc><Normal Text> </Normal Text><String>"$PROGRAMFILES64\Krita (x64)"</String><br/>
<Symbol>!</Symbol><Keyword>else</Keyword><br/>
<Normal Text>	</Normal Text><BaseFunc>InstallDir</BaseFunc><Normal Text> </Normal Text><String>"$PROGRAMFILES32\Krita (x86)"</String><br/>
<Symbol>!</Symbol><Keyword>endif</Keyword><br/>
<Normal Text>XPstyle on</Normal Text><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>ShowInstDetails</BaseFunc><Normal Text> show</Normal Text><br/>
<BaseFunc>ShowUninstDetails</BaseFunc><Normal Text> show</Normal Text><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Var</BaseFunc><Normal Text> KritaStartMenuFolder</Normal Text><br/>
<BaseFunc>Var</BaseFunc><Normal Text> CreateDesktopIcon</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Symbol>!</Symbol><Keyword>include</Keyword><Normal Text> MUI2.nsh</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> </Normal Text><Macro>MUI_FINISHPAGE_NOAUTOCLOSE</Macro><br/>
<Normal Text></Normal Text><br/>
<Normal Text># Installer Pages</Normal Text><br/>
<Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> </Normal Text><Macro>MUI_PAGE_WELCOME</Macro><br/>
<Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> </Normal Text><Macro>MUI_LICENSEPAGE_CHECKBOX</Macro><br/>
<Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> </Normal Text><Macro>MUI_PAGE_LICENSE</Macro><Normal Text> </Normal Text><String>"license_gpl-3.0.rtf"</String><br/>
<Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> </Normal Text><Macro>MUI_PAGE_DIRECTORY</Macro><br/>
<Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> </Normal Text><Macro>MUI_PAGE_COMPONENTS</Macro><br/>
<Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> </Normal Text><Macro>MUI_PAGE_CUSTOMFUNCTION_PRE</Macro><Normal Text>  func_ShellExLicensePage_Init</Normal Text><br/>
<Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> </Normal Text><Macro>MUI_PAGE_HEADER_TEXT</Macro><Normal Text> </Normal Text><String>"$(ShellExLicensePageHeader)"</String><br/>
<Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> </Normal Text><Macro>MUI_PAGE_LICENSE</Macro><Normal Text> </Normal Text><String>"license.rtf"</String><br/>
<Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> </Normal Text><Macro>MUI_STARTMENUPAGE_DEFAULTFOLDER</Macro><Normal Text> </Normal Text><String>"Krita"</String><br/>
<Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> </Normal Text><Macro>MUI_STARTMENUPAGE_REGISTRY_ROOT</Macro><Normal Text> HKLM</Normal Text><br/>
<Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> </Normal Text><Macro>MUI_STARTMENUPAGE_REGISTRY_KEY</Macro><Normal Text> </Normal Text><String>"Software\Krita"</String><br/>
<Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> </Normal Text><Macro>MUI_STARTMENUPAGE_REGISTRY_VALUENAME</Macro><Normal Text> </Normal Text><String>"StartMenuFolder"</String><br/>
<Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> </Normal Text><Macro>MUI_STARTMENUPAGE_NODISABLE</Macro><br/>
<Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> </Normal Text><Macro>MUI_PAGE_STARTMENU</Macro><Normal Text> Krita $KritaStartMenuFolder</Normal Text><br/>
<BaseFunc>Page</BaseFunc><Normal Text> Custom func_BeforeInstallPage_Init</Normal Text><br/>
<Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> </Normal Text><Macro>MUI_PAGE_INSTFILES</Macro><br/>
<Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> </Normal Text><Macro>MUI_PAGE_FINISH</Macro><br/>
<Normal Text></Normal Text><br/>
<Normal Text># Uninstaller Pages</Normal Text><br/>
<Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> </Normal Text><Macro>MUI_PAGE_CUSTOMFUNCTION_PRE</Macro><Normal Text> un.func_UnintallFirstpage_Init</Normal Text><br/>
<Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> </Normal Text><Macro>MUI_UNPAGE_CONFIRM</Macro><br/>
<Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> </Normal Text><Macro>MUI_UNPAGE_INSTFILES</Macro><br/>
<Normal Text></Normal Text><br/>
<Normal Text># Languages</Normal Text><br/>
<Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> </Normal Text><Macro>MUI_LANGUAGE</Macro><Normal Text> </Normal Text><String>"English"</String><br/>
<Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> </Normal Text><Macro>MUI_LANGUAGE</Macro><Normal Text> </Normal Text><String>"TradChinese"</String><br/>
<Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> </Normal Text><Macro>MUI_LANGUAGE</Macro><Normal Text> </Normal Text><String>"SimpChinese"</String><br/>
<Normal Text></Normal Text><br/>
<Symbol>!</Symbol><Keyword>include</Keyword><Normal Text> Sections.nsh</Normal Text><br/>
<Symbol>!</Symbol><Keyword>include</Keyword><Normal Text> LogicLib.nsh</Normal Text><br/>
<Symbol>!</Symbol><Keyword>include</Keyword><Normal Text> x64.nsh</Normal Text><br/>
<Symbol>!</Symbol><Keyword>include</Keyword><Normal Text> WinVer.nsh</Normal Text><br/>
<Symbol>!</Symbol><Keyword>include</Keyword><Normal Text> WordFunc.nsh</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Symbol>!</Symbol><Keyword>define</Keyword><Normal Text> KRITA_SHELLEX_DIR </Normal Text><String>"$INSTDIR\shellex"</String><br/>
<Normal Text></Normal Text><br/>
<Symbol>!</Symbol><Keyword>include</Keyword><Normal Text> </Normal Text><String>"include\FileExists2.nsh"</String><br/>
<Symbol>!</Symbol><Keyword>include</Keyword><Normal Text> </Normal Text><String>"include\IsFileInUse.nsh"</String><br/>
<Symbol>!</Symbol><Keyword>include</Keyword><Normal Text> </Normal Text><String>"krita_versions_detect.nsh"</String><br/>
<Symbol>!</Symbol><Keyword>include</Keyword><Normal Text> </Normal Text><String>"krita_shell_integration.nsh"</String><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Var</BaseFunc><Normal Text> KritaMsiProductX86</Normal Text><br/>
<BaseFunc>Var</BaseFunc><Normal Text> KritaMsiProductX64</Normal Text><br/>
<BaseFunc>Var</BaseFunc><Normal Text> KritaNsisVersion</Normal Text><br/>
<BaseFunc>Var</BaseFunc><Normal Text> KritaNsisBitness</Normal Text><br/>
<BaseFunc>Var</BaseFunc><Normal Text> KritaNsisInstallLocation</Normal Text><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Var</BaseFunc><Normal Text> PrevShellExInstallLocation</Normal Text><br/>
<BaseFunc>Var</BaseFunc><Normal Text> PrevShellExStandalone</Normal Text><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Var</BaseFunc><Normal Text> UninstallShellExStandalone</Normal Text><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Section</BaseFunc><Normal Text> </Normal Text><String>"-Remove_shellex"</String><Normal Text> SEC_remove_shellex</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $PrevShellExInstallLocation </Normal Text><Symbol>!=</Symbol><Normal Text> </Normal Text><String>""</String><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>AndIf</Macro><Symbol>}</Symbol><Normal Text> $PrevShellExStandalone </Normal Text><Symbol>==</Symbol><Normal Text> 1</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>AndIf</Macro><Symbol>}</Symbol><Normal Text> $KritaNsisVersion </Normal Text><Symbol>==</Symbol><Normal Text> </Normal Text><String>""</String><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>AndIf</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>FileExists</Normal Text><Symbol>}</Symbol><Normal Text> </Normal Text><String>"$PrevShellExInstallLocation\uninstall.exe"</String><br/>
<Normal Text>		push $R0</Normal Text><br/>
<Normal Text>		</Normal Text><BaseFunc>DetailPrint</BaseFunc><Normal Text> </Normal Text><String>"$(RemovingShellEx)"</String><br/>
<Normal Text>		</Normal Text><BaseFunc>SetDetailsPrint</BaseFunc><Normal Text> listonly</Normal Text><br/>
<Normal Text>		</Normal Text><BaseFunc>ExecWait</BaseFunc><Normal Text> </Normal Text><String>"$PrevShellExInstallLocation\uninstall.exe /S _?=$PrevShellExInstallLocation"</String><Normal Text> $R0</Normal Text><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $R0 </Normal Text><Symbol>!=</Symbol><Normal Text> 0</Normal Text><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Macro>IfNot</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>Silent</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>				</Normal Text><BaseFunc>MessageBox</BaseFunc><Normal Text> </Normal Text><Option>MB_OK</Option><Symbol>|</Symbol><Normal Text>MB_ICONSTOP </Normal Text><String>"$(RemoveShellExFailed)"</String><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>			</Normal Text><BaseFunc>SetDetailsPrint</BaseFunc><Normal Text> both</Normal Text><br/>
<Normal Text>			</Normal Text><BaseFunc>DetailPrint</BaseFunc><Normal Text> </Normal Text><String>"$(RemoveShellExFailed)"</String><br/>
<Normal Text>			</Normal Text><BaseFunc>Abort</BaseFunc><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>		</Normal Text><BaseFunc>Delete</BaseFunc><Normal Text> </Normal Text><String>"$PrevShellExInstallLocation\uninstall.exe"</String><br/>
<Normal Text>		</Normal Text><BaseFunc>RMDir</BaseFunc><Normal Text> /REBOOTOK </Normal Text><String>"$PrevShellExInstallLocation"</String><br/>
<Normal Text>		</Normal Text><BaseFunc>SetRebootFlag</BaseFunc><Normal Text> false</Normal Text><br/>
<Normal Text>		</Normal Text><BaseFunc>SetDetailsPrint</BaseFunc><Normal Text> lastused</Normal Text><br/>
<Normal Text>		</Normal Text><BaseFunc>DetailPrint</BaseFunc><Normal Text> </Normal Text><String>"$(RemoveShellExDone)"</String><br/>
<Normal Text>		pop $R0</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<BaseFunc>SectionEnd</BaseFunc><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Section</BaseFunc><Normal Text> </Normal Text><String>"$(SectionRemoveOldVer)"</String><Normal Text> SEC_remove_old_version</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $KritaNsisInstallLocation </Normal Text><Symbol>!=</Symbol><Normal Text> </Normal Text><String>""</String><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>AndIf</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>FileExists</Normal Text><Symbol>}</Symbol><Normal Text> </Normal Text><String>"$KritaNsisInstallLocation\uninstall.exe"</String><br/>
<Normal Text>		push $R0</Normal Text><br/>
<Normal Text>		</Normal Text><BaseFunc>DetailPrint</BaseFunc><Normal Text> </Normal Text><String>"$(RemovingOldVer)"</String><br/>
<Normal Text>		</Normal Text><BaseFunc>SetDetailsPrint</BaseFunc><Normal Text> listonly</Normal Text><br/>
<Normal Text>		</Normal Text><BaseFunc>ExecWait</BaseFunc><Normal Text> </Normal Text><String>"$KritaNsisInstallLocation\uninstall.exe /S _?=$KritaNsisInstallLocation"</String><Normal Text> $R0</Normal Text><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $R0 </Normal Text><Symbol>!=</Symbol><Normal Text> 0</Normal Text><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Macro>IfNot</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>Silent</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>				</Normal Text><BaseFunc>MessageBox</BaseFunc><Normal Text> </Normal Text><Option>MB_OK</Option><Symbol>|</Symbol><Normal Text>MB_ICONSTOP </Normal Text><String>"$(RemoveOldVerFailed)"</String><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>			</Normal Text><BaseFunc>SetDetailsPrint</BaseFunc><Normal Text> both</Normal Text><br/>
<Normal Text>			</Normal Text><BaseFunc>DetailPrint</BaseFunc><Normal Text> </Normal Text><String>"$(RemoveOldVerFailed)"</String><br/>
<Normal Text>			</Normal Text><BaseFunc>Abort</BaseFunc><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>		</Normal Text><BaseFunc>Delete</BaseFunc><Normal Text> </Normal Text><String>"$KritaNsisInstallLocation\uninstall.exe"</String><br/>
<Normal Text>		</Normal Text><BaseFunc>RMDir</BaseFunc><Normal Text> /REBOOTOK </Normal Text><String>"$KritaNsisInstallLocation"</String><br/>
<Normal Text>		</Normal Text><BaseFunc>SetRebootFlag</BaseFunc><Normal Text> false</Normal Text><br/>
<Normal Text>		</Normal Text><BaseFunc>SetDetailsPrint</BaseFunc><Normal Text> lastused</Normal Text><br/>
<Normal Text>		</Normal Text><BaseFunc>DetailPrint</BaseFunc><Normal Text> </Normal Text><String>"$(RemoveOldVerDone)"</String><br/>
<Normal Text>		pop $R0</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<BaseFunc>SectionEnd</BaseFunc><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Section</BaseFunc><Normal Text> </Normal Text><String>"-Thing"</String><br/>
<Normal Text>	</Normal Text><BaseFunc>SetOutPath</BaseFunc><Normal Text> $INSTDIR</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>WriteRegStr</BaseFunc><Normal Text> HKLM </Normal Text><String>"Software\Microsoft\Windows\CurrentVersion\Uninstall\${KRITA_UNINSTALL_REGKEY}"</String><Normal Text> \</Normal Text><br/>
<Normal Text>	                 </Normal Text><String>"DisplayName"</String><Normal Text> </Normal Text><String>"${KRITA_PRODUCTNAME} ${KRITA_VERSION_DISPLAY}"</String><br/>
<Normal Text>	</Normal Text><BaseFunc>WriteRegStr</BaseFunc><Normal Text> HKLM </Normal Text><String>"Software\Microsoft\Windows\CurrentVersion\Uninstall\${KRITA_UNINSTALL_REGKEY}"</String><Normal Text> \</Normal Text><br/>
<Normal Text>	                 </Normal Text><String>"UninstallString"</String><Normal Text> </Normal Text><String>"$\"</String><Normal Text>$INSTDIR\uninstall.exe$\</Normal Text><String>""</String><br/>
<Normal Text>	</Normal Text><BaseFunc>WriteUninstaller</BaseFunc><Normal Text> $INSTDIR\uninstall.exe</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>WriteRegStr</BaseFunc><Normal Text> HKLM </Normal Text><String>"Software\Microsoft\Windows\CurrentVersion\Uninstall\${KRITA_UNINSTALL_REGKEY}"</String><Normal Text> \</Normal Text><br/>
<Normal Text>	                 </Normal Text><String>"DisplayVersion"</String><Normal Text> </Normal Text><String>"${KRITA_VERSION}"</String><br/>
<Normal Text>	</Normal Text><BaseFunc>WriteRegStr</BaseFunc><Normal Text> HKLM </Normal Text><String>"Software\Microsoft\Windows\CurrentVersion\Uninstall\${KRITA_UNINSTALL_REGKEY}"</String><Normal Text> \</Normal Text><br/>
<Normal Text>	                 </Normal Text><String>"DisplayIcon"</String><Normal Text> </Normal Text><String>"$\"</String><Normal Text>$INSTDIR\shellex\krita.ico$\</Normal Text><String>",0"</String><br/>
<Normal Text>	</Normal Text><BaseFunc>WriteRegStr</BaseFunc><Normal Text> HKLM </Normal Text><String>"Software\Microsoft\Windows\CurrentVersion\Uninstall\${KRITA_UNINSTALL_REGKEY}"</String><Normal Text> \</Normal Text><br/>
<Normal Text>	                 </Normal Text><String>"URLInfoAbout"</String><Normal Text> </Normal Text><String>"https://krita.org/"</String><br/>
<Normal Text>	</Normal Text><BaseFunc>WriteRegStr</BaseFunc><Normal Text> HKLM </Normal Text><String>"Software\Microsoft\Windows\CurrentVersion\Uninstall\${KRITA_UNINSTALL_REGKEY}"</String><Normal Text> \</Normal Text><br/>
<Normal Text>	                 </Normal Text><String>"InstallLocation"</String><Normal Text> </Normal Text><String>"$INSTDIR"</String><br/>
<Normal Text>	</Normal Text><BaseFunc>WriteRegStr</BaseFunc><Normal Text> HKLM </Normal Text><String>"Software\Microsoft\Windows\CurrentVersion\Uninstall\${KRITA_UNINSTALL_REGKEY}"</String><Normal Text> \</Normal Text><br/>
<Normal Text>	                 </Normal Text><String>"Publisher"</String><Normal Text> </Normal Text><String>"${KRTIA_PUBLISHER}"</String><br/>
<Normal Text>	#WriteRegDWORD HKLM </Normal Text><String>"Software\Microsoft\Windows\CurrentVersion\Uninstall\${KRITA_UNINSTALL_REGKEY}"</String><Normal Text> \</Normal Text><br/>
<Normal Text>	#                   </Normal Text><String>"EstimatedSize"</String><Normal Text> 250000</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>WriteRegDWORD</BaseFunc><Normal Text> HKLM </Normal Text><String>"Software\Microsoft\Windows\CurrentVersion\Uninstall\${KRITA_UNINSTALL_REGKEY}"</String><Normal Text> \</Normal Text><br/>
<Normal Text>	                   </Normal Text><String>"NoModify"</String><Normal Text> 1</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>WriteRegDWORD</BaseFunc><Normal Text> HKLM </Normal Text><String>"Software\Microsoft\Windows\CurrentVersion\Uninstall\${KRITA_UNINSTALL_REGKEY}"</String><Normal Text> \</Normal Text><br/>
<Normal Text>	                   </Normal Text><String>"NoRepair"</String><Normal Text> 1</Normal Text><br/>
<Normal Text>	# Registry entries for version recognition</Normal Text><br/>
<Normal Text>	#   InstallLocation:</Normal Text><br/>
<Normal Text>	#     Where krita is installed</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>WriteRegStr</BaseFunc><Normal Text> HKLM </Normal Text><String>"Software\Krita"</String><Normal Text> \</Normal Text><br/>
<Normal Text>	                 </Normal Text><String>"InstallLocation"</String><Normal Text> </Normal Text><String>"$INSTDIR"</String><br/>
<Normal Text>	#   Version:</Normal Text><br/>
<Normal Text>	#     Version of Krita</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>WriteRegStr</BaseFunc><Normal Text> HKLM </Normal Text><String>"Software\Krita"</String><Normal Text> \</Normal Text><br/>
<Normal Text>	                 </Normal Text><String>"Version"</String><Normal Text> </Normal Text><String>"${KRITA_VERSION}"</String><br/>
<Normal Text>	#   x64:</Normal Text><br/>
<Normal Text>	#     Set to 1 for 64</Normal Text><Symbol>-</Symbol><Normal Text>bit Krita</Normal Text><Symbol>,</Symbol><Normal Text> can be missing for 32</Normal Text><Symbol>-</Symbol><Normal Text>bit Krita</Normal Text><br/>
<Symbol>!</Symbol><Keyword>ifdef</Keyword><Normal Text> KRITA_INSTALLER_64</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>WriteRegDWORD</BaseFunc><Normal Text> HKLM </Normal Text><String>"Software\Krita"</String><Normal Text> \</Normal Text><br/>
<Normal Text>	                   </Normal Text><String>"x64"</String><Normal Text> 1</Normal Text><br/>
<Symbol>!</Symbol><Keyword>else</Keyword><br/>
<Normal Text>	</Normal Text><BaseFunc>DeleteRegValue</BaseFunc><Normal Text> HKLM </Normal Text><String>"Software\Krita"</String><Normal Text> </Normal Text><String>"x64"</String><br/>
<Symbol>!</Symbol><Keyword>endif</Keyword><br/>
<Normal Text>	#   InstallerLanguage:</Normal Text><br/>
<Normal Text>	#     Language used by the installer </Normal Text><Symbol>(</Symbol><Normal Text>to be re</Normal Text><Symbol>-</Symbol><Normal Text>used for the uninstaller</Normal Text><Symbol>)</Symbol><br/>
<Normal Text>	</Normal Text><BaseFunc>WriteRegStr</BaseFunc><Normal Text> HKLM </Normal Text><String>"Software\Krita"</String><Normal Text> \</Normal Text><br/>
<Normal Text>	                 </Normal Text><String>"InstallerLanguage"</String><Normal Text> </Normal Text><String>"$LANGUAGE"</String><br/>
<Normal Text>	#   StartMenuFolder:</Normal Text><br/>
<Normal Text>	#     Start Menu Folder</Normal Text><br/>
<Normal Text>	#     Handled by Modern UI 2.0 </Normal Text><Macro>MUI_PAGE_STARTMENU</Macro><br/>
<BaseFunc>SectionEnd</BaseFunc><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Section</BaseFunc><Normal Text> </Normal Text><String>"${KRITA_PRODUCTNAME}"</String><Normal Text> SEC_product_main</Normal Text><br/>
<Normal Text>	# TODO: Maybe switch to explicit file list</Normal Text><Symbol>?</Symbol><br/>
<Normal Text>	</Normal Text><BaseFunc>File</BaseFunc><Normal Text> /r /x ffmpeg.exe /x ffmpeg_README.txt /x ffmpeg_LICENSE.txt $</Normal Text><Symbol>{</Symbol><Normal Text>KRITA_PACKAGE_ROOT</Normal Text><Symbol>}</Symbol><Normal Text>\bin</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>File</BaseFunc><Normal Text> /r $</Normal Text><Symbol>{</Symbol><Normal Text>KRITA_PACKAGE_ROOT</Normal Text><Symbol>}</Symbol><Normal Text>\lib</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>File</BaseFunc><Normal Text> /r $</Normal Text><Symbol>{</Symbol><Normal Text>KRITA_PACKAGE_ROOT</Normal Text><Symbol>}</Symbol><Normal Text>\share</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>File</BaseFunc><Normal Text> /r $</Normal Text><Symbol>{</Symbol><Normal Text>KRITA_PACKAGE_ROOT</Normal Text><Symbol>}</Symbol><Normal Text>\python</Normal Text><br/>
<BaseFunc>SectionEnd</BaseFunc><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Section</BaseFunc><Normal Text> </Normal Text><String>"-Main_associate"</String><br/>
<Normal Text>	</Normal Text><BaseFunc>CreateDirectory</BaseFunc><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>KRITA_SHELLEX_DIR</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Normal Text>Krita_RegisterFileAssociation</Normal Text><Symbol>}</Symbol><Normal Text> </Normal Text><String>"$INSTDIR\bin\krita.exe"</String><br/>
<BaseFunc>SectionEnd</BaseFunc><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Section</BaseFunc><Normal Text> </Normal Text><String>"-Main_Shortcuts"</String><br/>
<Normal Text>	# Placing this after Krita_RegisterFileAssociation to get the icon</Normal Text><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> </Normal Text><Macro>MUI_STARTMENU_WRITE_BEGIN</Macro><Normal Text> Krita</Normal Text><br/>
<Normal Text>		</Normal Text><BaseFunc>CreateDirectory</BaseFunc><Normal Text> </Normal Text><String>"$SMPROGRAMS\$KritaStartMenuFolder"</String><br/>
<Normal Text>		</Normal Text><BaseFunc>CreateShortcut</BaseFunc><Normal Text> </Normal Text><String>"$SMPROGRAMS\$KritaStartMenuFolder\${KRITA_PRODUCTNAME}.lnk"</String><Normal Text> </Normal Text><String>"$INSTDIR\bin\krita.exe"</String><Normal Text> </Normal Text><String>""</String><Normal Text> </Normal Text><String>"$INSTDIR\shellex\krita.ico"</String><Normal Text> 0</Normal Text><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> </Normal Text><Macro>MUI_STARTMENU_WRITE_END</Macro><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $CreateDesktopIcon </Normal Text><Symbol>==</Symbol><Normal Text> 1</Normal Text><br/>
<Normal Text>		# </Normal Text><Macro>For</Macro><Normal Text> the desktop icon</Normal Text><Symbol>,</Symbol><Normal Text> keep the name short and omit version info</Normal Text><br/>
<Normal Text>		</Normal Text><BaseFunc>CreateShortcut</BaseFunc><Normal Text> </Normal Text><String>"$DESKTOP\Krita.lnk"</String><Normal Text> </Normal Text><String>"$INSTDIR\bin\krita.exe"</String><Normal Text> </Normal Text><String>""</String><Normal Text> </Normal Text><String>"$INSTDIR\shellex\krita.ico"</String><Normal Text> 0</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<BaseFunc>SectionEnd</BaseFunc><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Section</BaseFunc><Normal Text> </Normal Text><String>"$(SectionShellEx)"</String><Normal Text> SEC_shellex</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>RunningX64</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Normal Text>Krita_RegisterComComonents</Normal Text><Symbol>}</Symbol><Normal Text> 64</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Normal Text>Krita_RegisterComComonents</Normal Text><Symbol>}</Symbol><Normal Text> 32</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Normal Text>Krita_RegisterShellExtension</Normal Text><Symbol>}</Symbol><br/>
<Normal Text></Normal Text><br/>
<Normal Text>	#   ShellExtension\InstallLocation:</Normal Text><br/>
<Normal Text>	#     Where the shell extension is installed</Normal Text><br/>
<Normal Text>	#     </Normal Text><Macro>If</Macro><Normal Text> installed by Krita installer</Normal Text><Symbol>,</Symbol><Normal Text> this must point to shellex sub</Normal Text><Symbol>-</Symbol><Normal Text>dir</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>WriteRegStr</BaseFunc><Normal Text> HKLM </Normal Text><String>"Software\Krita\ShellExtension"</String><Normal Text> \</Normal Text><br/>
<Normal Text>	                 </Normal Text><String>"InstallLocation"</String><Normal Text> </Normal Text><String>"$INSTDIR\shellex"</String><br/>
<Normal Text>	#   ShellExtension\Version:</Normal Text><br/>
<Normal Text>	#     Version of the shell extension</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>WriteRegStr</BaseFunc><Normal Text> HKLM </Normal Text><String>"Software\Krita\ShellExtension"</String><Normal Text> \</Normal Text><br/>
<Normal Text>	                 </Normal Text><String>"Version"</String><Normal Text> </Normal Text><String>"${KRITASHELLEX_VERSION}"</String><br/>
<Normal Text>	#   ShellExtension\Standalone:</Normal Text><br/>
<Normal Text>	#     0 </Normal Text><Symbol>=</Symbol><Normal Text> Installed by Krita installer</Normal Text><br/>
<Normal Text>	#     1 </Normal Text><Symbol>=</Symbol><Normal Text> Standalone installer</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>WriteRegDWORD</BaseFunc><Normal Text> HKLM </Normal Text><String>"Software\Krita\ShellExtension"</String><Normal Text> \</Normal Text><br/>
<Normal Text>	                   </Normal Text><String>"Standalone"</String><Normal Text> 0</Normal Text><br/>
<Normal Text>	#   ShellExtension\KritaExePath:</Normal Text><br/>
<Normal Text>	#     Path to krita.exe as specified by user or by Krita installer</Normal Text><br/>
<Normal Text>	#     Empty </Normal Text><Keyword>if</Keyword><Normal Text> not specified</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>WriteRegStr</BaseFunc><Normal Text> HKLM </Normal Text><String>"Software\Krita\ShellExtension"</String><Normal Text> \</Normal Text><br/>
<Normal Text>	                 </Normal Text><String>"KritaExePath"</String><Normal Text> </Normal Text><String>"$INSTDIR\bin\krita.exe"</String><br/>
<BaseFunc>SectionEnd</BaseFunc><br/>
<Normal Text></Normal Text><br/>
<Symbol>!</Symbol><Keyword>ifdef</Keyword><Normal Text> HAS_FFMPEG</Normal Text><br/>
<BaseFunc>Section</BaseFunc><Normal Text> </Normal Text><String>"$(SectionBundledFfmpeg)"</String><Normal Text> SEC_ffmpeg</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>File</BaseFunc><Normal Text> /oname</Normal Text><Symbol>=</Symbol><Normal Text>bin\ffmpeg.exe $</Normal Text><Symbol>{</Symbol><Normal Text>KRITA_PACKAGE_ROOT</Normal Text><Symbol>}</Symbol><Normal Text>\bin\ffmpeg.exe</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>File</BaseFunc><Normal Text> /oname</Normal Text><Symbol>=</Symbol><Normal Text>bin\ffmpeg_LICENSE.txt $</Normal Text><Symbol>{</Symbol><Normal Text>KRITA_PACKAGE_ROOT</Normal Text><Symbol>}</Symbol><Normal Text>\bin\ffmpeg_LICENSE.txt</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>File</BaseFunc><Normal Text> /oname</Normal Text><Symbol>=</Symbol><Normal Text>bin\ffmpeg_README.txt $</Normal Text><Symbol>{</Symbol><Normal Text>KRITA_PACKAGE_ROOT</Normal Text><Symbol>}</Symbol><Normal Text>\bin\ffmpeg_README.txt</Normal Text><br/>
<BaseFunc>SectionEnd</BaseFunc><br/>
<Symbol>!</Symbol><Keyword>endif</Keyword><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Section</BaseFunc><Normal Text> </Normal Text><String>"-Main_refreshShell"</String><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Normal Text>RefreshShell</Normal Text><Symbol>}</Symbol><br/>
<BaseFunc>SectionEnd</BaseFunc><br/>
<Normal Text></Normal Text><br/>
<Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> </Normal Text><Macro>MUI_FUNCTION_DESCRIPTION_BEGIN</Macro><br/>
<Normal Text>	#</Normal Text><Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> </Normal Text><Macro>MUI_DESCRIPTION_TEXT</Macro><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>SEC_remove_shellex</Normal Text><Symbol>}</Symbol><Normal Text> </Normal Text><String>"Remove previously installed Krita Shell Integration."</String><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> </Normal Text><Macro>MUI_DESCRIPTION_TEXT</Macro><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>SEC_remove_old_version</Normal Text><Symbol>}</Symbol><Normal Text> </Normal Text><String>"$(SectionRemoveOldVerDesc)"</String><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> </Normal Text><Macro>MUI_DESCRIPTION_TEXT</Macro><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>SEC_product_main</Normal Text><Symbol>}</Symbol><Normal Text> </Normal Text><String>"$(SectionMainDesc)"</String><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> </Normal Text><Macro>MUI_DESCRIPTION_TEXT</Macro><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>SEC_shellex</Normal Text><Symbol>}</Symbol><Normal Text> </Normal Text><String>"$(SectionShellExDesc)"</String><br/>
<Symbol>!</Symbol><Keyword>ifdef</Keyword><Normal Text> HAS_FFMPEG</Normal Text><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> </Normal Text><Macro>MUI_DESCRIPTION_TEXT</Macro><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>SEC_ffmpeg</Normal Text><Symbol>}</Symbol><Normal Text> </Normal Text><String>"$(SectionBundledFfmpegDesc)"</String><br/>
<Symbol>!</Symbol><Keyword>endif</Keyword><br/>
<Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> </Normal Text><Macro>MUI_FUNCTION_DESCRIPTION_END</Macro><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Section</BaseFunc><Normal Text> </Normal Text><String>"un.$(SectionShellEx)"</String><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $UninstallShellExStandalone </Normal Text><Symbol>==</Symbol><Normal Text> 1</Normal Text><br/>
<Normal Text>		push $R0</Normal Text><br/>
<Normal Text>		</Normal Text><BaseFunc>DetailPrint</BaseFunc><Normal Text> </Normal Text><String>"$(RemovingShellEx)"</String><br/>
<Normal Text>		</Normal Text><BaseFunc>SetDetailsPrint</BaseFunc><Normal Text> listonly</Normal Text><br/>
<Normal Text>		</Normal Text><BaseFunc>ExecWait</BaseFunc><Normal Text> </Normal Text><String>"$INSTDIR\shellex\uninstall.exe /S _?=$INSTDIR\shellex"</String><Normal Text> $R0</Normal Text><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $R0 </Normal Text><Symbol>!=</Symbol><Normal Text> 0</Normal Text><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Macro>IfNot</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>Silent</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>				</Normal Text><BaseFunc>MessageBox</BaseFunc><Normal Text> </Normal Text><Option>MB_OK</Option><Symbol>|</Symbol><Normal Text>MB_ICONSTOP </Normal Text><String>"$(RemoveShellExFailed)"</String><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>			</Normal Text><BaseFunc>SetDetailsPrint</BaseFunc><Normal Text> lastused</Normal Text><br/>
<Normal Text>			</Normal Text><BaseFunc>SetDetailsPrint</BaseFunc><Normal Text> both</Normal Text><br/>
<Normal Text>			</Normal Text><BaseFunc>DetailPrint</BaseFunc><Normal Text> </Normal Text><String>"$(RemoveShellExFailed)"</String><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>		</Normal Text><BaseFunc>Delete</BaseFunc><Normal Text> </Normal Text><String>"$INSTDIR\shellex\uninstall.exe"</String><br/>
<Normal Text>		</Normal Text><BaseFunc>RMDir</BaseFunc><Normal Text> /REBOOTOK </Normal Text><String>"$INSTDIR\shellex"</String><br/>
<Normal Text>		</Normal Text><BaseFunc>SetDetailsPrint</BaseFunc><Normal Text> lastused</Normal Text><br/>
<Normal Text>		</Normal Text><BaseFunc>DetailPrint</BaseFunc><Normal Text> </Normal Text><String>"$(RemoveShellExDone)"</String><br/>
<Normal Text>		pop $R0</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>Else</Macro><Symbol>}</Symbol><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Normal Text>Krita_UnregisterShellExtension</Normal Text><Symbol>}</Symbol><br/>
<Normal Text></Normal Text><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>RunningX64</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Normal Text>Krita_UnregisterComComonents</Normal Text><Symbol>}</Symbol><Normal Text> 64</Normal Text><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Normal Text>Krita_UnregisterComComonents</Normal Text><Symbol>}</Symbol><Normal Text> 32</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<BaseFunc>SectionEnd</BaseFunc><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Section</BaseFunc><Normal Text> </Normal Text><String>"un.Main_associate"</String><br/>
<Normal Text>	# TODO: Conditional</Normal Text><Symbol>,</Symbol><Normal Text> use install log</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $UninstallShellExStandalone </Normal Text><Symbol>!=</Symbol><Normal Text> 1</Normal Text><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Normal Text>Krita_UnregisterFileAssociation</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<BaseFunc>SectionEnd</BaseFunc><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Section</BaseFunc><Normal Text> </Normal Text><String>"un.Main_Shortcuts"</String><br/>
<Normal Text>	</Normal Text><BaseFunc>Delete</BaseFunc><Normal Text> </Normal Text><String>"$DESKTOP\Krita.lnk"</String><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> MUI_STARTMENU_GETFOLDER Krita $KritaStartMenuFolder</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>Delete</BaseFunc><Normal Text> </Normal Text><String>"$SMPROGRAMS\$KritaStartMenuFolder\${KRITA_PRODUCTNAME}.lnk"</String><br/>
<Normal Text>	</Normal Text><BaseFunc>RMDir</BaseFunc><Normal Text> </Normal Text><String>"$SMPROGRAMS\$KritaStartMenuFolder"</String><br/>
<BaseFunc>SectionEnd</BaseFunc><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Section</BaseFunc><Normal Text> </Normal Text><String>"un.${KRITA_PRODUCTNAME}"</String><br/>
<Normal Text>	# TODO: Maybe switch to explicit file list or some sort of install log</Normal Text><Symbol>?</Symbol><br/>
<Normal Text>	</Normal Text><BaseFunc>RMDir</BaseFunc><Normal Text> /r $INSTDIR\bin</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>RMDir</BaseFunc><Normal Text> /r $INSTDIR\lib</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>RMDir</BaseFunc><Normal Text> /r $INSTDIR\share</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>RMDir</BaseFunc><Normal Text> /r $INSTDIR\python</Normal Text><br/>
<BaseFunc>SectionEnd</BaseFunc><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Section</BaseFunc><Normal Text> </Normal Text><String>"un.Thing"</String><br/>
<Normal Text>	</Normal Text><BaseFunc>RMDir</BaseFunc><Normal Text> /REBOOTOK $INSTDIR\shellex</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>DeleteRegKey</BaseFunc><Normal Text> HKLM </Normal Text><String>"Software\Krita"</String><br/>
<Normal Text>	</Normal Text><BaseFunc>DeleteRegKey</BaseFunc><Normal Text> HKLM </Normal Text><String>"Software\Microsoft\Windows\CurrentVersion\Uninstall\${KRITA_UNINSTALL_REGKEY}"</String><br/>
<Normal Text>	</Normal Text><BaseFunc>Delete</BaseFunc><Normal Text> $INSTDIR\uninstall.exe</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>RMDir</BaseFunc><Normal Text> /REBOOTOK $INSTDIR</Normal Text><br/>
<BaseFunc>SectionEnd</BaseFunc><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Section</BaseFunc><Normal Text> </Normal Text><String>"un.Main_refreshShell"</String><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Normal Text>RefreshShell</Normal Text><Symbol>}</Symbol><br/>
<BaseFunc>SectionEnd</BaseFunc><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Function</BaseFunc><Normal Text> .onInit</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>SetShellVarContext</BaseFunc><Normal Text> all</Normal Text><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> SetSectionFlag $</Normal Text><Symbol>{</Symbol><Normal Text>SEC_product_main</Normal Text><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>SF_RO</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> SetSectionFlag $</Normal Text><Symbol>{</Symbol><Normal Text>SEC_product_main</Normal Text><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>SF_BOLD</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> SetSectionFlag $</Normal Text><Symbol>{</Symbol><Normal Text>SEC_remove_old_version</Normal Text><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>SF_RO</Normal Text><Symbol>}</Symbol><br/>
<Symbol>!</Symbol><Keyword>ifdef</Keyword><Normal Text> HAS_FFMPEG</Normal Text><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> SetSectionFlag $</Normal Text><Symbol>{</Symbol><Normal Text>SEC_ffmpeg</Normal Text><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>SF_RO</Normal Text><Symbol>}</Symbol><br/>
<Symbol>!</Symbol><Keyword>endif</Keyword><br/>
<Normal Text>	</Normal Text><BaseFunc>StrCpy</BaseFunc><Normal Text> $CreateDesktopIcon 1 # Create desktop icon by default</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>IfNot</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>AtLeastWin7</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>IfNot</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>Silent</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>			</Normal Text><BaseFunc>MessageBox</BaseFunc><Normal Text> </Normal Text><Option>MB_OK</Option><Symbol>|</Symbol><Normal Text>MB_ICONSTOP </Normal Text><String>"$(MsgRequireWin7)"</String><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>		</Normal Text><BaseFunc>Abort</BaseFunc><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text></Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>IfNot</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>Silent</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>		# Language selection</Normal Text><Symbol>,</Symbol><Normal Text> seems that the order is predefined.</Normal Text><br/>
<Normal Text>		</Normal Text><BaseFunc>Push</BaseFunc><Normal Text> </Normal Text><String>""</String><Normal Text> # This value is for languages auto count</Normal Text><br/>
<Normal Text>		</Normal Text><BaseFunc>Push</BaseFunc><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>LANG_ENGLISH</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>		</Normal Text><BaseFunc>Push</BaseFunc><Normal Text> English</Normal Text><br/>
<Normal Text>		</Normal Text><BaseFunc>Push</BaseFunc><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>LANG_TRADCHINESE</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>		</Normal Text><BaseFunc>Push</BaseFunc><Normal Text> </Normal Text><String>"繁體中文"</String><br/>
<Normal Text>		</Normal Text><BaseFunc>Push</BaseFunc><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>LANG_SIMPCHINESE</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>		</Normal Text><BaseFunc>Push</BaseFunc><Normal Text> </Normal Text><String>"简体中文"</String><br/>
<Normal Text>		</Normal Text><BaseFunc>Push</BaseFunc><Normal Text> A # </Normal Text><Symbol>=</Symbol><Normal Text> auto count languages</Normal Text><br/>
<Normal Text>		LangDLL::LangDialog </Normal Text><String>"$(^SetupCaption)"</String><Normal Text> </Normal Text><String>"$(SetupLangPrompt)"</String><br/>
<Normal Text>		</Normal Text><BaseFunc>Pop</BaseFunc><Normal Text> $LANGUAGE</Normal Text><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $LANGUAGE </Normal Text><Symbol>==</Symbol><Normal Text> </Normal Text><String>"cancel"</String><br/>
<Normal Text>			</Normal Text><BaseFunc>Abort</BaseFunc><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Normal Text>Endif</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text></Normal Text><br/>
<Symbol>!</Symbol><Keyword>ifdef</Keyword><Normal Text> KRITA_INSTALLER_64</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>RunningX64</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>		</Normal Text><BaseFunc>SetRegView</BaseFunc><Normal Text> 64</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>Else</Macro><Symbol>}</Symbol><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>IfNot</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>Silent</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>			</Normal Text><BaseFunc>MessageBox</BaseFunc><Normal Text> </Normal Text><Option>MB_OK</Option><Symbol>|</Symbol><Normal Text>MB_ICONSTOP </Normal Text><String>"$(Msg64bitOn32bit)"</String><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>		</Normal Text><BaseFunc>Abort</BaseFunc><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Normal Text>Endif</Normal Text><Symbol>}</Symbol><br/>
<Symbol>!</Symbol><Keyword>else</Keyword><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>RunningX64</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>		</Normal Text><BaseFunc>SetRegView</BaseFunc><Normal Text> 64</Normal Text><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>IfNot</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>Silent</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>			</Normal Text><BaseFunc>MessageBox</BaseFunc><Normal Text> </Normal Text><Option>MB_YESNO</Option><Symbol>|</Symbol><Normal Text>MB_ICONEXCLAMATION </Normal Text><String>"$(Msg32bitOn64bit)"</String><Normal Text> \</Normal Text><br/>
<Normal Text>			           /SD IDYES \</Normal Text><br/>
<Normal Text>			           IDYES lbl_allow32on64</Normal Text><br/>
<Normal Text>			</Normal Text><BaseFunc>Abort</BaseFunc><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>		lbl_allow32on64:</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Normal Text>Endif</Normal Text><Symbol>}</Symbol><br/>
<Symbol>!</Symbol><Keyword>endif</Keyword><br/>
<Normal Text></Normal Text><br/>
<Normal Text>	# Detect ancient Krita versions</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Normal Text>DetectKritaMsi32bit</Normal Text><Symbol>}</Symbol><Normal Text> $KritaMsiProductX86</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>RunningX64</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Normal Text>DetectKritaMsi64bit</Normal Text><Symbol>}</Symbol><Normal Text> $KritaMsiProductX64</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $KritaMsiProductX86 </Normal Text><Symbol>!=</Symbol><Normal Text> </Normal Text><String>""</String><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>OrIf</Macro><Symbol>}</Symbol><Normal Text> $KritaMsiProductX64 </Normal Text><Symbol>!=</Symbol><Normal Text> </Normal Text><String>""</String><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>IfNot</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>Silent</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>			</Normal Text><BaseFunc>MessageBox</BaseFunc><Normal Text> </Normal Text><Option>MB_YESNO</Option><Symbol>|</Symbol><Option>MB_ICONQUESTION</Option><Symbol>|</Symbol><Normal Text>MB_DEFBUTTON1 </Normal Text><String>"$(MsgAncientVerMustBeRemoved)"</String><Normal Text> \</Normal Text><br/>
<Normal Text>						/SD IDYES \</Normal Text><br/>
<Normal Text>						IDYES lbl_removeAncientVer</Normal Text><br/>
<Normal Text>			</Normal Text><BaseFunc>Abort</BaseFunc><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>		lbl_removeAncientVer:</Normal Text><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $KritaMsiProductX64 </Normal Text><Symbol>!=</Symbol><Normal Text> </Normal Text><String>""</String><br/>
<Normal Text>			push $R0</Normal Text><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Normal Text>MsiUninstall</Normal Text><Symbol>}</Symbol><Normal Text> $KritaMsiProductX64 $R0</Normal Text><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $R0 </Normal Text><Symbol>!=</Symbol><Normal Text> 0</Normal Text><br/>
<Normal Text>				$</Normal Text><Symbol>{</Symbol><Macro>IfNot</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>Silent</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>					$</Normal Text><Symbol>{</Symbol><Normal Text>IfKritaMsi3Alpha</Normal Text><Symbol>}</Symbol><Normal Text> $KritaMsiProductX64</Normal Text><br/>
<Normal Text>						</Normal Text><BaseFunc>MessageBox</BaseFunc><Normal Text> </Normal Text><Option>MB_OK</Option><Symbol>|</Symbol><Normal Text>MB_ICONSTOP </Normal Text><String>"$(MsgKrita3alpha1RemoveFailed)"</String><br/>
<Normal Text>					$</Normal Text><Symbol>{</Symbol><Macro>Else</Macro><Symbol>}</Symbol><br/>
<Normal Text>						</Normal Text><BaseFunc>MessageBox</BaseFunc><Normal Text> </Normal Text><Option>MB_OK</Option><Symbol>|</Symbol><Normal Text>MB_ICONSTOP </Normal Text><String>"$(MsgKrita2msi64bitRemoveFailed)"</String><br/>
<Normal Text>					$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>				$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>				</Normal Text><BaseFunc>Abort</BaseFunc><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>			pop $R0</Normal Text><br/>
<Normal Text>			</Normal Text><BaseFunc>StrCpy</BaseFunc><Normal Text> $KritaMsiProductX64 </Normal Text><String>""</String><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $KritaMsiProductX86 </Normal Text><Symbol>!=</Symbol><Normal Text> </Normal Text><String>""</String><br/>
<Normal Text>			push $R0</Normal Text><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Normal Text>MsiUninstall</Normal Text><Symbol>}</Symbol><Normal Text> $KritaMsiProductX86 $R0</Normal Text><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $R0 </Normal Text><Symbol>!=</Symbol><Normal Text> 0</Normal Text><br/>
<Normal Text>				$</Normal Text><Symbol>{</Symbol><Macro>IfNot</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>Silent</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>					</Normal Text><BaseFunc>MessageBox</BaseFunc><Normal Text> </Normal Text><Option>MB_OK</Option><Symbol>|</Symbol><Normal Text>MB_ICONSTOP </Normal Text><String>"$(MsgKrita2msi32bitRemoveFailed)"</String><br/>
<Normal Text>				$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>				</Normal Text><BaseFunc>Abort</BaseFunc><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>			pop $R0</Normal Text><br/>
<Normal Text>			</Normal Text><BaseFunc>StrCpy</BaseFunc><Normal Text> $KritaMsiProductX86 </Normal Text><String>""</String><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text></Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Normal Text>DetectKritaNsis</Normal Text><Symbol>}</Symbol><Normal Text> $KritaNsisVersion $KritaNsisBitness $KritaNsisInstallLocation</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $KritaNsisVersion </Normal Text><Symbol>!=</Symbol><Normal Text> </Normal Text><String>""</String><br/>
<Normal Text>		push $R0</Normal Text><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Normal Text>VersionCompare</Normal Text><Symbol>}</Symbol><Normal Text> </Normal Text><String>"${KRITA_VERSION}"</String><Normal Text> </Normal Text><String>"$KritaNsisVersion"</String><Normal Text> $R0</Normal Text><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $R0 </Normal Text><Symbol>==</Symbol><Normal Text> 0</Normal Text><br/>
<Normal Text>			# Same version installed... probably</Normal Text><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $KritaNsisBitness </Normal Text><Symbol>==</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>KRITA_INSTALLER_BITNESS</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>				# Very likely the same version</Normal Text><br/>
<Normal Text>				$</Normal Text><Symbol>{</Symbol><Macro>IfNot</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>Silent</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>					</Normal Text><BaseFunc>MessageBox</BaseFunc><Normal Text> </Normal Text><Option>MB_OK</Option><Symbol>|</Symbol><Option>MB_ICONINFORMATION</Option><Normal Text> </Normal Text><String>"$(MsgKritaSameVerReinstall)"</String><br/>
<Normal Text>				$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Macro>Else</Macro><Symbol>}</Symbol><br/>
<Normal Text>				# Very likely the same version but different arch</Normal Text><br/>
<Normal Text>				$</Normal Text><Symbol>{</Symbol><Macro>IfNot</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>Silent</Normal Text><Symbol>}</Symbol><br/>
<Symbol>!</Symbol><Keyword>ifdef</Keyword><Normal Text> KRITA_INSTALLER_64</Normal Text><br/>
<Normal Text>					</Normal Text><BaseFunc>MessageBox</BaseFunc><Normal Text> </Normal Text><Option>MB_OK</Option><Symbol>|</Symbol><Option>MB_ICONINFORMATION</Option><Normal Text> </Normal Text><String>"$(MsgKrita3264bitSwap)"</String><br/>
<Symbol>!</Symbol><Keyword>else</Keyword><br/>
<Normal Text>					</Normal Text><BaseFunc>MessageBox</BaseFunc><Normal Text> </Normal Text><Option>MB_OK</Option><Symbol>|</Symbol><Normal Text>MB_ICONEXCLAMATION </Normal Text><String>"$(MsgKrita3264bitSwap)"</String><br/>
<Symbol>!</Symbol><Keyword>endif</Keyword><br/>
<Normal Text>				$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>ElseIf</Macro><Symbol>}</Symbol><Normal Text> $R0 </Normal Text><Symbol>==</Symbol><Normal Text> 1</Normal Text><br/>
<Normal Text>			# Upgrade</Normal Text><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $KritaNsisBitness </Normal Text><Symbol>==</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>KRITA_INSTALLER_BITNESS</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>				# Silent about upgrade</Normal Text><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Macro>Else</Macro><Symbol>}</Symbol><br/>
<Normal Text>				# Upgrade but different arch</Normal Text><br/>
<Normal Text>				$</Normal Text><Symbol>{</Symbol><Macro>IfNot</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>Silent</Normal Text><Symbol>}</Symbol><br/>
<Symbol>!</Symbol><Keyword>ifdef</Keyword><Normal Text> KRITA_INSTALLER_64</Normal Text><br/>
<Normal Text>					</Normal Text><BaseFunc>MessageBox</BaseFunc><Normal Text> </Normal Text><Option>MB_OK</Option><Symbol>|</Symbol><Option>MB_ICONINFORMATION</Option><Normal Text> </Normal Text><String>"$(MsgKrita3264bitSwap)"</String><br/>
<Symbol>!</Symbol><Keyword>else</Keyword><br/>
<Normal Text>					</Normal Text><BaseFunc>MessageBox</BaseFunc><Normal Text> </Normal Text><Option>MB_OK</Option><Symbol>|</Symbol><Normal Text>MB_ICONEXCLAMATION </Normal Text><String>"$(MsgKrita3264bitSwap)"</String><br/>
<Symbol>!</Symbol><Keyword>endif</Keyword><br/>
<Normal Text>				$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>ElseIf</Macro><Symbol>}</Symbol><Normal Text> $R0 </Normal Text><Symbol>==</Symbol><Normal Text> 2</Normal Text><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Macro>IfNot</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>Silent</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>				</Normal Text><BaseFunc>MessageBox</BaseFunc><Normal Text> </Normal Text><Option>MB_OK</Option><Symbol>|</Symbol><Normal Text>MB_ICONSTOP </Normal Text><String>"$(MsgKritaNewerAlreadyInstalled)"</String><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>			</Normal Text><BaseFunc>Abort</BaseFunc><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>Else</Macro><Symbol>}</Symbol><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Macro>IfNot</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>Silent</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>				</Normal Text><BaseFunc>MessageBox</BaseFunc><Normal Text> </Normal Text><Option>MB_OK</Option><Symbol>|</Symbol><Normal Text>MB_ICONSTOP </Normal Text><String>"Error: Unexpected state"</String><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>			</Normal Text><BaseFunc>Abort</BaseFunc><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>		</Normal Text><Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> SetSectionFlag $</Normal Text><Symbol>{</Symbol><Normal Text>SEC_remove_old_version</Normal Text><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>SF_SELECTED</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>		# Detect </Normal Text><Keyword>if</Keyword><Normal Text> Krita is running...</Normal Text><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>IsFileinUse</Normal Text><Symbol>}</Symbol><Normal Text> </Normal Text><String>"$KritaNsisInstallLocation\bin\krita.exe"</String><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Macro>IfNot</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>Silent</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>				</Normal Text><BaseFunc>MessageBox</BaseFunc><Normal Text> </Normal Text><Option>MB_OK</Option><Symbol>|</Symbol><Normal Text>MB_ICONEXCLAMATION </Normal Text><String>"$(MsgKritaRunning)"</String><br/>
<Normal Text>			$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>			</Normal Text><BaseFunc>SetErrorLevel</BaseFunc><Normal Text> 10</Normal Text><br/>
<Normal Text>			</Normal Text><BaseFunc>Abort</BaseFunc><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>		pop $R0</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>Else</Macro><Symbol>}</Symbol><br/>
<Normal Text>		</Normal Text><Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> ClearSectionFlag $</Normal Text><Symbol>{</Symbol><Normal Text>SEC_remove_old_version</Normal Text><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>SF_SELECTED</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>		</Normal Text><BaseFunc>SectionSetText</BaseFunc><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>SEC_remove_old_version</Normal Text><Symbol>}</Symbol><Normal Text> </Normal Text><String>""</String><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text></Normal Text><br/>
<Normal Text>	# Detect standalone shell extension</Normal Text><br/>
<Normal Text>	# TODO: Would it be possible to update Krita without replacing the standalone shellex</Normal Text><Symbol>?</Symbol><br/>
<Normal Text>	</Normal Text><BaseFunc>ClearErrors</BaseFunc><br/>
<Normal Text>	</Normal Text><BaseFunc>ReadRegStr</BaseFunc><Normal Text> $PrevShellExInstallLocation HKLM </Normal Text><String>"Software\Krita\ShellExtension"</String><Normal Text> </Normal Text><String>"InstallLocation"</String><br/>
<Normal Text>	#ReadRegStr $PrevShellExVersion HKLM </Normal Text><String>"Software\Krita\ShellExtension"</String><Normal Text> </Normal Text><String>"Version"</String><br/>
<Normal Text>	</Normal Text><BaseFunc>ReadRegDWORD</BaseFunc><Normal Text> $PrevShellExStandalone HKLM </Normal Text><String>"Software\Krita\ShellExtension"</String><Normal Text> </Normal Text><String>"Standalone"</String><br/>
<Normal Text>	#ReadRegStr $PrevShellExKritaExePath HKLM </Normal Text><String>"Software\Krita\ShellExtension"</String><Normal Text> </Normal Text><String>"KritaExePath"</String><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>Errors</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>		# TODO: Assume no previous version installed or what</Normal Text><Symbol>?</Symbol><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $PrevShellExStandalone </Normal Text><Symbol>==</Symbol><Normal Text> 1</Normal Text><br/>
<Normal Text>		#</Normal Text><Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> SetSectionFlag $</Normal Text><Symbol>{</Symbol><Normal Text>SEC_remove_shellex</Normal Text><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>SF_SELECTED</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>Else</Macro><Symbol>}</Symbol><br/>
<Normal Text>		#</Normal Text><Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> ClearSectionFlag $</Normal Text><Symbol>{</Symbol><Normal Text>SEC_remove_shellex</Normal Text><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>SF_SELECTED</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>		#SectionSetText $</Normal Text><Symbol>{</Symbol><Normal Text>SEC_remove_shellex</Normal Text><Symbol>}</Symbol><Normal Text> </Normal Text><String>""</String><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<BaseFunc>FunctionEnd</BaseFunc><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Function</BaseFunc><Normal Text> un.onInit</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>SetShellVarContext</BaseFunc><Normal Text> all</Normal Text><br/>
<Symbol>!</Symbol><Keyword>ifdef</Keyword><Normal Text> KRITA_INSTALLER_64</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>RunningX64</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>		</Normal Text><BaseFunc>SetRegView</BaseFunc><Normal Text> 64</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>Else</Macro><Symbol>}</Symbol><br/>
<Normal Text>		</Normal Text><BaseFunc>Abort</BaseFunc><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Normal Text>Endif</Normal Text><Symbol>}</Symbol><br/>
<Symbol>!</Symbol><Keyword>else</Keyword><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>RunningX64</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>		</Normal Text><BaseFunc>SetRegView</BaseFunc><Normal Text> 64</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Normal Text>Endif</Normal Text><Symbol>}</Symbol><br/>
<Symbol>!</Symbol><Keyword>endif</Keyword><br/>
<Normal Text></Normal Text><br/>
<Normal Text>	# Get and use installer language:</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>Push</BaseFunc><Normal Text> $0</Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>ReadRegStr</BaseFunc><Normal Text> $0 HKLM </Normal Text><String>"Software\Krita"</String><Normal Text> </Normal Text><String>"InstallerLanguage"</String><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $0 </Normal Text><Symbol>!=</Symbol><Normal Text> </Normal Text><String>""</String><br/>
<Normal Text>		</Normal Text><BaseFunc>StrCpy</BaseFunc><Normal Text> $LANGUAGE $0</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>	</Normal Text><BaseFunc>Pop</BaseFunc><Normal Text> $0</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>	</Normal Text><BaseFunc>ReadRegDWORD</BaseFunc><Normal Text> $UninstallShellExStandalone HKLM </Normal Text><String>"Software\Krita\ShellExtension"</String><Normal Text> </Normal Text><String>"Standalone"</String><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>Silent</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>		# Only check here </Normal Text><Keyword>if</Keyword><Normal Text> running in silent mode. It's otherwise checked in</Normal Text><br/>
<Normal Text>		# un.func_UnintallFirstpage_Init in order to display a prompt in the</Normal Text><br/>
<Normal Text>		# correct language.</Normal Text><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>IsFileinUse</Normal Text><Symbol>}</Symbol><Normal Text> </Normal Text><String>"$INSTDIR\bin\krita.exe"</String><br/>
<Normal Text>			</Normal Text><BaseFunc>SetErrorLevel</BaseFunc><Normal Text> 10</Normal Text><br/>
<Normal Text>			</Normal Text><BaseFunc>Abort</BaseFunc><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<BaseFunc>FunctionEnd</BaseFunc><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Function</BaseFunc><Normal Text> un.func_UnintallFirstpage_Init</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>IsFileinUse</Normal Text><Symbol>}</Symbol><Normal Text> </Normal Text><String>"$INSTDIR\bin\krita.exe"</String><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>IfNot</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>Silent</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>			</Normal Text><BaseFunc>MessageBox</BaseFunc><Normal Text> </Normal Text><Option>MB_OK</Option><Symbol>|</Symbol><Normal Text>MB_ICONEXCLAMATION </Normal Text><String>"$(MsgUninstallKritaRunning)"</String><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>		</Normal Text><BaseFunc>SetErrorLevel</BaseFunc><Normal Text> 10</Normal Text><br/>
<Normal Text>		</Normal Text><BaseFunc>Quit</BaseFunc><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<BaseFunc>FunctionEnd</BaseFunc><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Function</BaseFunc><Normal Text> func_ShellExLicensePage_Init</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>IfNot</Macro><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>SectionIsSelected</Normal Text><Symbol>}</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>SEC_shellex</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>		# Skip ShellEx license page </Normal Text><Keyword>if</Keyword><Normal Text> not selected</Normal Text><br/>
<Normal Text>		</Normal Text><BaseFunc>Abort</BaseFunc><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<BaseFunc>FunctionEnd</BaseFunc><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Var</BaseFunc><Normal Text> hwndChkDesktopIcon</Normal Text><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Function</BaseFunc><Normal Text> func_DesktopShortcutPage_CheckChange</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Normal Text>NSD_GetState</Normal Text><Symbol>}</Symbol><Normal Text> $hwndChkDesktopIcon $CreateDesktopIcon</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $CreateDesktopIcon </Normal Text><Symbol>==</Symbol><Normal Text> $</Normal Text><Symbol>{</Symbol><Normal Text>BST_CHECKED</Normal Text><Symbol>}</Symbol><br/>
<Normal Text>		</Normal Text><BaseFunc>StrCpy</BaseFunc><Normal Text> $CreateDesktopIcon 1</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>Else</Macro><Symbol>}</Symbol><br/>
<Normal Text>		</Normal Text><BaseFunc>StrCpy</BaseFunc><Normal Text> $CreateDesktopIcon 0</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<BaseFunc>FunctionEnd</BaseFunc><br/>
<Normal Text></Normal Text><br/>
<BaseFunc>Function</BaseFunc><Normal Text> func_BeforeInstallPage_Init</Normal Text><br/>
<Normal Text>	push $R0</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>	nsDialogs::Create 1018</Normal Text><br/>
<Normal Text>	pop $R0</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $R0 </Normal Text><Symbol>==</Symbol><Normal Text> </Normal Text><Keyword>error</Keyword><br/>
<Normal Text>		</Normal Text><BaseFunc>Abort</BaseFunc><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>	</Normal Text><Symbol>!</Symbol><Keyword>insertmacro</Keyword><Normal Text> </Normal Text><Macro>MUI_HEADER_TEXT</Macro><Normal Text> </Normal Text><String>"$(ConfirmInstallPageHeader)"</String><Normal Text> </Normal Text><String>"$(ConfirmInstallPageDesc)"</String><br/>
<Normal Text></Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Normal Text>NSD_CreateLabel</Normal Text><Symbol>}</Symbol><Normal Text> 0u 0u 300u 20u </Normal Text><String>"$(DesktopIconPageDesc2)"</String><br/>
<Normal Text>	pop $R0</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Normal Text>NSD_CreateCheckbox</Normal Text><Symbol>}</Symbol><Normal Text> 0u 20u 300u 10u </Normal Text><String>"$(DesktopIconPageCheckbox)"</String><br/>
<Normal Text>	pop $hwndChkDesktopIcon</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>If</Macro><Symbol>}</Symbol><Normal Text> $CreateDesktopIcon </Normal Text><Symbol>==</Symbol><Normal Text> 1</Normal Text><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Normal Text>NSD_Check</Normal Text><Symbol>}</Symbol><Normal Text> $hwndChkDesktopIcon</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>Else</Macro><Symbol>}</Symbol><br/>
<Normal Text>		$</Normal Text><Symbol>{</Symbol><Normal Text>NSD_Uncheck</Normal Text><Symbol>}</Symbol><Normal Text> $hwndChkDesktopIcon</Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Macro>EndIf</Macro><Symbol>}</Symbol><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Normal Text>NSD_OnClick</Normal Text><Symbol>}</Symbol><Normal Text> $hwndChkDesktopIcon func_DesktopShortcutPage_CheckChange</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>	$</Normal Text><Symbol>{</Symbol><Normal Text>NSD_CreateLabel</Normal Text><Symbol>}</Symbol><Normal Text> 0u 40u 300u 140u </Normal Text><String>"$(ConfirmInstallPageDesc2)"</String><br/>
<Normal Text>	pop $R0</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>	# TODO: Add install option summary for review</Normal Text><Symbol>?</Symbol><br/>
<Normal Text></Normal Text><br/>
<Normal Text>	nsDialogs::Show</Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text>	pop $R0</Normal Text><br/>
<BaseFunc>FunctionEnd</BaseFunc><br/>
<Normal Text></Normal Text><br/>
<Normal Text></Normal Text><br/>
<Normal Text># Strings</Normal Text><br/>
<Symbol>!</Symbol><Keyword>include</Keyword><Normal Text> </Normal Text><String>"translations\English.nsh"</String><br/>
<Symbol>!</Symbol><Keyword>include</Keyword><Normal Text> </Normal Text><String>"translations\TradChinese.nsh"</String><br/>
<Symbol>!</Symbol><Keyword>include</Keyword><Normal Text> </Normal Text><String>"translations\SimpChinese.nsh"</String><br/>
