diff --git a/trunk/ConsoleDataMigration/documents/Readme.txt b/trunk/ConsoleDataMigration/documents/Readme.txt index f4a3404..9bfaff1 100644 --- a/trunk/ConsoleDataMigration/documents/Readme.txt +++ b/trunk/ConsoleDataMigration/documents/Readme.txt @@ -6,10 +6,15 @@ CTR_SDK-3_3 branch r45925 ARM C/C++ Compiler, 4.1 [Build 791] for Nintendo 【ビルド時の注意】 -開発機・量産機でAES鍵を変えるため、 +リリース用ビルドでは開発機・量産機でAES鍵を変えるため、 量産機用ビルドの場合 -build.sh RELEASE +./build.sh RELEASE + +でビルドすること。 + +開発機用ビルドの場合 +./build.sh UNFIXEDKEY でビルドすること。 diff --git a/trunk/ConsoleDataMigration/sources/build.sh b/trunk/ConsoleDataMigration/sources/build.sh index 7bbfd8e..c53dabb 100755 --- a/trunk/ConsoleDataMigration/sources/build.sh +++ b/trunk/ConsoleDataMigration/sources/build.sh @@ -1,16 +1,34 @@ #!/usr/bin/env bash +# バージョン取得 +function getVersion +{ + VERSION_MAJOR=$(cat common/version.h |grep VERSION_MAJOR|awk -F' ' '{print $3}'|sed 's/"//g') + VERSION_MINOR=$(cat common/version.h |grep VERSION_MINOR|awk -F' ' '{print $3}'|sed 's/"//g') + VERSION_MICRO=$(cat common/version.h |grep VERSION_MICRO|awk -F' ' '{print $3}'|sed 's/"//g') + VERSION_STR="VERSION_MAJOR=$VERSION_MAJOR VERSION_MINOR=$VERSION_MINOR VERSION_MICRO=$VERSION_MICRO" +} + # フラグ判定 for arg in $@ do if [ "$arg" = 'RELEASE' ]; then releaseBuild=true fi + + if [ "$arg" = 'UNFIXEDKEY' ]; then + unfixedKeyBuild=true + fi done if [ $releaseBuild ] ; then + getVersion BUILD_TYPE=release,development - OPTION="PROD_BUILD=true" + OPTION="PROD_BUILD=true $VERSION_STR" +elif [ $unfixedKeyBuild ] ; then + getVersion + BUILD_TYPE=release,development + OPTION="UNFIXEDKEY_BUILD=true $VERSION_STR" else BUILD_TYPE=development fi @@ -18,7 +36,6 @@ fi # IncrediBuildが使えるか which xgConsole > /dev/null 2>&1 if [ "$?" -eq 0 ]; then - echo "Use IncrediBuild" useIncrediBuild=true PARALLEL=-j16 else diff --git a/trunk/ConsoleDataMigration/sources/common/BuildSwitch.om b/trunk/ConsoleDataMigration/sources/common/BuildSwitch.om index 25cd960..6791239 100644 --- a/trunk/ConsoleDataMigration/sources/common/BuildSwitch.om +++ b/trunk/ConsoleDataMigration/sources/common/BuildSwitch.om @@ -17,9 +17,13 @@ if $(defined TARGET_PROGRAM) if $(defined PROD_BUILD) CCFLAGS += -DUSE_PROD_KEY TARGET_NAME = $(TARGET_PROGRAM) - TARGET_PROGRAM = $(TARGET_PROGRAM)_prod + TARGET_PROGRAM = $(TARGET_PROGRAM)_prod_$(VERSION_MAJOR)_$(VERSION_MINOR)_$(VERSION_MICRO) + export + elseif $(defined UNFIXEDKEY_BUILD) + TARGET_NAME = $(TARGET_PROGRAM) + TARGET_PROGRAM = $(TARGET_PROGRAM)_dev_$(VERSION_MAJOR)_$(VERSION_MINOR)_$(VERSION_MICRO) export else TARGET_NAME = $(TARGET_PROGRAM) export - export \ No newline at end of file + export