-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathcom.bambulab.BambuStudio.yml
More file actions
executable file
·416 lines (377 loc) · 14.5 KB
/
Copy pathcom.bambulab.BambuStudio.yml
File metadata and controls
executable file
·416 lines (377 loc) · 14.5 KB
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
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
app-id: com.bambulab.BambuStudio
runtime: org.gnome.Platform
runtime-version: '50'
sdk: org.gnome.Sdk
command: entrypoint
rename-icon: BambuStudio
finish-args:
- --share=ipc
- --socket=x11
- --share=network
- --device=all
- --filesystem=home
- --filesystem=xdg-run/gvfs
- --filesystem=/run/media
- --filesystem=/media
- --system-talk-name=org.freedesktop.UDisks2
# Work-around https://github.com/bambulab/BambuStudio/issues/6013
- --env=SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
# sdk-extensions:
# - org.freedesktop.Sdk.Extension.node22
modules:
# For libOSMesa
- name: mesa
buildsystem: meson
config-opts:
- -Dosmesa=classic
- -Ddri-drivers=[]
- -Dgallium-drivers=[]
- -Dvulkan-drivers=[]
- -Dplatforms=[]
build-options:
arch:
aarch64:
config-opts:
- -Dlibunwind=disabled
cleanup:
- /share/drirc.d
- /include
- '*.a'
sources:
- type: archive
url: https://archive.mesa3d.org/older-versions/20.x/mesa-20.2.6.tar.xz
sha256: f12ca3c6c622f11cd79ad66b4220f04514fa96f795062fe92a37339ab19885db
x-checker-data:
type: anitya
project-id: 1970
versions: {<: 20.3.0}
stable-only: true
url-template: https://archive.mesa3d.org/older-versions/20.x/mesa-$version.tar.xz
- name: glu
buildsystem: meson
sources:
- type: archive
url: https://archive.mesa3d.org/glu/glu-9.0.3.tar.xz
sha256: bd43fe12f374b1192eb15fe20e45ff456b9bc26ab57f0eee919f96ca0f8a330f
x-checker-data:
type: anitya
project-id: 383990
stable-only: true
url-template: https://archive.mesa3d.org/glu/glu-$version.tar.xz
cleanup:
- /include
- /lib/pkgconfig
- name: boost
buildsystem: simple
build-commands:
- ./bootstrap.sh --prefix=/app --with-libraries=iostreams,filesystem,thread,log,locale,regex,date_time
- ./b2 headers
- ./b2 -j$FLATPAK_BUILDER_N_JOBS install variant=release cxxstd=17 --layout=system
sources:
- type: archive
url: https://github.com/boostorg/boost/releases/download/boost-1.84.0/boost-1.84.0.tar.gz
sha256: 4d27e9efed0f6f152dc28db6430b9d3dfb40c0345da7342eaa5a987dde57bd95
cleanup:
- /include
- /lib/cmake
- name: cgal
buildsystem: cmake-ninja
sources:
- type: archive
url: https://github.com/CGAL/cgal/archive/refs/tags/v5.4.zip
sha256: d7605e0a5a5ca17da7547592f6f6e4a59430a0bc861948974254d0de43eab4c0
# https://github.com/bambulab/BambuStudio/blob/master/deps/CGAL/0001-clang19.patch
- type: patch
path: patches/cgal-clang19.patch
cleanup:
- /include
- /lib/cmake
- name: glfw
buildsystem: cmake-ninja
config-opts:
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
- -DBUILD_SHARED_LIBS:BOOL=ON
- -DGLFW_BUILD_WAYLAND=OFF
- -DGLFW_BUILD_X11=ON
- -DGLFW_BUILD_DOCS=OFF
- -DGLFW_BUILD_TESTS=OFF
- -DGLFW_BUILD_EXAMPLES=OFF
sources:
- type: git
url: https://github.com/glfw/glfw.git
tag: 3.5.1
commit: d9d6f0f1f967807ffade6598ea9a631ebaf37a56
x-checker-data:
type: anitya
project-id: 1180
stable-only: true
tag-template: $version
cleanup:
- /include
- /lib/cmake
- /lib/pkgconfig
- name: wxwidgets
buildsystem: cmake-ninja
config-opts:
- -DwxBUILD_PRECOMP=ON
- -DwxBUILD_TOOLKIT=gtk3
- -DwxBUILD_DEBUG_LEVEL=0
- -DwxBUILD_SAMPLES=OFF
- -DwxBUILD_SHARED=OFF
- -DwxUSE_MEDIACTRL=ON
- -DwxUSE_DETECT_SM=OFF
- -DwxUSE_UNICODE=ON
- -DwxUSE_PRIVATE_FONTS=1
- -DwxUSE_OPENGL=ON
- -DwxUSE_WEBREQUEST=ON
- -DwxUSE_WEBVIEW=ON
- -DwxUSE_REGEX=sys
- -DwxUSE_LIBSDL=OFF
- -DwxUSE_XTEST=OFF
- -DwxUSE_STC=OFF
- -DwxUSE_AUI=ON
- -DwxUSE_LIBPNG=sys
- -DwxUSE_ZLIB=sys
- -DwxUSE_LIBJPEG=sys
- -DwxUSE_LIBTIFF=sys
- -DwxUSE_NANOSVG=OFF
- -DwxUSE_EXPAT=sys
- -DwxUSE_GLCANVAS_EGL=OFF
sources:
- type: archive
url: https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.9/wxWidgets-3.2.9.tar.bz2
sha256: fb90f9538bffd6a02edbf80037a0c14c2baf9f509feac8f76ab2a5e4321f112b
x-checker-data:
is-important: true
type: git
tag-pattern: ^v([\d\.]+)$
versions:
<: '3.3'
cleanup:
- /include
- /lib/cmake
- name: blosc
buildsystem: cmake-ninja
build-options:
env:
CMAKE_POLICY_VERSION_MINIMUM: '3.5'
config-opts:
- -DCMAKE_POSITION_INDEPENDENT_CODE=ON
- -DBUILD_SHARED=BOOL:OFF
- -DBUILD_STATIC=BOOL:ON
- -DBUILD_TESTS=OFF
- -DBUILD_BENCHMARKS=OFF
- -DPREFER_EXTERNAL_ZLIB=ON
sources:
- type: archive
url: https://github.com/tamasmeszaros/c-blosc/archive/refs/heads/v1.17.0_tm.zip
sha256: dcb48bf43a672fa3de6a4b1de2c4c238709dad5893d1e097b8374ad84b1fc3b3
# https://github.com/Blosc/c-blosc/pull/392
- type: patch
path: patches/blosc-bool-fix.patch
cleanup:
- /include
- /lib/cmake
- name: BambuStudio
buildsystem: simple
build-options:
env:
CMAKE_POLICY_VERSION_MINIMUM: '3.5'
build-commands:
# start build
- |
mkdir -p deps/build && cd deps/build
cmake ../ \
-DDEP_WX_GTK3=1 \
-DDEP_DOWNLOAD_DIR=/run/build/BambuStudio/external-packages \
-DDEP_BUILD_PNG=OFF \
-DDEP_BUILD_JPEG=OFF \
-DDEP_BUILD_TIFF=OFF \
-DDEP_BUILD_BOOST=OFF \
-DDEP_BUILD_OPENSSL=OFF \
-DDEP_BUILD_GLFW=OFF \
-DDEP_BUILD_FREETYPE=OFF \
-DDEP_BUILD_WXWIDGETS=OFF \
-DDEP_BUILD_BLOSC=OFF \
-DDEP_BUILD_GMP=OFF \
-DDEP_BUILD_MPFR=OFF \
-DDEP_BUILD_CGAL=OFF
cmake --build . --target dep_TBB dep_Cereal dep_NLopt dep_libnoise dep_OpenVDB dep_Qhull dep_OpenCSG dep_OpenCV dep_Assimp dep_OCCT
- |
mkdir -p build && cd build
mkdir -p ../../node-cache/ && pushd ../../node-cache/ && tar xJf ../BambuStudio/external-packages/node*.tar.xz && cp -a ../BambuStudio/external-packages/pnpm node-*/bin/ && chmod +x node-*/bin/pnpm && popd
CXXFLAGS=-std=gnu++20 cmake ../ \
-GNinja \
-DCMAKE_INSTALL_PREFIX=/app \
-DCMAKE_INSTALL_LIBDIR=/app/lib \
-DCMAKE_PREFIX_PATH=/run/build/BambuStudio/deps/build/destdir/usr/local \
-DFLATPAK=ON \
-DSLIC3R_PCH=OFF \
-DSLIC3R_FHS=ON \
-DSLIC3R_GTK=3 \
-DSLIC3R_STATIC=ON \
-DSLIC3R_BUILD_TESTS=OFF \
-DSLIC3R_DESKTOP_INTEGRATION=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DBBL_RELEASE_TO_PUBLIC=1 \
-DBBL_INTERNAL_TESTING=0
CXXFLAGS=-std=gnu++20 cmake --build . --target install -j $(expr $FLATPAK_BUILDER_N_JOBS / 2)
cleanup:
- /include
post-install:
# Desktop Integration files
- |
install -Dm644 -t /app/share/icons/hicolor/scalable/apps/ resources/images/BambuStudio.svg
install -Dm644 ${FLATPAK_ID}.metainfo.xml /app/share/metainfo/${FLATPAK_ID}.metainfo.xml
mv /app/share/applications/BambuStudio.desktop /app/share/applications/${FLATPAK_ID}.desktop
desktop-file-edit --set-key=Exec --set-value="entrypoint %U" /app/share/applications/${FLATPAK_ID}.desktop
install -Dm755 entrypoint /app/bin
install -Dm755 umount /app/bin
sources:
# -
# Section bellow fetches all BambuStudio dependencies before the build process and stores them in external-packages/*/* .
# -DDEP_DOWNLOAD_DIR is set in the build process which has to match with dest.
#
# NOTE: The url, dest folder name and sha256 must match from BambuStudio's cmake scripts and folder names in BambuStudio/deps/
# -
# Cereal
# https://github.com/bambulab/BambuStudio/blob/master/deps/Cereal/Cereal.cmake
- type: file
url: https://github.com/USCiLab/cereal/archive/refs/tags/v1.3.0.zip
dest: external-packages/Cereal
sha256: 71642cb54658e98c8f07a0f0d08bf9766f1c3771496936f6014169d3726d9657
# NLopt
# https://github.com/bambulab/BambuStudio/blob/master/deps/NLopt/NLopt.cmake
- type: file
url: https://github.com/stevengj/nlopt/archive/v2.5.0.tar.gz
dest: external-packages/NLopt
sha256: c6dd7a5701fff8ad5ebb45a3dc8e757e61d52658de3918e38bab233e7fd3b4ae
# OCCT
# https://github.com/bambulab/BambuStudio/blob/master/deps/OCCT/OCCT.cmake
- type: file
url: https://github.com/Open-Cascade-SAS/OCCT/archive/refs/tags/V7_6_0.zip
dest: external-packages/OCCT
sha256: 28334f0e98f1b1629799783e9b4d21e05349d89e695809d7e6dfa45ea43e1dbc
# OpenCV
# https://github.com/bambulab/BambuStudio/blob/master/deps/OpenCV/OpenCV.cmake
- type: file
url: https://github.com/opencv/opencv/archive/refs/tags/4.6.0.tar.gz
dest: external-packages/OpenCV
sha256: 1ec1cba65f9f20fe5a41fda1586e01c70ea0c9a6d7b67c9e13edf0cfe2239277
# Assimp
# https://github.com/bambulab/BambuStudio/blob/master/deps/Assimp/Assimp.cmake
- type: file
url: https://github.com/assimp/assimp/archive/refs/tags/v5.4.3.tar.gz
dest: external-packages/Assimp
sha256: 66dfbaee288f2bc43172440a55d0235dfc7bf885dda6435c038e8000e79582cb
# OpenCSG
# https://github.com/bambulab/BambuStudio/blob/master/deps/OpenCSG/OpenCSG.cmake
- type: file
url: https://github.com/floriankirsch/OpenCSG/archive/refs/tags/opencsg-1-4-2-release.zip
dest: external-packages/OpenCSG
sha256: 51afe0db79af8386e2027d56d685177135581e0ee82ade9d7f2caff8deab5ec5
# OpenEXR
# https://github.com/bambulab/BambuStudio/blob/master/deps/OpenEXR/OpenEXR.cmake
- type: file
url: https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.5.zip
dest: external-packages/OpenEXR
sha256: 0307a3d7e1fa1e77e9d84d7e9a8694583fbbbfd50bdc6884e2c96b8ef6b902de
# libnoise
# https://github.com/bambulab/BambuStudio/blob/master/deps/libnoise/libnoise.cmake
- type: file
url: https://github.com/bambulab/libnoise/archive/refs/tags/v1.0.0.zip
dest: external-packages/libnoise
sha256: 7aae3433e4c841a1b15ddf40dc995b3d32efb154b92b6796888002e275bff859
# OpenVDB
# https://github.com/bambulab/BambuStudio/blob/master/deps/OpenVDB/OpenVDB.cmake
- type: file
url: https://github.com/tamasmeszaros/openvdb/archive/a68fd58d0e2b85f01adeb8b13d7555183ab10aa5.zip
dest: external-packages/OpenVDB
sha256: f353e7b99bd0cbfc27ac9082de51acf32a8bc0b3e21ff9661ecca6f205ec1d81
# Qhull
# https://github.com/bambulab/BambuStudio/blob/master/deps/Qhull/Qhull.cmake
- type: file
url: https://github.com/qhull/qhull/archive/v8.0.1.zip
dest: external-packages/Qhull
sha256: 5287f5edd6a0372588f5d6640799086a4033d89d19711023ef8229dd9301d69b
# TBB
# https://github.com/bambulab/BambuStudio/blob/master/deps/TBB/TBB.cmake
- type: file
url: https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.5.0.zip
dest: external-packages/TBB
sha256: 83ea786c964a384dd72534f9854b419716f412f9d43c0be88d41874763e7bb47
# Nodejs
# https://github.com/bambulab/BambuStudio/blob/master/src/slic3r/GUI/DeviceWeb/CMakeLists.txt
- type: file
url: https://nodejs.org/dist/v22.22.2/node-v22.22.2-linux-x64.tar.xz
dest: external-packages
sha256: 88fd1ce767091fd8d4a99fdb2356e98c819f93f3b1f8663853a2dee9b438068a
only-arches:
- x86_64
- type: file
url: https://nodejs.org/dist/v22.22.2/node-v22.22.2-linux-arm64.tar.xz
dest: external-packages
sha256: e9e1930fd321a470e29bb68f30318bf58e3ecb4acb4f1533fb19c58328a091fe
only-arches:
- aarch64
# PNPM
# https://github.com/bambulab/BambuStudio/blob/master/src/slic3r/GUI/DeviceWeb/CMakeLists.txt
- type: file
url: https://github.com/pnpm/pnpm/releases/download/v10.12.1/pnpm-linux-x64
dest: external-packages/
sha256: eb2dc1f109bca046ce734d062c8dd8f34db2b58a115992f9b086456efd7b2305
dest-filename: pnpm
only-arches:
- x86_64
- type: file
url: https://github.com/pnpm/pnpm/releases/download/v10.12.1/pnpm-linux-arm64
dest: external-packages/
sha256: c2f9e9d42d81f9f40a0f895513d014a08d5ecb0abc9e15c426ecfde6f492706b
dest-filename: pnpm
only-arches:
- aarch64
# BambuStudio Source Archive
- type: git
url: https://github.com/bambulab/BambuStudio.git
tag: v02.07.01.62
commit: 42d319c6692fa8e64790fddf0cdaafd2a4254bcc
# https://github.com/bambulab/BambuStudio/pull/10712
- type: patch
path: patches/nodejs-arm64.patch
# flatpak-node-generator --no-devel pnpm src/slic3r/GUI/DeviceWeb/device_page/pnpm-lock.yaml
- generated-sources.json
# https://github.com/bambulab/BambuStudio/pull/11059
- type: patch
path: patches/2.7.1-fixes.patch
# https://github.com/bambulab/BambuStudio/pull/11804
- type: patch
path: patches/0001-FIX-Fix-Open-in-Bambu-Studio-not-working-on-aarch64-.patch
- type: patch
path: patches/offline-npm.patch
# https://github.com/bambulab/BambuStudio/pull/11058
- type: patch
path: patches/system-gmp-mpfr.patch
# https://github.com/bambulab/BambuStudio/pull/11827
- type: patch
path: patches/system-cgal.patch
# Patched TBB cmake to make build without lto flag
- type: file
dest: deps/TBB
path: patches/TBB/GNU.cmake
# Apply TTB patches to fix linking failure. More info: https://github.com/prusa3d/PrusaSlicer/issues/8922
- type: patch
path: patches/0001-Apply-TBB-LTO-patch.patch
# https://github.com/bambulab/BambuStudio/pull/11782
- type: patch
path: patches/no-boost-system.patch
# AppData metainfo for Gnome Software & Co.
- type: file
path: com.bambulab.BambuStudio.metainfo.xml
# start-up script
# README: workaround for the following issues:
# SEE: https://github.com/prusa3d/PrusaSlicer/issues/2365
- type: file
path: entrypoint
# umount wrapper used to redirect umount calls to udisk2
- type: file
path: umount