Skip to content

Commit eebba2e

Browse files
committed
fix Windows?
1 parent baea808 commit eebba2e

File tree

6 files changed

+34
-7
lines changed

6 files changed

+34
-7
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ jobs:
3434
- name: Install dependencies
3535
run: ci/install-dependencies deps
3636
shell: bash
37+
- name: Env vars
38+
run: cat deps/env.sh
39+
shell: bash
3740
- name: Build
3841
run: . deps/env.sh && ci/build-app
3942
shell: bash

ci/build-app

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ cd $BUILD_DIR
2121
cmake \
2222
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
2323
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \
24-
-G Ninja \
24+
-G "$CMAKE_GENERATOR" \
2525
$SRC_DIR
2626

2727
echo_title Updating translations

ci/install-dependencies

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,38 @@ popd > /dev/null
88

99
SRC_DIR=$CI_DIR/..
1010

11-
QT_ARCH_WINDOWS=win64_msvc2019_64
11+
. $CI_DIR/lib/common.sh
12+
13+
QT_ARCH_WINDOWS=win64_mingw81
14+
QT_MINGW=tools_mingw81
15+
QT_MINGW_PATH=mingw810_64/bin
1216
QT_ARCH_MACOS=clang_64
1317
QT_VERSION=5.15.2
1418

1519
ECM_VERSION=5.69.0
1620

1721
CMAKE_VERSION=3.31.\*
22+
CMAKE_GENERATOR=Ninja
1823

1924
QPROPGEN_VERSION=0.1.\*
2025

2126
add_env_var() {
22-
echo "export $1=$2" >> $ENV_FILE
23-
export $1=$2
27+
echo "export $1=\"$2\"" >> $ENV_FILE
28+
export $1="$2"
2429
}
2530

2631
prepend_path() {
32+
if [ ! -d "$1" ] ; then
33+
die "prepend_path: \"$1\" does not exist"
34+
fi
2735
echo "export PATH=$1:\$PATH" >> $ENV_FILE
2836
export PATH=$1:$PATH
2937
}
3038

31-
. $CI_DIR/lib/common.sh
39+
if is_windows ; then
40+
CMAKE_GENERATOR="MinGW Makefiles"
41+
fi
42+
3243
. $CI_DIR/lib/common-dependencies.sh
3344
. $CI_DIR/lib/$OS-dependencies.sh
3445

@@ -52,5 +63,6 @@ touch $ENV_FILE
5263

5364
add_env_var CMAKE_INSTALL_PREFIX $INST_DIR
5465
add_env_var CMAKE_PREFIX_PATH $INST_DIR
66+
add_env_var CMAKE_GENERATOR "$CMAKE_GENERATOR"
5567

5668
main

ci/lib/common-dependencies.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AQTINSTALL_VERSION=3.1.0
1+
AQTINSTALL_VERSION=3.3.0
22
AQTINSTALL_ARCHIVES="qtbase qtimageformats qtsvg qttranslations qttools"
33

44
check_pipx() {

ci/lib/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ has_command() {
4040
}
4141

4242
die() {
43-
echo "$*" >&2
43+
echo "ERROR: $*" >&2
4444
exit 1
4545
}
4646

ci/lib/windows-dependencies.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ ICOUTILS_URL="https://downloads.sourceforge.net/project/unix-utils/icoutils/icou
33
ICOUTILS_SHA256=1773b553fed5565004606d8732d9980ecec82cdccf35103700d71a17b4059723
44

55
install_icoutils() {
6+
echo_title "Installing icoutils"
67
install_prebuilt_archive $ICOUTILS_URL $ICOUTILS_SHA256 $INST_DIR/icoutils.zip $INST_DIR
78
local icotool_exe=$INST_DIR/icoutils-$ICOUTILS_VERSION-x86_64/bin/icotool.exe
89
if [ ! -x "$icotool_exe" ] ; then
@@ -11,9 +12,20 @@ install_icoutils() {
1112
prepend_path $(dirname $icotool_exe)
1213
}
1314

15+
install_qtmingw() {
16+
echo_title "Installing Qt mingw"
17+
local qt_install_dir=$INST_DIR/qt
18+
aqt install-tool \
19+
windows desktop $QT_MINGW \
20+
--outputdir $qt_install_dir
21+
22+
prepend_path $qt_install_dir/Tools/$QT_MINGW_PATH
23+
}
24+
1425
main() {
1526
install_icoutils
1627
install_qt
28+
install_qtmingw
1729
install_cmake
1830
install_ecm
1931
}

0 commit comments

Comments
 (0)