author | Edouard Tisserant <edouard.tisserant@gmail.com> |
Wed, 06 Dec 2017 09:56:32 +0100 | |
changeset 28 | 950f79385de7 |
parent 6 | 862080d48ef2 |
child 37 | fd09116d3537 |
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 |
|
862080d48ef2
Various updates and enhancement in installer build system, including support for specialized distributions, existing in other branches
Edouard Tisserant
parents:
4
diff
changeset
|
2 |
SetCompressor /SOLID /FINAL lzma |
862080d48ef2
Various updates and enhancement in installer build system, including support for specialized distributions, existing in other branches
Edouard Tisserant
parents:
4
diff
changeset
|
3 |
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
|
4 |
|
0
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
5 |
!include MUI2.nsh |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
6 |
|
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
7 |
; MUI Settings |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
8 |
!define MUI_ICON "build\beremiz\images\brz.ico" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
9 |
!define MUI_HEADERIMAGE |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
10 |
!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
|
11 |
!define MUI_ABORTWARNING |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
12 |
|
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
13 |
; Documentation |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
14 |
!insertmacro MUI_PAGE_WELCOME |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
15 |
!define MUI_LICENSEPAGE_CHECKBOX |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
16 |
!insertmacro MUI_PAGE_LICENSE "build/license.txt" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
17 |
!insertmacro MUI_PAGE_DIRECTORY |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
18 |
!insertmacro MUI_PAGE_INSTFILES |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
19 |
!insertmacro MUI_PAGE_FINISH |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
20 |
|
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
21 |
!insertmacro MUI_UNPAGE_CONFIRM |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
22 |
!insertmacro MUI_UNPAGE_INSTFILES |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
23 |
|
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
24 |
!insertmacro MUI_LANGUAGE "English" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
25 |
|
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
26 |
Name "Beremiz $BVERSION" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
27 |
OutFile "Beremiz-$BVERSION.exe" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
28 |
InstallDir "$PROGRAMFILES\Beremiz" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
29 |
!define PYTHONW_EXE "$INSTDIR\python\pythonw.exe" |
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
|
30 |
!define BEREMIZ_EXE '"$INSTDIR\beremiz\Beremiz.py" -u "http://www.beremiz.org/updateinfo/$BVERSION/" $BEXTENSIONS' |
0
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
31 |
|
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
32 |
Section "Beremiz" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
33 |
SetOutPath $INSTDIR |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
34 |
File /r /x debian /x *.pyc "build/*" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
35 |
SectionEnd |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
36 |
|
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
|
37 |
Section "Examples" |
862080d48ef2
Various updates and enhancement in installer build system, including support for specialized distributions, existing in other branches
Edouard Tisserant
parents:
4
diff
changeset
|
38 |
CreateDirectory "$DESKTOP\BeremizExamples" |
862080d48ef2
Various updates and enhancement in installer build system, including support for specialized distributions, existing in other branches
Edouard Tisserant
parents:
4
diff
changeset
|
39 |
SetOutPath "$DESKTOP\BeremizExamples" |
862080d48ef2
Various updates and enhancement in installer build system, including support for specialized distributions, existing in other branches
Edouard Tisserant
parents:
4
diff
changeset
|
40 |
File /r "examples/*" |
862080d48ef2
Various updates and enhancement in installer build system, including support for specialized distributions, existing in other branches
Edouard Tisserant
parents:
4
diff
changeset
|
41 |
CreateShortCut "$DESKTOP\BeremizExamples\canopen_tests\CAN_TCP_Server.lnk" "$INSTDIR\CanFestival-3\drivers\can_tcp_win32\can_tcp_win32_server.exe" "" "" 0 SW_SHOWNORMAL "" "Simple CAN emulation over TCP (for CANopen testing)" |
862080d48ef2
Various updates and enhancement in installer build system, including support for specialized distributions, existing in other branches
Edouard Tisserant
parents:
4
diff
changeset
|
42 |
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
|
43 |
|
0
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
44 |
Section "Install" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
45 |
;Store installation folder |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
46 |
WriteRegStr HKCU "Software\Beremiz" "" $INSTDIR |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
47 |
;Create uninstaller |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
48 |
WriteUninstaller "$INSTDIR\Uninstall.exe" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
49 |
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
|
50 |
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
|
51 |
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
|
52 |
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
|
53 |
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
|
54 |
SectionEnd |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
55 |
|
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
56 |
Section "Shortcuts" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
57 |
SetShellVarContext all |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
58 |
CreateDirectory "$SMPROGRAMS\Beremiz" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
59 |
SetOutPath "$INSTDIR\mingw\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
|
60 |
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
|
61 |
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
|
62 |
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
|
63 |
SetShellVarContext current |
e3a923bd3d56
added desktop icon, added install.nsi and license.txt as prerequistes
Edouard Tisserant
parents:
0
diff
changeset
|
64 |
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
|
65 |
; 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
|
66 |
; 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
|
67 |
SectionEnd |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
68 |
|
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
69 |
Section "Uninstall" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
70 |
SetShellVarContext all |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
71 |
Delete "$INSTDIR\Uninstall.exe" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
72 |
Delete "$SMPROGRAMS\Beremiz\PlcopenEditor.lnk" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
73 |
Delete "$SMPROGRAMS\Beremiz\Beremiz.lnk" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
74 |
RMDir /R "$SMPROGRAMS\Beremiz" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
75 |
RMDir /R "$INSTDIR" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
76 |
DeleteRegKey /ifempty HKCU "Software\Beremiz" |
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
77 |
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
|
78 |
SetShellVarContext current |
e3a923bd3d56
added desktop icon, added install.nsi and license.txt as prerequistes
Edouard Tisserant
parents:
0
diff
changeset
|
79 |
Delete "$DESKTOP\Beremiz.lnk" |
0
7bc9d95b92bc
initial commit, 1.03 installs on WinXP, python test builds and works
Edouard Tisserant
parents:
diff
changeset
|
80 |
SectionEnd |