Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

バージョンを 2.4.0 の開発版に上げる #713

Merged
merged 3 commits into from
Dec 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions sakura/githash.bat
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ if "%APPVEYOR_REPO_NAME%" == "" (
) else (
echo #define APPVEYOR_REPO_NAME "%APPVEYOR_REPO_NAME%"
)

@rem enable 'dev version' macro which will be disabled on release branches
echo #define APPVEYOR_DEV_VERSION

if "%APPVEYOR_REPO_TAG_NAME%" == "" (
echo // APPVEYOR_REPO_TAG_NAME is not defined
) else (
Expand Down
9 changes: 8 additions & 1 deletion sakura_core/_main/WinMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "util/os.h"
#include "util/module.h"
#include "debug/CRunningTimer.h"
#include "version.h"


// アプリ名。2007.09.21 kobake 整理
Expand All @@ -48,7 +49,13 @@
#define _APP_NAME_3_(TYPE) TYPE("")
#endif

#define _GSTR_APPNAME_(TYPE) _APP_NAME_(TYPE) _APP_NAME_2_(TYPE) _APP_NAME_3_(TYPE)
#ifdef APPVEYOR_DEV_VERSION
#define _APP_NAME_DEV_(TYPE) TYPE("(dev Version)")
#else
#define _APP_NAME_DEV_(TYPE) TYPE("")
#endif

#define _GSTR_APPNAME_(TYPE) _APP_NAME_(TYPE) _APP_NAME_2_(TYPE) _APP_NAME_DEV_(TYPE) _APP_NAME_3_(TYPE)

const TCHAR g_szGStrAppName[] = (_GSTR_APPNAME_(_T) ); // この変数を直接参照せずに GSTR_APPNAME を使うこと
const CHAR g_szGStrAppNameA[] = (_GSTR_APPNAME_(ATEXT)); // この変数を直接参照せずに GSTR_APPNAME_A を使うこと
Expand Down
3 changes: 3 additions & 0 deletions sakura_core/dlg/CDlgAbout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ BOOL CDlgAbout::OnInitDialog( HWND hwndDlg, WPARAM wParam, LPARAM lParam )
);
cmemMsg.AppendString( _T(" ") _T(VER_PLATFORM) );
cmemMsg.AppendString( _T(SPACE_WHEN_DEBUG) _T(VER_CONFIG) );
#ifdef APPVEYOR_DEV_VERSION
cmemMsg.AppendString( _T(APPVEYOR_DEV_VERSION_STR_WITH_SPACE) );
#endif
#ifdef ALPHA_VERSION
cmemMsg.AppendString( _T(" ") _T(ALPHA_VERSION_STR));
#endif
Expand Down
27 changes: 21 additions & 6 deletions sakura_core/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// c => 2
// d => 0
#define VER_A 2 // a of ver a.b.c.d
#define VER_B 3 // b of ver a.b.c.d
#define VER_C 2 // c of ver a.b.c.d
#define VER_B 4 // b of ver a.b.c.d
#define VER_C 0 // c of ver a.b.c.d
#ifdef APPVEYOR_BUILD_NUMBER_INT
#define VER_D APPVEYOR_BUILD_NUMBER_INT // d of ver a.b.c.d
#else
Expand Down Expand Up @@ -65,6 +65,12 @@
#define ALPHA_VERSION_STR_WITH_SPACE ""
#endif

#ifdef APPVEYOR_DEV_VERSION
#define APPVEYOR_DEV_VERSION_STR_WITH_SPACE " dev"
#else
#define APPVEYOR_DEV_VERSION_STR_WITH_SPACE ""
#endif

// バージョン情報埋め込み用 Git ハッシュ文字列 (存在しない場合には空文字列)
#ifdef GIT_SHORT_COMMIT_HASH
#define VER_GIT_SHORTHASH " (" GIT_SHORT_COMMIT_HASH ")"
Expand All @@ -73,7 +79,16 @@
#endif

// リソース埋め込み用バージョン文字列 //
// e.g. "2.3.2.0 (4a0de579) UNICODE 64bit DEBUG" … デバッグビルド時の例 //
// e.g. "2.3.2.0 (4a0de579) UNICODE 64bit" … リリースビルド時の例 //
// e.g. "2.3.2.0 UNICODE 64bit" … Git 情報無い場合の例 //
#define RESOURCE_VERSION_STRING(_VersionString) _VersionString VER_GIT_SHORTHASH " " VER_CHARSET " " VER_PLATFORM SPACE_WHEN_DEBUG VER_CONFIG ALPHA_VERSION_STR_WITH_SPACE
// e.g. "2.3.2.0 (4a0de579) UNICODE 64bit dev DEBUG" … (開発版) デバッグビルド時の例 //
// e.g. "2.3.2.0 (4a0de579) UNICODE 64bit dev" … (開発版) リリースビルド時の例 //
// e.g. "2.3.2.0 UNICODE 64bit dev" … (開発版) Git 情報無い場合の例 //
// e.g. "2.3.2.0 (4a0de579) UNICODE 64bit DEBUG" … (タグ付き) デバッグビルド時の例 //
// e.g. "2.3.2.0 (4a0de579) UNICODE 64bit" … (タグ付き) リリースビルド時の例 //
#define RESOURCE_VERSION_STRING(_VersionString) \
_VersionString \
VER_GIT_SHORTHASH \
" " VER_CHARSET \
" " VER_PLATFORM \
APPVEYOR_DEV_VERSION_STR_WITH_SPACE \
SPACE_WHEN_DEBUG \
VER_CONFIG ALPHA_VERSION_STR_WITH_SPACE