mirror of
https://github.com/arabine/open-story-teller.git
synced 2025-12-06 17:09:06 +01:00
add windows setup
This commit is contained in:
parent
f8ad70697c
commit
a95e7c55a8
5 changed files with 81 additions and 2 deletions
22
.github/workflows/build_story_editor_windows.yml
vendored
22
.github/workflows/build_story_editor_windows.yml
vendored
|
|
@ -35,6 +35,26 @@ jobs:
|
||||||
run : |
|
run : |
|
||||||
mkdir build
|
mkdir build
|
||||||
cd 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
|
ninja
|
||||||
ls
|
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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,9 @@ set(NODEEDITOR_HEADER_FILES
|
||||||
./nodeeditor/include/QtNodes/internal/UndoCommands.hpp
|
./nodeeditor/include/QtNodes/internal/UndoCommands.hpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
list(APPEND PROJECT_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/icon.rc")
|
||||||
|
endif()
|
||||||
|
|
||||||
qt_add_executable(${PROJECT_NAME}
|
qt_add_executable(${PROJECT_NAME}
|
||||||
MANUAL_FINALIZATION
|
MANUAL_FINALIZATION
|
||||||
|
|
@ -174,6 +176,9 @@ target_link_libraries(${PROJECT_NAME} PUBLIC
|
||||||
QHexView
|
QHexView
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (UNIX)
|
if (UNIX)
|
||||||
target_link_libraries(${PROJECT_NAME} PUBLIC dl)
|
target_link_libraries(${PROJECT_NAME} PUBLIC dl)
|
||||||
endif (UNIX)
|
endif (UNIX)
|
||||||
|
|
|
||||||
1
story-editor/icon.rc
Normal file
1
story-editor/icon.rc
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
IDI_ICON1 ICON DISCARDABLE "story-editor-logo.ico"
|
||||||
53
story-editor/nsis-installer.nsi
Normal file
53
story-editor/nsis-installer.nsi
Normal 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
|
||||||
BIN
story-editor/story-editor-logo.ico
Normal file
BIN
story-editor/story-editor-logo.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 220 KiB |
Loading…
Reference in a new issue