on master help sign in
Try to update installers/win/
commitdf29e02ea0094eda78b01cb016a517e8fe6810c7 authorEvan Czaplicki <evancz@users.noreply.github.com> dateThu 26 Apr 2018, 17:21 (9 years ago) parent5a915f5
5 files changed+30−35
installers/win/Nsisfile.nsi+19−19 installers/win/README.md+2−4 installers/win/inst.dat−4 installers/win/make_installer.cmd+9−4 installers/win/uninst.dat−4
installers/win/Nsisfile.nsi+19−19
@@ -1,4 +1,4 @@
1−; Elm Platform Installer
1+; Elm Installer
22
33;--------------------------------
44;Includes
@@ -12,7 +12,7 @@
1212;--------------------------------
1313;Defines
1414
15− !Define PRODUCT_DIR_REG_KEY "Software\Elm\Elm Platform\${PLATFORM_VERSION}"
15+ !Define PRODUCT_DIR_REG_KEY "Software\Elm\Elm\${PLATFORM_VERSION}"
1616 !Define FILES_SOURCE_PATH "files"
1717 !Define INST_DAT "inst.dat"
1818 !Define UNINST_DAT "uninst.dat"
@@ -26,11 +26,11 @@
2626;General settings
2727
2828 ;Name and file
29− Name "Elm Platform ${PLATFORM_VERSION}"
30− OutFile "ElmPlatform-${PLATFORM_VERSION}-setup.exe"
29+ Name "Elm ${PLATFORM_VERSION}"
30+ OutFile "Elm-${PLATFORM_VERSION}.exe"
3131
3232 ;Default install dir
33− InstallDir "$PROGRAMFILES\Elm Platform\${PLATFORM_VERSION}"
33+ InstallDir "$PROGRAMFILES\Elm\${PLATFORM_VERSION}"
3434 InstallDirRegKey HKLM "${PRODUCT_DIR_REG_KEY}" ""
3535
3636 ;Icon
@@ -96,18 +96,18 @@ FunctionEnd
9696
9797 ;Start Menu Folder Page Configuration
9898 !Define MUI_PAGE_HEADER_SUBTEXT \
99− "Choose a Start Menu folder for the Elm Platform ${PLATFORM_VERSION} shortcuts."
99+ "Choose a Start Menu folder for the Elm ${PLATFORM_VERSION} shortcuts."
100100 !Define MUI_STARTMENUPAGE_TEXT_TOP \
101− "Select the Start Menu folder in which you would like to create Elm Platform shortcuts. You can also enter a name to create a new folder."
101+ "Select the Start Menu folder in which you would like to create Elm shortcuts. You can also enter a name to create a new folder."
102102 !Define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
103103 !Define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_DIR_REG_KEY}"
104104 !Define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
105− !Define MUI_STARTMENUPAGE_DEFAULTFOLDER "Elm Platform ${PLATFORM_VERSION}"
105+ !Define MUI_STARTMENUPAGE_DEFAULTFOLDER "Elm ${PLATFORM_VERSION}"
106106 !insertmacro MUI_PAGE_STARTMENU StartMenuPage $START_MENU_FOLDER
107107 !insertmacro MUI_PAGE_INSTFILES
108108 !define MUI_FINISHPAGE_RUN
109109 !define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink"
110− !define MUI_FINISHPAGE_RUN_TEXT "Open tutorial on how to use Elm Platform"
110+ !define MUI_FINISHPAGE_RUN_TEXT "Open tutorial on how to use Elm"
111111 !insertmacro MUI_PAGE_FINISH
112112
113113 !insertmacro MUI_UNPAGE_WELCOME
@@ -156,7 +156,7 @@ Section "Update the PATH environment variable" SecPath
156156
157157 ; Update PATH
158158 ; First, remove any older version
159− ExecWait '"$SYSDIR\wscript.exe" //E:vbscript "$INSTDIR\removefrompath.vbs" "$PROGRAMFILES\Elm Platform"'
159+ ExecWait '"$SYSDIR\wscript.exe" //E:vbscript "$INSTDIR\removefrompath.vbs" "$PROGRAMFILES\Elm"'
160160 ; Then add to the PATH
161161 ExecWait '"$SYSDIR\wscript.exe" //E:vbscript "$INSTDIR\updatepath.vbs" "$INSTDIR\bin"'
162162 SetShellVarContext current
@@ -182,13 +182,13 @@ Section "Create uninstaller" SecAddRem
182182 SectionIn RO
183183
184184 ; Add uninstall information to Add/Remove Programs
185− WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ElmPlatform-${PLATFORM_VERSION}" \
186− "DisplayName" "Elm Platform ${PLATFORM_VERSION}"
187− WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ElmPlatform-${PLATFORM_VERSION}" \
185+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Elm-${PLATFORM_VERSION}" \
186+ "DisplayName" "Elm ${PLATFORM_VERSION}"
187+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Elm-${PLATFORM_VERSION}" \
188188 "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""
189− WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ElmPlatform-${PLATFORM_VERSION}" \
189+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Elm-${PLATFORM_VERSION}" \
190190 "DisplayIcon" "$INSTDIR\logo.ico"
191− WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ElmPlatform-${PLATFORM_VERSION}" \
191+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Elm-${PLATFORM_VERSION}" \
192192 "Publisher" "elm-lang.org"
193193
194194 ;Create uninstaller
@@ -225,7 +225,7 @@ SectionGroupEnd
225225Section "Uninstall"
226226
227227 ; Update PATH
228− ExecWait '"$SYSDIR\wscript.exe" //E:vbscript "$INSTDIR\removefrompath.vbs" "$PROGRAMFILES\Elm Platform"'
228+ ExecWait '"$SYSDIR\wscript.exe" //E:vbscript "$INSTDIR\removefrompath.vbs" "$PROGRAMFILES\Elm"'
229229 SetShellVarContext current
230230
231231 !Include ${UNINST_DAT}
@@ -233,8 +233,8 @@ Section "Uninstall"
233233 Delete "$INSTDIR\Uninstall.exe"
234234 RMDir $INSTDIR
235235
236− ;Since we install to '$PF\Elm Platform\$PLATFORM_VERSION', we
237− ;should also try to delete '$PF\Elm Platform' if it is empty.
236+ ;Since we install to '$PF\Elm\$PLATFORM_VERSION', we
237+ ;should also try to delete '$PF\Elm' if it is empty.
238238 ${GetParent} $INSTDIR $R0
239239 RMDir $R0
240240
@@ -256,7 +256,7 @@ Section "Uninstall"
256256 DeleteRegKey HKCU "Software\Elm"
257257 DeleteRegKey HKLM "${PRODUCT_DIR_REG_KEY}"
258258 DeleteRegKey /IfEmpty HKCU Software\Elm
259− DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ElmPlatform-${PLATFORM_VERSION}"
259+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Elm-${PLATFORM_VERSION}"
260260
261261 ; Update environment variables
262262 SendMessage ${HWND_BROADCAST} ${WM_SETTINGCHANGE} 0 "STR:Environment" /TIMEOUT=5000
installers/win/README.md+2−4
@@ -4,8 +4,6 @@ You will need the [NSIS installer](http://nsis.sourceforge.net/Download) to be i
44
55Once everything is installed, run something like this command:
66
7− make_installer.cmd 0.17
7+ make_installer.cmd 0.19
88
9−It will build an installer called `ElmPlatform-0.17-setup.exe`. You can read
10−more about what arguments can be given to this command in the comments in
11−`BuildFromSource.hs`.
9+It will build an installer called `Elm-0.19-setup.exe`.
installers/win/inst.dat−4
@@ -1,9 +1,5 @@
11SetOutPath "$INSTDIR\bin"
22File "${FILES_SOURCE_PATH}\bin\elm.exe"
3−File "${FILES_SOURCE_PATH}\bin\elm-make.exe"
4−File "${FILES_SOURCE_PATH}\bin\elm-package.exe"
5−File "${FILES_SOURCE_PATH}\bin\elm-repl.exe"
6−File "${FILES_SOURCE_PATH}\bin\elm-reactor.exe"
73
84SetOutPath "$INSTDIR"
95File "file.ico"
installers/win/make_installer.cmd+9−4
@@ -1,15 +1,20 @@
11
22set version=%1
33
4−runhaskell ..\BuildFromSource.hs %version%
4+git clone https://github.com/elm-lang/elm-compiler.git
5+cd elm-compiler
6+git checkout %version%
7+cabal sandbox init
8+cabal update
9+cabal configure
10+cabal build
11+
512if %errorlevel% neq 0 exit /b %errorlevel%
613
714mkdir files
815mkdir files\bin
916
10−set platform=Elm-Platform\%version%
11−
12−xcopy %platform%\.cabal-sandbox\bin\elm*.exe files\bin /s /e
17+xcopy dist/build/elm/elm.exe files\bin /s /e
1318xcopy updatepath.vbs files
1419
1520if EXIST "%ProgramFiles%" (
installers/win/uninst.dat−4
@@ -1,8 +1,4 @@
11Delete "$INSTDIR\bin\elm.exe"
2−Delete "$INSTDIR\bin\elm-make.exe"
3−Delete "$INSTDIR\bin\elm-package.exe"
4−Delete "$INSTDIR\bin\elm-repl.exe"
5−Delete "$INSTDIR\bin\elm-reactor.exe"
62RmDir "$INSTDIR\bin"
73
84Delete "$INSTDIR\file.ico"