build: Rework CI and move all bundling into new build target. (#6556)
* build: Rework CI and move all bundling into new build target. * ci: Use "mingw" in msys2 release names for compatibility. * ci: Use "osx" in macOS release names for compatibility. * ci: Disable macOS upload. Will be moved to a separate PR for canary merge.
This commit is contained in:
parent
2e479fcec5
commit
2d6aca4563
57 changed files with 614 additions and 967 deletions
|
@ -85,7 +85,7 @@ if (MSVC)
|
|||
# Since MSVC's debugging information is not very deterministic, so we have to disable it
|
||||
# when using ccache or other caching tools
|
||||
if (CITRA_USE_CCACHE OR CITRA_USE_PRECOMPILED_HEADERS)
|
||||
# Precompiled headers are deleted if not using /Z7. See https://github.com/nanoant/CMakePCHCompiler/issues/21
|
||||
# Precompiled headers are deleted if not using /Z7. See https://github.com/nanoant/CMakePCHCompiler/issues/21
|
||||
add_compile_options(/Z7)
|
||||
else()
|
||||
add_compile_options(/Zi)
|
||||
|
@ -110,28 +110,21 @@ else()
|
|||
add_compile_options("-stdlib=libc++")
|
||||
endif()
|
||||
|
||||
# Set file offset size to 64 bits.
|
||||
#
|
||||
# On modern Unixes, this is typically already the case. The lone exception is
|
||||
# glibc, which may default to 32 bits. glibc allows this to be configured
|
||||
# by setting _FILE_OFFSET_BITS.
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR MINGW)
|
||||
add_definitions(-D_FILE_OFFSET_BITS=64)
|
||||
endif()
|
||||
|
||||
if (MINGW)
|
||||
add_definitions(-DMINGW_HAS_SECURE_API)
|
||||
if (COMPILE_WITH_DWARF)
|
||||
add_compile_options("-gdwarf")
|
||||
endif()
|
||||
|
||||
if (MINGW_STATIC_BUILD)
|
||||
add_definitions(-DQT_STATICPLUGIN)
|
||||
add_compile_options("-static")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR MINGW)
|
||||
# Set file offset size to 64 bits.
|
||||
#
|
||||
# On modern Unixes, this is typically already the case. The lone exception is
|
||||
# glibc, which may default to 32 bits. glibc allows this to be configured
|
||||
# by setting _FILE_OFFSET_BITS.
|
||||
add_definitions(-D_FILE_OFFSET_BITS=64)
|
||||
|
||||
# GNU ar: Create thin archive files.
|
||||
# Requires binutils-2.19 or later.
|
||||
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> qcTP <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||
|
|
|
@ -38,13 +38,16 @@ android {
|
|||
ndk.abiFilters abiFilter
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
//release {
|
||||
// storeFile file('')
|
||||
// storePassword System.getenv('ANDROID_KEYPASS')
|
||||
// keyAlias = 'key0'
|
||||
// keyPassword System.getenv('ANDROID_KEYPASS')
|
||||
//}
|
||||
def keystoreFile = System.getenv('ANDROID_KEYSTORE_FILE')
|
||||
if (keystoreFile != null) {
|
||||
signingConfigs {
|
||||
release {
|
||||
storeFile file(keystoreFile)
|
||||
storePassword System.getenv('ANDROID_KEYSTORE_PASS')
|
||||
keyAlias System.getenv('ANDROID_KEY_ALIAS')
|
||||
keyPassword System.getenv('ANDROID_KEYSTORE_PASS')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
applicationVariants.all { variant ->
|
||||
|
@ -56,7 +59,7 @@ android {
|
|||
|
||||
// Signed by release key, allowing for upload to Play Store.
|
||||
release {
|
||||
signingConfig signingConfigs.debug
|
||||
signingConfig keystoreFile != null ? signingConfigs.release : signingConfigs.debug
|
||||
}
|
||||
|
||||
// builds a release build that doesn't need signing
|
||||
|
@ -107,8 +110,7 @@ android {
|
|||
cmake {
|
||||
arguments "-DENABLE_QT=0", // Don't use QT
|
||||
"-DENABLE_SDL2=0", // Don't use SDL
|
||||
"-DANDROID_ARM_NEON=true", // cryptopp requires Neon to work
|
||||
"-DBUNDLE_SPEEX=ON"
|
||||
"-DANDROID_ARM_NEON=true" // cryptopp requires Neon to work
|
||||
|
||||
abiFilters abiFilter
|
||||
}
|
||||
|
@ -168,3 +170,23 @@ def getVersion() {
|
|||
|
||||
return versionName
|
||||
}
|
||||
|
||||
// Add task to each variant for copying output APKs to bundle directory.
|
||||
android.applicationVariants.all { variant ->
|
||||
def capitalizedName = variant.name.capitalize()
|
||||
def copyTask = tasks.register("copyBundle${capitalizedName}") {
|
||||
doLast {
|
||||
project.copy {
|
||||
from variant.outputs[0].outputFile.parentFile
|
||||
include '*.apk'
|
||||
into layout.buildDirectory.dir("bundle")
|
||||
}
|
||||
project.copy {
|
||||
from layout.buildDirectory.dir("outputs/bundle/${variant.name}")
|
||||
include '*.aab'
|
||||
into layout.buildDirectory.dir("bundle")
|
||||
}
|
||||
}
|
||||
}
|
||||
tasks.named("bundle${capitalizedName}").get().configure { finalizedBy copyTask }
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ void ReportError(std::string msg, HRESULT hr) {
|
|||
unique_mfptr<IMFTransform> MFDecoderInit(GUID audio_format) {
|
||||
|
||||
HRESULT hr = S_OK;
|
||||
MFT_REGISTER_TYPE_INFO reg = {0};
|
||||
MFT_REGISTER_TYPE_INFO reg{};
|
||||
GUID category = MFT_CATEGORY_AUDIO_DECODER;
|
||||
IMFActivate** activate;
|
||||
unique_mfptr<IMFTransform> transform;
|
||||
|
|
|
@ -29,22 +29,6 @@ if(UNIX AND NOT APPLE)
|
|||
install(TARGETS citra RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
|
||||
endif()
|
||||
|
||||
if (MSVC AND ENABLE_WEB_SERVICE AND OPENSSL_DLL_DIR)
|
||||
include(CopyCitraOpensslDeps)
|
||||
copy_citra_openssl_deps(citra)
|
||||
endif()
|
||||
|
||||
if (CITRA_USE_PRECOMPILED_HEADERS)
|
||||
target_precompile_headers(citra PRIVATE precompiled_headers.h)
|
||||
endif()
|
||||
|
||||
if (CITRA_BUNDLE_LIBRARIES)
|
||||
add_custom_command(TARGET citra
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}
|
||||
-DTYPE=standalone
|
||||
-DEXECUTABLE_PATH=$<TARGET_FILE:citra>
|
||||
-P ${CMAKE_SOURCE_DIR}/CMakeModules/BundleLibraries.cmake
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
||||
endif()
|
||||
|
|
|
@ -290,22 +290,6 @@ elseif(WIN32)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if (CITRA_BUNDLE_LIBRARIES)
|
||||
if (APPLE)
|
||||
set(BUNDLE_DIR "$<TARGET_BUNDLE_DIR:citra-qt>")
|
||||
endif()
|
||||
|
||||
add_custom_command(TARGET citra-qt
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}
|
||||
-DTYPE=qt
|
||||
-DEXECUTABLE_PATH=$<TARGET_FILE:citra-qt>
|
||||
-DBUNDLE_PATH=${BUNDLE_DIR}
|
||||
-P ${CMAKE_SOURCE_DIR}/CMakeModules/BundleLibraries.cmake
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
create_target_directory_groups(citra-qt)
|
||||
|
||||
target_link_libraries(citra-qt PRIVATE audio_core citra_common citra_core input_common network video_core)
|
||||
|
@ -360,15 +344,6 @@ if(UNIX AND NOT APPLE)
|
|||
install(TARGETS citra-qt RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
include(CopyCitraQt6Deps)
|
||||
copy_citra_Qt6_deps(citra-qt)
|
||||
if (ENABLE_WEB_SERVICE AND OPENSSL_DLL_DIR)
|
||||
include(CopyCitraOpensslDeps)
|
||||
copy_citra_openssl_deps(citra-qt)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT APPLE)
|
||||
target_compile_definitions(citra-qt PRIVATE HAS_OPENGL)
|
||||
endif()
|
||||
|
|
|
@ -44,7 +44,7 @@ void PrintColoredMessage(const Entry& entry) {
|
|||
return;
|
||||
}
|
||||
|
||||
CONSOLE_SCREEN_BUFFER_INFO original_info = {0};
|
||||
CONSOLE_SCREEN_BUFFER_INFO original_info{};
|
||||
GetConsoleScreenBufferInfo(console_handle, &original_info);
|
||||
|
||||
WORD color = 0;
|
||||
|
|
|
@ -12,10 +12,6 @@ target_link_libraries(citra-room PRIVATE citra_common network)
|
|||
if (ENABLE_WEB_SERVICE)
|
||||
target_compile_definitions(citra-room PRIVATE -DENABLE_WEB_SERVICE)
|
||||
target_link_libraries(citra-room PRIVATE web_service)
|
||||
if (MSVC AND OPENSSL_DLL_DIR)
|
||||
include(CopyCitraOpensslDeps)
|
||||
copy_citra_openssl_deps(citra-room)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_link_libraries(citra-room PRIVATE cryptopp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue