Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
GeraldKimmersdorfer committed Nov 30, 2023
2 parents 96a5466 + 8a111ed commit 7ba8639
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 3,765 deletions.
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/CMakeLists.txt.user
/extern/*
/doc/*
/doc
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ endif()
include(cmake/alp_add_git_repository.cmake)
alp_add_git_repository(renderer_static_data URL https://github.com/AlpineMapsOrg/renderer_static_data.git COMMITISH origin/main DO_NOT_ADD_SUBPROJECT)
alp_add_git_repository(alpineapp_fonts URL https://github.com/AlpineMapsOrg/fonts.git COMMITISH origin/main DO_NOT_ADD_SUBPROJECT)
alp_add_git_repository(doc URL https://github.com/AlpineMapsOrg/documentation.git COMMITISH origin/main DO_NOT_ADD_SUBPROJECT DESTINATION_PATH doc)


if (ANDROID)
alp_add_git_repository(android_openssl URL https://github.com/KDAB/android_openssl.git COMMITISH origin/master DO_NOT_ADD_SUBPROJECT)
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
9 changes: 6 additions & 3 deletions cmake/alp_add_git_repository.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,17 @@ find_package(Git 2.22 REQUIRED)

function(alp_add_git_repository name)
set(options DO_NOT_ADD_SUBPROJECT)
set(oneValueArgs URL COMMITISH)
set(oneValueArgs URL COMMITISH DESTINATION_PATH)
set(multiValueArgs )
cmake_parse_arguments(PARSE_ARGV 1 PARAM "${options}" "${oneValueArgs}" "${multiValueArgs}")

file(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR} )
set(repo_dir ${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR}/${name})
set(short_repo_dir ${ALP_EXTERN_DIR}/${name})
if (DEFINED PARAM_DESTINATION_PATH AND NOT PARAM_DESTINATION_PATH STREQUAL "")
set(repo_dir ${CMAKE_SOURCE_DIR}/${PARAM_DESTINATION_PATH})
set(short_repo_dir ${PARAM_DESTINATION_PATH})
endif()

set(${name}_SOURCE_DIR "${repo_dir}" PARENT_SCOPE)

Expand Down Expand Up @@ -70,8 +74,7 @@ function(alp_add_git_repository name)
endif()
else()
message(STATUS "Clonging ${PARAM_URL} to ${short_repo_dir}.")
execute_process(COMMAND ${GIT_EXECUTABLE} clone --recurse-submodules ${PARAM_URL} ${name}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/${ALP_EXTERN_DIR}
execute_process(COMMAND ${GIT_EXECUTABLE} clone --recurse-submodules ${PARAM_URL} ${repo_dir}
RESULT_VARIABLE GIT_CLONE_RESULT)
if (NOT ${GIT_CLONE_RESULT})
execute_process(COMMAND ${GIT_EXECUTABLE} checkout --quiet ${PARAM_COMMITISH}
Expand Down
3,723 changes: 0 additions & 3,723 deletions doc/gl_renderer_design.svg

This file was deleted.

Binary file removed doc/report_fancy_alpine_maps.pdf
Binary file not shown.
2 changes: 2 additions & 0 deletions unittests/nucleus/nucleus_tile_scheduler_rate_limiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
constexpr auto timing_multiplicator = 200;
#elif defined __ANDROID__
constexpr auto timing_multiplicator = 50;
#elif defined _MSC_VER
constexpr auto timing_multiplicator = 50;
#else
constexpr auto timing_multiplicator = 10;
#endif
Expand Down

0 comments on commit 7ba8639

Please sign in to comment.