on master help sign in
Try to update installers/win/
df29e02Evan Czaplicki
installers/win/Nsisfile.nsi+19−19
@@ -1,4 +1,4 @@
1−; Elm Platform Installer
1+; Elm Installer
2
2
3;--------------------------------
3;--------------------------------
4;Includes
4;Includes
@@ -12,7 +12,7 @@
12;--------------------------------
12;--------------------------------
13;Defines
13;Defines
14
14
15− !Define PRODUCT_DIR_REG_KEY "Software\Elm\Elm Platform\${PLATFORM_VERSION}"
15+ !Define PRODUCT_DIR_REG_KEY "Software\Elm\Elm\${PLATFORM_VERSION}"
16 !Define FILES_SOURCE_PATH "files"
16 !Define FILES_SOURCE_PATH "files"
17 !Define INST_DAT "inst.dat"
17 !Define INST_DAT "inst.dat"
18 !Define UNINST_DAT "uninst.dat"
18 !Define UNINST_DAT "uninst.dat"
@@ -26,11 +26,11 @@
26;General settings
26;General settings
27
27
28 ;Name and file
28 ;Name and file
29− Name "Elm Platform ${PLATFORM_VERSION}"
29+ Name "Elm ${PLATFORM_VERSION}"
30− OutFile "ElmPlatform-${PLATFORM_VERSION}-setup.exe"
30+ OutFile "Elm-${PLATFORM_VERSION}.exe"
31
31
32 ;Default install dir
32 ;Default install dir
33− InstallDir "$PROGRAMFILES\Elm Platform\${PLATFORM_VERSION}"
33+ InstallDir "$PROGRAMFILES\Elm\${PLATFORM_VERSION}"
34 InstallDirRegKey HKLM "${PRODUCT_DIR_REG_KEY}" ""
34 InstallDirRegKey HKLM "${PRODUCT_DIR_REG_KEY}" ""
35
35
36 ;Icon
36 ;Icon
@@ -96,18 +96,18 @@ FunctionEnd
96
96
97 ;Start Menu Folder Page Configuration
97 ;Start Menu Folder Page Configuration
98 !Define MUI_PAGE_HEADER_SUBTEXT \
98 !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."
100 !Define MUI_STARTMENUPAGE_TEXT_TOP \
100 !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."
102 !Define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
102 !Define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
103 !Define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_DIR_REG_KEY}"
103 !Define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_DIR_REG_KEY}"
104 !Define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
104 !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}"
106 !insertmacro MUI_PAGE_STARTMENU StartMenuPage $START_MENU_FOLDER
106 !insertmacro MUI_PAGE_STARTMENU StartMenuPage $START_MENU_FOLDER
107 !insertmacro MUI_PAGE_INSTFILES
107 !insertmacro MUI_PAGE_INSTFILES
108 !define MUI_FINISHPAGE_RUN
108 !define MUI_FINISHPAGE_RUN
109 !define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink"
109 !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"
111 !insertmacro MUI_PAGE_FINISH
111 !insertmacro MUI_PAGE_FINISH
112
112
113 !insertmacro MUI_UNPAGE_WELCOME
113 !insertmacro MUI_UNPAGE_WELCOME
@@ -156,7 +156,7 @@ Section "Update the PATH environment variable" SecPath
156
156
157 ; Update PATH
157 ; Update PATH
158 ; First, remove any older version
158 ; 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"'
160 ; Then add to the PATH
160 ; Then add to the PATH
161 ExecWait '"$SYSDIR\wscript.exe" //E:vbscript "$INSTDIR\updatepath.vbs" "$INSTDIR\bin"'
161 ExecWait '"$SYSDIR\wscript.exe" //E:vbscript "$INSTDIR\updatepath.vbs" "$INSTDIR\bin"'
162 SetShellVarContext current
162 SetShellVarContext current
@@ -182,13 +182,13 @@ Section "Create uninstaller" SecAddRem
182 SectionIn RO
182 SectionIn RO
183
183
184 ; Add uninstall information to Add/Remove Programs
184 ; Add uninstall information to Add/Remove Programs
185− 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 ${PLATFORM_VERSION}"
186+ "DisplayName" "Elm ${PLATFORM_VERSION}"
187− WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ElmPlatform-${PLATFORM_VERSION}" \
187+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Elm-${PLATFORM_VERSION}" \
188 "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""
188 "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}" \
190 "DisplayIcon" "$INSTDIR\logo.ico"
190 "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}" \
192 "Publisher" "elm-lang.org"
192 "Publisher" "elm-lang.org"
193
193
194 ;Create uninstaller
194 ;Create uninstaller
@@ -225,7 +225,7 @@ SectionGroupEnd
225Section "Uninstall"
225Section "Uninstall"
226
226
227 ; Update PATH
227 ; 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"'
229 SetShellVarContext current
229 SetShellVarContext current
230
230
231 !Include ${UNINST_DAT}
231 !Include ${UNINST_DAT}
@@ -233,8 +233,8 @@ Section "Uninstall"
233 Delete "$INSTDIR\Uninstall.exe"
233 Delete "$INSTDIR\Uninstall.exe"
234 RMDir $INSTDIR
234 RMDir $INSTDIR
235
235
236− ;Since we install to '$PF\Elm Platform\$PLATFORM_VERSION', we
236+ ;Since we install to '$PF\Elm\$PLATFORM_VERSION', we
237− ;should also try to delete '$PF\Elm Platform' if it is empty.
237+ ;should also try to delete '$PF\Elm' if it is empty.
238 ${GetParent} $INSTDIR $R0
238 ${GetParent} $INSTDIR $R0
239 RMDir $R0
239 RMDir $R0
240
240
@@ -256,7 +256,7 @@ Section "Uninstall"
256 DeleteRegKey HKCU "Software\Elm"
256 DeleteRegKey HKCU "Software\Elm"
257 DeleteRegKey HKLM "${PRODUCT_DIR_REG_KEY}"
257 DeleteRegKey HKLM "${PRODUCT_DIR_REG_KEY}"
258 DeleteRegKey /IfEmpty HKCU Software\Elm
258 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}"
260
260
261 ; Update environment variables
261 ; Update environment variables
262 SendMessage ${HWND_BROADCAST} ${WM_SETTINGCHANGE} 0 "STR:Environment" /TIMEOUT=5000
262 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
4
4
5Once everything is installed, run something like this command:
5Once everything is installed, run something like this command:
6
6
7− make_installer.cmd 0.17
7+ make_installer.cmd 0.19
8
8
9−It will build an installer called `ElmPlatform-0.17-setup.exe`. You can read
9+It will build an installer called `Elm-0.19-setup.exe`.
10−more about what arguments can be given to this command in the comments in
11−`BuildFromSource.hs`.
installers/win/inst.dat−4
@@ -1,9 +1,5 @@
1SetOutPath "$INSTDIR\bin"
1SetOutPath "$INSTDIR\bin"
2File "${FILES_SOURCE_PATH}\bin\elm.exe"
2File "${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"
7
3
8SetOutPath "$INSTDIR"
4SetOutPath "$INSTDIR"
9File "file.ico"
5File "file.ico"
installers/win/make_installer.cmd+9−4
@@ -1,15 +1,20 @@
1
1
2set version=%1
2set version=%1
3
3
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+
5if %errorlevel% neq 0 exit /b %errorlevel%
12if %errorlevel% neq 0 exit /b %errorlevel%
6
13
7mkdir files
14mkdir files
8mkdir files\bin
15mkdir files\bin
9
16
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
13xcopy updatepath.vbs files
18xcopy updatepath.vbs files
14
19
15if EXIST "%ProgramFiles%" (
20if EXIST "%ProgramFiles%" (
installers/win/uninst.dat−4
@@ -1,8 +1,4 @@
1Delete "$INSTDIR\bin\elm.exe"
1Delete "$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"
6RmDir "$INSTDIR\bin"
2RmDir "$INSTDIR\bin"
7
3
8Delete "$INSTDIR\file.ico"
4Delete "$INSTDIR\file.ico"