Skip to content

Commit

Permalink
pack: Update win32 nsis script
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
robertogerson committed May 11, 2017
1 parent 64ae12e commit 6cab408
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 43 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt5core5a, libqt5gui5, libqt5network5, libq
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
# Copy QT's dynamic libs
if(WIN32)
set(QT_INSTALLED_PATH "C:/Qt/5.5/mingw492_32")
set(QT_INSTALLED_PATH "C:/Qt/5.8/mingw53_32")
install(FILES "${QT_INSTALLED_PATH}/bin/Qt5Core.dll"
"${QT_INSTALLED_PATH}/bin/Qt5Gui.dll"
"${QT_INSTALLED_PATH}/bin/Qt5Network.dll"
Expand All @@ -102,7 +102,7 @@ if(WIN32)
bin)

install(FILES "${QT_INSTALLED_PATH}/plugins/platforms/qwindows.dll"
DESTINATION plugins/platforms)
DESTINATION bin/plugins/platforms)
endif()

# This must always be last!
Expand Down
6 changes: 5 additions & 1 deletion src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,8 @@ target_link_libraries(nclcomposer_core
LINK_PUBLIC Qt5::Xml Qt5::Widgets
)

install(TARGETS nclcomposer_core DESTINATION ${NCLCOMPOSER_BINARY_DIR_LIB})
if(WIN32)
install(TARGETS nclcomposer_core DESTINATION ${NCLCOMPOSER_BINARY_DIR_BIN})
else()
install(TARGETS nclcomposer_core DESTINATION ${NCLCOMPOSER_BINARY_DIR_LIB})
endif()
9 changes: 8 additions & 1 deletion src/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ else()
message("Do not use fervor gui")
endif()

# Set some Win32 Specific Settings
IF(WIN32)
SET(GUI_TYPE WIN32)
ENDIF(WIN32)

# Current date and time
string(TIMESTAMP BUILD_DATE "%Y-%m-%d %H:%M")
add_definitions(-DBUILD_DATE="${BUILD_DATE}")
Expand Down Expand Up @@ -48,7 +53,7 @@ QT5_WRAP_UI(UI_GENERATED_HEADERS
${UI_SOURCES}
)

