add windows setup

This commit is contained in:
Anthony Rabine 2023-08-11 16:18:22 +02:00
parent f8ad70697c
commit a95e7c55a8
5 changed files with 81 additions and 2 deletions

View file

@ -35,6 +35,26 @@ jobs:
run : |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=${{ github.workspace }}\Qt\6.5.1\msvc2019_64 -DQT_DIR=${{ github.workspace }}\Qt\6.5.1\msvc2019_64\lib\cmake\Qt6 -G Ninja ..
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=${{ github.workspace }}\Qt\${{ env.QT_VERSION }}\msvc2019_64 -DQT_DIR=${{ github.workspace }}\Qt\6.5.1\msvc2019_64\lib\cmake\Qt6 -G Ninja ..
ninja
ls
mkdir story-editor
cp story-editor.exe story-editor
windeployqt story-editor/story-editor.exe --release
copy C:\Windows\System32\vccorlib140.dll story-editor\
copy C:\Windows\System32\msvcp140.dll story-editor\
copy C:\Windows\System32\vcruntime140.dll story-editor\
${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/msvc2019_64/bin/windeployqt.exe story-editor\story-editor.exe
Compress-Archive story-editor StoryEditor-Windows.zip
makensis.exe /V3 nsis-installer.nsi
- name: upload_artefact
uses: actions/upload-artifact@v3
with:
name: StoryEditorWindows-Zip
path: ./story-editor/build/StoryEditor-Windows.zip
- name: upload_artefact
uses: actions/upload-artifact@v3
with:
name: StoryEditorWindows-Setup
path: ./story-editor/build/story-editor-setup.exe

View file

@ -151,7 +151,9 @@ set(NODEEDITOR_HEADER_FILES
./nodeeditor/include/QtNodes/internal/UndoCommands.hpp
)
if (WIN32)
list(APPEND PROJECT_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/icon.rc")
endif()
qt_add_executable(${PROJECT_NAME}
MANUAL_FINALIZATION
@ -174,6 +176,9 @@ target_link_libraries(${PROJECT_NAME} PUBLIC
QHexView
)
if (UNIX)
target_link_libraries(${PROJECT_NAME} PUBLIC dl)
endif (UNIX)

1
story-editor/icon.rc Normal file
View file

@ -0,0 +1 @@
IDI_ICON1 ICON DISCARDABLE "story-editor-logo.ico"

View file

@ -0,0 +1,53 @@
# define installer name
!define APPNAME "StoryEditor"
!define COMPANYNAME "OpenStoryTeller"
!define DESCRIPTION "A story editor using graphical nodes, for the OpenStoryTeller project. http://openstoryteller.org"
!define VERSIONMAJOR 1
!define VERSIONMINOR 3
!define VERSIONBUILD 4
OutFile "build/story-editor-setup.exe"
# set desktop as install directory
InstallDir "$PROGRAMFILES64\${APPNAME}"
Name "${COMPANYNAME} - ${APPNAME}"
# default section start
Section
# define output path
SetOutPath $INSTDIR
# specify file to go in output path
File /r "build/story-editor\*"
File "story-editor-logo.ico"
# define uninstaller name
WriteUninstaller $INSTDIR\uninstaller.exe
# Create shortcut
SetShellVarContext all
CreateDirectory "$SMPROGRAMS\${COMPANYNAME}"
CreateShortCut "$SMPROGRAMS\${COMPANYNAME}\${APPNAME}.lnk" "$INSTDIR\story-editor.exe" "" "$INSTDIR\story-editor-logo.ico"
SetShellVarContext current
#-------
# default section end
SectionEnd
# create a section to define what the uninstaller does.
# the section will always be named "Uninstall"
Section "Uninstall"
# Always delete uninstaller first
Delete $INSTDIR\uninstaller.exe
Delete "$SMPROGRAMS\${COMPANYNAME}\${APPNAME}.lnk"
Delete $INSTDIR\story-editor-logo.ico
# now delete installed file
Delete $INSTDIR\*
# Delete the directory
RMDir /r $INSTDIR
SectionEnd

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB