File: build-windows-nsis

package info (click to toggle)
dustrac 2.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 28,396 kB
  • sloc: cpp: 43,805; ansic: 30,075; sh: 121; xml: 79; python: 33; makefile: 11
file content (30 lines) | stat: -rwxr-xr-x 971 bytes parent folder | download
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
#!/bin/bash

# Builds NSIS installer for Windows in Docker.

#
# Note!!: It would be possible to generate the NSIS installer with CPack,
# but let's use the old packaging scripts for now and only build with CMake.
#

DUSTRAC_RELEASE_VERSION=2.2.0

CMAKE=/mxe/usr/bin/i686-w64-mingw32.static-cmake
CPACK=/mxe/usr/bin/i686-w64-mingw32.static-cpack

CMD="export LANG=en_US.UTF-8 && \
     export LC_ALL=en_US.UTF-8 && \
     export PATH='$PATH':/mxe/usr/bin && \
     cd /dr2d && rm -rf build-windows-nsis && mkdir -p build-windows-nsis && \
     cd build-windows-nsis && ${CMAKE} -DPACKAGE_TYPE=NSIS .. && \
     make -j4 && \
     DUSTRAC_RELEASE_VERSION=${DUSTRAC_RELEASE_VERSION} ../scripts/build-windows-nsis-packaging-helper"

if [ -f /.dockerenv ]; then
    echo "Script inside Docker"
    bash -c "${CMD}"
else
    echo "Script outside Docker"
    docker run --user $(id -u):$(id -g) --privileged -t -v $(pwd):/dr2d juzzlin/mxe-qt5-20.04:latest bash -c "${CMD}"
fi