ci: Build only metaforce

This commit is contained in:
Luke Street 2022-02-21 22:12:03 -05:00
parent 913ea0f7c4
commit 54330e43b6
6 changed files with 24 additions and 31 deletions

View File

@ -467,7 +467,7 @@ if (NOT CMAKE_CROSSCOMPILING)
add_subdirectory(assetnameparser EXCLUDE_FROM_ALL) add_subdirectory(assetnameparser EXCLUDE_FROM_ALL)
endif () endif ()
add_compile_definitions(URDE_ZIP_INPUT_STREAM=1) # Enable CZipInputStream now that zlib header is known 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/kabufuda EXCLUDE_FROM_ALL)
add_subdirectory(extern/jbus EXCLUDE_FROM_ALL) add_subdirectory(extern/jbus EXCLUDE_FROM_ALL)
@ -478,9 +478,6 @@ add_subdirectory(aurora)
add_subdirectory(Runtime) add_subdirectory(Runtime)
add_subdirectory(mpcksum EXCLUDE_FROM_ALL) add_subdirectory(mpcksum EXCLUDE_FROM_ALL)
add_subdirectory(gbalink EXCLUDE_FROM_ALL) add_subdirectory(gbalink EXCLUDE_FROM_ALL)
#add_subdirectory(visigen)
#add_dependencies(hecl visigen)
if (NOT WINDOWS_STORE AND NOT NX) if (NOT WINDOWS_STORE AND NOT NX)
if (APPLE AND EXISTS /opt/local/libexec/qt5) 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}) find_package(Qt5Widgets QUIET PATHS ${QT_HOMEBREW_PATH})
if (Qt6Widgets_FOUND) if (Qt6Widgets_FOUND)
message(STATUS "Qt6 found, metaforce-gui will be built") message(STATUS "Qt6 found, metaforce-gui will be built")
add_subdirectory(metaforce-gui) add_subdirectory(metaforce-gui EXCLUDE_FROM_ALL)
elseif(Qt5Widgets_FOUND) elseif(Qt5Widgets_FOUND)
message(STATUS "Qt5 found, metaforce-gui will be built") message(STATUS "Qt5 found, metaforce-gui will be built")
add_subdirectory(metaforce-gui) add_subdirectory(metaforce-gui EXCLUDE_FROM_ALL)
else() else()
message(STATUS "Qt5-6 not found, metaforce-gui will not be built") message(STATUS "Qt5-6 not found, metaforce-gui will not be built")
endif() endif()
@ -516,19 +513,19 @@ if (TARGET crashpad_handler)
list(APPEND BINARY_TARGETS crashpad_handler) list(APPEND BINARY_TARGETS crashpad_handler)
endif () endif ()
set(BIN_PREFIX "${CMAKE_INSTALL_PREFIX}") set(BIN_PREFIX "${CMAKE_INSTALL_PREFIX}")
if (TARGET metaforce-gui) #if (TARGET metaforce-gui)
if (APPLE) # if (APPLE)
# app bundle already has all needed binaries # # app bundle already has all needed binaries
install(TARGETS metaforce-gui DESTINATION ${BIN_PREFIX}) # install(TARGETS metaforce-gui DESTINATION ${BIN_PREFIX})
list(APPEND DSYM_ONLY_TARGETS metaforce-gui) # list(APPEND DSYM_ONLY_TARGETS metaforce-gui)
# we have to rename here, cmake is inflexible about bundle naming # # 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 rm -fr Metaforce.app)")
install(CODE "execute_process(WORKING_DIRECTORY \"${BIN_PREFIX}\" COMMAND mv metaforce-gui.app 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") # set(BIN_PREFIX "${BIN_PREFIX}/Metaforce.app/Contents/MacOS")
else() # else()
list(APPEND BINARY_TARGETS metaforce-gui) # list(APPEND BINARY_TARGETS metaforce-gui)
endif () # endif ()
endif () #endif ()
install(TARGETS ${BINARY_TARGETS} DESTINATION ${BIN_PREFIX}) install(TARGETS ${BINARY_TARGETS} DESTINATION ${BIN_PREFIX})
if (CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo) if (CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo)
foreach (target IN LISTS BINARY_TARGETS DSYM_ONLY_TARGETS) foreach (target IN LISTS BINARY_TARGETS DSYM_ONLY_TARGETS)

View File

@ -6,4 +6,4 @@ Exec=metaforce
Icon=metaforce Icon=metaforce
Terminal=false Terminal=false
Type=Application Type=Application
Categories=Graphics;3DGraphics;Games Categories=Graphics;3DGraphics;Game

View File

@ -4,17 +4,15 @@ shopt -s extglob
# Get linuxdeploy # Get linuxdeploy
cd "$RUNNER_WORKSPACE" cd "$RUNNER_WORKSPACE"
curl -OL https://github.com/encounter/linuxdeploy/releases/download/continuous/linuxdeploy-$(uname -m).AppImage 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
chmod +x linuxdeploy-$(uname -m).AppImage linuxdeploy-plugin-qt-$(uname -m).AppImage
# Build AppImage # Build AppImage
cd "$GITHUB_WORKSPACE" cd "$GITHUB_WORKSPACE"
mkdir -p build/appdir/usr/{bin,share/{applications,icons/hicolor}} mkdir -p build/appdir/usr/{bin,share/{applications,icons/hicolor}}
cp build/install/!(*.*) build/appdir/usr/bin 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 -r Runtime/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 Runtime/platforms/freedesktop/metaforce.desktop build/appdir/usr/share/applications
cd build/install cd build/install
VERSION="$METAFORCE_VERSION" NO_STRIP=1 "$RUNNER_WORKSPACE"/linuxdeploy-$(uname -m).AppImage \ VERSION="$METAFORCE_VERSION" NO_STRIP=1 "$RUNNER_WORKSPACE"/linuxdeploy-$(uname -m).AppImage \
--appdir "$GITHUB_WORKSPACE"/build/appdir \ --appdir "$GITHUB_WORKSPACE"/build/appdir --output appimage
--plugin qt --output appimage

View File

@ -2,11 +2,9 @@
cd build/install cd build/install
# remove debug files before package # remove debug files before package
rm -r Metaforce.app/Contents/MacOS/*.dSYM rm -r Metaforce.app/Contents/MacOS/*.dSYM
# order is important for i in metaforce crashpad_handler; do
for i in visigen hecl metaforce crashpad_handler; do
codesign --timestamp --options runtime -s "$CODESIGN_IDENT" Metaforce.app/Contents/MacOS/$i codesign --timestamp --options runtime -s "$CODESIGN_IDENT" Metaforce.app/Contents/MacOS/$i
done done
macdeployqt Metaforce.app -sign-for-notarization="$CODESIGN_IDENT" -no-strip
create-dmg Metaforce.app --identity="$CODESIGN_IDENT" . create-dmg Metaforce.app --identity="$CODESIGN_IDENT" .
xcrun altool -t osx -f *.dmg --primary-bundle-id com.axiodl.Metaforce \ 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" --notarize-app -u "$ASC_USERNAME" -p "$ASC_PASSWORD" --team-id "$ASC_TEAM_ID"

View File

@ -1,3 +1,3 @@
#!/bin/bash -ex #!/bin/bash -ex
cd build/install 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

View File

@ -1,3 +1,3 @@
#!/bin/bash -ex #!/bin/bash -ex
cd build/install/Metaforce.app/Contents/MacOS 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