Skip to content

Commit 0ee2822

Browse files
committed
Unify repositories, add brief README, greatly improve packaging and release situation.
1 parent c26ead9 commit 0ee2822

11 files changed

Lines changed: 893 additions & 68 deletions

File tree

.github/workflows/cmake.yml

Lines changed: 138 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,66 +5,167 @@ permissions:
55

66
on:
77
push:
8-
branches: [ "master" ]
8+
branches: ["master"]
99
tags:
1010
- 'v*'
1111
pull_request:
12-
branches: [ "master" ]
13-
14-
env:
15-
BUILD_TYPE: Release
12+
branches: ["master"]
1613

1714
jobs:
18-
build:
15+
build-windows:
1916
runs-on: windows-latest
2017

2118
steps:
2219
- uses: actions/checkout@v4
2320

24-
- name: Setup zlib
21+
- name: Setup zlib via vcpkg
2522
shell: pwsh
26-
run: |
27-
vcpkg install zlib:x64-windows zlib:x64-windows-static
23+
run: vcpkg install zlib:x64-windows zlib:x64-windows-static
2824

29-
- name: Cache qt static build
30-
id: cache-qt-static-build
25+
- name: Cache Qt static build
26+
id: cache-qt-static
3127
uses: actions/cache@v4
3228
with:
3329
path: Qt6Static
34-
key: ${{ runner.os }}-Qt6Static
35-
36-
- name: Download and unzip qt static build
30+
key: ${{ runner.os }}-Qt6Static-6.11.0
31+
32+
- name: Download Qt static build
33+
if: steps.cache-qt-static.outputs.cache-hit != 'true'
3734
shell: pwsh
38-
if: steps.cache-qt-static-build.outputs.cache-hit != 'true'
3935
run: |
40-
Invoke-WebRequest -Uri www.atarismwc.com/Qt6Static.7z -OutFile Qt6Static.7z
36+
Invoke-WebRequest -Uri https://www.atarismwc.com/Qt6Static.7z -OutFile Qt6Static.7z
4137
7z x -oQt6Static Qt6Static.7z -y
42-
43-
- name: Configure CMake
38+
39+
- name: Build static exe
4440
env:
4541
CMAKE_TOOLCHAIN_FILE: C:/vcpkg/scripts/buildsystems/vcpkg.cmake
46-
run: cmake -S ${{github.workspace}} -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSTATIC_QT_DIR=${{github.workspace}}/Qt6Static -DCFGEDITOR_BUILD_STATIC=ON
47-
48-
- name: Build
49-
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
50-
51-
- name: Upload
52-
uses: actions/upload-artifact@v4
42+
run: |
43+
cmake -S ${{ github.workspace }} -B ${{ github.workspace }}/build-static -DCMAKE_BUILD_TYPE=Release -DSTATIC_QT_DIR=${{ github.workspace }}/Qt6Static -DCFGEDITOR_BUILD_STATIC=ON
44+
cmake --build ${{ github.workspace }}/build-static --config Release
45+
46+
- name: Install Qt (dynamic)
47+
uses: jurplel/install-qt-action@v4
5348
with:
54-
name: CFGEditorPlusPlus
55-
path: ${{github.workspace}}/build/Release/CFGEditorPlusPlus.exe
56-
57-
- name: Move artifact
49+
version: '6.11.0'
50+
arch: 'win64_msvc2022_64'
51+
cache: true
52+
53+
- name: Build dynamic exe
54+
run: |
55+
cmake -S ${{ github.workspace }} -B ${{ github.workspace }}/build-dynamic -DCMAKE_BUILD_TYPE=Release "-DCMAKE_PREFIX_PATH=${{ env.QT_ROOT_DIR }}"
56+
cmake --build ${{ github.workspace }}/build-dynamic --config Release
57+
58+
- name: Create zip package
59+
run: python zip_script.py build-dynamic/Release
60+
61+
- name: Copy zip for installer
5862
shell: pwsh
59-
if: startsWith(github.ref, 'refs/tags')
6063
run: |
61-
Move-Item -Path ${{github.workspace}}/build/Release/CFGEditorPlusPlus.exe -Destination ${{github.workspace}}/CFGEditorPlusPlus.exe
62-
63-
- name: Release
64+
New-Item -ItemType Directory -Force -Path packaging/windows/Properties
65+
Copy-Item CFGEditor.zip -Destination packaging/windows/Properties/CFGEditor.zip
66+
67+
- name: Build installer
68+
run: msbuild packaging/windows/CFGEditorInstaller.csproj /p:Configuration=Release /p:Platform=AnyCPU
69+
70+
- name: Upload static exe
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: CFGEditorPlusPlus-windows-static
74+
path: ${{ github.workspace }}/build-static/Release/CFGEditorPlusPlus.exe
75+
76+
- name: Upload installer
77+
uses: actions/upload-artifact@v4
78+
with:
79+
name: ICFGEditor-windows
80+
path: packaging/windows/bin/Release/net48/ICFGEditor.exe
81+
82+
build-linux:
83+
runs-on: ubuntu-22.04
84+
85+
steps:
86+
- uses: actions/checkout@v4
87+
88+
- name: Install system dependencies
89+
run: |
90+
sudo apt-get update
91+
sudo apt-get install -y \
92+
pkg-config \
93+
libx11-xcb-dev libxcb1-dev libxcb-cursor-dev libxcb-icccm4-dev \
94+
libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev \
95+
libxcb-render0-dev libxcb-render-util0-dev libxcb-shape0-dev \
96+
libxcb-shm0-dev libxcb-sync-dev libxcb-util-dev libxcb-xfixes0-dev \
97+
libxcb-xinerama0-dev libxcb-xkb-dev \
98+
libxkbcommon-dev libxkbcommon-x11-dev \
99+
libfontconfig-dev libfreetype-dev \
100+
libgl-dev libegl-dev \
101+
libfuse2 ninja-build
102+
103+
- name: Install Qt (dynamic)
104+
uses: jurplel/install-qt-action@v4
105+
with:
106+
version: '6.11.0'
107+
arch: 'linux_gcc_64'
108+
cache: true
109+
110+
- name: Download linuxdeploy tools
111+
run: |
112+
wget -q "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" -O linuxdeploy-x86_64.AppImage
113+
wget -q "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage" -O linuxdeploy-plugin-qt-x86_64.AppImage
114+
chmod +x linuxdeploy-x86_64.AppImage linuxdeploy-plugin-qt-x86_64.AppImage
115+
116+
- name: Build
117+
run: |
118+
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release "-DCMAKE_PREFIX_PATH=${{ env.QT_ROOT_DIR }}"
119+
cmake --build build --parallel
120+
121+
- name: Package AppImage
122+
env:
123+
QMAKE: ${{ env.QT_ROOT_DIR }}/bin/qmake
124+
OUTPUT: ${{ github.workspace }}/CFGEditorPlusPlus-x86_64.AppImage
125+
APPIMAGE_EXTRACT_AND_RUN: '1'
126+
run: |
127+
export PATH="${{ github.workspace }}:$PATH"
128+
./linuxdeploy-x86_64.AppImage \
129+
--appdir AppDir \
130+
--executable build/CFGEditorPlusPlus \
131+
--desktop-file CFGEditorPlusPlus.desktop \
132+
--icon-file VioletEgg.png \
133+
--plugin qt \
134+
--output appimage
135+
136+
- name: Upload AppImage
137+
uses: actions/upload-artifact@v4
138+
with:
139+
name: CFGEditorPlusPlus-AppImage
140+
path: CFGEditorPlusPlus-x86_64.AppImage
141+
142+
release:
143+
runs-on: ubuntu-latest
144+
needs: [build-windows, build-linux]
145+
if: startsWith(github.ref, 'refs/tags')
146+
147+
steps:
148+
- name: Download Windows static exe
149+
uses: actions/download-artifact@v4
150+
with:
151+
name: CFGEditorPlusPlus-windows-static
152+
path: release-files/
153+
154+
- name: Download Windows installer
155+
uses: actions/download-artifact@v4
156+
with:
157+
name: ICFGEditor-windows
158+
path: release-files/
159+
160+
- name: Download Linux AppImage
161+
uses: actions/download-artifact@v4
162+
with:
163+
name: CFGEditorPlusPlus-AppImage
164+
path: release-files/
165+
166+
- name: Create release
64167
uses: softprops/action-gh-release@v2
65-
if: startsWith(github.ref, 'refs/tags')
66168
with:
67169
generate_release_notes: true
68-
prerelease: true
69-
files: CFGEditorPlusPlus.exe
70-
170+
prerelease: false
171+
files: release-files/*

.gitignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,15 @@ Thumbs.db
7070
*.exe
7171

7272
build/
73+
build-*/
7374
CMakeLists.txt.user
7475
CFGEditor.zip
7576
.vs
76-
CMakeSettings.json
77+
CMakeSettings.json
78+
*.AppImage
79+
.venv
80+
AppDir
81+
*.log
82+
6.*
83+
packaging/windows/bin/
84+
packaging/windows/obj/

0 commit comments

Comments
 (0)