Skip to content

Commit dfccda4

Browse files
committed
Added NSIS script and 3:rd party licenses
1 parent a0e461f commit dfccda4

6 files changed

+186
-18
lines changed

CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ add_subdirectory(mdflib)
3535

3636
if (wxWidgets_FOUND AND WIN32)
3737
add_subdirectory(mdfviewer)
38-
endif()
38+
endif()
39+

LICENSE-3RD-PARTY.md

+17-14
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,6 @@ SPDX-License-Identifier: BSL-1.0
1111

1212
https://www.boost.org/LICENSE_1_0.txt
1313

14-
### Doxygen
15-
16-
Software documentation tool.
17-
18-
License: https://www.doxygen.nl/index.html
19-
20-
### Google Test
21-
22-
Unit test libraries.
23-
24-
SPDX-License-Identifier: BSD-3-Clause
25-
26-
https://opensource.org/licenses/BSD-3-Clause
27-
2814
### Expat
2915

3016
C library for parsing XML
@@ -67,9 +53,26 @@ https://www.zlib.net/zlib_license.html
6753

6854
https://opensource.org/licenses/Zlib
6955

56+
## Build Applications
7057

58+
### Doxygen
59+
60+
Software documentation tool.
61+
62+
https://www.doxygen.nl/index.html
63+
64+
### Google Test
65+
66+
Unit test libraries.
67+
68+
SPDX-License-Identifier: BSD-3-Clause
69+
70+
https://opensource.org/licenses/BSD-3-Clause
7171

72+
### NSIS - Nullsoft Scriptable Install System
7273

74+
Windows and Unix installers.
7375

76+
https://nsis.sourceforge.io/Main_Page
7477

7578

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The project is a rather complex consisting of several libraries and applications
1414
- Application ODS Modeler. The application configure ASAM ODS database models.
1515
- Application Measurement Manager. The application manage multiple measurement files.
1616

17-
<<<<<<< HEAD
17+
1818
The project is currently under development.
1919

2020
## Building the project
@@ -29,11 +29,12 @@ needs to be downloaded and built.
2929
- Doxygen's application. Is required if the documentation should be built.
3030
- Google Test Library. Is required for running and build the unit tests.
3131
- wxWidgets Library. Is required for the GUI applications to build. Set both
32+
- NSIS Installer. Needed to build an installer executable for Windows.
3233
the 'wxWidgets_ROOT_DIR' and the 'wxWidgets_LIB_DIR' variables.
3334

3435
## License
3536

3637
The project uses the MIT license. See external LICENSE file in project root.
37-
=======
38+
3839
The project is currently under development.
39-
>>>>>>> b0fb5db134066228124ebd128d6b768f26188a72
40+

img/document.ico

169 KB
Binary file not shown.

img/server.ico

139 KB
Binary file not shown.

script/report_server.nsi

