mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-26 19:50:05 +00:00
Download system archives from the repo and make it default off
This commit is contained in:
parent
8775458054
commit
ce1f25d133
@ -14,7 +14,7 @@ echo y | sh cmake-3.9.0-Linux-x86_64.sh --prefix=cmake
|
||||
export PATH=/citra/cmake/cmake-3.9.0-Linux-x86_64/bin:$PATH
|
||||
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_CUSTOM_SYSTEM_ARCHIVES=1
|
||||
make -j4
|
||||
|
||||
ctest -VV -C Release
|
||||
|
@ -52,7 +52,7 @@ elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||
export Qt5_DIR=$(brew --prefix)/opt/qt5
|
||||
|
||||
mkdir build && cd build
|
||||
cmake .. -GXcode
|
||||
cmake .. make .. -GXcode -DENABLE_CUSTOM_SYSTEM_ARCHIVES=1
|
||||
xcodebuild -configuration Release
|
||||
|
||||
ctest -VV -C Release
|
||||
|
@ -13,6 +13,8 @@ option(CITRA_USE_BUNDLED_QT "Download bundled Qt binaries" OFF)
|
||||
|
||||
option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON)
|
||||
|
||||
option(ENABLE_CUSTOM_SYSTEM_ARCHIVES "Enable the creation of custom system archives if missing" OFF)
|
||||
|
||||
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/.git/hooks/pre-commit)
|
||||
message(STATUS "Copying pre-commit hook")
|
||||
file(COPY hooks/pre-commit
|
||||
@ -244,6 +246,18 @@ if (ENABLE_WEB_SERVICE)
|
||||
add_definitions(-DENABLE_WEB_SERVICE)
|
||||
endif()
|
||||
|
||||
if (ENABLE_CUSTOM_SYSTEM_ARCHIVES)
|
||||
message(STATUS "Downloading binaries for system archives...")
|
||||
# TODO(B3N30) Move the repo to citra-emu
|
||||
file(DOWNLOAD
|
||||
https://github.com/B3n30/citra_system_archives/releases/download/v1.0/system_archives.7z
|
||||
"${CMAKE_BINARY_DIR}/externals/system_archives.7z" SHOW_PROGRESS)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${CMAKE_BINARY_DIR}/externals/system_archives.7z"
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals")
|
||||
set(CUSTOM_ARCHIVES_PREFIX "${CMAKE_BINARY_DIR}/externals/system_archives")
|
||||
add_definitions(-DENABLE_CUSTOM_SYSTEM_ARCHIVES)
|
||||
endif()
|
||||
|
||||
# Platform-specific library requirements
|
||||
# ======================================
|
||||
|
||||
|
@ -19,7 +19,7 @@ install:
|
||||
before_build:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake -G "Visual Studio 15 2017 Win64" -DCITRA_USE_BUNDLED_QT=1 -DCITRA_USE_BUNDLED_SDL2=1 -DCMAKE_USE_OPENSSL=0 ..
|
||||
- cmake -G "Visual Studio 15 2017 Win64" -DCITRA_USE_BUNDLED_QT=1 -DCITRA_USE_BUNDLED_SDL2=1 -DCMAKE_USE_OPENSSL=0 -DENABLE_CUSTOM_SYSTEM_ARCHIVES=1 ..
|
||||
- cd ..
|
||||
|
||||
build:
|
||||
|
87385
dist/shared_font.app.romfs.h
vendored
87385
dist/shared_font.app.romfs.h
vendored
File diff suppressed because it is too large
Load Diff
@ -26,8 +26,10 @@
|
||||
#include "network/network.h"
|
||||
#include "video_core/video_core.h"
|
||||
|
||||
#ifdef ENABLE_CUSTOM_SYSTEM_ARCHIVES
|
||||
// System Archives
|
||||
#include "../../dist/shared_font.app.romfs.h"
|
||||
#include "shared_font/shared_font.app.romfs.h"
|
||||
#endif
|
||||
|
||||
namespace Core {
|
||||
|
||||
@ -228,10 +230,12 @@ void System::SystemIntegrityCheck() {
|
||||
LOG_INFO(Core, "SystemCheck: Shared Font(legacy) exists.");
|
||||
} else {
|
||||
LOG_ERROR(Core, "SystemCheck: Shared Font missing.");
|
||||
#ifdef ENABLE_CUSTOM_SYSTEM_ARCHIVES
|
||||
file = std::make_shared<FileUtil::IOFile>(shared_font_path, "w+b");
|
||||
file->WriteBytes(SHARED_FONT_DATA, SHARED_FONT_DATA_len);
|
||||
file->Close();
|
||||
LOG_DEBUG(Core, "SystemCheck: Created Shared Font.");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user