├── .circleci
└── config.yml.disabled
├── .gitignore
├── DockerHub.md
├── LICENSE
├── README.md
├── appimage
├── appimage-arm64v8-base
│ └── Dockerfile
├── appimage-arm64v8-openscad
│ └── Dockerfile
├── appimage-armv7l-base
│ └── Dockerfile
├── appimage-x86_64-base
│ └── Dockerfile
└── appimage-x86_64-openscad
│ └── Dockerfile
├── cgal-1
├── Dockerfile
├── bug.cc
└── test_gmp_bug_different_cgal_versions.sh
├── mxe
├── mxe-base
│ └── Dockerfile
├── mxe-i686-deps
│ └── Dockerfile
├── mxe-i686-gui
│ └── Dockerfile
├── mxe-i686-openscad
│ └── Dockerfile
├── mxe-requirements
│ └── Dockerfile
├── mxe-x86_64-deps
│ └── Dockerfile
├── mxe-x86_64-gui
│ └── Dockerfile
├── mxe-x86_64-openscad
│ └── Dockerfile
├── packages.lst
└── settings.mk
├── openscad
├── bookworm
│ ├── Dockerfile
│ ├── Dockerfile.egl
│ └── hooks
│ │ ├── build
│ │ └── pre_build
├── buster
│ └── Dockerfile
└── stretch
│ ├── Dockerfile
│ └── patches
│ └── fix-qt-translation-call.patch
├── scripts
├── build-appimage.sh
├── build-images.sh
├── build-mxe.sh
├── build.sh
├── docker-build-release.sh
└── list.sh
├── src
└── src-openscad
│ └── Dockerfile
└── wasm
└── wasm-playground-base
└── Dockerfile
/.circleci/config.yml.disabled:
--------------------------------------------------------------------------------
1 | version: 2
2 | jobs:
3 | appimage-x86_64-base:
4 | docker:
5 | - image: cimg/base:stable
6 | steps:
7 | - checkout
8 | - setup_remote_docker:
9 | version: 20.10.2
10 | - run:
11 | name: Build AppImage (x86_64) base image
12 | no_output_timeout: 18000
13 | command: |
14 | docker pull openscad/appimage-x86_64-base:latest || true
15 | #docker build --cache-from openscad/appimage-x86_64-base:latest -t openscad/appimage-x86_64-base:latest appimage/appimage-x86_64-base
16 | docker build -t openscad/appimage-x86_64-base:latest appimage/appimage-x86_64-base
17 | docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
18 | docker push openscad/appimage-x86_64-base:latest
19 | appimage-x86_64-openscad:
20 | docker:
21 | - image: cimg/base:stable
22 | steps:
23 | - checkout
24 | - setup_remote_docker:
25 | version: 20.10.2
26 | - run:
27 | name: Build OpenSCAD AppImage (x86_64)
28 | no_output_timeout: 18000
29 | command: |
30 | mkdir -p /tmp/out
31 | docker build -t openscad/appimage-x86_64-openscad:latest --build-arg OPENSCAD_VERSION="$(date +%Y.%m.%d).appimage${CIRCLE_BUILD_NUM}" appimage/appimage-x86_64-openscad
32 | docker run openscad/appimage-x86_64-openscad:latest | tar -x -v -C /tmp/out
33 | - store_artifacts:
34 | path: /tmp/out
35 | destination: 64-bit
36 | appimage-arm64v8-base:
37 | docker:
38 | - image: cimg/base:stable
39 | steps:
40 | - checkout
41 | - setup_remote_docker:
42 | version: 20.10.2
43 | - run:
44 | name: Build AppImage (arm64v8) base image
45 | no_output_timeout: 18000
46 | command: |
47 | docker pull openscad/appimage-arm64v8-base:latest || true
48 | docker build --cache-from openscad/appimage-arm64v8-base:latest -t openscad/appimage-arm64v8-base:latest appimage/appimage-arm64v8-base
49 | docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
50 | docker push openscad/appimage-arm64v8-base:latest
51 | mxe-requirements:
52 | docker:
53 | - image: cimg/base:stable
54 | steps:
55 | - checkout
56 | - setup_remote_docker:
57 | version: 20.10.2
58 | - run:
59 | name: Build MXE base image
60 | no_output_timeout: 18000
61 | command: |
62 | docker pull openscad/mxe-requirements:latest || true
63 | docker build --cache-from openscad/mxe-requirements:latest -t openscad/mxe-requirements:latest mxe/mxe-requirements
64 | docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
65 | docker push openscad/mxe-requirements:latest
66 | mxe-x86_64-gcc:
67 | docker:
68 | - image: cimg/base:stable
69 | resource_class: large
70 | steps:
71 | - checkout
72 | - setup_remote_docker:
73 | version: 20.10.2
74 | - run:
75 | name: Build MXE gcc (64bit)
76 | no_output_timeout: 18000
77 | command: |
78 | docker pull openscad/mxe-x86_64-gcc:latest || true
79 | docker build --cache-from openscad/mxe-requirements:latest --cache-from openscad/mxe-x86_64-gcc:latest -t openscad/mxe-x86_64-gcc:latest --build-arg JOBS=4 mxe/mxe-x86_64-gcc
80 | docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
81 | docker push openscad/mxe-x86_64-gcc:latest
82 | mxe-x86_64-deps:
83 | docker:
84 | - image: cimg/base:stable
85 | resource_class: large
86 | steps:
87 | - checkout
88 | - setup_remote_docker:
89 | version: 20.10.2
90 | - run:
91 | name: Build MXE dependencies 1 (64bit)
92 | no_output_timeout: 18000
93 | command: |
94 | docker pull openscad/mxe-x86_64-deps:latest || true
95 | docker build --cache-from openscad/mxe-requirements:latest --cache-from openscad/mxe-x86_64-gcc:latest --cache-from openscad/mxe-x86_64-deps:latest -t openscad/mxe-x86_64-deps:latest --build-arg JOBS=4 mxe/mxe-x86_64-deps
96 | docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
97 | docker push openscad/mxe-x86_64-deps:latest
98 | mxe-x86_64-deps2:
99 | docker:
100 | - image: cimg/base:stable
101 | resource_class: large
102 | steps:
103 | - checkout
104 | - setup_remote_docker:
105 | version: 20.10.2
106 | - run:
107 | name: Build MXE dependencies 2 (64bit)
108 | no_output_timeout: 18000
109 | command: |
110 | docker pull openscad/mxe-x86_64-deps2:latest || true
111 | docker build --cache-from openscad/mxe-requirements:latest --cache-from openscad/mxe-x86_64-gcc:latest --cache-from openscad/mxe-x86_64-deps:latest --cache-from openscad/mxe-x86_64-deps2:latest -t openscad/mxe-x86_64-deps2:latest --build-arg JOBS=4 mxe/mxe-x86_64-deps2
112 | docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
113 | docker push openscad/mxe-x86_64-deps2:latest
114 | mxe-x86_64-gui:
115 | docker:
116 | - image: cimg/base:stable
117 | resource_class: large
118 | steps:
119 | - checkout
120 | - setup_remote_docker:
121 | version: 20.10.2
122 | - run:
123 | name: Build MXE GUI (64bit)
124 | no_output_timeout: 18000
125 | command: |
126 | docker pull openscad/mxe-x86_64-gui:latest || true
127 | docker build --cache-from openscad/mxe-requirements:latest --cache-from openscad/mxe-x86_64-gcc:latest --cache-from openscad/mxe-x86_64-deps:latest --cache-from openscad/mxe-x86_64-gui:latest -t openscad/mxe-x86_64-gui:latest --build-arg JOBS=4 mxe/mxe-x86_64-gui
128 | docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
129 | docker push openscad/mxe-x86_64-gui:latest
130 | mxe-x86_64-openscad:
131 | docker:
132 | - image: cimg/base:stable
133 | resource_class: large
134 | steps:
135 | - checkout
136 | - setup_remote_docker:
137 | version: 20.10.2
138 | - run:
139 | name: Build MXE OpenSCAD (64bit)
140 | no_output_timeout: 18000
141 | command: |
142 | mkdir -p /tmp/out
143 | docker build -t openscad/mxe-x86_64-openscad:latest --build-arg OPENSCAD_VERSION="$(date +%Y.%m.%d).ci${CIRCLE_BUILD_NUM}" --build-arg JOBS=2 mxe/mxe-x86_64-openscad
144 | docker run openscad/mxe-x86_64-openscad:latest | tar -x -v -C /tmp/out
145 | - store_artifacts:
146 | path: /tmp/out
147 | destination: 64-bit
148 | mxe-i686-gcc:
149 | docker:
150 | - image: cimg/base:stable
151 | resource_class: large
152 | steps:
153 | - checkout
154 | - setup_remote_docker:
155 | version: 20.10.2
156 | - run:
157 | name: Build MXE gcc (32bit)
158 | no_output_timeout: 18000
159 | command: |
160 | docker pull openscad/mxe-i686-gcc:latest || true
161 | docker build --cache-from openscad/mxe-requirements:latest --cache-from openscad/mxe-i686-gcc:latest -t openscad/mxe-i686-gcc:latest --build-arg JOBS=4 mxe/mxe-i686-gcc
162 | docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
163 | docker push openscad/mxe-i686-gcc:latest
164 | mxe-i686-deps:
165 | docker:
166 | - image: cimg/base:stable
167 | resource_class: large
168 | steps:
169 | - checkout
170 | - setup_remote_docker:
171 | version: 20.10.2
172 | - run:
173 | name: Build MXE dependencies 1 (32bit)
174 | no_output_timeout: 18000
175 | command: |
176 | docker pull openscad/mxe-i686-deps:latest || true
177 | docker build --cache-from openscad/mxe-requirements:latest --cache-from openscad/mxe-i686-gcc:latest --cache-from openscad/mxe-i686-deps:latest -t openscad/mxe-i686-deps:latest --build-arg JOBS=4 mxe/mxe-i686-deps
178 | docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
179 | docker push openscad/mxe-i686-deps:latest
180 | mxe-i686-deps2:
181 | docker:
182 | - image: cimg/base:stable
183 | resource_class: large
184 | steps:
185 | - checkout
186 | - setup_remote_docker:
187 | version: 20.10.2
188 | - run:
189 | name: Build MXE dependencies 2 (32bit)
190 | no_output_timeout: 18000
191 | command: |
192 | docker pull openscad/mxe-i686-deps2:latest || true
193 | docker build --cache-from openscad/mxe-requirements:latest --cache-from openscad/mxe-i686-gcc:latest --cache-from openscad/mxe-i686-deps:latest --cache-from openscad/mxe-i686-deps2:latest -t openscad/mxe-i686-deps2:latest --build-arg JOBS=4 mxe/mxe-i686-deps2
194 | docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
195 | docker push openscad/mxe-i686-deps2:latest
196 | mxe-i686-gui:
197 | docker:
198 | - image: cimg/base:stable
199 | resource_class: large
200 | steps:
201 | - checkout
202 | - setup_remote_docker:
203 | version: 20.10.2
204 | - run:
205 | name: Build MXE GUI (32bit)
206 | no_output_timeout: 18000
207 | command: |
208 | docker pull openscad/mxe-i686-gui:latest || true
209 | docker build --cache-from openscad/mxe-requirements:latest --cache-from openscad/mxe-i686-gcc:latest --cache-from openscad/mxe-i686-deps:latest --cache-from openscad/mxe-gui:latest -t openscad/mxe-i686-gui:latest --build-arg JOBS=4 mxe/mxe-i686-gui
210 | docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
211 | docker push openscad/mxe-i686-gui:latest
212 | mxe-i686-openscad:
213 | docker:
214 | - image: cimg/base:stable
215 | resource_class: large
216 | steps:
217 | - checkout
218 | - setup_remote_docker:
219 | version: 20.10.2
220 | - run:
221 | name: Build MXE OpenSCAD (32bit)
222 | no_output_timeout: 18000
223 | command: |
224 | mkdir -p /tmp/out
225 | docker build -t openscad/mxe-i686-openscad:latest --build-arg OPENSCAD_VERSION="$(date +%Y.%m.%d).ci${CIRCLE_BUILD_NUM}" --build-arg JOBS=2 mxe/mxe-i686-openscad
226 | docker run openscad/mxe-i686-openscad:latest | tar -x -v -C /tmp/out
227 | - store_artifacts:
228 | path: /tmp/out
229 | destination: 32-bit
230 | workflows:
231 | version: 2
232 | build:
233 | jobs:
234 | - appimage-x86_64-base
235 | - appimage-x86_64-openscad:
236 | requires:
237 | - appimage-x86_64-base
238 | - mxe-requirements
239 | - mxe-x86_64-gcc:
240 | requires:
241 | - mxe-requirements
242 | - mxe-i686-gcc
243 | - mxe-x86_64-deps:
244 | requires:
245 | - mxe-x86_64-gcc
246 | - mxe-x86_64-deps2:
247 | requires:
248 | - mxe-x86_64-deps
249 | - mxe-x86_64-gui:
250 | requires:
251 | - mxe-x86_64-deps2
252 | - mxe-x86_64-openscad:
253 | requires:
254 | - mxe-x86_64-gui
255 | - mxe-i686-gcc:
256 | requires:
257 | - mxe-requirements
258 | - mxe-i686-deps:
259 | requires:
260 | - mxe-i686-gcc
261 | - mxe-i686-deps2:
262 | requires:
263 | - mxe-i686-deps
264 | - mxe-i686-gui:
265 | requires:
266 | - mxe-i686-deps2
267 | - mxe-i686-openscad:
268 | requires:
269 | - mxe-i686-gui
270 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | releases/
2 |
--------------------------------------------------------------------------------
/DockerHub.md:
--------------------------------------------------------------------------------
1 | # Official OpenSCAD Docker images
2 |
3 | Maintained by the [OpenSCAD](https://www.openscad.org/) Team.
4 |
5 | ## Supported tags and respective Dockerfile links
6 |
7 | * [`dev`](https://github.com/openscad/docker-openscad/blob/main/openscad/bookworm/Dockerfile) based on Debian bookworm
8 | * [`2021.01`](https://github.com/openscad/docker-openscad/blob/main/openscad/buster/Dockerfile) `latest` based on Debian buster
9 | * [`2019.05`](https://github.com/openscad/docker-openscad/blob/main/openscad/buster/Dockerfile) based on Debian buster
10 | * [`2015.03`](https://github.com/openscad/docker-openscad/blob/main/openscad/buster/Dockerfile) based on Debian stretch
11 |
12 | The `dev`tag is rebuilt regularly from the `master` branch of the OpenSCAD repository. Additional tags are set with the date of the build, so for example the build on March 25th, 2024 will be tagged as both `dev` and `dev.2024-03-25`.
13 |
14 | ## Quick Reference
15 |
16 | * For help use the [mailing list](https://openscad.org/community.html#forum) or the [#openscad](https://openscad.org/community.html#irc) IRC channel on libera.chat.
17 |
18 | * Bug reports and feature requests can be filed at https://github.com/openscad/docker-openscad/issues
19 |
20 | * Documentation about OpenSCAD can be found at https://openscad.org/documentation.html
21 |
22 | * Get started with the [Tutorial](https://en.wikibooks.org/wiki/OpenSCAD_Tutorial)
23 | * A quick reference card is available as [Cheatsheet](https://openscad.org/cheatsheet/index.html)
24 | * For more details, see the [User Manual](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual#The_OpenSCAD_User_Manual) and [Language Reference](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual#The_OpenSCAD_Language_Reference)
25 | * The list of [Books](https://openscad.org/documentation-books.html) includes some directly about OpenSCAD and others using OpenSCAD to help teach topics like Math, Geometry, and 3D printing.
26 |
27 | ## What is OpenSCAD?
28 |
29 |
30 | OpenSCAD is software for creating solid 3D CAD models. It is free software and available for Linux/UNIX, Windows and Mac OS X. Unlike most free software for creating 3D models (such as Blender) it does not focus on the artistic aspects of 3D modelling but instead on the CAD aspects. Thus it might be the application you are looking for when you are planning to create 3D models of machine parts but pretty sure is not what you are looking for when you are more interested in creating computer-animated movies.
31 |
32 | OpenSCAD is not an interactive modeller. Instead it is something like a 3D-compiler that reads in a script file that describes the object and renders the 3D model from this script file. This gives you (the designer) full control over the modelling process and enables you to easily change any step in the modelling process or make designs that are defined by configurable parameters.
33 |
34 | OpenSCAD provides two main modelling techniques: First there is constructive solid geometry (aka CSG) and second there is extrusion of 2D outlines. Autocad DXF files can be used as the data exchange format for such 2D outlines. In addition to 2D paths for extrusion it is also possible to read design parameters from DXF files. Besides DXF files OpenSCAD can read and create 3D models in the STL and OFF file formats.
35 |
36 | ## License
37 |
38 | The OpenSCAD binary is distributed under the [GNU General Public License v3.0](https://spdx.org/licenses/GPL-3.0-or-later.html) (or later). The source code can be found in the [github repository](https://github.com/openscad/openscad/) under the release version / tag that is the same as the docker image tag.
39 |
40 | For the development builds the matching source code can be found via the commit hash shown via `docker run openscad/openscad:dev openscad --info | head -n1`
41 |
42 | ## General Use of the images
43 |
44 | For general use (running OpenSCAD in a container), please use the `openscad/openscad` images published and documented at Docker Hub.
45 |
46 | * [openscad/openscad](https://hub.docker.com/repository/docker/openscad/openscad)
47 |
48 | ### Rendering to a STL/3MF Model
49 |
50 | ```bash
51 | docker run \
52 | -it \
53 | --rm \
54 | -v $(pwd):/openscad \
55 | -u $(id -u ${USER}):$(id -g ${USER}) \
56 | openscad/openscad:latest \
57 | openscad -o CSG.3mf CSG.scad
58 | ```
59 |
60 | ### Rendering a PNG
61 |
62 | ```bash
63 | docker run \
64 | -it \
65 | --rm \
66 | --init \
67 | -v $(pwd):/openscad \
68 | -u $(id -u ${USER}):$(id -g ${USER}) \
69 | openscad/openscad:latest \
70 | xvfb-run -a openscad -o CSG.png CSG.scad
71 | ```
72 |
73 | Note that PNG renderings currently still needs the X display in all release versions. So this needs `--init` and run via `xvfb-run`.
74 |
75 | That limitation is lifted in the latest dev snapshots due to the built-in EGL support.
76 |
77 | ## Usage in Makefiles
78 |
79 | OpenSCAD supports usage in Makefiles, e.g.
80 |
81 | ```
82 | %.stl: %.scad
83 | openscad -m make -o ./stl/$@ -d $@.deps $<
84 | openscad -m make --render -o ./png/$@.png $<
85 | ```
86 |
87 | Using the docker container version allows this too, by transforming the
88 | tool calls to the `$(shell ...)` notation. Note that this does not easily
89 | supports the `-m make` option as that would run inside the container and
90 | may need extra attention. The currently published containers do not have
91 | `make` installed.
92 |
93 | ```
94 | %.stl: %.scad
95 |
96 | docker run \
97 | -it \
98 | --rm \
99 | -v $(shell pwd):/openscad \
100 | -u $(shell id -u ${USER}):$(shell id -g ${USER}) \
101 | openscad/openscad:latest \
102 | openscad -o ./stl/$@ -d $@.deps $<
103 |
104 | docker run \
105 | -it \
106 | --rm \
107 | --init \
108 | -v $(shell pwd):/openscad \
109 | -u $(shell id -u ${USER}):$(shell id -g ${USER}) \
110 | openscad/openscad:latest \
111 | xvfb-run -a openscad -o ./png/$@.png $<
112 | ```
113 |
114 | ## CI support, for internal use
115 |
116 | * `openscad/appimage-*`
117 | * `openscad/mxe-*`
118 | * `openscad/src-*`
119 |
120 | All docker images can be viewed with a [Docker Hub search for `openscad/`](https://hub.docker.com/search?q=openscad%2F&image_filter=open_source&type=image).
121 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 2-Clause License
2 |
3 | Copyright (c) 2017, openscad
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 |
9 | * Redistributions of source code must retain the above copyright notice, this
10 | list of conditions and the following disclaimer.
11 |
12 | * Redistributions in binary form must reproduce the above copyright notice,
13 | this list of conditions and the following disclaimer in the documentation
14 | and/or other materials provided with the distribution.
15 |
16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # docker-openscad
2 | This repository collects OpenSCAD related docker files. One is meant for running OpenSCAD in a container (for building models, etc.), while the rest are meant for internal use in the OpenSCAD CI automation.
3 |
4 | ## General Use
5 |
6 | For general use (running OpenSCAD in a container), please use the `openscad/openscad` images published and documented at Docker Hub.
7 |
8 | * [openscad/openscad](https://hub.docker.com/repository/docker/openscad/openscad)
9 |
10 | ### Rendering to a STL/3MF Model
11 |
12 | ```bash
13 | docker run \
14 | -it \
15 | --rm \
16 | -v $(pwd):/openscad \
17 | -u $(id -u ${USER}):$(id -g ${USER}) \
18 | openscad/openscad:latest \
19 | openscad -o CSG.3mf CSG.scad
20 | ```
21 |
22 | ### Rendering a PNG
23 |
24 | ```bash
25 | docker run \
26 | -it \
27 | --rm \
28 | --init \
29 | -v $(pwd):/openscad \
30 | -u $(id -u ${USER}):$(id -g ${USER}) \
31 | openscad/openscad:latest \
32 | xvfb-run -a openscad -o CSG.png CSG.scad
33 | ```
34 |
35 | Note that PNG renderings currently still needs the X display. That limitation can go away soon due to the built-in EGL support. So this needs `--init` and run via `xvfb-run`.
36 |
37 | ## CI support, for internal use
38 |
39 | * `openscad/appimage-*`
40 | * `openscad/mxe-*`
41 | * `openscad/src-*`
42 |
43 | All docker images can be viewed with a [Docker Hub search for `openscad/`](https://hub.docker.com/search?q=openscad%2F&image_filter=open_source&type=image).
44 |
45 | ## Debug Builds
46 |
47 | Creating an image with debug symbols depends if the app is compiled with `cmake` or `qmake`. To enable debugging set `BUILD_TYPE="Debug"` and `DEBUG="+"` in `scripts/build-images.sh
48 |
49 |
50 | Before
51 | ```bash
52 | --build-arg BUILD_TYPE="Release" \
53 | --build-arg DEBUG="-" \
54 | ```
55 |
56 | After
57 | ```bash
58 | --build-arg BUILD_TYPE="Debug" \
59 | --build-arg DEBUG="+" \
60 | ```
61 |
62 | Example to run gdb in a container
63 | ```bash
64 | docker run --ulimit core=-1 -it -v $(pwd):/input openscad/openscad:2021.01-debug
65 | apt update; apt install gdb -y
66 | xvfb-run gdb --ex run --args openscad --info
67 | ```
68 |
--------------------------------------------------------------------------------
/appimage/appimage-arm64v8-base/Dockerfile:
--------------------------------------------------------------------------------
1 | #
2 | # Build: docker build -t openscad/appimage-arm64v8-base .
3 | # Use: docker run --rm -it -v openscad/appimage-arm64v8-base
4 | #
5 | FROM arm64v8/ubuntu:20.04
6 |
7 | ARG GITHUB_USER=openscad
8 | ARG GITHUB_REPO=openscad
9 | ARG BRANCH=master
10 | ARG JOBS=2
11 |
12 | ENV DEBIAN_FRONTEND noninteractive
13 |
14 | RUN \
15 | apt-get update && \
16 | apt-get upgrade -y && \
17 | apt-get install -y --no-install-recommends \
18 | apt-utils apt-transport-https ca-certificates git wget \
19 | patchelf gnupg ccache appstream xxd desktop-file-utils \
20 | libjpeg-dev cimg-dev libcairo-dev libfuse-dev libssl-dev \
21 | libgpgme-dev libgcrypt20-dev clang clang-12 ninja-build \
22 | itstool \
23 | && \
24 | apt-get clean
25 |
26 | RUN \
27 | echo "deb https://download.opensuse.org/repositories/home:/t-paul:/cgal/xUbuntu_20.04/ ./" >> /etc/apt/sources.list && \
28 | echo "deb https://apt.kitware.com/ubuntu/ focal main" >> /etc/apt/sources.list && \
29 | grep -v "^#" /etc/apt/sources.list && \
30 | wget -qO - https://files.openscad.org/OBS-Repository-Key.pub | apt-key add - && \
31 | wget -qO - https://apt.kitware.com/keys/kitware-archive-latest.asc | apt-key add - && \
32 | apt-get update && \
33 | apt-get upgrade -y && \
34 | apt-get install -y --no-install-recommends libcgal-dev && \
35 | apt-get clean
36 |
37 | WORKDIR /openscad
38 |
39 | # Invalidate docker cache if the branch changes
40 | ADD https://api.github.com/repos/${GITHUB_USER}/${GITHUB_REPO}/git/refs/heads/${BRANCH} version.json
41 |
42 | RUN \
43 | cat version.json && rm -f version.json && \
44 | git clone "https://github.com/${GITHUB_USER}/${GITHUB_REPO}" . && \
45 | git checkout "${BRANCH}" && \
46 | git rev-parse --abbrev-ref HEAD && \
47 | git log -n8 --pretty=tformat:"%h %ai (%aN) %s" && \
48 | bash ./scripts/uni-get-dependencies.sh && \
49 | bash ./scripts/check-dependencies.sh && \
50 | (apt-get install -y lib3mf-dev || /bin/true) && \
51 | cd / && apt-get clean && rm -rf /openscad
52 |
53 | WORKDIR /appimage
54 |
55 | RUN \
56 | git clone --single-branch --recursive https://github.com/linuxdeploy/linuxdeploy.git && \
57 | git clone --single-branch --recursive https://github.com/linuxdeploy/linuxdeploy-plugin-qt.git && \
58 | git clone --single-branch --recursive https://github.com/linuxdeploy/linuxdeploy-plugin-appimage.git && \
59 | git clone --single-branch --recursive https://github.com/AppImage/AppImageKit.git
60 |
61 | RUN \
62 | cd /appimage/linuxdeploy/ && mkdir build && cd build/ && cmake -DCMAKE_INSTALL_PREFIX=/appimage/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo .. && make -j"$JOBS" && make install && \
63 | cd /appimage && mkdir -p usr/bin/ && cp linuxdeploy/build/bin/linuxdeploy usr/bin/
64 |
65 | RUN \
66 | cd /appimage/linuxdeploy-plugin-qt/ && mkdir build && cd build/ && cmake -DCMAKE_INSTALL_PREFIX=/appimage/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo .. && make -j"$JOBS" && make install
67 |
68 | RUN \
69 | cd /appimage/linuxdeploy-plugin-appimage && mkdir build && cd build/ && cmake -DCMAKE_INSTALL_PREFIX=/appimage/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo .. && make -j"$JOBS" && make install
70 |
71 | RUN \
72 | cd /appimage/AppImageKit && mkdir build && cd build/ && cmake -DCMAKE_INSTALL_PREFIX=/appimage/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DAPPIMAGEKIT_PACKAGE_DEBS=OFF .. && make -j"$JOBS" && make install
73 |
74 | RUN \
75 | rm -rf linuxdeploy linuxdeploy-plugin-qt linuxdeploy-plugin-appimage AppImageKit && \
76 | find /appimage
77 |
--------------------------------------------------------------------------------
/appimage/appimage-arm64v8-openscad/Dockerfile:
--------------------------------------------------------------------------------
1 | #
2 | # Build: docker build -t openscad/appimage-arm64v8-openscad .
3 | # Use: docker run --rm -it -v openscad/appimage-arm64v8-openscad
4 | #
5 | FROM openscad/appimage-arm64v8-base:latest
6 |
7 | ARG GITHUB_USER=openscad
8 | ARG GITHUB_REPO=openscad
9 | ARG BRANCH=master
10 | ARG REFS=heads
11 | ARG OPENSCAD_VERSION=
12 | ARG BUILD_TYPE=Release
13 | ARG SNAPSHOT=ON
14 | ARG JOBS=2
15 | ARG COMMIT=true
16 |
17 | WORKDIR /openscad
18 |
19 | # Invalidate docker cache if the branch changes
20 | ADD https://api.github.com/repos/${GITHUB_USER}/${GITHUB_REPO}/git/refs/${REFS}/${BRANCH} version.json
21 |
22 | RUN \
23 | cat version.json && rm -f version.json && \
24 | git clone --recursive --single-branch --branch "${BRANCH}" --shallow-submodules "https://github.com/${GITHUB_USER}/${GITHUB_REPO}" . && \
25 | git rev-parse --abbrev-ref HEAD && \
26 | git log -n8 --pretty=tformat:"%h %ai (%aN) %s"
27 |
28 | RUN \
29 | export OPENSCAD_COMMIT=$(/bin/"$COMMIT" && git log -1 --pretty=format:%h || echo "") && \
30 | mkdir build && \
31 | cd build && \
32 | cmake .. \
33 | -GNinja \
34 | -DENABLE_TESTS=OFF \
35 | -DCMAKE_INSTALL_PREFIX=/usr \
36 | -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
37 | -DOpenGL_GL_PREFERENCE=LEGACY \
38 | -DEXPERIMENTAL=${SNAPSHOT} \
39 | -DSNAPSHOT=${SNAPSHOT} \
40 | -DOPENSCAD_VERSION="$OPENSCAD_VERSION" \
41 | -DOPENSCAD_COMMIT="$OPENSCAD_COMMIT" \
42 | && \
43 | cmake --build . "-j$JOBS" -v
44 |
45 | RUN \
46 | cmake --install build --prefix=AppDir/usr -v
47 |
48 | RUN \
49 | export PATH=/appimage/usr/bin:"$PATH" && \
50 | VERSION="${OPENSCAD_VERSION:-$(date +%Y.%m.%d).ai}" linuxdeploy --plugin qt --output appimage --appdir AppDir && \
51 | mkdir -p out && \
52 | cp -iv OpenSCAD*.AppImage out/
53 |
54 | ENTRYPOINT tar --create -C /openscad/out .
55 |
--------------------------------------------------------------------------------
/appimage/appimage-armv7l-base/Dockerfile:
--------------------------------------------------------------------------------
1 | #
2 | # Build: docker build -t appimage-base .
3 | # Use: docker run --rm -it -v appimage-base
4 | #
5 | FROM buildpack-deps:stretch
6 |
7 | RUN apt-get update
8 |
9 | RUN apt-get install -y --no-install-recommends binfmt-support qemu qemu-user-static debootstrap apt-src apt-transport-https devscripts git fakeroot
10 |
11 | RUN update-binfmts --display
12 |
13 | RUN wget http://archive.raspbian.org/raspbian.public.key -O - | apt-key add -q
14 |
15 | WORKDIR /raspi
16 |
17 | RUN qemu-debootstrap --variant=fakechroot --keyring=/etc/apt/trusted.gpg --arch armhf stretch /raspi http://mirrordirector.raspbian.org/raspbian/
18 |
19 | RUN chroot /data/raspberry-pi/root uname -a
20 |
--------------------------------------------------------------------------------
/appimage/appimage-x86_64-base/Dockerfile:
--------------------------------------------------------------------------------
1 | #
2 | # Build: docker build --progress=plain --load -t openscad/appimage-x86_64-base:latest .
3 | #
4 | FROM ubuntu:22.04
5 |
6 | ARG GITHUB_USER=openscad
7 | ARG GITHUB_REPO=openscad
8 | ARG BRANCH=master
9 |
10 | ENV DEBIAN_FRONTEND=noninteractive
11 |
12 | RUN \
13 | apt-get update && \
14 | apt-get upgrade -y && \
15 | apt-get install -y --no-install-recommends \
16 | software-properties-common \
17 | apt-transport-https \
18 | ca-certificates \
19 | openssh-client \
20 | libsqlite3-dev \
21 | lsb-release \
22 | liblzma-dev \
23 | libssl-dev \
24 | libbz2-dev \
25 | appstream \
26 | apt-utils \
27 | unzip \
28 | gnupg \
29 | file \
30 | ncat \
31 | wget \
32 | git
33 |
34 | RUN \
35 | sed -ie 's/^#\s*\(.*universe\)$/\1/' /etc/apt/sources.list && \
36 | echo "deb https://download.opensuse.org/repositories/home:/t-paul:/lib3mf/xUbuntu_22.04/ ./" >> /etc/apt/sources.list && \
37 | echo "deb https://download.opensuse.org/repositories/home:/t-paul:/cgal/xUbuntu_22.04/ ./" >> /etc/apt/sources.list && \
38 | grep -v "^#" /etc/apt/sources.list && \
39 | wget -qO - https://files.openscad.org/OBS-Repository-Key.pub | apt-key add - && \
40 | apt-get update && \
41 | apt-get upgrade -y
42 |
43 | WORKDIR /openscad
44 |
45 | # Invalidate docker cache if the branch changes
46 | ADD https://api.github.com/repos/${GITHUB_USER}/${GITHUB_REPO}/git/refs/heads/${BRANCH} version.json
47 |
48 | RUN \
49 | cat version.json && rm -f version.json && \
50 | git clone "https://github.com/${GITHUB_USER}/${GITHUB_REPO}" . && \
51 | git checkout "${BRANCH}" && \
52 | git rev-parse --abbrev-ref HEAD && \
53 | git log -n8 --pretty=tformat:"%h %ai (%aN) %s"
54 |
55 | RUN \
56 | bash ./scripts/uni-get-dependencies.sh && \
57 | bash ./scripts/check-dependencies.sh && \
58 | (apt-get install -y lib3mf-dev python3-dev nettle-dev || /bin/true) && \
59 | apt-get clean
60 |
61 | WORKDIR /appimage
62 |
63 | RUN \
64 | rm -rf /openscad && \
65 | wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && \
66 | wget -q https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage && \
67 | wget -q https://github.com/t-paul/linuxdeploy-plugin-python/archive/refs/heads/master.zip -O linuxdeploy-plugin-python.zip && \
68 | wget -q https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh
69 |
70 | RUN \
71 | chmod +x linuxdeploy*.AppImage *.sh && \
72 | ./linuxdeploy-x86_64.AppImage --appimage-extract && \
73 | ./linuxdeploy-plugin-qt-x86_64.AppImage --appimage-extract && \
74 | mkdir -p usr/bin/share && \
75 | mv -iv squashfs-root/usr/bin/* usr/bin && \
76 | mv -iv squashfs-root/plugins . && \
77 | rm -rf squashfs-root && \
78 | unzip -p linuxdeploy-plugin-python.zip linuxdeploy-plugin-python-master/linuxdeploy-plugin-python.sh > usr/bin/linuxdeploy-plugin-python.sh && \
79 | unzip -p linuxdeploy-plugin-python.zip linuxdeploy-plugin-python-master/share/sitecustomize.py > usr/bin/sitecustomize.py && \
80 | chmod 755 /appimage/usr/bin/linuxdeploy-plugin-python.sh && \
81 | rm -rf squashfs-root && \
82 | rm -rf *.AppImage && \
83 | find /appimage
84 |
85 | RUN \
86 | dpkg --purge $(dpkg -l 'libqscintilla2-qt5*' | grep ^ii | awk '{ print $2 }') && \
87 | wget -q https://www.riverbankcomputing.com/static/Downloads/QScintilla/2.14.1/QScintilla_src-2.14.1.tar.gz && \
88 | tar xvf QScintilla_src-2.14.1.tar.gz && \
89 | cd QScintilla_src-2.14.1/src && \
90 | qmake && \
91 | make -j2 && make install
92 |
--------------------------------------------------------------------------------
/appimage/appimage-x86_64-openscad/Dockerfile:
--------------------------------------------------------------------------------
1 | #
2 | # Build: docker build --progress=plain --load -t openscad/appimage-x86_64-openscad .
3 | # Use: docker run --rm openscad/appimage-x86_64-openscad | tar tvf -
4 | #
5 | FROM openscad/appimage-x86_64-base:latest
6 |
7 | ARG GITHUB_USER=openscad
8 | ARG GITHUB_REPO=openscad
9 | ARG BRANCH=master
10 | ARG REFS=heads
11 | ARG OPENSCAD_VERSION=
12 | ARG BUILD_TYPE=Release
13 | ARG SNAPSHOT=ON
14 | ARG JOBS=2
15 | ARG COMMIT=true
16 |
17 | WORKDIR /openscad
18 |
19 | # Invalidate docker cache if the branch changes
20 | ADD https://api.github.com/repos/${GITHUB_USER}/${GITHUB_REPO}/git/refs/${REFS}/${BRANCH} version.json
21 |
22 | RUN \
23 | cat version.json && rm -f version.json && \
24 | git clone --recursive --single-branch --branch "${BRANCH}" --shallow-submodules "https://github.com/${GITHUB_USER}/${GITHUB_REPO}" . && \
25 | git rev-parse --abbrev-ref HEAD && \
26 | git log -n8 --pretty=tformat:"%h %ai (%aN) %s"
27 |
28 | RUN \
29 | export OPENSCAD_VERSION="$(date +%Y.%m.%d).ai" && \
30 | export OPENSCAD_COMMIT=$(/bin/"$COMMIT" && git log -1 --pretty=format:%h || echo "") && \
31 | mkdir build && \
32 | cd build && \
33 | cmake .. \
34 | -DOPENSCAD_VERSION="$OPENSCAD_VERSION" \
35 | -DOPENSCAD_COMMIT="$OPENSCAD_COMMIT" \
36 | -DCMAKE_INSTALL_PREFIX=/usr \
37 | -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
38 | -DUSE_BUILTIN_OPENCSG=ON \
39 | -DMANIFOLD_PYBIND=OFF \
40 | -DMANIFOLD_TEST=OFF \
41 | -DENABLE_PYTHON=ON \
42 | -DENABLE_TESTS=OFF \
43 | -DEXPERIMENTAL=${SNAPSHOT} \
44 | -DSNAPSHOT=${SNAPSHOT} \
45 | && \
46 | make -j"$JOBS" && \
47 | make install DESTDIR=../AppDir
48 |
49 | RUN \
50 | export PATH=/appimage/usr/bin:"$PATH" && \
51 | mv -iv AppDir/usr/share/applications/openscad.desktop AppDir/usr/share/applications/org.openscad.OpenSCAD.desktop && \
52 | sed -i -e 's/openscad.desktop/org.openscad.OpenSCAD.desktop/' AppDir/usr/share/metainfo/org.openscad.OpenSCAD.appdata.xml && \
53 | sed -i -e '/
2 | #include
3 | #include
4 |
5 | int main() {
6 | CGAL::Surface_mesh> mesh;
7 | CGAL::Polygon_mesh_processing::triangulate_faces(mesh);
8 | }
9 |
--------------------------------------------------------------------------------
/cgal-1/test_gmp_bug_different_cgal_versions.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -eu
3 |
4 | export MXE_PREFIX=/mxe
5 | export TARGET=x86_64-w64-mingw32.static.posix
6 | export PATH="$MXE_PREFIX/usr/bin":"$MXE_PREFIX/usr/x86_64-pc-linux-gnu/bin":"$PATH"
7 |
8 | URL="https://github.com/CGAL/cgal/releases/download"
9 |
10 | function install() {
11 | (
12 | V="CGAL-$1"
13 | rm -rf "$V"
14 | tar xf "$V-library.tar.xz"
15 | cd "$V"
16 | mkdir -p build
17 | cd build
18 | ${TARGET}-cmake .. \
19 | -DCMAKE_BUILD_TYPE=Release \
20 | -DCGAL_INSTALL_CMAKE_DIR:STRING="lib/CGAL" \
21 | -DCGAL_INSTALL_INC_DIR:STRING="include" \
22 | -DCGAL_INSTALL_DOC_DIR:STRING="share/doc/CGAL-$version" \
23 | -DCGAL_INSTALL_BIN_DIR:STRING="bin"
24 | make install >/dev/null
25 | )
26 | }
27 |
28 | for version in $(ls -1 *.xz | sed -e 's/[^-]*-\([0-9.]*\)-.*/\1/') ; do
29 | install "${version}"
30 |
31 | echo "# Compiling w/ CGAL ${version}"
32 | "$TARGET"-g++ -std=c++14 -DCGAL_USE_GMPXX=1 -o bug.cc.obj -c bug.cc
33 | echo "# Compilation finished"
34 | echo
35 | echo "# Press enter to continue"
36 |
37 | read
38 | done
39 |
40 |
--------------------------------------------------------------------------------
/mxe/mxe-base/Dockerfile:
--------------------------------------------------------------------------------
1 | # syntax=docker/dockerfile:1.2
2 | #
3 | # Build: docker build -t openscad/mxe-base .
4 | # Use: docker run --rm -it openscad/mxe-base
5 | #
6 | FROM openscad/mxe-requirements:latest
7 |
8 | ARG JOBS=2
9 | ARG MXE_REF=tags
10 | ARG MXE_BRANCH=openscad-snapshot-build
11 | ARG MXE_CLONE_DEPTH=5
12 | ARG MXE_GITHUB_USER=openscad
13 | ARG MXE_GITHUB_REPO=mxe
14 | ARG CLEAN=clean-junk
15 |
16 | COPY packages.lst /tmp
17 | COPY settings.mk /tmp
18 |
19 | WORKDIR /mxe
20 |
21 | # Invalidate docker cache if the branch changes
22 | ADD https://api.github.com/repos/${MXE_GITHUB_USER}/${MXE_GITHUB_REPO}/git/refs/${MXE_REF}/${MXE_BRANCH} version.json
23 |
24 | RUN \
25 | cat version.json && rm -f version.json && \
26 | git clone --recursive --depth "${MXE_CLONE_DEPTH}" --single-branch --branch "${MXE_BRANCH}" "https://github.com/${MXE_GITHUB_USER}/${MXE_GITHUB_REPO}" . && \
27 | git rev-parse --abbrev-ref HEAD && \
28 | git log -n"${MXE_CLONE_DEPTH}" --pretty=tformat:"%h %ai (%aN) %s"
29 |
30 | RUN \
31 | --mount=type=cache,id=pkg,target=/mxe/pkg \
32 | eval `bash /tmp/packages.lst` && \
33 | make "JOBS=${JOBS}" "-j${JOBS}" \
34 | MXE_SETTINGS_FILE=/tmp/settings.mk \
35 | MXE_PLUGIN_DIRS="${PLUGIN_DIRS}" \
36 | ${PKG_DOWNLOAD_ALL} \
37 | && \
38 | make "JOBS=${JOBS}" "-j${JOBS}" \
39 | MXE_SETTINGS_FILE=/tmp/settings.mk \
40 | MXE_PLUGIN_DIRS="${PLUGIN_DIRS}" \
41 | MXE_TARGETS="${TARGET_32} ${TARGET_64}" \
42 | ${PKG_MXE_GCC} \
43 | && \
44 | make ${CLEAN}
45 |
--------------------------------------------------------------------------------
/mxe/mxe-i686-deps/Dockerfile:
--------------------------------------------------------------------------------
1 | #
2 | # Build: docker build -t openscad/mxe-i686-deps .
3 | # Use: docker run --rm -it openscad/mxe-i686-deps
4 | #
5 | FROM openscad/mxe-base:latest
6 |
7 | ARG JOBS=2
8 | ARG CLEAN=clean-junk
9 |
10 | WORKDIR /mxe
11 |
12 | RUN \
13 | --mount=type=cache,id=pkg,target=/mxe/pkg \
14 | eval `bash /tmp/packages.lst` && \
15 | make "JOBS=${JOBS}" "-j${JOBS}" \
16 | MXE_SETTINGS_FILE=/tmp/settings.mk \
17 | MXE_PLUGIN_DIRS="${PLUGIN_DIRS}" \
18 | MXE_TARGETS="${TARGET_32}" \
19 | ${PKG_MXE_DEP} \
20 | && \
21 | make ${CLEAN}
22 |
--------------------------------------------------------------------------------
/mxe/mxe-i686-gui/Dockerfile:
--------------------------------------------------------------------------------
1 | #
2 | # Build: docker build -t openscad/mxe-i686-gui .
3 | # Use: docker run --rm -it openscad/mxe-i686-gui
4 | #
5 | FROM openscad/mxe-i686-deps:latest
6 |
7 | ARG JOBS=2
8 | ARG CLEAN=clean-junk
9 |
10 | WORKDIR /mxe
11 |
12 | RUN \
13 | --mount=type=cache,id=pkg,target=/mxe/pkg \
14 | eval `bash /tmp/packages.lst` && \
15 | make "JOBS=${JOBS}" "-j${JOBS}" \
16 | MXE_SETTINGS_FILE=/tmp/settings.mk \
17 | MXE_PLUGIN_DIRS="${PLUGIN_DIRS}" \
18 | MXE_TARGETS="${TARGET_32}" \
19 | ${PKG_MXE_GUI} \
20 | && \
21 | make ${CLEAN}
22 |
--------------------------------------------------------------------------------
/mxe/mxe-i686-openscad/Dockerfile:
--------------------------------------------------------------------------------
1 | #
2 | # Build: docker build -t openscad/mxe-i686-openscad .
3 | # Use: docker run --rm -it openscad/mxe-i686-openscad
4 | #
5 | FROM openscad/mxe-i686-gui:latest
6 |
7 | ARG SUFFIX=
8 | ARG GITHUB_USER=openscad
9 | ARG GITHUB_REPO=openscad
10 | ARG BRANCH=master
11 | ARG REFS=heads
12 | ARG OPENSCAD_VERSION=
13 | ARG RELEASE_TYPE=snapshot
14 | ARG JOBS=2
15 |
16 | WORKDIR /openscad
17 |
18 | # Invalidate docker cache if the branch changes
19 | ADD https://api.github.com/repos/${GITHUB_USER}/${GITHUB_REPO}/git/refs/${REFS}/${BRANCH} version.json
20 |
21 | RUN \
22 | cat version.json && rm -f version.json && \
23 | git clone --recursive "https://github.com/${GITHUB_USER}/${GITHUB_REPO}" . && \
24 | git checkout "${BRANCH}" && \
25 | git rev-parse --abbrev-ref HEAD && \
26 | git log -n8 --pretty=tformat:"%h %ai (%aN) %s"
27 | RUN \
28 | export LC_ALL=C.UTF-8 ; \
29 | export MXEDIR=/mxe ; \
30 | export PKG_CONFIG_PATH=/mxe/usr/i686-w64-mingw32.static.posix/lib/pkgconfig ; \
31 | bash -c 'ln -sfv /usr/bin/python{3,}' ; \
32 | export NUMCPU="$JOBS" ; \
33 | export LIB3MF_INCLUDEPATH=/mxe/usr/i686-w64-mingw32.static.posix/include/lib3mf ; \
34 | export LIB3MF_LIBPATH=/mxe/usr/i686-w64-mingw32.static.posix/lib ; \
35 | sed -ie 's/WARNING_FLAGS -Werror/WARNING_FLAGS/' submodules/manifold/CMakeLists.txt ; \
36 | ./scripts/release-common.sh -v "${OPENSCAD_VERSION}" mingw32 ${RELEASE_TYPE} ; \
37 | mkdir -p out; \
38 | for f in mingw*/*.zip mingw*/*Installer.exe; do \
39 | N=$(basename "$f" | sed -e "s/\\(-x86-[36][24]\\)/\\1${SUFFIX}/;"); \
40 | cp -iv "$f" out/"$N"; \
41 | done
42 |
43 | ENTRYPOINT tar --create -C /openscad/out .
44 |
--------------------------------------------------------------------------------
/mxe/mxe-requirements/Dockerfile:
--------------------------------------------------------------------------------
1 | #
2 | # Build: docker build -t openscad/mxe-requirements .
3 | # Use: docker run --rm -it -v openscad/mxe-requirements
4 | #
5 | FROM buildpack-deps:bookworm
6 |
7 | RUN apt-get update
8 |
9 | RUN apt-get install -y --no-install-recommends \
10 | python-is-python3 \
11 | python3-mako \
12 | libpcre3-dev \
13 | libtool-bin \
14 | ninja-build \
15 | p7zip-full \
16 | autopoint \
17 | intltool \
18 | itstool \
19 | libtool \
20 | bison \
21 | gnupg \
22 | gperf \
23 | scons \
24 | unzip \
25 | cmake \
26 | meson \
27 | flex \
28 | less \
29 | lzip \
30 | nsis \
31 | ruby \
32 | ncat \
33 | zstd \
34 | vim \
35 | zip
36 |
--------------------------------------------------------------------------------
/mxe/mxe-x86_64-deps/Dockerfile:
--------------------------------------------------------------------------------
1 | #
2 | # Build: docker build -t openscad/mxe-x86_64-deps .
3 | # Use: docker run --rm -it openscad/mxe-x86_64-deps
4 | #
5 | FROM openscad/mxe-base:latest
6 |
7 | ARG JOBS=2
8 | ARG CLEAN=clean-junk
9 |
10 | WORKDIR /mxe
11 |
12 | RUN \
13 | --mount=type=cache,id=pkg,target=/mxe/pkg \
14 | eval `bash /tmp/packages.lst` && \
15 | make "JOBS=${JOBS}" "-j${JOBS}" \
16 | MXE_SETTINGS_FILE=/tmp/settings.mk \
17 | MXE_PLUGIN_DIRS="${PLUGIN_DIRS}" \
18 | MXE_TARGETS="${TARGET_64}" \
19 | ${PKG_MXE_DEP} \
20 | && \
21 | make ${CLEAN}
22 |
--------------------------------------------------------------------------------
/mxe/mxe-x86_64-gui/Dockerfile:
--------------------------------------------------------------------------------
1 | #
2 | # Build: docker build -t openscad/mxe-x86_64-gui .
3 | # Use: docker run --rm -it openscad/mxe-x86_64-gui
4 | #
5 | FROM openscad/mxe-x86_64-deps:latest
6 |
7 | ARG JOBS=2
8 | ARG CLEAN=clean-junk
9 |
10 | WORKDIR /mxe
11 |
12 | RUN \
13 | --mount=type=cache,id=pkg,target=/mxe/pkg \
14 | eval `bash /tmp/packages.lst` && \
15 | make "JOBS=${JOBS}" "-j${JOBS}" \
16 | MXE_SETTINGS_FILE=/tmp/settings.mk \
17 | MXE_PLUGIN_DIRS="${PLUGIN_DIRS}" \
18 | MXE_TARGETS="${TARGET_64}" \
19 | ${PKG_MXE_GUI} \
20 | && \
21 | make ${CLEAN}
22 |
--------------------------------------------------------------------------------
/mxe/mxe-x86_64-openscad/Dockerfile:
--------------------------------------------------------------------------------
1 | #
2 | # Build: docker build -t openscad/mxe-x86_64-openscad .
3 | # Use: docker run --rm -it openscad/mxe-x86_64-openscad
4 | #
5 | FROM openscad/mxe-x86_64-gui:latest
6 |
7 | ARG SUFFIX=
8 | ARG GITHUB_USER=openscad
9 | ARG GITHUB_REPO=openscad
10 | ARG BRANCH=master
11 | ARG REFS=heads
12 | ARG OPENSCAD_VERSION=
13 | ARG RELEASE_TYPE=snapshot
14 | ARG JOBS=2
15 |
16 | WORKDIR /openscad
17 |
18 | # Invalidate docker cache if the branch changes
19 | ADD https://api.github.com/repos/${GITHUB_USER}/${GITHUB_REPO}/git/refs/${REFS}/${BRANCH} version.json
20 |
21 | RUN \
22 | cat version.json && rm -f version.json && \
23 | git clone --recursive "https://github.com/${GITHUB_USER}/${GITHUB_REPO}" . && \
24 | git checkout "${BRANCH}" && \
25 | git rev-parse --abbrev-ref HEAD && \
26 | git log -n8 --pretty=tformat:"%h %ai (%aN) %s"
27 | RUN \
28 | export LC_ALL=C.UTF-8 ; \
29 | export MXEDIR=/mxe ; \
30 | export PKG_CONFIG_PATH=/mxe/usr/x86_64-w64-mingw32.static.posix/lib/pkgconfig ; \
31 | bash -c 'ln -sfv /usr/bin/python{3,}' ; \
32 | export NUMCPU="$JOBS" ; \
33 | export LIB3MF_INCLUDEPATH=/mxe/usr/x86_64-w64-mingw32.static.posix/include/lib3mf ; \
34 | export LIB3MF_LIBPATH=/mxe/usr/x86_64-w64-mingw32.static.posix/lib ; \
35 | sed -ie 's/WARNING_FLAGS -Werror/WARNING_FLAGS/' submodules/manifold/CMakeLists.txt ; \
36 | ./scripts/release-common.sh -v "${OPENSCAD_VERSION}" mingw64 ${RELEASE_TYPE} ; \
37 | mkdir -p out; \
38 | for f in mingw*/*.zip mingw*/*Installer.exe; do \
39 | N=$(basename "$f" | sed -e "s/\\(-x86-[36][24]\\)/\\1${SUFFIX}/;"); \
40 | cp -iv "$f" out/"$N"; \
41 | done
42 |
43 | ENTRYPOINT tar --create -C /openscad/out .
44 |
--------------------------------------------------------------------------------
/mxe/packages.lst:
--------------------------------------------------------------------------------
1 | TARGET_32=i686-w64-mingw32.static.posix
2 | TARGET_64=x86_64-w64-mingw32.static.posix
3 |
4 | PLUGIN_DIRS=plugins/gcc13
5 |
6 | PKG_MXE_GCC="cc"
7 | PKG_MXE_DEP="mpfr eigen libxml2 freetype fontconfig harfbuzz cairo glib tbb libzip lib3mf double-conversion nettle nsis"
8 | PKG_MXE_GUI="opencsg cgal qtbase qtmultimedia qtgamepad qtsvg qscintilla2"
9 | PKG_MXE_ALL="$PKG_MXE_GCC $PKG_MXE_DEP $PKG_MXE_GUI"
10 |
11 | set -f
12 | set -- $PKG_MXE_ALL
13 | set -- ${@/#/download-}
14 | PKG_DOWNLOAD_ALL="$@"
15 |
16 | for var in TARGET_32 TARGET_64 PLUGIN_DIRS PKG_MXE_GCC PKG_MXE_DEP PKG_MXE_GUI PKG_MXE_ALL PKG_DOWNLOAD_ALL
17 | do
18 | echo "export ${var}=\"${!var}\""
19 | done
20 |
--------------------------------------------------------------------------------
/mxe/settings.mk:
--------------------------------------------------------------------------------
1 | qtbase_CONFIGURE_OPTS="-no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-sql-tds"
2 |
--------------------------------------------------------------------------------
/openscad/bookworm/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM debian:bookworm-slim AS builder
2 |
3 | ARG GITHUB_USER=openscad
4 | ARG GITHUB_REPO=openscad
5 | ARG BRANCH=master
6 | ARG REFS=heads
7 | ARG OPENSCAD_VERSION=
8 | ARG BUILD_TYPE=Release
9 | ARG SNAPSHOT=ON
10 | ARG JOBS=1
11 | ARG COMMIT=true
12 |
13 | ENV DEBIAN_FRONTEND=noninteractive
14 |
15 | RUN apt-get update && apt-get -y full-upgrade
16 |
17 | # Base setup
18 | RUN \
19 | apt-get install -y --no-install-recommends \
20 | build-essential devscripts apt-utils apt-transport-https ca-certificates git wget jq
21 |
22 | # Dev dependencies
23 | RUN \
24 | apt-get -y install --no-install-recommends \
25 | build-essential curl libffi-dev libxmu-dev cmake bison flex \
26 | git-core libboost-all-dev libmpfr-dev libboost-dev \
27 | libcairo2-dev libeigen3-dev libcgal-dev libgmp3-dev \
28 | libgmp-dev imagemagick libfreetype6-dev libdouble-conversion-dev \
29 | gtk-doc-tools libglib2.0-dev gettext pkg-config ragel libxi-dev \
30 | libfontconfig-dev libzip-dev lib3mf-dev libharfbuzz-dev libxml2-dev \
31 | qtbase5-dev libqt5scintilla2-dev libqt5opengl5-dev libqt5svg5-dev \
32 | qtmultimedia5-dev libqt5multimedia5-plugins libtbb-dev \
33 | python3-pip python3-venv \
34 | libglew-dev
35 |
36 | WORKDIR /openscad
37 |
38 | # Invalidate docker cache if the branch changes
39 | ADD https://api.github.com/repos/${GITHUB_USER}/${GITHUB_REPO}/git/refs/${REFS}/${BRANCH} version.json
40 |
41 | RUN \
42 | cat version.json | jq . && rm -f version.json && \
43 | git clone --recurse-submodules "https://github.com/${GITHUB_USER}/${GITHUB_REPO}" . && \
44 | git checkout "${BRANCH}" && \
45 | git rev-parse --abbrev-ref HEAD && \
46 | git log -n8 --pretty=tformat:"%h %ai (%aN) %s"
47 |
48 | RUN \
49 | export OPENSCAD_COMMIT=$(/bin/"$COMMIT" && git log -1 --pretty=format:%h || echo "") && \
50 | mkdir build && \
51 | cd build && \
52 | cmake .. \
53 | -DCMAKE_INSTALL_PREFIX=/usr/local \
54 | -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
55 | -DEXPERIMENTAL=${SNAPSHOT} \
56 | -DSNAPSHOT=${SNAPSHOT} \
57 | -DUSE_BUILTIN_OPENCSG=ON \
58 | -DOPENSCAD_VERSION="$OPENSCAD_VERSION" \
59 | -DOPENSCAD_COMMIT="$OPENSCAD_COMMIT" \
60 | && \
61 | make -j"$JOBS" && \
62 | make install
63 |
64 | FROM debian:bookworm-slim
65 |
66 | RUN apt-get update
67 |
68 | RUN apt-get -y full-upgrade
69 |
70 | RUN apt-get install -y --no-install-recommends \
71 | libcairo2 libdouble-conversion3 libxml2 lib3mf1 libzip4 libharfbuzz0b \
72 | libboost-thread1.74.0 libboost-program-options1.74.0 libboost-filesystem1.74.0 \
73 | libboost-regex1.74.0 libmpfr6 libqscintilla2-qt5-15 \
74 | libqt5multimedia5 libqt5concurrent5 libtbb12 libglu1-mesa \
75 | libglew2.2 xvfb xauth
76 |
77 | RUN apt-get clean
78 |
79 | WORKDIR /usr/local
80 |
81 | COPY --from=builder /usr/local/ .
82 |
83 | WORKDIR /openscad
84 |
--------------------------------------------------------------------------------
/openscad/bookworm/Dockerfile.egl:
--------------------------------------------------------------------------------
1 | FROM debian:bookworm-slim AS builder
2 |
3 | ARG GITHUB_USER=openscad
4 | ARG GITHUB_REPO=openscad
5 | ARG BRANCH=master
6 | ARG REFS=heads
7 | ARG OPENSCAD_VERSION=
8 | ARG BUILD_TYPE=Release
9 | ARG SNAPSHOT=ON
10 | ARG JOBS=1
11 | ARG COMMIT=true
12 |
13 | ENV DEBIAN_FRONTEND=noninteractive
14 |
15 | RUN apt-get update && apt-get -y full-upgrade
16 |
17 | # Base setup
18 | RUN \
19 | apt-get install -y --no-install-recommends \
20 | build-essential devscripts apt-utils apt-transport-https ca-certificates git wget jq
21 |
22 | # Dev dependencies
23 | RUN \
24 | apt-get -y install --no-install-recommends \
25 | build-essential curl libffi-dev libxmu-dev cmake bison flex \
26 | git-core libboost-all-dev libmpfr-dev libboost-dev \
27 | libcairo2-dev libeigen3-dev libcgal-dev libopencsg-dev libgmp3-dev \
28 | libgmp-dev imagemagick libfreetype6-dev libdouble-conversion-dev \
29 | gtk-doc-tools libglib2.0-dev gettext pkg-config ragel libxi-dev \
30 | libfontconfig-dev libzip-dev lib3mf-dev libharfbuzz-dev libxml2-dev \
31 | qtbase5-dev libqt5scintilla2-dev libqt5opengl5-dev libqt5svg5-dev \
32 | qtmultimedia5-dev libqt5multimedia5-plugins libtbb-dev \
33 | python3-pip python3-venv \
34 | libegl-dev libegl1-mesa-dev
35 |
36 | RUN \
37 | echo "deb-src http://deb.debian.org/debian bookworm main" >> /etc/apt/sources.list && \
38 | cat /etc/apt/sources.list && \
39 | apt-get update && \
40 | apt-get -y build-dep libglew-dev libopencsg-dev
41 |
42 | RUN \
43 | groupadd -r openscad && \
44 | useradd -r -g openscad openscad && \
45 | mkdir /opencsg-build /glew-build /egl /openscad && \
46 | chown openscad:openscad /opencsg-build /glew-build /egl /openscad
47 |
48 | USER openscad
49 |
50 | WORKDIR /glew-build
51 |
52 | # Build & install EGL glew
53 | RUN \
54 | apt-get source libglew-dev && \
55 | cd $(find . -maxdepth 1 -type d -name 'glew-*') && \
56 | sed -i -e 's/SYSTEM[\t ?]*=.*$/SYSTEM = linux-egl/' Makefile && \
57 | dch -m -l egl -m "Configure for EGL" && \
58 | debuild -uc -us && \
59 | cp $(ls ../libglew*.deb | egrep -v -- '-(dev|dbgsym)_') /egl/
60 |
61 | USER root
62 |
63 | RUN dpkg -i libglew*.deb
64 |
65 | USER openscad
66 |
67 | WORKDIR /opencsg-build
68 |
69 | # Build & install EGL patched version of OpenCSG
70 | RUN \
71 | apt-get source libopencsg-dev && \
72 | cd $(find . -maxdepth 1 -type d -name 'opencsg-*') && \
73 | dch -m -l egl -m "Disable GLX dependencies" && \
74 | sed -i -e 's/example//' opencsg.pro && \
75 | sed -i -e 's/.*RenderTexture.*//' src/src.pro && \
76 | sed -i -e 's/.*pBufferTexture.*/\\/' src/src.pro && \
77 | sed -i -e 's/.*define.*OPENCSG_HAVE_PBUFFER.*//' src/opencsgConfig.h && \
78 | sed -i -e 's/GLXEW_SGIX_[a-z]*/false/' src/channelManager.cpp && \
79 | rm -rf debian/libopencsg-ex* && \
80 | debuild -uc -us -nc && \
81 | cp $(ls ../libopencsg*.deb | egrep -v -- '-(dev|dbg|example)_') /egl/
82 |
83 | USER root
84 |
85 | RUN dpkg -i libopencsg*.deb
86 |
87 | USER openscad
88 | WORKDIR /openscad
89 |
90 | # Invalidate docker cache if the branch changes
91 | ADD https://api.github.com/repos/${GITHUB_USER}/${GITHUB_REPO}/git/refs/${REFS}/${BRANCH} version.json
92 |
93 | RUN \
94 | cat version.json | jq . && rm -f version.json && \
95 | git clone --recurse-submodules "https://github.com/${GITHUB_USER}/${GITHUB_REPO}" . && \
96 | git checkout "${BRANCH}" && \
97 | git rev-parse --abbrev-ref HEAD && \
98 | git log -n8 --pretty=tformat:"%h %ai (%aN) %s"
99 |
100 | RUN \
101 | git submodule update --init && \
102 | export OPENSCAD_COMMIT=$(/bin/"$COMMIT" && git log -1 --pretty=format:%h || echo "") && \
103 | mkdir build && \
104 | cd build && \
105 | cmake .. \
106 | -DCMAKE_INSTALL_PREFIX=/usr/local \
107 | -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
108 | -DEXPERIMENTAL=${SNAPSHOT} \
109 | -DSNAPSHOT=${SNAPSHOT} \
110 | -DOPENSCAD_VERSION="$OPENSCAD_VERSION" \
111 | -DOPENSCAD_COMMIT="$OPENSCAD_COMMIT" \
112 | -DENABLE_EGL=ON \
113 | && \
114 | make -j"$JOBS"
115 |
116 | USER root
117 | WORKDIR /openscad/build
118 | RUN make install
119 |
120 | FROM debian:bookworm-slim
121 |
122 | RUN apt-get update
123 |
124 | RUN apt-get -y full-upgrade
125 |
126 | RUN apt-get install -y --no-install-recommends \
127 | libcairo2 libdouble-conversion3 libxml2 lib3mf1 libzip4 libharfbuzz0b \
128 | libboost-thread1.74.0 libboost-program-options1.74.0 libboost-filesystem1.74.0 \
129 | libboost-regex1.74.0 libopencsg1 libmpfr6 libqscintilla2-qt5-15 \
130 | libqt5multimedia5 libqt5concurrent5 libtbb12 libglu1-mesa \
131 | libopengl0
132 |
133 | RUN apt-get clean
134 |
135 | WORKDIR /tmp
136 |
137 | COPY --from=builder /egl .
138 |
139 | RUN dpkg -i *.deb && rm -f *.deb
140 |
141 | WORKDIR /usr/local
142 |
143 | COPY --from=builder /usr/local/ .
144 |
145 | WORKDIR /openscad
146 |
--------------------------------------------------------------------------------
/openscad/bookworm/hooks/build:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | export DOCKER_CLI_EXPERIMENTAL=enabled
4 | export DOCKER_BUILDKIT=1
5 | VERSION=$(git log -1 --date="format:%Y.%m.%d.dd%j%H" --format="%cd")
6 | echo "Version: $VERSION"
7 | echo "Image Name: $IMAGE_NAME"
8 | echo "Using BUILD_INFO=${BUILD_INFO}"
9 | lscpu || /bin/true
10 | free -m || /bin/true
11 | dmidecode -t system || /bin/true
12 | docker buildx build \
13 | --push \
14 | --progress plain \
15 | --platform linux/amd64,linux/arm64 \
16 | --build-arg REFS="heads" \
17 | --build-arg BRANCH="master" \
18 | --build-arg OPENSCAD_VERSION="$VERSION" \
19 | --build-arg BUILD_TYPE="Release" \
20 | --build-arg DEBUG="-" \
21 | --build-arg JOBS=2 \
22 | -f $DOCKERFILE_PATH -t $IMAGE_NAME .
23 |
--------------------------------------------------------------------------------
/openscad/bookworm/hooks/pre_build:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | export DOCKER_CLI_EXPERIMENTAL=enabled
4 | export DOCKER_BUILDKIT=1
5 | docker buildx create \
6 | --name builder \
7 | --driver docker-container \
8 | --platform linux/amd64,linux/arm64 \
9 | --use
10 | docker buildx inspect --bootstrap
11 |
--------------------------------------------------------------------------------
/openscad/buster/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM debian:buster-slim AS builder
2 |
3 | ARG GITHUB_USER=openscad
4 | ARG GITHUB_REPO=openscad
5 | ARG BRANCH=master
6 | ARG REFS=heads
7 | ARG OPENSCAD_VERSION=
8 | ARG SNAPSHOT=+
9 | ARG DEBUG=-
10 | ARG JOBS=1
11 | ARG COMMIT=true
12 |
13 | ENV DEBIAN_FRONTEND=noninteractive
14 |
15 | RUN apt-get update
16 |
17 | RUN apt-get -y full-upgrade
18 |
19 | # Base setup
20 | RUN apt-get install -y --no-install-recommends \
21 | apt-utils apt-transport-https ca-certificates git wget jq
22 |
23 | # Dev dependencies
24 | RUN apt-get -y install --no-install-recommends \
25 | build-essential curl libffi-dev libxmu-dev cmake bison flex \
26 | git-core libboost-all-dev libmpfr-dev libboost-dev libglew-dev \
27 | libcairo2-dev libeigen3-dev libcgal-dev libopencsg-dev libgmp3-dev \
28 | libgmp-dev imagemagick libfreetype6-dev libdouble-conversion-dev \
29 | gtk-doc-tools libglib2.0-dev gettext pkg-config ragel libxi-dev \
30 | libfontconfig-dev libzip-dev lib3mf-dev libharfbuzz-dev libxml2-dev \
31 | qtbase5-dev libqt5scintilla2-dev libqt5opengl5-dev libqt5svg5-dev \
32 | qtmultimedia5-dev libqt5multimedia5-plugins qt5-default binutils
33 |
34 | WORKDIR /openscad
35 |
36 | # Invalidate docker cache if the branch changes
37 | ADD https://api.github.com/repos/${GITHUB_USER}/${GITHUB_REPO}/git/refs/${REFS}/${BRANCH} version.json
38 |
39 | RUN \
40 | cat version.json | jq . && rm -f version.json && \
41 | git clone "https://github.com/${GITHUB_USER}/${GITHUB_REPO}" . && \
42 | git checkout "${BRANCH}" && \
43 | git rev-parse --abbrev-ref HEAD && \
44 | git log -n8 --pretty=tformat:"%h %ai (%aN) %s"
45 |
46 | RUN \
47 | git submodule update --init && \
48 | export OPENSCAD_COMMIT=$(/bin/"$COMMIT" && git log -1 --pretty=format:%h || echo "") && \
49 | qmake -v && \
50 | qmake -d \
51 | PREFIX=/usr/local \
52 | VERSION="$OPENSCAD_VERSION" \
53 | OPENSCAD_COMMIT="$OPENSCAD_COMMIT" \
54 | CONFIG+=qopenglwidget \
55 | CONFIG${SNAPSHOT}=experimental \
56 | CONFIG${SNAPSHOT}=snapshot \
57 | CONFIG${DEBUG}=debug && \
58 | make -j"$JOBS"
59 |
60 | RUN strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
61 |
62 | RUN make install INSTALL_ROOT=/
63 |
64 | FROM debian:buster-slim
65 |
66 | RUN apt-get update
67 |
68 | RUN apt-get -y full-upgrade
69 |
70 | RUN apt-get install -y --no-install-recommends \
71 | libcairo2 libdouble-conversion1 libxml2 lib3mf1 libzip4 libharfbuzz0b \
72 | libboost-thread1.67.0 libboost-program-options1.67.0 libboost-filesystem1.67.0 \
73 | libboost-regex1.67.0 libglew2.1 libopencsg1 libmpfr6 libqscintilla2-qt5-13 \
74 | libqt5multimedia5 libqt5concurrent5 libcgal13 libglu1-mesa xvfb xauth
75 |
76 | RUN apt-get clean
77 |
78 | WORKDIR /usr/local
79 |
80 | COPY --from=builder /usr/local/ .
81 |
82 | WORKDIR /openscad
83 |
--------------------------------------------------------------------------------
/openscad/stretch/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM debian:stretch-slim AS builder
2 |
3 | ARG GITHUB_USER=openscad
4 | ARG GITHUB_REPO=openscad
5 | ARG BRANCH=master
6 | ARG REFS=heads
7 | ARG OPENSCAD_VERSION=
8 | ARG SNAPSHOT=+
9 | ARG DEBUG=-
10 | ARG JOBS=1
11 | ARG COMMIT=true
12 |
13 | ENV DEBIAN_FRONTEND=noninteractive
14 |
15 | # Base setup
16 | RUN \
17 | apt-get update && \
18 | apt-get upgrade -y && \
19 | apt-get install -y --no-install-recommends apt-utils apt-transport-https ca-certificates git wget gnupg jq
20 |
21 | # Add OBS repo as Debian/stretch did not ship lib3mf-dev and libopencsg-dev had some issues
22 | # that are fixed in version 1.4.2.
23 | RUN \
24 | wget -qO - https://files.openscad.org/OBS-Repository-Key.pub | apt-key add - && \
25 | echo "deb https://download.opensuse.org/repositories/home:/t-paul:/lib3mf/Debian_9.0/ ./" >> /etc/apt/sources.list && \
26 | echo "deb https://download.opensuse.org/repositories/home:/t-paul:/opencsg-1.4.2/Debian_9.0/ ./" >> /etc/apt/sources.list
27 |
28 | RUN \
29 | apt-get update && \
30 | apt-get upgrade -y
31 |
32 | # Dev dependencies
33 | RUN apt-get -y install --no-install-recommends \
34 | build-essential curl libffi-dev libxmu-dev cmake bison flex \
35 | git-core libboost-all-dev libmpfr-dev libboost-dev libglew-dev \
36 | libcairo2-dev libeigen3-dev libcgal-dev libopencsg-dev libgmp3-dev \
37 | libgmp-dev imagemagick libfreetype6-dev libdouble-conversion-dev \
38 | gtk-doc-tools libglib2.0-dev gettext pkg-config ragel libxi-dev \
39 | libfontconfig-dev libzip-dev lib3mf-dev libharfbuzz-dev libxml2-dev \
40 | qtbase5-dev libqt5scintilla2-dev libqt5opengl5-dev libqt5svg5-dev \
41 | qtmultimedia5-dev libqt5multimedia5-plugins qt5-default
42 |
43 | WORKDIR /openscad
44 |
45 | # Invalidate docker cache if the branch changes
46 | ADD https://api.github.com/repos/${GITHUB_USER}/${GITHUB_REPO}/git/refs/${REFS}/${BRANCH} version.json
47 |
48 | RUN \
49 | cat version.json | jq . && rm -f version.json && \
50 | git clone "https://github.com/${GITHUB_USER}/${GITHUB_REPO}" . && \
51 | git checkout "${BRANCH}" && \
52 | git rev-parse --abbrev-ref HEAD && \
53 | git log -n8 --pretty=tformat:"%h %ai (%aN) %s"
54 |
55 | COPY patches/ patches/
56 |
57 | RUN patch -p1 < patches/fix-qt-translation-call.patch
58 |
59 | RUN \
60 | git submodule update --init && \
61 | export OPENSCAD_COMMIT=$(/bin/"$COMMIT" && git log -1 --pretty=format:%h || echo "") && \
62 | qmake -v && \
63 | qmake -d \
64 | PREFIX=/usr/local \
65 | VERSION="$OPENSCAD_VERSION" \
66 | OPENSCAD_COMMIT="$OPENSCAD_COMMIT" \
67 | CONFIG+=qopenglwidget \
68 | CONFIG${SNAPSHOT}=experimental \
69 | CONFIG${SNAPSHOT}=snapshot \
70 | CONFIG${DEBUG}=debug && \
71 | make -j"$JOBS"
72 |
73 | RUN make install INSTALL_ROOT=/
74 |
75 | FROM debian:stretch-slim
76 |
77 | RUN apt-get update
78 |
79 | RUN apt-get -y full-upgrade
80 |
81 | RUN apt-get install -y --no-install-recommends \
82 | libcairo2 libdouble-conversion1 libxml2 libzip4 libharfbuzz0b \
83 | libboost-thread1.62.0 libboost-program-options1.62.0 libboost-filesystem1.62.0 \
84 | libboost-regex1.62.0 libglew2.0 libmpfr4 libqt5scintilla2-12v5 libcgal12 \
85 | libqt5opengl5 libqt5multimedia5 libqt5concurrent5 libglu1-mesa libgl1-mesa-dri \
86 | xvfb xauth apt-transport-https ca-certificates wget gnupg
87 |
88 | RUN \
89 | wget -qO - https://files.openscad.org/OBS-Repository-Key.pub | apt-key add - && \
90 | echo "deb https://download.opensuse.org/repositories/home:/t-paul:/lib3mf/Debian_9.0/ ./" >> /etc/apt/sources.list && \
91 | echo "deb https://download.opensuse.org/repositories/home:/t-paul:/opencsg-1.4.2/Debian_9.0/ ./" >> /etc/apt/sources.list && \
92 | apt-get update
93 |
94 | RUN apt-get install -y --no-install-recommends \
95 | lib3mf1 libopencsg1
96 |
97 | RUN apt-get clean
98 |
99 | WORKDIR /usr/local
100 |
101 | COPY --from=builder /usr/local/ .
102 |
103 | # Prevent warning when running OpenSCAD
104 | RUN mkdir -p /root/.local/share
105 |
106 | WORKDIR /openscad
107 |
--------------------------------------------------------------------------------
/openscad/stretch/patches/fix-qt-translation-call.patch:
--------------------------------------------------------------------------------
1 | From 4fa5f0340a2b7b031a0b39f7de0ca795d52bb68b Mon Sep 17 00:00:00 2001
2 | From: Torsten Paul
3 | Date: Sun, 27 Nov 2016 19:29:04 +0100
4 | Subject: Handle 2 argument translation calls generated by Qt 5.7.1 (fixes
5 | #1872).
6 |
7 |
8 | diff --git a/src/qtgettext.h b/src/qtgettext.h
9 | index 6e667163e..dbc4f1744 100644
10 | --- a/src/qtgettext.h
11 | +++ b/src/qtgettext.h
12 | @@ -16,10 +16,16 @@
13 |
14 | #define N_(String) String
15 |
16 | -inline QString _( const char *msgid, int category )
17 | +inline QString _(const char *msgid, int category)
18 | {
19 | - Q_UNUSED( category );
20 | - return QString::fromUtf8( _( msgid ) );
21 | + Q_UNUSED(category);
22 | + return QString::fromUtf8(_(msgid));
23 | +}
24 | +
25 | +inline QString _(const char *msgid, const char *disambiguation)
26 | +{
27 | + Q_UNUSED(disambiguation);
28 | + return QString::fromUtf8(_(msgid));
29 | }
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/scripts/build-appimage.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -e
2 |
3 | SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
4 |
5 | COUNT=0
6 |
7 | . "${SCRIPT_DIR}/build.sh"
8 |
9 | clean
10 |
11 | build appimage openscad/appimage-x86_64-base
12 | build appimage openscad/appimage-x86_64-openscad
13 |
14 | build appimage openscad/appimage-arm64v8-base
15 | build appimage openscad/appimage-arm64v8-openscad
16 |
17 | list 'openscad/appimage-*'
18 |
--------------------------------------------------------------------------------
/scripts/build-images.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -xe
2 |
3 | build () {
4 | REF="$1"
5 | BRANCH="$2"
6 | DOCKERTAG1="$3"
7 | DOCKERTAG2="$4"
8 | VERSION="$5"
9 | DIR="$6"
10 | FILE="$7"
11 |
12 | DOCKERTAG1_ARGS=""
13 | DOCKERTAG2_ARGS=""
14 |
15 | if [ -n "$FILE" ]; then
16 | DOCKERFILE_ARGS="-f ${DIR}/${FILE}"
17 | fi
18 |
19 | if [ -z "$VERSION" ]; then
20 | VERSION="$DOCKERTAG1"
21 | fi
22 |
23 | if [ -n "$DOCKERTAG1" ]; then
24 | DOCKERTAG1_ARGS="-t openscad/openscad:$DOCKERTAG1"
25 | fi
26 | if [ -n "$DOCKERTAG2" ]; then
27 | DOCKERTAG2_ARGS="-t openscad/openscad:$DOCKERTAG2"
28 | fi
29 |
30 | echo "Building $BRANCH with version $VERSION..."
31 | docker buildx build \
32 | --push \
33 | --platform linux/amd64,linux/arm64 \
34 | --build-arg=REFS="$REF" \
35 | --build-arg=BRANCH="$BRANCH" \
36 | --build-arg OPENSCAD_VERSION="$VERSION" \
37 | --build-arg BUILD_TYPE="Release" \
38 | --build-arg DEBUG="-" \
39 | --build-arg JOBS=4 \
40 | $DOCKERTAG1_ARGS \
41 | $DOCKERTAG2_ARGS \
42 | $DOCKERFILE_ARGS \
43 | "$DIR"
44 | }
45 |
46 | V=$(git log -1 --date="format:%Y.%m.%d.dd%j%H" --format="%cd")
47 |
48 | build tags openscad-2015.03-3 2015.03 "" "" openscad/stretch Dockerfile
49 | build tags openscad-2019.05 2019.05 "" "" openscad/buster Dockerfile
50 | build tags openscad-2021.01 2021.01 latest "" openscad/buster Dockerfile
51 | build heads master dev "" "$V" openscad/bookworm Dockerfile
52 | build heads master egl "" "$V" openscad/bookworm Dockerfile.egl
53 |
54 | docker image list -f 'reference=openscad/openscad'
55 |
--------------------------------------------------------------------------------
/scripts/build-mxe.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -e
2 |
3 | SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
4 |
5 | COUNT=0
6 |
7 | . "${SCRIPT_DIR}/build.sh"
8 |
9 | clean
10 |
11 | build mxe openscad/mxe-requirements --no-cache "$@"
12 |
13 | # Base build for both 32-bit and 64-bit gcc
14 | build mxe openscad/mxe-base "$@"
15 |
16 | build mxe openscad/mxe-x86_64-deps "$@"
17 | build mxe openscad/mxe-x86_64-gui "$@"
18 | build mxe openscad/mxe-x86_64-openscad "$@"
19 |
20 | build mxe openscad/mxe-i686-deps "$@"
21 | build mxe openscad/mxe-i686-gui "$@"
22 | build mxe openscad/mxe-i686-openscad "$@"
23 |
24 | list 'openscad/mxe-*'
25 |
--------------------------------------------------------------------------------
/scripts/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -e
2 |
3 | clean () {
4 | rm -f ???_build-*.log
5 | }
6 |
7 | build () {
8 | DIR="$1"
9 | TAG="$2"
10 | NAME="${TAG#*/}"
11 | shift
12 | shift
13 |
14 | COUNT=$(( $COUNT + 1 ))
15 | LOG=$(printf "%03d_build-%s.log" "$COUNT" "$NAME")
16 | JOBS=$(( ( $(nproc --all) + 1 ) / 2 ))
17 |
18 | echo "*" | tee "$LOG"
19 | echo "* $(date): building $NAME (using JOBS=$JOBS)" | tee -a "$LOG"
20 | echo "* $(date): log in $LOG" | tee -a "$LOG"
21 | echo "*" | tee -a "$LOG"
22 | time DOCKER_BUILDKIT=1 BUILDKIT_PROGRESS=plain docker build --progress=plain -t "$TAG":latest --build-arg="JOBS=$JOBS" "$@" -f "$DIR"/"$NAME"/Dockerfile "$DIR" 2>&1 >> "$LOG"
23 | echo "*" | tee -a "$LOG"
24 | echo "* $(date): finished $NAME" | tee -a "$LOG"
25 | echo "*" | tee -a "$LOG"
26 | }
27 |
28 | list () {
29 | REF="$1"
30 |
31 | date
32 | docker image list -f "reference=${REF}"
33 | }
34 |
--------------------------------------------------------------------------------
/scripts/docker-build-release.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -e
2 |
3 | # This script is intended to build release candidates and releases using
4 | # the docker images for MXE and Linux AppImage.
5 | # The build is configured as release, so experimental features are going
6 | # to be disabled and hidden.
7 |
8 | REFS="$1"
9 | BRANCH="$2"
10 | VERSION="$3"
11 |
12 | RELEASES="releases"
13 | URL=https://github.com/openscad/openscad.git
14 |
15 | build () {
16 | TAG="$1"
17 | DIR="$2"
18 | shift 2
19 | docker build -t "${TAG}" --build-arg REFS="${REFS}" --build-arg BRANCH="${BRANCH}" --build-arg OPENSCAD_VERSION="${VERSION}" --build-arg RELEASE_TYPE="" "$@" "${DIR}"
20 | }
21 |
22 | run () {
23 | TAG="$1"
24 | mkdir -p "${RELEASES}"
25 | docker run -i "${TAG}":latest | tar -x -v -C "${RELEASES}" -f -
26 | }
27 |
28 | hash_and_sign () {
29 | for a in "${RELEASES}"/*.{exe,zip,AppImage,tar.gz,dmg}
30 | do
31 | echo "+ $a"
32 | if [ -f "$a" ]
33 | then
34 | sha256sum "$a" | tee "${a}.sha256"; sha512sum "$a" | tee "${a}.sha512"
35 | if [ -f "$a".asc ]
36 | then
37 | echo "Skipping signing as $a.asc already exists"
38 | else
39 | gpg -u 8AF822A975097442 --detach-sign --armor "$a"
40 | fi
41 | fi
42 | done
43 | }
44 |
45 | main () {
46 | echo "Branch/Tag for checkout: '${REFS}/${BRANCH}'"
47 | echo "Version to set in OpenSCAD: '${VERSION}'"
48 | echo ""
49 | echo "1) MXE 32-bit"
50 | echo "2) MXE 64-bit"
51 | echo "3) AppImage x86 64-bit"
52 | echo "4) AppImage ARM 64-bit"
53 | echo ""
54 | echo "9) Sources"
55 | echo ""
56 | echo "0) Hash & Sign"
57 | echo ""
58 | echo -n "Select: "
59 | read nr
60 |
61 | case "$nr" in
62 | 1)
63 | build openscad/mxe-i686-openscad mxe/mxe-i686-openscad/
64 | run openscad/mxe-i686-openscad
65 | ;;
66 | 2)
67 | build openscad/mxe-x86_64-openscad mxe/mxe-x86_64-openscad/
68 | run openscad/mxe-x86_64-openscad
69 | ;;
70 | 3)
71 | build openscad/appimage-x86_64-openscad appimage/appimage-x86_64-openscad/ --build-arg SNAPSHOT=-
72 | run openscad/appimage-x86_64-openscad
73 | ;;
74 | 4)
75 | build openscad/appimage-arm64v8-openscad appimage/appimage-arm64v8-openscad/ --build-arg SNAPSHOT=-
76 | run openscad/appimage-arm64v8-openscad
77 | ;;
78 | 9)
79 | build openscad/src-openscad src/src-openscad --build-arg TAG="${BRANCH}"
80 | run openscad/src-openscad
81 | ;;
82 | 0)
83 | hash_and_sign
84 | ;;
85 | *)
86 | echo "Unknown selection."
87 | ;;
88 | esac
89 | }
90 |
91 | last_tag () {
92 | git ls-remote --tags "$URL" | \
93 | egrep 'refs/tags/openscad-[0-9]{4}.[0-9]{2}[0-9A-Z-]*$' | \
94 | sed -e 's,.*/,,' | \
95 | awk -F - '{ if (length($3) == 0) { ext = "{R}" } else if (index($3, "RC") == 1) { ext = "{P}" $3 } else { ext = "{U}" $3 }; print $1 "-" $2 ext}' | \
96 | sort | \
97 | sed -e 's,{R},,; s,{[UP]},-,' | \
98 | tail -n1
99 | }
100 |
101 | if [ x = x"$REFS" ]
102 | then
103 | REFS=tags
104 | BRANCH=`last_tag`
105 | VERSION=${BRANCH#openscad-}
106 | fi
107 |
108 | main
109 |
--------------------------------------------------------------------------------
/scripts/list.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash -e
2 |
3 | SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
4 |
5 | . "${SCRIPT_DIR}/build.sh"
6 |
7 | list 'openscad/mxe-*'
8 |
--------------------------------------------------------------------------------
/src/src-openscad/Dockerfile:
--------------------------------------------------------------------------------
1 | #
2 | # Build: docker build -t src-openscad .
3 | # Use: docker run --rm -it -v src-openscad
4 | #
5 | FROM alpine:3.12 AS build
6 |
7 | ARG GITHUB_USER=openscad
8 | ARG GITHUB_REPO=openscad
9 | ARG TAG
10 |
11 | WORKDIR /openscad
12 |
13 | RUN apk --update add git tar gzip && \
14 | rm -rf /var/lib/apt/lists/* && \
15 | rm /var/cache/apk/*
16 |
17 | # Invalidate docker cache if the branch changes
18 | ADD https://api.github.com/repos/${GITHUB_USER}/${GITHUB_REPO}/git/refs/tags/${TAG} tag.json
19 |
20 | RUN \
21 | cat tag.json && rm -f tag.json && \
22 | git clone --recursive --depth 10 --branch "${TAG}" "https://github.com/${GITHUB_USER}/${GITHUB_REPO}" "${TAG}" && \
23 | cd "${TAG}" && \
24 | git rev-parse --abbrev-ref HEAD && \
25 | git log -n8 --pretty=tformat:"%h %ai (%aN) %s"
26 |
27 | RUN \
28 | mkdir -p out && \
29 | tar -c -v \
30 | -I 'gzip -9' \
31 | --exclude '.git' \
32 | --exclude '.github' \
33 | --exclude .gitmodules \
34 | --exclude \*.yml \
35 | --exclude .travis.yml \
36 | --exclude .circleci \
37 | --exclude snap \
38 | -f out/"${TAG}".src.tar.gz "${TAG}"
39 |
40 | FROM alpine:3.12
41 | WORKDIR /openscad/out
42 | COPY --from=build /openscad/out .
43 |
44 | ENTRYPOINT tar --create -C /openscad/out .
45 |
--------------------------------------------------------------------------------
/wasm/wasm-playground-base/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM debian:bookworm-slim
2 |
3 | ENV DEBIAN_FRONTEND=noninteractive
4 |
5 | RUN \
6 | apt-get update && \
7 | apt-get upgrade -y && \
8 | apt-get install -y --no-install-recommends \
9 | software-properties-common \
10 | apt-transport-https \
11 | ca-certificates \
12 | openssh-client \
13 | lsb-release \
14 | apt-utils \
15 | xz-utils \
16 | nodejs \
17 | unzip \
18 | make \
19 | ncat \
20 | wget \
21 | npm \
22 | zip \
23 | git
24 |
25 | WORKDIR /build
26 |
--------------------------------------------------------------------------------