From 54330e43b641ec93e3edfea9d89aa4d9999b8640 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Mon, 21 Feb 2022 22:12:03 -0500 Subject: [PATCH] ci: Build only metaforce --- CMakeLists.txt | 35 +++++++++---------- .../platforms/freedesktop/metaforce.desktop | 2 +- ci/build-appimage.sh | 10 +++--- ci/build-dmg.sh | 4 +-- ci/upload-debug-linux.sh | 2 +- ci/upload-debug-macos.sh | 2 +- 6 files changed, 24 insertions(+), 31 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 81da87b3a..c89e4e6a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -467,7 +467,7 @@ if (NOT CMAKE_CROSSCOMPILING) add_subdirectory(assetnameparser EXCLUDE_FROM_ALL) endif () add_compile_definitions(URDE_ZIP_INPUT_STREAM=1) # Enable CZipInputStream now that zlib header is known -add_subdirectory(DataSpec) +add_subdirectory(DataSpec EXCLUDE_FROM_ALL) add_subdirectory(extern/kabufuda EXCLUDE_FROM_ALL) add_subdirectory(extern/jbus EXCLUDE_FROM_ALL) @@ -478,9 +478,6 @@ add_subdirectory(aurora) add_subdirectory(Runtime) add_subdirectory(mpcksum EXCLUDE_FROM_ALL) add_subdirectory(gbalink EXCLUDE_FROM_ALL) -#add_subdirectory(visigen) - -#add_dependencies(hecl visigen) if (NOT WINDOWS_STORE AND NOT NX) if (APPLE AND EXISTS /opt/local/libexec/qt5) @@ -498,10 +495,10 @@ if (NOT WINDOWS_STORE AND NOT NX) find_package(Qt5Widgets QUIET PATHS ${QT_HOMEBREW_PATH}) if (Qt6Widgets_FOUND) message(STATUS "Qt6 found, metaforce-gui will be built") - add_subdirectory(metaforce-gui) + add_subdirectory(metaforce-gui EXCLUDE_FROM_ALL) elseif(Qt5Widgets_FOUND) message(STATUS "Qt5 found, metaforce-gui will be built") - add_subdirectory(metaforce-gui) + add_subdirectory(metaforce-gui EXCLUDE_FROM_ALL) else() message(STATUS "Qt5-6 not found, metaforce-gui will not be built") endif() @@ -516,19 +513,19 @@ if (TARGET crashpad_handler) list(APPEND BINARY_TARGETS crashpad_handler) endif () set(BIN_PREFIX "${CMAKE_INSTALL_PREFIX}") -if (TARGET metaforce-gui) - if (APPLE) - # app bundle already has all needed binaries - install(TARGETS metaforce-gui DESTINATION ${BIN_PREFIX}) - list(APPEND DSYM_ONLY_TARGETS metaforce-gui) - # we have to rename here, cmake is inflexible about bundle naming - install(CODE "execute_process(WORKING_DIRECTORY \"${BIN_PREFIX}\" COMMAND rm -fr Metaforce.app)") - install(CODE "execute_process(WORKING_DIRECTORY \"${BIN_PREFIX}\" COMMAND mv metaforce-gui.app Metaforce.app)") - set(BIN_PREFIX "${BIN_PREFIX}/Metaforce.app/Contents/MacOS") - else() - list(APPEND BINARY_TARGETS metaforce-gui) - endif () -endif () +#if (TARGET metaforce-gui) +# if (APPLE) +# # app bundle already has all needed binaries +# install(TARGETS metaforce-gui DESTINATION ${BIN_PREFIX}) +# list(APPEND DSYM_ONLY_TARGETS metaforce-gui) +# # we have to rename here, cmake is inflexible about bundle naming +# install(CODE "execute_process(WORKING_DIRECTORY \"${BIN_PREFIX}\" COMMAND rm -fr Metaforce.app)") +# install(CODE "execute_process(WORKING_DIRECTORY \"${BIN_PREFIX}\" COMMAND mv metaforce-gui.app Metaforce.app)") +# set(BIN_PREFIX "${BIN_PREFIX}/Metaforce.app/Contents/MacOS") +# else() +# list(APPEND BINARY_TARGETS metaforce-gui) +# endif () +#endif () install(TARGETS ${BINARY_TARGETS} DESTINATION ${BIN_PREFIX}) if (CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo) foreach (target IN LISTS BINARY_TARGETS DSYM_ONLY_TARGETS) diff --git a/Runtime/platforms/freedesktop/metaforce.desktop b/Runtime/platforms/freedesktop/metaforce.desktop index 9c669db56..6e16e1a9d 100644 --- a/Runtime/platforms/freedesktop/metaforce.desktop +++ b/Runtime/platforms/freedesktop/metaforce.desktop @@ -6,4 +6,4 @@ Exec=metaforce Icon=metaforce Terminal=false Type=Application -Categories=Graphics;3DGraphics;Games +Categories=Graphics;3DGraphics;Game diff --git a/ci/build-appimage.sh b/ci/build-appimage.sh index 05d3a7066..3da5f249a 100755 --- a/ci/build-appimage.sh +++ b/ci/build-appimage.sh @@ -4,17 +4,15 @@ shopt -s extglob # Get linuxdeploy cd "$RUNNER_WORKSPACE" curl -OL https://github.com/encounter/linuxdeploy/releases/download/continuous/linuxdeploy-$(uname -m).AppImage -curl -OL https://github.com/encounter/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-$(uname -m).AppImage -chmod +x linuxdeploy-$(uname -m).AppImage linuxdeploy-plugin-qt-$(uname -m).AppImage +chmod +x linuxdeploy-$(uname -m).AppImage # Build AppImage cd "$GITHUB_WORKSPACE" mkdir -p build/appdir/usr/{bin,share/{applications,icons/hicolor}} cp build/install/!(*.*) build/appdir/usr/bin -cp -r metaforce-gui/platforms/freedesktop/{16x16,32x32,48x48,64x64,128x128,256x256,512x512,1024x1024} build/appdir/usr/share/icons/hicolor -cp metaforce-gui/platforms/freedesktop/metaforce.desktop build/appdir/usr/share/applications +cp -r Runtime/platforms/freedesktop/{16x16,32x32,48x48,64x64,128x128,256x256,512x512,1024x1024} build/appdir/usr/share/icons/hicolor +cp Runtime/platforms/freedesktop/metaforce.desktop build/appdir/usr/share/applications cd build/install VERSION="$METAFORCE_VERSION" NO_STRIP=1 "$RUNNER_WORKSPACE"/linuxdeploy-$(uname -m).AppImage \ - --appdir "$GITHUB_WORKSPACE"/build/appdir \ - --plugin qt --output appimage + --appdir "$GITHUB_WORKSPACE"/build/appdir --output appimage diff --git a/ci/build-dmg.sh b/ci/build-dmg.sh index 21a7b0f5a..25079add2 100755 --- a/ci/build-dmg.sh +++ b/ci/build-dmg.sh @@ -2,11 +2,9 @@ cd build/install # remove debug files before package rm -r Metaforce.app/Contents/MacOS/*.dSYM -# order is important -for i in visigen hecl metaforce crashpad_handler; do +for i in metaforce crashpad_handler; do codesign --timestamp --options runtime -s "$CODESIGN_IDENT" Metaforce.app/Contents/MacOS/$i done -macdeployqt Metaforce.app -sign-for-notarization="$CODESIGN_IDENT" -no-strip create-dmg Metaforce.app --identity="$CODESIGN_IDENT" . xcrun altool -t osx -f *.dmg --primary-bundle-id com.axiodl.Metaforce \ --notarize-app -u "$ASC_USERNAME" -p "$ASC_PASSWORD" --team-id "$ASC_TEAM_ID" diff --git a/ci/upload-debug-linux.sh b/ci/upload-debug-linux.sh index 760b5d125..e2d02027e 100755 --- a/ci/upload-debug-linux.sh +++ b/ci/upload-debug-linux.sh @@ -1,3 +1,3 @@ #!/bin/bash -ex cd build/install -sentry-cli upload-dif --org axiodl --project metaforce {hecl,metaforce-gui,metaforce,visigen}{,.dbg} --include-sources +sentry-cli upload-dif --org axiodl --project metaforce metaforce{,.dbg} --include-sources diff --git a/ci/upload-debug-macos.sh b/ci/upload-debug-macos.sh index 507ba610a..0ee55384c 100755 --- a/ci/upload-debug-macos.sh +++ b/ci/upload-debug-macos.sh @@ -1,3 +1,3 @@ #!/bin/bash -ex cd build/install/Metaforce.app/Contents/MacOS -sentry-cli upload-dif --org axiodl --project metaforce {hecl,metaforce-gui,metaforce,visigen}{,.dSYM} --include-sources +sentry-cli upload-dif --org axiodl --project metaforce metaforce{,.dSYM} --include-sources