# vim: noai et ts=4 tw=0 # with a few tiny modifications by Phil Harper(philh@theopencd.org) # modified for tuxmath by Yves Combe (yves@ycombe.net) # modified for mypaint by Yves Combe (yves@ycombe.net) !define PKG_VERSION "@VERSION@" !define PKG_PREFIX "mypaint" !define APP_PREFIX "mypaint" !define APP_EXE "${APP_PREFIX}.exe" !define APP_NAME "MyPaint" OutFile "${PKG_PREFIX}-${PKG_VERSION}-win32-installer.exe" Name "${APP_NAME}" Caption "" CRCCheck on WindowIcon off BGGradient off # Default to not silent SilentInstall normal SilentUnInstall normal # Various default text options MiscButtonText InstallButtonText FileErrorText # Default installation dir and registry key of install directory InstallDir "$PROGRAMFILES\${APP_NAME}" InstallDirRegKey HKLM SOFTWARE\${APP_NAME} "Install_Dir" # Licence text LicenseText "You must agree to this license before installing ${APP_NAME}" LicenseData "COPYING" # Directory browsing # DirShow show ComponentText "This will install ${APP_NAME} on your computer. Select which optional things you want installed." DirText "Choose a directory to install ${APP_NAME} in to:" AllowRootDirInstall false # Install page stuff InstProgressFlags smooth AutoCloseWindow true Section SetOutPath $INSTDIR File /r "mingw32\*.*" WriteRegStr HKLM SOFTWARE\${APP_NAME} "Install_Dir" "$INSTDIR" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" "DisplayName" "${APP_NAME} (remove only)" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" "UninstallString" '"$INSTDIR\uninstall.exe"' WriteUninstaller "uninstall.exe" SectionEnd Section "Start Menu Shortcuts" SetShellVarContext all SetOutPath $INSTDIR\bin CreateDirectory "$SMPROGRAMS\${APP_NAME}" CreateShortCut "$SMPROGRAMS\${APP_NAME}\${APP_NAME}.lnk" "$INSTDIR\bin\${APP_EXE}" "" "$INSTDIR\bin\${APP_EXE}" 0 "" "" "Start MyPaint" CreateShortCut "$SMPROGRAMS\${APP_NAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 "" "" "Remove MyPaint" SectionEnd Section "Desktop Shortcut" SetShellVarContext all SetOutPath $INSTDIR\bin CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\bin\${APP_EXE}" "" "$INSTDIR\bin\${APP_EXE}" 0 "" "" "Run MyPaint" SectionEnd ;Function .onInstSuccess ; BringToFront ; MessageBox MB_YESNO|MB_ICONQUESTION \ ; "${APP_NAME} was installed. Would you like to run ${APP_NAME} now ?" \ ; IDNO NoExec ; Exec '$INSTDIR\${APP_EXE}' ; NoExec: ;FunctionEnd ; uninstall stuff UninstallText "This will uninstall ${APP_NAME}. Hit 'Uninstall' to continue." ; special uninstall section. Section "Uninstall" SetShellVarContext all ; remove registry keys DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" DeleteRegKey HKLM SOFTWARE\${APP_NAME} RMDir /r "$INSTDIR\bin" RMDir /r "$INSTDIR\lib" RMDir /r "$INSTDIR\share" RMDIR /r "$INSTDIR\etc" RMDIR /r "$INSTDIR\include" RMDIR /r "$INSTDIR\man" RMDIR /r "$INSTDIR\contrib" RMDIR /r "$INSTDIR\manifest" Delete "$INSTDIR\*.*" Delete "$DESKTOP\${APP_NAME}.lnk" Delete "$SMPROGRAMS\${APP_NAME}\*.*" RMDir "$SMPROGRAMS\${APP_NAME}" SectionEnd