-
-
Notifications
You must be signed in to change notification settings - Fork 41
executable file
·301 lines (251 loc) · 11.2 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
# Test build process on various OS and Configutations
name: Build
on:
workflow_dispatch:
jobs:
build-linux:
name: Converseen Linux Build (AppImage)
runs-on: ubuntu-20.04
steps:
- name: Checkout Converseen
uses: actions/checkout@v4
- name: Install Dependencies
run: |
sudo add-apt-repository -y ppa:savoury1/graphics
sudo apt-get update
sudo apt-get upgrade
sudo apt install -y binutils coreutils desktop-file-utils fakeroot fuse libgdk-pixbuf2.0-dev patchelf python3-pip python3-setuptools squashfs-tools strace util-linux zsync gnupg2
sudo apt install -y git cmake zlib1g-dev libxcb-cursor0
sudo apt install -y libtool pkg-config build-essential libssl-dev libffi-dev zlib1g-dev libpng-dev libjpeg-dev liblcms2-dev libtiff-dev libopenjp2-7-dev libwebp-dev libde265-dev libheif-dev libgif-dev libfreetype6-dev libfontconfig1-dev libxext-dev libx11-dev libdjvulibre-dev libgs-dev libwmf-dev libpango1.0-dev librsvg2-bin librsvg2-dev libxml2-dev fftw-dev liblqr-1-0-dev libraw-dev libopenexr-dev libdeflate-dev libraqm-dev libjxl-dev libimath-dev libffi7 zlib1g libpng16-16 libjpeg8 liblcms2-2 libtiff5 libopenjp2-7 libwebp6 libde265-0 libx265-209 libx265-dev libheif1 libgif7 libfreetype6 libfontconfig1 libxext6 libdjvulibre21 libgs9 libwmf0.2-7 libpango1.0-0 librsvg2-2 libxml2 fftw2 liblqr-1-0 libraw19 libimath-3-1-29 libopenexr24 libdeflate0 libraqm0 libpsm-infinipath1 libgl1-mesa-dri
- name: Build ImageMagick
run: |
wget https://mirror.dogado.de/imagemagick/ImageMagick.tar.bz2
tar -xvf ImageMagick.tar.bz2
cd ImageMagick-*/
./configure --enable-shared --disable-installed --enable-hdri --without-perl --disable-dependency-tracking --with-gslib=yes --with-openjp2 --with-wmf --without-gvc --with-djvu --without-dps --without-fpx --with-heic=yes --prefix=$HOME/ImageMagick7-devel
make -j$(nproc)
make install
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: '==3.1.*'
version: '6.7.*'
host: 'linux'
target: 'desktop'
arch: 'linux_gcc_64'
install-deps: 'true'
set-env: 'true'
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
- name: Build AppImage
run: |
cd package/AppImage
chmod a+x build-with-qmake.sh
chmod a+x finalize-appimage.sh
./build-with-qmake.sh
./finalize-appimage.sh
build-linux-qt6-im6:
name: Converseen Linux Build (Qt6 + ImageMagick6)
runs-on: ubuntu-latest
steps:
- name: Checkout Converseen
uses: actions/checkout@v4
with:
path: Converseen
- name: Install Dependencies
run: |
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get upgrade
sudo apt install -y git cmake libglx-dev libgl1-mesa-dev qt6-base-dev qt6-tools-dev qt6-tools-dev-tools qt6-base-dev-tools qt6-l10n-tools qt6-multimedia-dev
sudo apt install -y libtool pkg-config build-essential libssl-dev
sudo apt install -y libmagick++-dev libmagickcore-dev libmagickwand-dev imagemagick
- name: Build Converseen
run: |
cd Converseen
mkdir build
cd build
cmake .. -DUSE_QT6=yes
make
snap-build:
name: Converseen Snap Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Snap
uses: snapcore/action-build@v1
id: snapcraft
with:
path: package/Snap
build-windows:
name: Converseen Windows Build
runs-on: windows-2022
steps:
- name: Download ImageMagick for Windows
shell: powershell
run: |
# Get latest version number from GitHub
$gitTags = git ls-remote --sort="version:refname" --tags https://github.com/ImageMagick/ImageMagick.git
$lastTagLine = $gitTags[-1]
$lastTagVersion = $lastTagLine -replace '.*refs/tags/(.*)', '$1'
$latestVersionNumber = $lastTagVersion
Write-Host "Latest ImageMagick Version Found: $latestVersionNumber"
Invoke-WebRequest -Uri "https://imagemagick.org/archive/binaries/ImageMagick-$latestVersionNumber-Q16-HDRI-x86-dll.exe" -OutFile ImageMagick-Installer.exe
- name: Install ImageMagick for Windows
shell: cmd
run: |
ImageMagick-Installer.exe /MERGETASKS=install_devel /VERYSILENT /DIR=ImageMagick
- name: Checkout Converseen
uses: actions/checkout@v4
with:
path: Converseen
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '5.15.2'
host: 'windows'
target: 'desktop'
arch: 'win32_msvc2019'
install-deps: 'true'
set-env: 'true'
- name: Build Converseen
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
cd Converseen
mkdir build
cd build
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release -DImageMagick_EXECUTABLE_DIR="${{ github.workspace }}\ImageMagick" ..
nmake
build-macos:
name: Converseen macOS Build
runs-on: macos-13
env:
BASE_DIR: ${{ github.workspace }}/im_build
WORKING_DIR: ${{ github.workspace }}
steps:
- name: Install dependencies
run: |
set -e
export HOMEBREW_NO_AUTO_UPDATE=1
brew install pkg-config freetype jpeg-turbo libheif libpng libtiff libtool openexr openexr openjpeg webp libraw ghostscript
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: '==3.1.*'
version: '6.7.*'
host: 'mac'
target: 'desktop'
arch: 'clang_64'
- name: Checkout Converseen
uses: actions/checkout@v4
with:
path: Converseen
- name: Download ImageMagick
run: |
wget https://imagemagick.org/archive/ImageMagick.tar.gz
tar -xzvf ImageMagick.tar.gz
- name: Build ImageMagick
run: |
cd ImageMagick-*
./configure --prefix=${{ github.workspace }}/im_build \
--with-quantum-depth=16 \
--disable-dependency-tracking \
--without-perl \
--without-x \
--disable-static \
--disable-installed \
--enable-shared \
--with-flif=yes \
--with-gslib=yes
make
make install
- name: Build Converseen
run: |
mkdir build
cd build
qmake ../converseen/converseen.pro -spec macx-clang QMAKE_MACOSX_DEPLOYMENT_TARGET=12.0 IM_INSTALL_PREFIX=${{ github.workspace }}/im_build
make
- name: Copy Dependencies
shell: python {0}
run: |
import os
import shutil
working_dir = os.environ['WORKING_DIR']
os.chdir(working_dir + "/build/bin")
print("Working dir:" + working_dir + "/build/bin")
# Define the destination folder where symbolic links will be copied
destination_folder = "converseen.app/Contents/Frameworks"
os.mkdir(destination_folder)
# Define the folders to scan
folders_to_scan = [
"/usr/local/Cellar/aom",
"/usr/local/Cellar/brotli",
"/usr/local/Cellar/fontconfig",
"/usr/local/Cellar/freetype",
"/usr/local/Cellar/gettext",
"/usr/local/Cellar/ghostscript",
"/usr/local/Cellar/giflib",
"/usr/local/Cellar/highway",
"/usr/local/Cellar/imath",
"/usr/local/Cellar/jasper",
"/usr/local/Cellar/jbig2dec",
"/usr/local/Cellar/jpeg-turbo",
"/usr/local/Cellar/jpeg-xl",
"/usr/local/Cellar/libde265",
"/usr/local/Cellar/libheif",
"/usr/local/Cellar/libidn",
"/usr/local/Cellar/libomp",
"/usr/local/Cellar/libpng",
"/usr/local/Cellar/libraw",
"/usr/local/Cellar/libtiff",
"/usr/local/Cellar/libtool",
"/usr/local/Cellar/libvmaf",
"/usr/local/Cellar/little-cms2",
"/usr/local/Cellar/lz4",
"/usr/local/Cellar/openexr",
"/usr/local/Cellar/openjpeg",
"/usr/local/Cellar/pcre2",
"/usr/local/Cellar/webp",
"/usr/local/Cellar/x265",
"/usr/local/Cellar/xz",
"/usr/local/Cellar/zstd"
]
# Function to find and copy symbolic links with a dylib extension
def copy_dylib_from_folder(folder):
try:
if os.path.exists(folder):
for root, dirs, files in os.walk(folder):
for file in files:
if file.endswith(".dylib"):
dylib_path = os.path.join(root, file)
dylib_name = os.path.basename(dylib_path)
if os.path.islink(os.path.join(root, file)):
# Copy the symbolic link to the destination folder
shutil.copy(dylib_path, os.path.join(destination_folder, dylib_name), follow_symlinks=False)
print(f"Copied link {dylib_name} from {folder} to {destination_folder}")
else:
# Copy library to the destination folder
shutil.copy(dylib_path, os.path.join(destination_folder, dylib_name))
print(f"Copied file {dylib_name} from {folder} to {destination_folder}")
else:
print(f"The folder {folder} does not exist.")
except Exception as e:
print(f"An error occurred: {str(e)} while copying from {folder}")
# Execute the function for each folder to scan
for folder in folders_to_scan:
copy_dylib_from_folder(folder)
- name: Deploy Qt
run: |
cd build/bin
sudo chmod -Rv a+rwx converseen.app/Contents/Frameworks/
macdeployqt converseen.app -libpath=${{ github.workspace }}/im_build/lib
# Fix libzip rpaths
cd converseen.app/Contents/Frameworks/
install_name_tool -change /usr/lib/libbz2.1.0.dylib @rpath/libbz2.1.0.dylib libzip.5.dylib
install_name_tool -change @loader_path/../../../../opt/xz/lib/liblzma.5.dylib @rpath/liblzma.5.dylib libzip.5.dylib
install_name_tool -change @loader_path/../../../../opt/zstd/lib/libzstd.1.dylib @rpath/libzstd.1.dylib libzip.5.dylib