Skip to content

Commit 6cab408

Browse files
committed
pack: Update win32 nsis script
* CMakeLists.txt: Likewise. * src/core/CMakeLists.txt: Likewise. * src/gui/CMakeLists.txt: Likewise. * src/gui/images/nclcomposer.rc -> src/gui/nclcomposer.rc: Renamed. * win32-nsis/nclcomposer.nsis -> win32-nsis/nclcomposer.nsi: Renamed.
1 parent 64ae12e commit 6cab408

File tree

5 files changed

+58
-43
lines changed

5 files changed

+58
-43
lines changed

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt5core5a, libqt5gui5, libqt5network5, libq
8888
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
8989
# Copy QT's dynamic libs
9090
if(WIN32)
91-
set(QT_INSTALLED_PATH "C:/Qt/5.5/mingw492_32")
91+
set(QT_INSTALLED_PATH "C:/Qt/5.8/mingw53_32")
9292
install(FILES "${QT_INSTALLED_PATH}/bin/Qt5Core.dll"
9393
"${QT_INSTALLED_PATH}/bin/Qt5Gui.dll"
9494
"${QT_INSTALLED_PATH}/bin/Qt5Network.dll"
@@ -102,7 +102,7 @@ if(WIN32)
102102
bin)
103103

104104
install(FILES "${QT_INSTALLED_PATH}/plugins/platforms/qwindows.dll"
105-
DESTINATION plugins/platforms)
105+
DESTINATION bin/plugins/platforms)
106106
endif()
107107

108108
# This must always be last!

src/core/CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,8 @@ target_link_libraries(nclcomposer_core
7070
LINK_PUBLIC Qt5::Xml Qt5::Widgets
7171
)
7272

73-
install(TARGETS nclcomposer_core DESTINATION ${NCLCOMPOSER_BINARY_DIR_LIB})
73+
if(WIN32)
74+
install(TARGETS nclcomposer_core DESTINATION ${NCLCOMPOSER_BINARY_DIR_BIN})
75+
else()
76+
install(TARGETS nclcomposer_core DESTINATION ${NCLCOMPOSER_BINARY_DIR_LIB})
77+
endif()

src/gui/CMakeLists.txt

+8-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ else()
99
message("Do not use fervor gui")
1010
endif()
1111

12+
# Set some Win32 Specific Settings
13+
IF(WIN32)
14+
SET(GUI_TYPE WIN32)
15+
ENDIF(WIN32)
16+
1217
# Current date and time
1318
string(TIMESTAMP BUILD_DATE "%Y-%m-%d %H:%M")
1419
add_definitions(-DBUILD_DATE="${BUILD_DATE}")
@@ -48,7 +53,7 @@ QT5_WRAP_UI(UI_GENERATED_HEADERS
4853
${UI_SOURCES}
4954
)
5055