+163
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
# Copyright 2021 Ingemar Hedvall
2+
# SPDX-License-Identifier: MIT
3+
4+
!include MUI2.nsh
5+
!include x64.nsh
6+
!include FileFunc.nsh
7+
8+
Name "Report Server Applications and Libraries"
9+
OutFile "..\cmake-build-release\report_server.exe"
10+
Unicode True
11+
12+
RequestExecutionLevel admin
13+
14+
Var StartMenuFolder
15+
16+
InstallDir "$LOCALAPPDATA\ReportServer"
17+
InstallDirRegKey HKLM "Software\ReportServer" ""
18+
19+
20+
!define MUI_ABORTWARNING
21+
!define ARP "Software\Microsoft\Windows\CurrentVersion\Uninstall\ReportServer"
22+
23+
!insertmacro MUI_PAGE_WELCOME
24+
!insertmacro MUI_PAGE_LICENSE "..\LICENSE"
25+
!insertmacro MUI_PAGE_COMPONENTS
26+
!insertmacro MUI_PAGE_DIRECTORY
27+
28+
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Report Server"
29+
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
30+
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\ReportServer"
31+
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
32+
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
33+
34+
!insertmacro MUI_PAGE_INSTFILES
35+
!insertmacro MUI_PAGE_FINISH
36+
37+
!insertmacro MUI_UNPAGE_WELCOME
38+
!insertmacro MUI_UNPAGE_CONFIRM
39+
!insertmacro MUI_UNPAGE_INSTFILES
40+
!insertmacro MUI_UNPAGE_FINISH
41+
42+
!insertmacro MUI_LANGUAGE "English"
43+
44+
;--------------------------------
45+
;Installer Sections
46+
47+
Section "Applications" App
48+
SectionIn RO
49+
SetRegView 64
50+
SetShellVarContext all
51+
52+
SetOutPath "$INSTDIR\bin"
53+
File "..\cmake-build-release\mdfviewer\*.exe"
54+
55+
SetOutPath "$INSTDIR\img"
56+
File "..\img\*.*"
57+
58+
;Store installation folder
59+
WriteRegStr HKLM "Software\ReportServer" "" $INSTDIR
60+
61+
WriteUninstaller "$INSTDIR\Uninstall.exe"
62+
63+
; Add /Remove Programs
64+
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
65+
IntFmt $0 "0x%08X" $0
66+
67+
68+
WriteRegNone HKLM "${ARP}" ""
69+
WriteRegStr HKLM "${ARP}" "InstallLocation" $INSTDIR
70+
WriteRegStr HKLM "${ARP}" "DisplayIcon" "$INSTDIR\img\server.ico"
71+
WriteRegStr HKLM "${ARP}" "DisplayName" "Report Server 1.0"
72+
WriteRegStr HKLM "${ARP}" "DisplayVersion" "1.0.0"
73+
WriteRegStr HKLM "${ARP}" "Publisher" "Ingemar Hedvall"
74+
WriteRegDWORD HKLM "${ARP}" "NoModify" 1
75+
WriteRegDWORD HKLM "${ARP}" "NoRepair" 1
76+
WriteRegDWORD HKLM "${ARP}" "VersionMajor" 1
77+
WriteRegDWORD HKLM "${ARP}" "VersionMinor" 0
78+
WriteRegDWORD HKLM "${ARP}" "EstimatedSize" "$0"
79+
WriteRegStr HKLM "${ARP}" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""
80+
81+
;Create uninstaller
82+
83+
84+
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
85+
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
86+
CreateShortcut "$SMPROGRAMS\$StartMenuFolder\MDF Viewer.lnk" "$INSTDIR\bin\mdfview.exe"
87+
!insertmacro MUI_STARTMENU_WRITE_END
88+
89+
SectionEnd
90+
91+
Section /o "Util Library" Util
92+
SetRegView 64
93+
94+
SetOutPath "$INSTDIR\lib"
95+
File "..\cmake-build-release\utillib\libutil.a"
96+
File "..\cmake-build-debug\utillib\libutild.a"
97+
98+
SetOutPath "$INSTDIR\include\util"
99+
File "..\utillib\include\util\*.*"
100+
101+
SetOutPath "$INSTDIR\doc\util"
102+
File /r "..\cmake-build-release\utillib\html\*.*"
103+
104+
CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Util Library Documentation.lnk" \
105+
"$INSTDIR\doc\util\index.html" "" "$INSTDIR\img\document.ico" \
106+
0 SW_SHOWNORMAL
107+
108+
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
109+
IntFmt $0 "0x%08X" $0
110+
WriteRegDWORD HKLM "${ARP}" "EstimatedSize" "$0"
111+
SectionEnd
112+
113+
Section /o "MDF Library" MDF
114+
SetRegView 64
115+
116+
SetOutPath "$INSTDIR\lib"
117+
File "..\cmake-build-release\mdflib\libmdf.a"
118+
File "..\cmake-build-debug\mdflib\libmdfd.a"
119+
120+
SetOutPath "$INSTDIR\include\mdf"
121+
File "..\mdflib\include\mdf\*.*"
122+
123+
SetOutPath "$INSTDIR\doc\mdf"
124+
File /r "..\cmake-build-release\mdflib\html\*.*"
125+
126+
CreateShortcut "$SMPROGRAMS\$StartMenuFolder\MDF Library Documentation.lnk" \
127+
"$INSTDIR\doc\mdf\index.html" "" "$INSTDIR\img\document.ico" \
128+
0 SW_SHOWNORMAL
129+
130+
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
131+
IntFmt $0 "0x%08X" $0
132+
WriteRegDWORD HKLM "${ARP}" "EstimatedSize" "$0"
133+
SectionEnd
134+
135+
136+
LangString DESC_App ${LANG_ENGLISH} "All executables."
137+
LangString DESC_Util ${LANG_ENGLISH} "Util Library"
138+
LangString DESC_MDF ${LANG_ENGLISH} "MDF Library"
139+
140+
141+
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
142+
!insertmacro MUI_DESCRIPTION_TEXT ${App} $(DESC_App)
143+
!insertmacro MUI_DESCRIPTION_TEXT ${Util} $(DESC_Util)
144+
!insertmacro MUI_DESCRIPTION_TEXT ${MDF} $(DESC_MDF)
145+
!insertmacro MUI_FUNCTION_DESCRIPTION_END
146+
147+
;--------------------------------
148+
;Uninstaller Section
149+
150+
Section "Uninstall"
151+
SetRegView 64
152+
SetShellVarContext all
153+
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
154+
155+
Delete "$INSTDIR\Uninstall.exe"
156+
157+
RMDir /r "$INSTDIR"
158+
RMDir /r "$SMPROGRAMS\$StartMenuFolder"
159+
160+
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ReportServer"
161+
DeleteRegKey HKLM "Software\ReportServer"
162+
163+
SectionEnd

0 commit comments

Comments
 (0)