add_executable(nclcomposer
add_executable(nclcomposer ${GUI_TYPE}
main.cpp
src/ComposerMainWindow.cpp
src/PreferencesDialog.cpp
Expand Down Expand Up @@ -76,6 +81,8 @@ add_executable(nclcomposer
gui.qrc
../plugins/common-resources/images.qrc
../plugins/common-resources/language.qrc

nclcomposer.rc
)

set_target_properties(nclcomposer PROPERTIES
Expand Down
File renamed without changes.
82 changes: 43 additions & 39 deletions win32-nsis/nclcomposer.nsis → win32-nsis/nclcomposer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

;--------------------------------
!ifndef VERSION
!define VERSION "0.3.0"
!define VERSION "0.4.0"
!endif

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

; License informations
LicenseText "Please review the license terms before installing NCL Composer."
LicenseData "../LICENSE.EPL"
LicenseData "../LICENSE.LGPL"

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

; Put file there
File "C:\Composer\*.dll"
File "C:\Composer\*.exe"
File "C:\Composer\bin\*"

SetOutPath $INSTDIR\bin\plugins\platforms
File "C:\Composer\bin\plugins\platforms\qwindows.dll"

WriteUninstaller "uninstall.exe"

; include Files
SetoutPath $INSTDIR\include
File /r "C:\Composer\include\*"
; SetoutPath $INSTDIR\include
; File /r "C:\Composer\include\*"

; data Files
SetOutPath $INSTDIR\data
File "C:\Composer\data\*"
SetOutPath $INSTDIR\share\nclcomposer
File "C:\Composer\share\nclcomposer\*"

; install NCL Language Profile
SetOutPath $INSTDIR\extensions
File "C:\Composer\extensions\NCLLanguageProfile.dll"
SetOutPath $INSTDIR\lib\nclcomposer\plugins
File "C:\Composer\lib\nclcomposer\plugins\libnclprofile.dll"

; translation files
SetOutPath $INSTDIR\extensions
File "C:\Composer\extensions\*.qm"
; SetOutPath $INSTDIR\extensions
; File "C:\Composer\extensions\*.qm"

; Associate .cpr files with NCL Composer
${registerExtension} $INSTDIR\nclcomposer.exe ".cpr" "NCL Composer project"
Expand All @@ -116,9 +118,9 @@ SectionEnd ; end the section
Section "Start Menu Shortcuts"
SectionIn 1
CreateDirectory "$SMPROGRAMS\NCL Composer"
CreateShortCut "$SMPROGRAMS\NCL Composer\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\NCL Composer\NCL Composer.lnk" "$INSTDIR\nclcomposer.exe" "" "$INSTDIR\nclcomposer.exe" 0
CreateShortCut "$SMPROGRAMS\NCL Composer\ (MakeNSISW).lnk" "$INSTDIR\nclcomposer.nsi" "" "$INSTDIR\nclcomposer.nsi" 0
CreateShortCut "$SMPROGRAMS\NCL Composer\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\NCL Composer\NCL Composer.lnk" "$INSTDIR\nclcomposer.exe" "" "$INSTDIR\nclcomposer.exe" 0
CreateShortCut "$SMPROGRAMS\NCL Composer\ (MakeNSISW).lnk" "$INSTDIR\nclcomposer.nsi" "" "$INSTDIR\nclcomposer.nsi" 0
SectionEnd

; Ginga default executable
Expand Down Expand Up @@ -156,51 +158,53 @@ SectionGroupEnd
SectionGroup /e "Install Default Plugins"
Section "Textual View"
SectionIn 1
SetOutPath $INSTDIR\extensions
; File "C:\Composer\extensions\qscintilla2.dll"
File "C:\Composer\extensions\ncl_textual_view.dll"
SetOutPath $INSTDIR\lib\nclcomposer\plugins
File "C:\Composer\lib\nclcomposer\plugins\libncl_textual_view.dll"

SetOutPath $INSTDIR\bin
File "C:\Composer\bin\libqscintilla2_telem.dll"
SectionEnd

Section "Layout View"
SectionIn 1
SetOutPath $INSTDIR\extensions
File "C:\Composer\\extensions\ncl_layout_view.dll"
SetOutPath $INSTDIR\lib\nclcomposer\plugins
File "C:\Composer\lib\nclcomposer\plugins\libncl_layout_view.dll"
SectionEnd

Section "Properties View"
SectionIn 1
SetOutPath $INSTDIR\extensions
File "C:\Composer\extensions\properties_view.dll"
SetOutPath $INSTDIR\lib\nclcomposer\plugins
File "C:\Composer\lib\nclcomposer\plugins\libproperties_view.dll"
SectionEnd

Section "Structural View"
SectionIn 1
SetOutPath $INSTDIR\extensions
File "C:\Composer\extensions\ncl_structural_view_next.dll"
SetOutPath $INSTDIR\lib\nclcomposer\plugins
File "C:\Composer\lib\nclcomposer\plugins\libncl_structural_view.dll"
SectionEnd

Section "Outline View"
SectionIn 1
SetOutPath $INSTDIR\extensions
File "C:\Composer\extensions\outline_view.dll"
SetOutPath $INSTDIR\lib\nclcomposer\plugins
File "C:\Composer\lib\nclcomposer\plugins\liboutline_view.dll"
SectionEnd

Section "Validator Plugin"
SectionIn 1
SetOutPath $INSTDIR\extensions
File "C:\Composer\extensions\validator.dll"
SetOutPath $INSTDIR\lib\nclcomposer\plugins
File "C:\Composer\lib\nclcomposer\plugins\libvalidator_plugin.dll"
SectionEnd

Section "Rules View"
SectionIn 1
SetOutPath $INSTDIR\extensions
File "C:\Composer\extensions\ncl_rules_view.dll"
SetOutPath $INSTDIR\lib\nclcomposer\plugins
File "C:\Composer\lib\nclcomposer\plugins\libncl_rules_view.dll"
SectionEnd

Section "Run View"
SectionIn 1
SetOutPath $INSTDIR\extensions
File "C:\Composer\extensions\run_view.dll"
SetOutPath $INSTDIR\lib\nclcomposer\plugins
File "C:\Composer\lib\nclcomposer\plugins\librun_view.dll"
SectionEnd

SectionGroupEnd
Expand All @@ -210,12 +214,12 @@ SectionGroupEnd
UninstallText "This will uninstall NCL Composer. Hit next to continue"
Section "Uninstall"
Delete "$INSTDIR\*"
Delete "$INSTDIR\extensions\*"
Delete "$INSTDIR\data\*"
Delete "$INSTDIR\include\*"
RMDir "$INSTDIR\extensions"
RMDir "$INSTDIR\data"
RMDir "$INSTDIR\include"
Delete "$INSTDIR\bin\*"
Delete "$INSTDIR\lib\nclcomposer\plugins\*"
Delete "$INSTDIR\share\nclcomposer\*"
RMDir "$INSTDIR\bin"
RMDir "$INSTDIR\lib"
RMDir "$INSTDIR\share"

;Shortcuts
Delete "$SMPROGRAMS\NCL Composer\*"
Expand Down

0 comments on commit 6cab408

Please sign in to comment.