mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-11-24 04:31:37 +03:00
Merge pull request #177 from Orange-OpenSource/fix/win64_installer
fix path key for win64 installer
This commit is contained in:
commit
4ce04b35b6
@ -1,117 +1,125 @@
|
||||
; includes
|
||||
!include "MUI2.nsh"
|
||||
|
||||
; define icons
|
||||
!define MUI_ICON "..\..\ci\windows\logo.ico"
|
||||
!define MUI_HEADERIMAGE
|
||||
!define MUI_HEADERIMAGE_BITMAP "..\..\ci\windows\logo.png"
|
||||
!define MUI_HEADERIMAGE_RIGHT
|
||||
|
||||
; define version
|
||||
!define /file VERSION "version.txt"
|
||||
|
||||
; The name of the installer
|
||||
Name "hurl ${VERSION}"
|
||||
|
||||
; The file to write
|
||||
|
||||
OutFile "hurl_${VERSION}_installer.exe"
|
||||
|
||||
; Request application privileges for Windows Vista and higher
|
||||
RequestExecutionLevel admin
|
||||
|
||||
; Build Unicode installer
|
||||
Unicode False
|
||||
|
||||
; The default installation directory
|
||||
InstallDir $PROGRAMFILES64\hurl
|
||||
|
||||
; Pages
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_LICENSE ..\..\LICENSE
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
Page components
|
||||
Page directory
|
||||
Page instfiles
|
||||
|
||||
UninstPage uninstConfirm
|
||||
UninstPage instfiles
|
||||
|
||||
; The stuff to install
|
||||
SectionGroup "executables"
|
||||
Section "hurl.exe"
|
||||
SectionIn RO
|
||||
SetOutPath $INSTDIR
|
||||
File "hurl.exe"
|
||||
; Write installation path
|
||||
ReadRegStr $0 HKCU "Environment" "Path"
|
||||
WriteRegStr HKCU "Environment" "path" "$0$INSTDIR;"
|
||||
; Write the uninstall
|
||||
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||
SectionEnd
|
||||
Section "hurlfmt.exe"
|
||||
SectionIn RO
|
||||
SetOutPath $INSTDIR
|
||||
File "hurlfmt.exe"
|
||||
SectionEnd
|
||||
SectionGroupEnd
|
||||
|
||||
SectionGroup "dlls"
|
||||
Section "charset-1.dll"
|
||||
SectionIn RO
|
||||
SetOutPath $INSTDIR
|
||||
File "charset-1.dll"
|
||||
SectionEnd
|
||||
Section "iconv-2.dll"
|
||||
SectionIn RO
|
||||
SetOutPath $INSTDIR
|
||||
File "iconv-2.dll"
|
||||
SectionEnd
|
||||
Section "libxml2.dll"
|
||||
SectionIn RO
|
||||
SetOutPath $INSTDIR
|
||||
File "libxml2.dll"
|
||||
SectionEnd
|
||||
Section "lzma.dll"
|
||||
SectionIn RO
|
||||
SetOutPath $INSTDIR
|
||||
File "lzma.dll"
|
||||
SectionEnd
|
||||
Section "zlib1.dll"
|
||||
SectionIn RO
|
||||
SetOutPath $INSTDIR
|
||||
File "zlib1.dll"
|
||||
SectionEnd
|
||||
SectionGroupEnd
|
||||
|
||||
SectionGroup "txt"
|
||||
Section "version.txt"
|
||||
SectionIn 3
|
||||
SetOutPath $INSTDIR
|
||||
File "version.txt"
|
||||
SectionEnd
|
||||
Section "README.md"
|
||||
SectionIn 3
|
||||
SetOutPath $INSTDIR
|
||||
File "..\..\README.md"
|
||||
SectionEnd
|
||||
Section "CHANGELOG.md"
|
||||
SectionIn 3
|
||||
SetOutPath $INSTDIR
|
||||
File "..\..\CHANGELOG.md"
|
||||
SectionEnd
|
||||
Section "LICENSE"
|
||||
SectionIn 3
|
||||
SetOutPath $INSTDIR
|
||||
File "..\..\LICENSE"
|
||||
SectionEnd
|
||||
SectionGroupEnd
|
||||
|
||||
; Uninstaller
|
||||
Section "Uninstall"
|
||||
; Remove files and uninstaller
|
||||
Delete $INSTDIR\*
|
||||
; Remove directories
|
||||
RMDir "$INSTDIR"
|
||||
SectionEnd
|
||||
; includes
|
||||
!include "MUI2.nsh"
|
||||
|
||||
; define icons
|
||||
!define MUI_ICON "..\..\ci\windows\logo.ico"
|
||||
!define MUI_HEADERIMAGE
|
||||
!define MUI_HEADERIMAGE_BITMAP "..\..\ci\windows\logo.png"
|
||||
!define MUI_HEADERIMAGE_RIGHT
|
||||
|
||||
; define version
|
||||
!define /file VERSION "version.txt"
|
||||
|
||||
; The name of the installer
|
||||
Name "hurl ${VERSION}"
|
||||
|
||||
; The file to write
|
||||
|
||||
OutFile "hurl_${VERSION}_installer.exe"
|
||||
|
||||
; Request application privileges for Windows Vista and higher
|
||||
RequestExecutionLevel admin
|
||||
|
||||
; Build Unicode installer
|
||||
Unicode False
|
||||
|
||||
; The default installation directory
|
||||
InstallDir $PROGRAMFILES64\hurl
|
||||
|
||||
; Start pages
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_LICENSE ..\..\LICENSE
|
||||
|
||||
Page components
|
||||
Page directory
|
||||
Page instfiles
|
||||
|
||||
; Finish page
|
||||
!define MUI_FINISHPAGE_LINK 'Click here to visit us at https://hurl.dev/'
|
||||
!define MUI_FINISHPAGE_LINK_LOCATION https://hurl.dev/
|
||||
!define MUI_FINISHPAGE_TITLE_3LINES
|
||||
!define MUI_FINISHPAGE_TITLE "Congratulation, hurl ${VERSION} is ready to use on your favorite windows terminal (cmd and powershell)"
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
!insertmacro MUI_LANGUAGE English
|
||||
|
||||
UninstPage uninstConfirm
|
||||
UninstPage instfiles
|
||||
|
||||
; The stuff to install
|
||||
SectionGroup "executables"
|
||||
Section "hurl.exe"
|
||||
SectionIn RO
|
||||
SetOutPath $INSTDIR
|
||||
File "hurl.exe"
|
||||
; Write installation path
|
||||
ReadRegStr $0 HKCU "Environment" "Path"
|
||||
WriteRegStr HKCU "Environment" "path" "$0;$INSTDIR"
|
||||
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
|
||||
; Write the uninstall
|
||||
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||
SectionEnd
|
||||
Section "hurlfmt.exe"
|
||||
SectionIn RO
|
||||
SetOutPath $INSTDIR
|
||||
File "hurlfmt.exe"
|
||||
SectionEnd
|
||||
SectionGroupEnd
|
||||
|
||||
SectionGroup "dlls"
|
||||
Section "charset-1.dll"
|
||||
SectionIn RO
|
||||
SetOutPath $INSTDIR
|
||||
File "charset-1.dll"
|
||||
SectionEnd
|
||||
Section "iconv-2.dll"
|
||||
SectionIn RO
|
||||
SetOutPath $INSTDIR
|
||||
File "iconv-2.dll"
|
||||
SectionEnd
|
||||
Section "libxml2.dll"
|
||||
SectionIn RO
|
||||
SetOutPath $INSTDIR
|
||||
File "libxml2.dll"
|
||||
SectionEnd
|
||||
Section "lzma.dll"
|
||||
SectionIn RO
|
||||
SetOutPath $INSTDIR
|
||||
File "lzma.dll"
|
||||
SectionEnd
|
||||
Section "zlib1.dll"
|
||||
SectionIn RO
|
||||
SetOutPath $INSTDIR
|
||||
File "zlib1.dll"
|
||||
SectionEnd
|
||||
SectionGroupEnd
|
||||
|
||||
SectionGroup "txt"
|
||||
Section "version.txt"
|
||||
SectionIn 3
|
||||
SetOutPath $INSTDIR
|
||||
File "version.txt"
|
||||
SectionEnd
|
||||
Section "README.md"
|
||||
SectionIn 3
|
||||
SetOutPath $INSTDIR
|
||||
File "..\..\README.md"
|
||||
SectionEnd
|
||||
Section "CHANGELOG.md"
|
||||
SectionIn 3
|
||||
SetOutPath $INSTDIR
|
||||
File "..\..\CHANGELOG.md"
|
||||
SectionEnd
|
||||
Section "LICENSE"
|
||||
SectionIn 3
|
||||
SetOutPath $INSTDIR
|
||||
File "..\..\LICENSE"
|
||||
SectionEnd
|
||||
SectionGroupEnd
|
||||
|
||||
; Uninstaller
|
||||
Section "Uninstall"
|
||||
; Remove files and uninstaller
|
||||
Delete $INSTDIR\*
|
||||
; Remove directories
|
||||
RMDir "$INSTDIR"
|
||||
SectionEnd
|
||||
|
@ -117,5 +117,5 @@ cd c:\hurl\target\win-package
|
||||
setx /M path "%path%;C:\Program Files (x86)\NSIS\Bin"
|
||||
refreshenv
|
||||
cd c:\hurl\target\win-package
|
||||
makensis /NOCD /V4 c:\hurl\contrib\windows\hurl.nsi
|
||||
makensis /NOCD /V4 c:\hurl\ci\windows\hurl.nsi
|
||||
```
|
||||
|
@ -129,5 +129,5 @@ $oldpath = Get-ItemProperty -Path HKCU:\Environment -Name Path
|
||||
$newpath = $oldpath.Path += ";C:\Program Files (x86)\NSIS\Bin"
|
||||
Set-ItemProperty -Path HKCU:\Environment -Name Path -Value $newpath
|
||||
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
|
||||
makensis.exe /NOCD /V4 ..\..\contrib\windows\hurl.nsi
|
||||
makensis.exe /NOCD /V4 ..\..\ci\windows\hurl.nsi
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user