diff --git a/trunk/ConsoleDataMigration/sources/ConsoleRestore/OMakefile b/trunk/ConsoleDataMigration/sources/ConsoleRestore/OMakefile index 9e6e6a7..7d8da8c 100644 --- a/trunk/ConsoleDataMigration/sources/ConsoleRestore/OMakefile +++ b/trunk/ConsoleDataMigration/sources/ConsoleRestore/OMakefile @@ -82,7 +82,7 @@ LIBFILES += $`(addprefix $(CTRMW_QRE_ROOT)$(DIRSEP)$(SUBDIR_LIBRARIES INSTALL_SDK_TOOL = true ROM_SPEC_FILE = $(TARGET_NAME).rsf -DESCRIPTOR = $(HORIZON_ROOT)/resources/specfiles/private/RepairTool.desc +DESCRIPTOR = $(HORIZON_ROOT)/resources/specfiles/tools/RepairTool.desc include $(ROOT_OMAKE)/modulerules diff --git a/trunk/ConsoleDataMigration/sources/ConsoleRestore/Shop.cpp b/trunk/ConsoleDataMigration/sources/ConsoleRestore/Shop.cpp index a7f6b4b..6fa251e 100644 --- a/trunk/ConsoleDataMigration/sources/ConsoleRestore/Shop.cpp +++ b/trunk/ConsoleDataMigration/sources/ConsoleRestore/Shop.cpp @@ -64,6 +64,8 @@ bool s_IsNimShopInitialized = false; struct ShopThreadParam { ConsoleRestore::ShopOperation op; + NN_PADDING3; + NN_PADDING4; nn::nim::TitleConfig config; }; diff --git a/trunk/ConsoleDataMigration/sources/build.sh b/trunk/ConsoleDataMigration/sources/build.sh index 05df44b..b717023 100755 --- a/trunk/ConsoleDataMigration/sources/build.sh +++ b/trunk/ConsoleDataMigration/sources/build.sh @@ -21,7 +21,7 @@ function getVersion } # フラグ判定 -prodBuild=false; +prodBuild=false unfixedKeyBuild=false for arg in $@ do @@ -48,41 +48,80 @@ else fi # IncrediBuildが使えるか +set +e which xgConsole > /dev/null 2>&1 if [ "$?" -eq 0 ]; then useIncrediBuild=true PARALLEL=-j16 else + useIncrediBuild=false PARALLEL=-j8 fi +set -e + +function buildCore +{ + command="$1" + + if $useIncrediBuild ; then + xgConsole /command="$command $PARALLEL" /profile="profile.xml" + else + $command $PARALLEL + fi +} + +function buildBackupAndRestore +{ + BuildExec="omake BUILD=$BUILD_TYPE FILTER=CTR-TS.*fast $OPTION" + + cd ConsoleBackup + export HORIZON_ROOT=$HORIZON_ROOT_BACKUP + buildCore "$BuildExec" + cd ../ + cd ConsoleRestore + export HORIZON_ROOT=$HORIZON_ROOT_RESTORE + buildCore "$BuildExec" + cd ../ +} + +function buildAutoTest +{ + testBuildExec="omake dotests-emumem BUILD=development FILTER=CTR-TS*.fast SKIP_RUN=true" + cd tests + + cd common + export HORIZON_ROOT=$HORIZON_ROOT_BACKUP + buildCore "$testBuildExec" + cd ../ + + cd ConsoleBackup + export HORIZON_ROOT=$HORIZON_ROOT_BACKUP + buildCore "$testBuildExec" + cd ../ + + cd ConsoleRestore + export HORIZON_ROOT=$HORIZON_ROOT_RESTORE + buildCore "$testBuildExec" + cd ../ + + cd ../ +} #################### 通常ビルド #################### -# ツールのビルド -toolBuildExec="omake BUILD=$BUILD_TYPE FILTER=CTR-TS.*fast $OPTION" -if [ $useIncrediBuild ] ; then - xgConsole /command="$toolBuildExec $PARALLEL" /profile="profile.xml" -else - $toolBuildExec $PARALLEL -fi +# ConsoleBackup、ConsoleRestoreのビルド +buildBackupAndRestore #リリース用ビルドはツールのみ -if [ $prodBuild ] || [ $unfixedKeyBuild ] ; then +if $prodBuild || $unfixedKeyBuild ; then exit fi # CTR自動テストのビルド -testBuildExec="omake dotests-emumem BUILD=development FILTER=CTR-TS*.fast SKIP_RUN=true" -cd tests -if [ $useIncrediBuild ] ; then - xgConsole /command="$testBuildExec $PARALLEL" /profile="../profile.xml" -else - $testBuildExec $PARALLEL -fi -cd ../ +buildAutoTest # PC上のテストのビルド cd tests/googletest/ -if [ $useIncrediBuild ] ; then +if $useIncrediBuild ; then xgConsole /command="omake $PARALLEL" /profile="../../profile.xml" else omake $PARALLEL diff --git a/trunk/ConsoleDataMigration/sources/common/FileTransfer.cpp b/trunk/ConsoleDataMigration/sources/common/FileTransfer.cpp index 398dc26..edce261 100644 --- a/trunk/ConsoleDataMigration/sources/common/FileTransfer.cpp +++ b/trunk/ConsoleDataMigration/sources/common/FileTransfer.cpp @@ -213,7 +213,7 @@ bool ExportTwlSaveFile(const wchar_t* from_path, const wchar_t* to_path, void* b common::cmacKey); COMMON_LOGGER_RETURN_FALSE_IF_FAILED(result); - result = to_file.TryWrite(&writesize, cmac, sizeof(cmac)); + result = to_file.TryWrite(&writesize, cmac, sizeof(cmac), true); COMMON_LOGGER_RETURN_FALSE_IF_FAILED(result); result = to_file.TryFlush(); COMMON_LOGGER_RETURN_FALSE_IF_FAILED(result); @@ -445,7 +445,7 @@ bool CopyDirectory(ImportDataList* fileList, const wchar_t * from_path, const wc common::cmacKey); COMMON_LOGGER_RETURN_FALSE_IF_FAILED(result); - result = to_file.TryWrite(&writesize, cmac, sizeof(cmac)); + result = to_file.TryWrite(&writesize, cmac, sizeof(cmac), true); COMMON_LOGGER_RETURN_FALSE_IF_FAILED(result); } diff --git a/trunk/ConsoleDataMigration/sources/common/SaveDataMover.cpp b/trunk/ConsoleDataMigration/sources/common/SaveDataMover.cpp index 91bb7b6..951d3a2 100644 --- a/trunk/ConsoleDataMigration/sources/common/SaveDataMover.cpp +++ b/trunk/ConsoleDataMigration/sources/common/SaveDataMover.cpp @@ -498,7 +498,7 @@ nn::Result SaveDataMover::CopyFile(nn::fs::FileInputStream& is, nn::fs::FileOutp s32 read = 0; s32 write = 0; COMMON_LOGGER_RETURN_RESULT_IF_FAILED(is.TryRead(&read, pBuffer, readSize)); - COMMON_LOGGER_RETURN_RESULT_IF_FAILED(os.TryWrite(&write, pBuffer, read)); + COMMON_LOGGER_RETURN_RESULT_IF_FAILED(os.TryWrite(&write, pBuffer, read, true)); restSize -= read; m_FinishedSize += read; diff --git a/trunk/ConsoleDataMigration/sources/tests/ConsoleBackup/Exporter/OMakefile b/trunk/ConsoleDataMigration/sources/tests/ConsoleBackup/Exporter/OMakefile index 9577c6c..4c91012 100644 --- a/trunk/ConsoleDataMigration/sources/tests/ConsoleBackup/Exporter/OMakefile +++ b/trunk/ConsoleDataMigration/sources/tests/ConsoleBackup/Exporter/OMakefile @@ -53,6 +53,7 @@ LIBS += libnn_test \ libnn_ps \ libnn_am \ lib_demo \ + libnn_nim \ ROM_SPEC_FILE = ../../../ConsoleBackup/ConsoleBackup.rsf diff --git a/trunk/ConsoleDataMigration/sources/tests/ConsoleRestore/PreinstallImporter/OMakefile b/trunk/ConsoleDataMigration/sources/tests/ConsoleRestore/PreinstallImporter/OMakefile index ca31e96..710a70a 100644 --- a/trunk/ConsoleDataMigration/sources/tests/ConsoleRestore/PreinstallImporter/OMakefile +++ b/trunk/ConsoleDataMigration/sources/tests/ConsoleRestore/PreinstallImporter/OMakefile @@ -57,7 +57,7 @@ LIBS += libnn_test \ libnn_xml_simple \ ROM_SPEC_FILE = ../../../ConsoleRestore/ConsoleRestore.rsf -DESCRIPTOR = $(HORIZON_ROOT)/resources/specfiles/private/RepairTool.desc +DESCRIPTOR = $(HORIZON_ROOT)/resources/specfiles/tools/RepairTool.desc include $(makePlatformDefsPath build.tests) diff --git a/trunk/ConsoleDataMigration/sources/tests/ConsoleRestore/TitleDownloader/OMakefile b/trunk/ConsoleDataMigration/sources/tests/ConsoleRestore/TitleDownloader/OMakefile index be42b06..a8417c4 100644 --- a/trunk/ConsoleDataMigration/sources/tests/ConsoleRestore/TitleDownloader/OMakefile +++ b/trunk/ConsoleDataMigration/sources/tests/ConsoleRestore/TitleDownloader/OMakefile @@ -59,7 +59,7 @@ LIBS += libnn_test \ ROM_SPEC_FILE = ../../../ConsoleRestore/ConsoleRestore.rsf -DESCRIPTOR = $(HORIZON_ROOT)/resources/specfiles/private/RepairTool.desc +DESCRIPTOR = $(HORIZON_ROOT)/resources/specfiles/tools/RepairTool.desc include $(makePlatformDefsPath build.tests)