author | Edouard Tisserant <edouard.tisserant@gmail.com> |
Thu, 28 Jul 2022 17:09:18 +0200 | |
changeset 74 | 46a4c1f5113b |
parent 39 | 3aea3759ccd7 |
child 102 | 86aab112a8f4 |
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 |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
7 |
|
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
8 |
; 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
|
9 |
!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
|
10 |
!define MUI_HEADERIMAGE |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
11 |
!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
|
12 |
!define MUI_ABORTWARNING |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
13 |
|
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
14 |
; Documentation |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
15 |
!insertmacro MUI_PAGE_WELCOME |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
16 |
!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
|
17 |
!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
|
18 |
!insertmacro MUI_PAGE_DIRECTORY |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
19 |
!insertmacro MUI_PAGE_INSTFILES |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
20 |
!insertmacro MUI_PAGE_FINISH |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
21 |
|
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
22 |
!insertmacro MUI_UNPAGE_CONFIRM |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
23 |
!insertmacro MUI_UNPAGE_INSTFILES |
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_LANGUAGE "English" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
26 |
|
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
27 |
Name "Beremiz $BVERSION" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
28 |
OutFile "Beremiz-$BVERSION.exe" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
29 |
InstallDir "$PROGRAMFILES\Beremiz" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
30 |
!define PYTHONW_EXE "$INSTDIR\python\pythonw.exe" |
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
|
31 |
!define BEREMIZ_EXE '"$INSTDIR\beremiz\Beremiz.py" -u "http://www.beremiz.org/updateinfo/$BVERSION/"' |
0
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
32 |
|
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
33 |
Section "Beremiz" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
34 |
SetOutPath $INSTDIR |
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
|
35 |
File /r /x debian /x *.pyc "installer/*" |
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
|
36 |
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
|
37 |
|
0
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
38 |
Section "Install" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
39 |
;Store installation folder |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
40 |
WriteRegStr HKCU "Software\Beremiz" "" $INSTDIR |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
41 |
;Create uninstaller |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
42 |
WriteUninstaller "$INSTDIR\Uninstall.exe" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
43 |
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Beremiz" "Contact" "edouard.tisserant@gmail.com" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
44 |
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
|
45 |
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
|
46 |
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
|
47 |
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
|
48 |
SectionEnd |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
49 |
|
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
50 |
Section "Shortcuts" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
51 |
SetShellVarContext all |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
52 |
CreateDirectory "$SMPROGRAMS\Beremiz" |
38
3991f82369cb
Bundle in installer only fraction of MSYS2: Mingw32. The rest isn't needed for now.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
37
diff
changeset
|
53 |
SetOutPath "$INSTDIR\mingw32\bin" |
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
|
54 |
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
|
55 |
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
|
56 |
CreateShortCut "$SMPROGRAMS\Beremiz\Uninstall.lnk" "$INSTDIR\uninstall.exe" |
4
e3a923bd3d56
added desktop icon, added install.nsi and license.txt as prerequistes
Edouard Tisserant
parents:
0
diff
changeset
|
57 |
SetShellVarContext current |
e3a923bd3d56
added desktop icon, added install.nsi and license.txt as prerequistes
Edouard Tisserant
parents:
0
diff
changeset
|
58 |
CreateShortCut "$DESKTOP\Beremiz.lnk" "${PYTHONW_EXE}" '${BEREMIZ_EXE}' "$INSTDIR\beremiz\images\brz.ico" |
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
|
59 |
; Profiling : |
862080d48ef2
Various updates and enhancement in installer build system, including support for specialized distributions, existing in other branches
Edouard Tisserant
parents:
4
diff
changeset
|
60 |
; CreateShortCut "$DESKTOP\BeremizPro.lnk" "${PYTHONW_EXE}" '-m cProfile -o %USERPROFILE%/stats.pstat ${BEREMIZ_EXE}' "$INSTDIR\beremiz\images\brz.ico" |
0
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
61 |
SectionEnd |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
62 |
|
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
63 |
Section "Uninstall" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
64 |
SetShellVarContext all |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
65 |
Delete "$INSTDIR\Uninstall.exe" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
66 |
Delete "$SMPROGRAMS\Beremiz\PlcopenEditor.lnk" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
67 |
Delete "$SMPROGRAMS\Beremiz\Beremiz.lnk" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
68 |
RMDir /R "$SMPROGRAMS\Beremiz" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
69 |
RMDir /R "$INSTDIR" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
70 |
DeleteRegKey /ifempty HKCU "Software\Beremiz" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
71 |
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
|
72 |
SetShellVarContext current |
e3a923bd3d56
added desktop icon, added install.nsi and license.txt as prerequistes
Edouard Tisserant
parents:
0
diff
changeset
|
73 |
Delete "$DESKTOP\Beremiz.lnk" |
0
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
74 |
SectionEnd |