Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
benma committed Oct 30, 2024
1 parent df0909d commit 7dbf54b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,13 @@ jobs:
- name: Install Qt
# Qt modules: Not sure why we need qtpositioning - app compilation fails without. Maybe the webengine depends on it.
# qtpositioning depends on qtserialport.
# qtwebechannel is for the JS/backend bridge.
# qtwebchannel is for the JS/backend bridge.
# qtwebengine is for rendering the frontend.
run: |
pip install aqtinstall
aqt install-qt mac desktop 6.2.4 --modules qtpositioning qtserialport qtwebchannel qtwebengine --outputdir ~/Qt
echo "$HOME/Qt/6.2.4/macos/bin" >> $GITHUB_PATH
echo "$HOME/Qt/6.2.4/macos/libexec" >> $GITHUB_PATH
- name: Build macOS app
run: >
./scripts/github-ci.sh qt-osx;
Expand Down
10 changes: 7 additions & 3 deletions frontends/qt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

include ../../env.mk.inc

PATH := $(PATH)

base:
mkdir build
./genassets.sh
Expand Down Expand Up @@ -46,6 +48,10 @@ osx:
$(MAKE) clean
cd server && $(MAKE) macosx
$(MAKE) base
echo ${PATH}
ls ~/Qt/6.2.4/macos/bin/qmake
~/Qt/6.2.4/macos/bin/qmake -version
qmake -version
qmake -set MACOS_MIN_VERSION $(MACOS_MIN_VERSION)
# See https://stackoverflow.com/questions/77136519/qmake-failing-with-sdk-14-ventura-13-5-2
qmake -early QMAKE_DEFAULT_LIBDIRS=$(shell xcrun -show-sdk-path)/usr/lib -o build/Makefile
Expand All @@ -54,9 +60,7 @@ osx:
mv build/BitBox.app build/osx/
cp resources/MacOS/Info.plist build/osx/BitBox.app/Contents/
cp resources/MacOS/icon.icns build/osx/BitBox.app/Contents/Resources/
# The `-executable` flag is needed to make the macOS build work when Qt is installed from homebrew.
# It works without it when Qt is installed using the official installer.
cd build/osx/ && macdeployqt BitBox.app -executable=BitBox.app/Contents/Frameworks/QtWebEngineCore.framework/Versions/Current/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess
cd build/osx/ && macdeployqt BitBox.app
cp server/libserver.so build/osx/BitBox.app/Contents/Frameworks
cp build/assets.rcc build/osx/BitBox.app/Contents/MacOS/
install_name_tool -change libserver.so @executable_path/../Frameworks/libserver.so build/osx/BitBox.app/Contents/MacOS/BitBox
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ apt-get -y install --no-install-recommends python3-pip python3-dev
pip install -U pip && pip install aqtinstall
# Not sure why we need qtpositioning - app compilation fails without. Maybe the webengine depends on it.
# qtpositioning depends on qtserialport.
# qtwebechannel is for the JS/backend bridge.
# qtwebchannel is for the JS/backend bridge.
# qtwebengine is for rendering the frontend.
aqt install-qt linux desktop 6.2.4 -m qtpositioning qtserialport qtwebchannel qtwebengine --outputdir /opt/qt6

Expand Down
5 changes: 2 additions & 3 deletions scripts/github-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,13 @@ fi

# The following is executed only on macOS machines.
if [ "$OS_NAME" == "osx" ]; then
# GitHub CI installs Go directly in the macos action, before executing
# GitHub CI installs Go and Qt directly in the macos action, before executing
# this script.
go version
export PATH="~/Qt/6.2.4/macos/bin:~/Qt/6.2.4/macos/libexec:$PATH"
export LDFLAGS="-L~/Qt/6.2.4/macos/lib"
export CPPFLAGS="-I~/Qt/6.2.4/macos/include"
export GOPATH=~/go
export PATH=$PATH:~/go/bin
export PATH="$PATH:~/go/bin"
mkdir -p $GOPATH/$(dirname $GO_SRC_DIR)
# GitHub checkout action (git clone) seem to require current work dir
# to be the root of the repo during its clean up phase. So, we push it
Expand Down

0 comments on commit 7dbf54b

Please sign in to comment.