Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup #62

Merged
merged 3 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
uses: jurplel/install-qt-action@v3
with:
aqtversion: '==3.1.*'
version: '6.6.0'
version: '6.6.1'
host: ${{ matrix.host }}
target: 'desktop'
arch: ${{ matrix.arch }}
Expand Down
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,20 @@ We use Qt Creator (with mingw on Windows), which is the only tested setup atm an
* Some other dependencies will be pulled automatically during building.

## Building the android version
* Due to a [bug](https://bugreports.qt.io/browse/QTBUG-113851) in the Qt/cmake/gradle build system for android, you need to delete all `libc.so` files from the build dir before rebuilding (yes! no, that's not a joke). There is a script that does that in linux [renderer/android/workaround_qt_cmake_build_bug.sh](https://github.com/AlpineMapsOrg/renderer/blob/main/android/workaround_qt_cmake_build_bug.sh), please don't run it anywhere important, definitely not as root;) ). You can add it as a custom build step before everything else in qt creator (in the %{buildDir} working directory).
* We are usually building with Qt Creator, because it works relatively out of the box. However, it should also work on the command line or other IDEs if you set it up correctly.
* You need a Java JDK before you can do anything else. Not all Java versions work, and the error messages might be surprising (or non-existant). I'm running with Java 19, and I can compile for old devices. Iirc a newer version of Java caused issues. [Android documents the required Java version](https://developer.android.com/build/jdks), but as said, for me Java 19 works as well. It might change in the future.
* Once you have Java, go to Qt Creator Preferences -> Devices -> Android. There click "Set Up SDK" to automatically download and install an Android SDK.
* Finally, you might need to click on SDK Manager to install a fitting SDK Platform (take the newest, it also works for older devices), and ndk (newest as well).
* Then Google the internet to find out how to enable the developer mode on Android.
* On linux, you'll have to setup some udev rules. Run `Android/SDK/platform-tools/adb devices` and you should get instructions.
* If there are problems, check out the [documentation from Qt](https://doc.qt.io/qt-6/android-getting-started.html)
* Finally, you are welcome to ask in discord if something is not working!

## Building the WebAssembly version:
* Atm, none of the Qt versions works perfectly in all browsers
* In Qt 6.6 touch doesn't work on Firefox (issues #33)
* [WebAssembly version compatible with the Qt version](https://doc-snapshots.qt.io/qt6-dev/wasm.html#installing-emscripten)
* The threaded version doesn't seem to work atm, so use the non-threaded!
* [The Qt documentation is quite good on how to get it to run](https://doc-snapshots.qt.io/qt6-dev/wasm.html#installing-emscripten). Be aware that only specific versions of emscripten work for specific versions of Qt, and the error messages are not helpfull.
* The threaded version doesn't seem to work atm, so use the non-threaded (bug reported)!
* There are a number of other bugs, we track them with the upstream tag.

# Code style
Expand Down
34 changes: 0 additions & 34 deletions app/android/workaround_qt_cmake_build_bug.sh

This file was deleted.

1 change: 0 additions & 1 deletion app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@

int main(int argc, char **argv)
{
// QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::Floor);
QQuickWindow::setGraphicsApi(QSGRendererInterface::GraphicsApi::OpenGLRhi);
QApplication app(argc, argv);
app.setWindowIcon(QIcon("app/icons/favicon.ico"));
Expand Down