51-
add_executable(nclcomposer
56+
add_executable(nclcomposer ${GUI_TYPE}
5257
main.cpp
5358
src/ComposerMainWindow.cpp
5459
src/PreferencesDialog.cpp
@@ -76,6 +81,8 @@ add_executable(nclcomposer
7681
gui.qrc
7782
../plugins/common-resources/images.qrc
7883
../plugins/common-resources/language.qrc
84+
85+
nclcomposer.rc
7986
)
8087

8188
set_target_properties(nclcomposer PROPERTIES
File renamed without changes.

win32-nsis/nclcomposer.nsis renamed to win32-nsis/nclcomposer.nsi

+43-39
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
;--------------------------------
1010
!ifndef VERSION
11-
!define VERSION "0.3.0"
11+
!define VERSION "0.4.0"
1212
!endif
1313

1414
Name "NCL Composer ${VERSION}"
@@ -25,7 +25,7 @@ InstallDir "$PROGRAMFILES\TeleMidia\NCL Composer"
2525

2626
; License informations
2727
LicenseText "Please review the license terms before installing NCL Composer."
28-
LicenseData "../LICENSE.EPL"
28+
LicenseData "../LICENSE.LGPL"
2929

3030
; Request application privileges for Windows Vista
3131
RequestExecutionLevel admin
@@ -81,29 +81,31 @@ InstType "Minimal"
8181
Section "NCL Composer Core (required)" ; No components page, name is not important
8282
SectionIn RO
8383
; Set output path to the installation directory.
84-
SetOutPath $INSTDIR
84+
SetOutPath $INSTDIR\bin
8585

8686
; Put file there
87-
File "C:\Composer\*.dll"
88-
File "C:\Composer\*.exe"
87+
File "C:\Composer\bin\*"
88+
89+
SetOutPath $INSTDIR\bin\plugins\platforms
90+
File "C:\Composer\bin\plugins\platforms\qwindows.dll"
8991

9092
WriteUninstaller "uninstall.exe"
9193

9294
; include Files
93-
SetoutPath $INSTDIR\include
94-
File /r "C:\Composer\include\*"
95+
; SetoutPath $INSTDIR\include
96+
; File /r "C:\Composer\include\*"
9597

9698
; data Files
97-
SetOutPath $INSTDIR\data
98-
File "C:\Composer\data\*"
99+
SetOutPath $INSTDIR\share\nclcomposer
100+
File "C:\Composer\share\nclcomposer\*"
99101

100102
; install NCL Language Profile
101-
SetOutPath $INSTDIR\extensions
102-
File "C:\Composer\extensions\NCLLanguageProfile.dll"
103+
SetOutPath $INSTDIR\lib\nclcomposer\plugins
104+
File "C:\Composer\lib\nclcomposer\plugins\libnclprofile.dll"
103105

104106
; translation files
105-
SetOutPath $INSTDIR\extensions
106-
File "C:\Composer\extensions\*.qm"
107+
; SetOutPath $INSTDIR\extensions
108+
; File "C:\Composer\extensions\*.qm"
107109

108110
; Associate .cpr files with NCL Composer
109111
${registerExtension} $INSTDIR\nclcomposer.exe ".cpr" "NCL Composer project"
@@ -116,9 +118,9 @@ SectionEnd ; end the section
116118
Section "Start Menu Shortcuts"
117119
SectionIn 1
118120
CreateDirectory "$SMPROGRAMS\NCL Composer"
119-
CreateShortCut "$SMPROGRAMS\NCL Composer\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
120-
CreateShortCut "$SMPROGRAMS\NCL Composer\NCL Composer.lnk" "$INSTDIR\nclcomposer.exe" "" "$INSTDIR\nclcomposer.exe" 0
121-
CreateShortCut "$SMPROGRAMS\NCL Composer\ (MakeNSISW).lnk" "$INSTDIR\nclcomposer.nsi" "" "$INSTDIR\nclcomposer.nsi" 0
121+
CreateShortCut "$SMPROGRAMS\NCL Composer\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
122+
CreateShortCut "$SMPROGRAMS\NCL Composer\NCL Composer.lnk" "$INSTDIR\nclcomposer.exe" "" "$INSTDIR\nclcomposer.exe" 0
123+
CreateShortCut "$SMPROGRAMS\NCL Composer\ (MakeNSISW).lnk" "$INSTDIR\nclcomposer.nsi" "" "$INSTDIR\nclcomposer.nsi" 0
122124
SectionEnd
123125

124126
; Ginga default executable
@@ -156,51 +158,53 @@ SectionGroupEnd
156158
SectionGroup /e "Install Default Plugins"
157159
Section "Textual View"
158160
SectionIn 1
159-
SetOutPath $INSTDIR\extensions
160-
; File "C:\Composer\extensions\qscintilla2.dll"
161-
File "C:\Composer\extensions\ncl_textual_view.dll"
161+
SetOutPath $INSTDIR\lib\nclcomposer\plugins
162+
File "C:\Composer\lib\nclcomposer\plugins\libncl_textual_view.dll"
163+
164+
SetOutPath $INSTDIR\bin
165+
File "C:\Composer\bin\libqscintilla2_telem.dll"
162166
SectionEnd
163167

164168
Section "Layout View"
165169
SectionIn 1
166-
SetOutPath $INSTDIR\extensions
167-
File "C:\Composer\\extensions\ncl_layout_view.dll"
170+
SetOutPath $INSTDIR\lib\nclcomposer\plugins
171+
File "C:\Composer\lib\nclcomposer\plugins\libncl_layout_view.dll"
168172
SectionEnd
169173

170174
Section "Properties View"
171175
SectionIn 1
172-
SetOutPath $INSTDIR\extensions
173-
File "C:\Composer\extensions\properties_view.dll"
176+
SetOutPath $INSTDIR\lib\nclcomposer\plugins
177+
File "C:\Composer\lib\nclcomposer\plugins\libproperties_view.dll"
174178
SectionEnd
175179

176180
Section "Structural View"
177181
SectionIn 1
178-
SetOutPath $INSTDIR\extensions
179-
File "C:\Composer\extensions\ncl_structural_view_next.dll"
182+
SetOutPath $INSTDIR\lib\nclcomposer\plugins
183+
File "C:\Composer\lib\nclcomposer\plugins\libncl_structural_view.dll"
180184
SectionEnd
181185

182186
Section "Outline View"
183187
SectionIn 1
184-
SetOutPath $INSTDIR\extensions
185-
File "C:\Composer\extensions\outline_view.dll"
188+
SetOutPath $INSTDIR\lib\nclcomposer\plugins
189+
File "C:\Composer\lib\nclcomposer\plugins\liboutline_view.dll"
186190
SectionEnd
187191

188192
Section "Validator Plugin"
189193
SectionIn 1
190-
SetOutPath $INSTDIR\extensions
191-
File "C:\Composer\extensions\validator.dll"
194+
SetOutPath $INSTDIR\lib\nclcomposer\plugins
195+
File "C:\Composer\lib\nclcomposer\plugins\libvalidator_plugin.dll"
192196
SectionEnd
193197

194198
Section "Rules View"
195199
SectionIn 1
196-
SetOutPath $INSTDIR\extensions
197-
File "C:\Composer\extensions\ncl_rules_view.dll"
200+
SetOutPath $INSTDIR\lib\nclcomposer\plugins
201+
File "C:\Composer\lib\nclcomposer\plugins\libncl_rules_view.dll"
198202
SectionEnd
199203

200204
Section "Run View"
201205
SectionIn 1
202-
SetOutPath $INSTDIR\extensions
203-
File "C:\Composer\extensions\run_view.dll"
206+
SetOutPath $INSTDIR\lib\nclcomposer\plugins
207+
File "C:\Composer\lib\nclcomposer\plugins\librun_view.dll"
204208
SectionEnd
205209

206210
SectionGroupEnd
@@ -210,12 +214,12 @@ SectionGroupEnd
210214
UninstallText "This will uninstall NCL Composer. Hit next to continue"
211215
Section "Uninstall"
212216
Delete "$INSTDIR\*"
213-
Delete "$INSTDIR\extensions\*"
214-
Delete "$INSTDIR\data\*"
215-
Delete "$INSTDIR\include\*"
216-
RMDir "$INSTDIR\extensions"
217-
RMDir "$INSTDIR\data"
218-
RMDir "$INSTDIR\include"
217+
Delete "$INSTDIR\bin\*"
218+
Delete "$INSTDIR\lib\nclcomposer\plugins\*"
219+
Delete "$INSTDIR\share\nclcomposer\*"
220+
RMDir "$INSTDIR\bin"
221+
RMDir "$INSTDIR\lib"
222+
RMDir "$INSTDIR\share"
219223

220224
;Shortcuts
221225
Delete "$SMPROGRAMS\NCL Composer\*"

0 commit comments

Comments
 (0)