From 86d137d2c681e7c1884db0bfdde64eb0863e44f7 Mon Sep 17 00:00:00 2001 From: N2614 Date: Tue, 21 Feb 2012 04:22:06 +0000 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E6=9E=9C=E7=89=A9=E3=81=AE=E3=83=95?= =?UTF-8?q?=E3=82=A1=E3=82=A4=E3=83=AB=E5=90=8D=E3=81=AB=E3=83=90=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=83=A7=E3=83=B3=E7=95=AA=E5=8F=B7=E3=82=92=E5=85=A5?= =?UTF-8?q?=E3=82=8C=E3=82=89=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=20UnfixedKey=E7=94=A8=E3=83=93=E3=83=AB=E3=83=89=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@645 385bec56-5757-e545-9c3a-d8741f4650f1 --- .../ConsoleDataMigration/documents/Readme.txt | 9 ++++++-- trunk/ConsoleDataMigration/sources/build.sh | 21 +++++++++++++++++-- .../sources/common/BuildSwitch.om | 8 +++++-- 3 files changed, 32 insertions(+), 6 deletions(-) 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