Download system archives from the repo and make it default off

This commit is contained in:
B3n30 2017-08-16 13:22:37 +02:00
parent 8775458054
commit ce1f25d133
6 changed files with 22 additions and 87389 deletions

View File

@ -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 export PATH=/citra/cmake/cmake-3.9.0-Linux-x86_64/bin:$PATH
mkdir build && cd build mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_CUSTOM_SYSTEM_ARCHIVES=1
make -j4 make -j4
ctest -VV -C Release ctest -VV -C Release

View File

@ -52,7 +52,7 @@ elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
export Qt5_DIR=$(brew --prefix)/opt/qt5 export Qt5_DIR=$(brew --prefix)/opt/qt5
mkdir build && cd build mkdir build && cd build
cmake .. -GXcode cmake .. make .. -GXcode -DENABLE_CUSTOM_SYSTEM_ARCHIVES=1
xcodebuild -configuration Release xcodebuild -configuration Release
ctest -VV -C Release ctest -VV -C Release

View File

@ -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_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) if(NOT EXISTS ${CMAKE_SOURCE_DIR}/.git/hooks/pre-commit)
message(STATUS "Copying pre-commit hook") message(STATUS "Copying pre-commit hook")
file(COPY hooks/pre-commit file(COPY hooks/pre-commit
@ -244,6 +246,18 @@ if (ENABLE_WEB_SERVICE)
add_definitions(-DENABLE_WEB_SERVICE) add_definitions(-DENABLE_WEB_SERVICE)
endif() 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 # Platform-specific library requirements
# ====================================== # ======================================

View File

@ -19,7 +19,7 @@ install:
before_build: before_build:
- mkdir build - mkdir build
- cd 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 .. - cd ..
build: build:

File diff suppressed because it is too large Load Diff

View File

@ -26,8 +26,10 @@
#include "network/network.h" #include "network/network.h"
#include "video_core/video_core.h" #include "video_core/video_core.h"
#ifdef ENABLE_CUSTOM_SYSTEM_ARCHIVES
// System Archives // System Archives
#include "../../dist/shared_font.app.romfs.h" #include "shared_font/shared_font.app.romfs.h"
#endif
namespace Core { namespace Core {
@ -228,10 +230,12 @@ void System::SystemIntegrityCheck() {
LOG_INFO(Core, "SystemCheck: Shared Font(legacy) exists."); LOG_INFO(Core, "SystemCheck: Shared Font(legacy) exists.");
} else { } else {
LOG_ERROR(Core, "SystemCheck: Shared Font missing."); LOG_ERROR(Core, "SystemCheck: Shared Font missing.");
#ifdef ENABLE_CUSTOM_SYSTEM_ARCHIVES
file = std::make_shared<FileUtil::IOFile>(shared_font_path, "w+b"); file = std::make_shared<FileUtil::IOFile>(shared_font_path, "w+b");
file->WriteBytes(SHARED_FONT_DATA, SHARED_FONT_DATA_len); file->WriteBytes(SHARED_FONT_DATA, SHARED_FONT_DATA_len);
file->Close(); file->Close();
LOG_DEBUG(Core, "SystemCheck: Created Shared Font."); LOG_DEBUG(Core, "SystemCheck: Created Shared Font.");
#endif
} }
} }