1!include "MUI.nsh" 2Name "PARI 2.3.3" 3!define dll "libpari-gmp.dll" 4!define objdir "..\Ocygwin-i686-gmp" 5 6;--No need to modify things below -- 7AutoCloseWindow false 8 9OutFile "Pari.exe" 10InstallDir "$PROGRAMFILES\PARI" 11InstallDirRegKey HKLM "Software\PARI" "" 12 13!define MUI_ABORTWARNING 14 15!insertmacro MUI_PAGE_WELCOME 16!insertmacro MUI_PAGE_LICENSE "..\COPYING" 17!insertmacro MUI_PAGE_COMPONENTS 18!insertmacro MUI_PAGE_DIRECTORY 19!insertmacro MUI_PAGE_INSTFILES 20!insertmacro MUI_PAGE_FINISH 21 22!insertmacro MUI_UNPAGE_WELCOME 23!insertmacro MUI_UNPAGE_CONFIRM 24!insertmacro MUI_UNPAGE_INSTFILES 25!insertmacro MUI_UNPAGE_FINISH 26 27!insertmacro MUI_LANGUAGE "English" 28;-------------------------------- 29;Installer Sections 30 31!define uninst "Software\Microsoft\Windows\CurrentVersion\Uninstall\PARI" 32 33Section "pari (required)" SecCopy 34 SetOutPath "$INSTDIR" 35 File /oname=gp.exe "${objdir}\gp-dyn.exe" 36 File "makegprc" 37 File "..\misc\tex2mail" 38 File "${objdir}\${dll}" 39 File "\cygwin\bin\cygcrypt-0.dll" 40 File "\cygwin\bin\cygfltknox-1.1.dll" 41 File "\cygwin\bin\cygiconv-2.dll" 42 File "\cygwin\bin\cygintl-8.dll" 43 File "\cygwin\bin\cygncurses-8.dll" 44 File "\cygwin\bin\cygreadline6.dll" 45 File "\cygwin\bin\cygperl5_8.dll" 46 File "\cygwin\bin\cygwin1.dll" 47 File "\cygwin\bin\perl.exe" 48 File "\cygwin\bin\sh.exe" 49 50 WriteRegStr HKCU "Software\PARI" "" $INSTDIR 51 WriteRegStr HKLM ${uninst} "DisplayName" "PARI (remove only)" 52 WriteRegStr HKLM ${uninst} "UninstallString" '"$INSTDIR\uninstall.exe"' 53 54 WriteUninstaller "$INSTDIR\Uninstall.exe" 55 56 SetOutPath "$INSTDIR" 57 ExecWait "perl makegprc $INSTDIR" 58 Delete "$INSTDIR\makegprc" 59SectionEnd 60 61Section "Galois files" SecGAL 62 SetOutPath "$INSTDIR\galdata" 63 File "..\data\galdata\*" 64SectionEnd 65 66Section "documentation" SecDOC 67 SetOutPath "$INSTDIR" 68 File "..\doc\gphelp" 69 SetOutPath $INSTDIR\doc 70 File "acro.exe" 71 File "..\doc\translations" 72 File "..\doc\*.tex" 73 File "..\doc\*.pdf" 74SectionEnd 75 76Section "examples" SecEX 77 SetOutPath "$INSTDIR" 78 File "..\doc\gphelp" 79 SetOutPath $INSTDIR\examples 80 File "..\examples\EXPLAIN" 81 File "..\examples\Inputrc" 82 File "..\examples\*.gp" 83 File "..\examples\*.c" 84 File "..\examples\Makefile.cygwin-i686" 85SectionEnd 86 87Function .onInstSuccess 88 MessageBox MB_OK "Thank you for using PARI/GP! Double-click on 'gp' to start the calculator.$\r$\nTweak $INSTDIR\.gprc to customize GP: colors, script search path, etc." 89 ExecShell "open" "$INSTDIR" 90FunctionEnd 91 92!define short "$SMPROGRAMS\PARI" 93 94Section "shortcuts" SecSM 95 CreateDirectory "${short}" 96 CreateShortCut "${short}\gp.lnk" "$INSTDIR\gp.exe" "" "$INSTDIR\gp.exe" 0 97 CreateShortCut "${short}\users.lnk" "$INSTDIR\doc\users.pdf" "" "$INSTDIR\doc\users.pdf" 0 98 CreateShortCut "${short}\libpari.lnk" "$INSTDIR\doc\libpari.pdf" "" "$INSTDIR\doc\libpari.pdf" 0 99 CreateShortCut "${short}\tutorial.lnk" "$INSTDIR\doc\tutorial.pdf" "" "$INSTDIR\doc\tutorial.pdf" 0 100 CreateShortCut "${short}\refcard.lnk" "$INSTDIR\doc\refcard.pdf" "" "$INSTDIR\doc\refcard.pdf" 0 101 WriteINIStr "${short}\PARI pages.url" "InternetShortcut" "URL" "http://pari.math.u-bordeaux.fr" 102 CreateShortCut "${short}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 103 CreateShortCut "$DESKTOP\PARI.lnk" "$INSTDIR\gp.exe" 104SectionEnd 105 106;-------------------------------- 107;Descriptions 108 109LangString DESC_SecCopy ${LANG_ENGLISH} "Copy pari files to application folder." 110LangString DESC_DOC ${LANG_ENGLISH} "Install documentation and online help." 111LangString DESC_EX ${LANG_ENGLISH} "Install sample GP scripts." 112LangString DESC_GAL ${LANG_ENGLISH} "Install Galois data files (degree > 7)." 113LangString DESC_SM ${LANG_ENGLISH} "Add PARI shortcuts to Start Menu and desktop." 114 115!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN 116 !insertmacro MUI_DESCRIPTION_TEXT ${SecCopy} $(DESC_SecCopy) 117 !insertmacro MUI_DESCRIPTION_TEXT ${SecGAL} $(DESC_GAL) 118 !insertmacro MUI_DESCRIPTION_TEXT ${SecSM} $(DESC_SM) 119 !insertmacro MUI_DESCRIPTION_TEXT ${SecDOC} $(DESC_DOC) 120 !insertmacro MUI_DESCRIPTION_TEXT ${SecEX} $(DESC_EX) 121!insertmacro MUI_FUNCTION_DESCRIPTION_END 122 123;-------------------------------- 124Section "Uninstall" 125 Delete "$INSTDIR\gp.exe" 126 Delete "$INSTDIR\.gprc" 127 Delete "$INSTDIR\gphelp" 128 Delete "$INSTDIR\tex2mail" 129 Delete "$INSTDIR\${dll}" 130 Delete "$INSTDIR\cygcrypt-0.dll" 131 Delete "$INSTDIR\cygfltknox-1.1.dll" 132 Delete "$INSTDIR\cygiconv-2.dll" 133 Delete "$INSTDIR\cygintl-8.dll" 134 Delete "$INSTDIR\cygncurses-8.dll" 135 Delete "$INSTDIR\cygreadline6.dll" 136 Delete "$INSTDIR\cygperl5_8.dll" 137 Delete "$INSTDIR\cygwin1.dll" 138 Delete "$INSTDIR\perl.exe" 139 Delete "$INSTDIR\sh.exe" 140 141 Delete "$INSTDIR\Uninstall.exe" 142 RMDir /r "$INSTDIR\doc" 143 RMDir /r "$INSTDIR\examples" 144 RMDir /r "$INSTDIR\galdata" 145 146 DeleteRegKey HKLM ${uninst} 147 DeleteRegKey /ifempty HKLM "Software\PARI" 148 149 RMDir /r "$SMPROGRAMS\PARI" 150 Delete "$DESKTOP\PARI.lnk" 151 RMDir "$INSTDIR" 152SectionEnd 153