mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-18 04:21:00 +00:00
Git version fixed
This commit is contained in:
parent
55ca625371
commit
cd71125277
@ -53,7 +53,8 @@ if errorlevel 1 (
|
||||
goto done
|
||||
)
|
||||
|
||||
for /F %%I IN ('call %GIT% describe --always') do set GIT_VERSION=%%I
|
||||
for /F %%I IN ('call %GIT% rev-list HEAD --count') do set GIT_VERSION=%%I
|
||||
for /F %%I IN ('call %GIT% rev-parse --short HEAD') do set GIT_VERSION=%GIT_VERSION%-%%I
|
||||
|
||||
rem // Don't modify the file if it already has the current version.
|
||||
if exist "%GIT_VERSION_FILE%" (
|
||||
|
@ -36,7 +36,7 @@ AboutDialog::AboutDialog(wxWindow *parent)
|
||||
t_descr->SetForegroundColour(wxColor(255,255,255));
|
||||
t_descr->SetPosition(wxPoint(12,50));
|
||||
|
||||
wxStaticText* t_version = new wxStaticText(this, wxID_ANY, wxString::Format(_PRGNAME_" Version : " RPCS3_GIT_VERSION));
|
||||
wxStaticText* t_version = new wxStaticText(this, wxID_ANY, wxString::Format(_PRGNAME_" Version: " _PRGVER_ "-" RPCS3_GIT_VERSION));
|
||||
t_version->SetBackgroundColour(wxColor(100,100,100));
|
||||
t_version->SetForegroundColour(wxColor(200,200,200));
|
||||
t_version->SetPosition(wxPoint(12,66));
|
||||
|
@ -73,7 +73,7 @@ MainFrame::MainFrame()
|
||||
, m_sys_menu_opened(false)
|
||||
{
|
||||
|
||||
SetLabel(wxString::Format(_PRGNAME_ " " _PRGVER_ " " RPCS3_GIT_VERSION));
|
||||
SetLabel(wxString::Format(_PRGNAME_ " v" _PRGVER_ "-" RPCS3_GIT_VERSION));
|
||||
|
||||
wxMenuBar* menubar = new wxMenuBar();
|
||||
|
||||
@ -165,7 +165,7 @@ MainFrame::MainFrame()
|
||||
wxGetApp().Bind(wxEVT_KEY_DOWN, &MainFrame::OnKeyDown, this);
|
||||
wxGetApp().Bind(wxEVT_DBG_COMMAND, &MainFrame::UpdateUI, this);
|
||||
|
||||
LOG_NOTICE(GENERAL, _PRGNAME_ " " _PRGVER_ " " RPCS3_GIT_VERSION);
|
||||
LOG_NOTICE(GENERAL, _PRGNAME_ " v" _PRGVER_ "-" RPCS3_GIT_VERSION);
|
||||
LOG_NOTICE(GENERAL, "");
|
||||
}
|
||||
|
||||
|
@ -4,14 +4,24 @@ set(GIT_VERSION_UPDATE "1")
|
||||
|
||||
find_package(Git)
|
||||
if(GIT_FOUND)
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} describe --always
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} rev-list HEAD --count
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
RESULT_VARIABLE exit_code
|
||||
OUTPUT_VARIABLE GIT_VERSION)
|
||||
if(NOT ${exit_code} EQUAL 0)
|
||||
message(WARNING "git describe failed, unable to include version.")
|
||||
message(WARNING "git rev-list failed, unable to include version.")
|
||||
endif()
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
RESULT_VARIABLE exit_code
|
||||
OUTPUT_VARIABLE GIT_VERSION_)
|
||||
if(NOT ${exit_code} EQUAL 0)
|
||||
message(WARNING "git rev-parse failed, unable to include version.")
|
||||
endif()
|
||||
string(STRIP ${GIT_VERSION} GIT_VERSION)
|
||||
string(STRIP ${GIT_VERSION_} GIT_VERSION_)
|
||||
string(STRIP ${GIT_VERSION}-${GIT_VERSION_} GIT_VERSION)
|
||||
message(STATUS "GIT_VERSION: " ${GIT_VERSION})
|
||||
else()
|
||||
message(WARNING "git not found, unable to include version.")
|
||||
endif()
|
||||
|
@ -223,7 +223,7 @@
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)\Utilities\git-version-gen.cmd"</Command>
|
||||
<Command>%windir%\sysnative\cmd.exe /c "$(SolutionDir)\Utilities\git-version-gen.cmd"</Command>
|
||||
<Message>Updating git-version.h</Message>
|
||||
</PreBuildEvent>
|
||||
<ProjectReference>
|
||||
@ -253,7 +253,7 @@
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)\Utilities\git-version-gen.cmd"</Command>
|
||||
<Command>%windir%\sysnative\cmd.exe /c "$(SolutionDir)\Utilities\git-version-gen.cmd"</Command>
|
||||
<Message>Updating git-version.h</Message>
|
||||
</PreBuildEvent>
|
||||
<ProjectReference>
|
||||
@ -283,7 +283,7 @@
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)\Utilities\git-version-gen.cmd"</Command>
|
||||
<Command>%windir%\sysnative\cmd.exe /c "$(SolutionDir)\Utilities\git-version-gen.cmd"</Command>
|
||||
<Message>Updating git-version.h</Message>
|
||||
</PreBuildEvent>
|
||||
<ProjectReference>
|
||||
@ -313,7 +313,7 @@
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)\Utilities\git-version-gen.cmd"</Command>
|
||||
<Command>%windir%\sysnative\cmd.exe /c "$(SolutionDir)\Utilities\git-version-gen.cmd"</Command>
|
||||
<Message>Updating git-version.h</Message>
|
||||
</PreBuildEvent>
|
||||
<ProjectReference>
|
||||
@ -343,7 +343,7 @@
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)\Utilities\git-version-gen.cmd"</Command>
|
||||
<Command>%windir%\sysnative\cmd.exe /c "$(SolutionDir)\Utilities\git-version-gen.cmd"</Command>
|
||||
<Message>Updating git-version.h</Message>
|
||||
</PreBuildEvent>
|
||||
<ProjectReference>
|
||||
@ -384,7 +384,7 @@
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)\Utilities\git-version-gen.cmd"</Command>
|
||||
<Command>%windir%\sysnative\cmd.exe /c "$(SolutionDir)\Utilities\git-version-gen.cmd"</Command>
|
||||
<Message>Updating git-version.h</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
@ -422,7 +422,7 @@
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)\Utilities\git-version-gen.cmd"</Command>
|
||||
<Command>%windir%\sysnative\cmd.exe /c "$(SolutionDir)\Utilities\git-version-gen.cmd"</Command>
|
||||
<Message>Updating git-version.h</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
@ -461,7 +461,7 @@
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)\Utilities\git-version-gen.cmd"</Command>
|
||||
<Command>%windir%\sysnative\cmd.exe /c "$(SolutionDir)\Utilities\git-version-gen.cmd"</Command>
|
||||
<Message>Updating git-version.h</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
@ -500,7 +500,7 @@
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)\Utilities\git-version-gen.cmd"</Command>
|
||||
<Command>%windir%\sysnative\cmd.exe /c "$(SolutionDir)\Utilities\git-version-gen.cmd"</Command>
|
||||
<Message>Updating git-version.h</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
|
Loading…
x
Reference in New Issue
Block a user