Skip to content

Commit

Permalink
Merge pull request #4 from tuxecure/sdl2mir-armhf-arm64-amd64
Browse files Browse the repository at this point in the history
add MIR_BUILD macros , it requires to load QGuiApp on focal to show t…
  • Loading branch information
jhayar0719 authored Sep 12, 2024
2 parents 614353d + d44da84 commit 8583709
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 334 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,11 @@ target_link_libraries(supertux2_lib PUBLIC LibPhysfs)

if(NOT EMSCRIPTEN)
IF(MIR_BUILD)
find_package(SDL2 REQUIRED)
find_package(SDL2_image REQUIRED)
find_package(Qt5Gui REQUIRED) #LOMIRI doesnt start without starting QGui
find_package(Qt5Core REQUIRED)
target_compile_definitions(supertux2_lib PUBLIC MIR_BUILD=1)
target_link_directories(supertux2_lib PUBLIC ${SDL2_LIBDIR})

target_link_libraries(supertux2_lib PUBLIC Qt5::Gui Qt5::Core)
endif()
target_link_libraries(supertux2_lib PUBLIC LibSDL2_ttf)
target_link_libraries(supertux2_lib PUBLIC LibSDL2 LibSDL2_image)
Expand Down
329 changes: 0 additions & 329 deletions CMakeLists.txt.autosave

This file was deleted.

2 changes: 1 addition & 1 deletion clickable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env_vars:
PKG_CONFIG_PATH: "/usr/lib/${ARCH_TRIPLET}/dev/pkgconfig"
dependencies_target:
- "nano"
- "&& wget https://ubportslibpatches.github.io/ubporrts_ppa/dists/focal/sdl2mir_${ARCH_TRIPLET}.deb && dpkg -i ./sdl2mir_${ARCH_TRIPLET}.deb && wget https://ubportslibpatches.github.io/ubporrts_ppa/dists/focal/sdl2-image_${ARCH_TRIPLET}.deb && dpkg -i ./sdl2-image_${ARCH_TRIPLET}.deb && apt-get install -y --force-yes --no-install-recommends net-tools"
- "&& wget http://192.168.1.6:9999/sdl2mir_${ARCH_TRIPLET}.deb && dpkg -i ./sdl2mir_${ARCH_TRIPLET}.deb && wget http://192.168.1.6:9999/sdl2-image_${ARCH_TRIPLET}.deb && dpkg -i ./sdl2-image_${ARCH_TRIPLET}.deb && apt-get install -y --force-yes --no-install-recommends net-tools"
- "libogg-dev"
- "libopenal-dev"
- "libfreetype6-dev"
Expand Down
9 changes: 8 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,17 @@

#include "supertux/main.hpp"

#ifdef MIR_BUILD
//required
#include <QGuiApplication>
#endif
static std::unique_ptr<Main> g_main;

int main(int argc, char** argv)
{
#ifdef MIR_BUILD
QGuiApplication app(argc, argv);
#endif
g_main = std::make_unique<Main>();

int ret = g_main->run(argc, argv);
Expand All @@ -34,8 +41,8 @@ int main(int argc, char** argv)
// destructors and thus would make the destruction crash.
g_main.reset();
#endif
return 0;

return ret;
}

/* EOF */
Loading

0 comments on commit 8583709

Please sign in to comment.