author | Edouard Tisserant <edouard.tisserant@gmail.com> |
Thu, 28 Sep 2023 22:29:30 +0200 | |
changeset 120 | 02e37d9e96a9 |
parent 116 | dc462ee1c0f5 |
permissions | -rw-r--r-- |
6
862080d48ef2
Various updates and enhancement in installer build system, including support for specialized distributions, existing in other branches
Edouard Tisserant
parents:
4
diff
changeset
|
1 |
|
39
3aea3759ccd7
Re-enable lzma compression for windows installer
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
38
diff
changeset
|
2 |
SetCompressor /SOLID /FINAL lzma |
3aea3759ccd7
Re-enable lzma compression for windows installer
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
38
diff
changeset
|
3 |
;SetCompress off |
6
862080d48ef2
Various updates and enhancement in installer build system, including support for specialized distributions, existing in other branches
Edouard Tisserant
parents:
4
diff
changeset
|
4 |
SetDatablockOptimize off |
862080d48ef2
Various updates and enhancement in installer build system, including support for specialized distributions, existing in other branches
Edouard Tisserant
parents:
4
diff
changeset
|
5 |
|
0
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
6 |
!include MUI2.nsh |
120
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
116
diff
changeset
|
7 |
;!include LogicLib.nsh |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
116
diff
changeset
|
8 |
!include x64.nsh |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
116
diff
changeset
|
9 |
|
0
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
10 |
|
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
11 |
; MUI Settings |
37
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
6
diff
changeset
|
12 |
!define MUI_ICON "installer\beremiz\images\brz.ico" |
0
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
13 |
!define MUI_HEADERIMAGE |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
14 |
!define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\nsis.bmp" ; optional |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
15 |
!define MUI_ABORTWARNING |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
16 |
|
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
17 |
; Documentation |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
18 |
!insertmacro MUI_PAGE_WELCOME |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
19 |
!define MUI_LICENSEPAGE_CHECKBOX |
37
fd09116d3537
New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
6
diff
changeset
|
20 |
!insertmacro MUI_PAGE_LICENSE "installer/license.txt" |
0
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
21 |
!insertmacro MUI_PAGE_DIRECTORY |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
22 |
!insertmacro MUI_PAGE_INSTFILES |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
23 |
!insertmacro MUI_PAGE_FINISH |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
24 |
|
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
25 |
!insertmacro MUI_UNPAGE_CONFIRM |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
26 |
!insertmacro MUI_UNPAGE_INSTFILES |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
27 |
|
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
28 |
!insertmacro MUI_LANGUAGE "English" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
29 |
|
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
30 |
Name "Beremiz $BVERSION" |
120
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
116
diff
changeset
|
31 |
OutFile "Beremiz-nsis-installer.exe" |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
116
diff
changeset
|
32 |
InstallDir "$PROGRAMFILES64\Beremiz" |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
116
diff
changeset
|
33 |
!define PYTHONW_EXE "$INSTDIR\$MSYS_DIR\$MSYS_ENV_DIR\bin\pythonw.exe" |
116
dc462ee1c0f5
Windows installer: add winpaths.py to extend %PATH% so that build find msys2 binaries including Make.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
114
diff
changeset
|
34 |
!define BEREMIZ_EXE '"$INSTDIR\beremiz\Beremiz.py" -e "$INSTDIR\winpaths.py"' |
0
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
35 |
|
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
36 |
Section "Beremiz" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
37 |
SetOutPath $INSTDIR |
120
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
116
diff
changeset
|
38 |
${If} ${IsNativeAMD64} |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
116
diff
changeset
|
39 |
File /r /x debian /x *.pyc "installer/*" |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
116
diff
changeset
|
40 |
${Else} |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
116
diff
changeset
|
41 |
Abort "Unsupported CPU architecture!" |
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
116
diff
changeset
|
42 |
${EndIf} |
6
862080d48ef2
Various updates and enhancement in installer build system, including support for specialized distributions, existing in other branches
Edouard Tisserant
parents:
4
diff
changeset
|
43 |
SectionEnd |
862080d48ef2
Various updates and enhancement in installer build system, including support for specialized distributions, existing in other branches
Edouard Tisserant
parents:
4
diff
changeset
|
44 |
|
0
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
45 |
Section "Install" |
120
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
116
diff
changeset
|
46 |
SetRegView 64 |
0
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
47 |
;Store installation folder |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
48 |
WriteRegStr HKCU "Software\Beremiz" "" $INSTDIR |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
49 |
;Create uninstaller |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
50 |
WriteUninstaller "$INSTDIR\Uninstall.exe" |
114
9def1a3011ed
update contact address in windows installer
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
113
diff
changeset
|
51 |
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Beremiz" "Contact" "contact@beremiz.fr" |
0
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
52 |
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Beremiz" "DisplayName" "Beremiz" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
53 |
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Beremiz" "Publisher" "Beremiz" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
54 |
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Beremiz" "URLInfoAbout" "http://www.beremiz.org" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
55 |
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Beremiz" "UninstallString" "$INSTDIR\uninstall.exe" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
56 |
SectionEnd |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
57 |
|
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
58 |
Section "Shortcuts" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
59 |
SetShellVarContext all |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
60 |
CreateDirectory "$SMPROGRAMS\Beremiz" |
116
dc462ee1c0f5
Windows installer: add winpaths.py to extend %PATH% so that build find msys2 binaries including Make.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
114
diff
changeset
|
61 |
SetOutPath "%HOMEDRIVE%%HOMEPATH%" |
102
86aab112a8f4
Windows installer: remove useless shortcuts.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
39
diff
changeset
|
62 |
; CreateShortCut "$SMPROGRAMS\Beremiz\PlcopenEditor.lnk" "${PYTHONW_EXE}" '"$INSTDIR\beremiz\plcopeneditor.py"' "$INSTDIR\beremiz\images\poe.ico" |
0
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
63 |
CreateShortCut "$SMPROGRAMS\Beremiz\Beremiz.lnk" "${PYTHONW_EXE}" '${BEREMIZ_EXE}' "$INSTDIR\beremiz\images\brz.ico" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
64 |
CreateShortCut "$SMPROGRAMS\Beremiz\Uninstall.lnk" "$INSTDIR\uninstall.exe" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
65 |
SectionEnd |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
66 |
|
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
67 |
Section "Uninstall" |
120
02e37d9e96a9
Windows Installer : Python3 + 64bit
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
116
diff
changeset
|
68 |
SetRegView 64 |
0
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
69 |
SetShellVarContext all |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
70 |
Delete "$INSTDIR\Uninstall.exe" |
113
d986e1935daf
cleanup dead/commented code
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
102
diff
changeset
|
71 |
; Delete "$SMPROGRAMS\Beremiz\PlcopenEditor.lnk" |
0
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
72 |
Delete "$SMPROGRAMS\Beremiz\Beremiz.lnk" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
73 |
RMDir /R "$SMPROGRAMS\Beremiz" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
74 |
RMDir /R "$INSTDIR" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
75 |
DeleteRegKey /ifempty HKCU "Software\Beremiz" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
76 |
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Beremiz" |
4
e3a923bd3d56
added desktop icon, added install.nsi and license.txt as prerequistes
Edouard Tisserant
parents:
0
diff
changeset
|
77 |
SetShellVarContext current |
e3a923bd3d56
added desktop icon, added install.nsi and license.txt as prerequistes
Edouard Tisserant
parents:
0
diff
changeset
|
78 |
Delete "$DESKTOP\Beremiz.lnk" |
0
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
79 |
SectionEnd |