-
Notifications
You must be signed in to change notification settings - Fork 165
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
[x64対応] バージョン情報にPlatform情報を埋め込み (32bit/64bit) #179
Conversation
28f93e5
to
2b43a34
Compare
調整完了しました。 |
一部不具合があったので直します |
調整完了しました。x64 版のリソースビルド時に _WIN64 が定義されていなかったのでプロジェクト設定で定義を追加しました。 |
sakura_core/dlg/CDlgAbout.cpp
Outdated
@@ -26,6 +26,7 @@ | |||
#include "util/module.h" | |||
#include "gitrev.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
で gitrev.h をインクルードするので version.h のインクルードだけにできます。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
たしかに。30e4286 で gitrev.h のインクルードをすべて version.h に集約しました。
sakura_core/version.h
Outdated
|
||
// リソース埋め込み用バージョン文字列 | ||
// e.g. "2.3.2.0 (4a0de579) UNICODE 64bit DEBUG" | ||
#define RESOURCE_VERSION_STRING(_VersionString) _VersionString " (" GIT_SHORT_COMMIT_HASH ") " VER_CHARSET " " VER_PLATFORM " " VER_CONFIG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#90 で書きましたが、Release 版のときに、
VER_CONFIG の前に空白入る件お願いします。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
対応しました
#ifndef _UNICODE | ||
" ANSI" | ||
#endif | ||
VALUE "ProductVersion", RESOURCE_VERSION_STRING(PR_VER_STR) // e.g. "2.3.2.0 4a0de579 UNICODE 64bit DEBUG" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
も version.h をインクルードしたほうがいいと思います。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
対応しました
#if defined(GIT_COMMIT_HASH) | ||
cmemMsg.AppendString(_T("(GitHash " GIT_COMMIT_HASH ")\r\n")); | ||
#endif | ||
cmemMsg.AppendString( szMsg ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
以下のようにするのはいかがでしょうか?
追加や削除が容易になると思います。
#ifdef GIT_COMMIT_HASH
#define VER_GITHASH "(GitHash " GIT_COMMIT_HASH ")"
#else
#define VER_GITHASH ""
#endif
DWORD dwVersionMS, dwVersionLS;
GetAppVersionInfo( NULL, VS_VERSION_INFO, &dwVersionMS, &dwVersionLS );
auto_sprintf(szMsg,
_T("v%d.%d.%d.%d"),
HIWORD(dwVersionMS), LOWORD(dwVersionMS), HIWORD(dwVersionLS), LOWORD(dwVersionLS) // e.g. {2, 3, 2, 0}
);
cmemMsg.AppendString( szMsg );
cmemMsg.AppendString( _T(" ") _T(VER_PLATFORM) );
#ifdef _DEBUG
cmemMsg.AppendString( _T(" ") _T(VER_CONFIG) );
#endif
#ifdef GIT_COMMIT_HASH
cmemMsg.AppendString( _T("\r\n") _T(VER_GITHASH) _T("\r\n"));
#endif
#if defined(GIT_URL)
cmemMsg.AppendString(_T("(GitURL " GIT_URL ")\r\n"));
#endif
cmemMsg.AppendString( _T("\r\n") );
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
今は x64 マージを優先したいです
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
了解です
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Release 構成の場合に、auto_sprintf で VER_CONFIG を %hs で出力するときに %hs の前に空白があるので
末尾に余計な空白が入りますが、後で対応すればいいと思います。
認識してしましたが重要な問題ではないと判断し(可読性のほうを重視して)そのままにしてあります。 |
#90 のコンフリクトを解消した版。
諸事情でリポジトリの Fork をし直したので PR も作り直します。
対応内容