mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 13:31:27 +12:00
Git version fixed
This commit is contained in:
parent
55ca625371
commit
cd71125277
5 changed files with 26 additions and 15 deletions
|
@ -53,7 +53,8 @@ if errorlevel 1 (
|
||||||
goto done
|
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.
|
rem // Don't modify the file if it already has the current version.
|
||||||
if exist "%GIT_VERSION_FILE%" (
|
if exist "%GIT_VERSION_FILE%" (
|
||||||
|
|
|
@ -36,7 +36,7 @@ AboutDialog::AboutDialog(wxWindow *parent)
|
||||||
t_descr->SetForegroundColour(wxColor(255,255,255));
|
t_descr->SetForegroundColour(wxColor(255,255,255));
|
||||||
t_descr->SetPosition(wxPoint(12,50));
|
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->SetBackgroundColour(wxColor(100,100,100));
|
||||||
t_version->SetForegroundColour(wxColor(200,200,200));
|
t_version->SetForegroundColour(wxColor(200,200,200));
|
||||||
t_version->SetPosition(wxPoint(12,66));
|
t_version->SetPosition(wxPoint(12,66));
|
||||||
|
|
|
@ -73,7 +73,7 @@ MainFrame::MainFrame()
|
||||||
, m_sys_menu_opened(false)
|
, 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();
|
wxMenuBar* menubar = new wxMenuBar();
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ MainFrame::MainFrame()
|
||||||
wxGetApp().Bind(wxEVT_KEY_DOWN, &MainFrame::OnKeyDown, this);
|
wxGetApp().Bind(wxEVT_KEY_DOWN, &MainFrame::OnKeyDown, this);
|
||||||
wxGetApp().Bind(wxEVT_DBG_COMMAND, &MainFrame::UpdateUI, 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, "");
|
LOG_NOTICE(GENERAL, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,14 +4,24 @@ set(GIT_VERSION_UPDATE "1")
|
||||||
|
|
||||||
find_package(Git)
|
find_package(Git)
|
||||||
if(GIT_FOUND)
|
if(GIT_FOUND)
|
||||||
execute_process(COMMAND ${GIT_EXECUTABLE} describe --always
|
execute_process(COMMAND ${GIT_EXECUTABLE} rev-list HEAD --count
|
||||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||||
RESULT_VARIABLE exit_code
|
RESULT_VARIABLE exit_code
|
||||||
OUTPUT_VARIABLE GIT_VERSION)
|
OUTPUT_VARIABLE GIT_VERSION)
|
||||||
if(NOT ${exit_code} EQUAL 0)
|
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()
|
endif()
|
||||||
string(STRIP ${GIT_VERSION} GIT_VERSION)
|
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()
|
else()
|
||||||
message(WARNING "git not found, unable to include version.")
|
message(WARNING "git not found, unable to include version.")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -223,7 +223,7 @@
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||||
</Link>
|
</Link>
|
||||||
<PreBuildEvent>
|
<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>
|
<Message>Updating git-version.h</Message>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
<ProjectReference>
|
<ProjectReference>
|
||||||
|
@ -253,7 +253,7 @@
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||||
</Link>
|
</Link>
|
||||||
<PreBuildEvent>
|
<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>
|
<Message>Updating git-version.h</Message>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
<ProjectReference>
|
<ProjectReference>
|
||||||
|
@ -283,7 +283,7 @@
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||||
</Link>
|
</Link>
|
||||||
<PreBuildEvent>
|
<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>
|
<Message>Updating git-version.h</Message>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
<ProjectReference>
|
<ProjectReference>
|
||||||
|
@ -313,7 +313,7 @@
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||||
</Link>
|
</Link>
|
||||||
<PreBuildEvent>
|
<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>
|
<Message>Updating git-version.h</Message>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
<ProjectReference>
|
<ProjectReference>
|
||||||
|
@ -343,7 +343,7 @@
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||||
</Link>
|
</Link>
|
||||||
<PreBuildEvent>
|
<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>
|
<Message>Updating git-version.h</Message>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
<ProjectReference>
|
<ProjectReference>
|
||||||
|
@ -384,7 +384,7 @@
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||||
</Link>
|
</Link>
|
||||||
<PreBuildEvent>
|
<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>
|
<Message>Updating git-version.h</Message>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
@ -422,7 +422,7 @@
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||||
</Link>
|
</Link>
|
||||||
<PreBuildEvent>
|
<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>
|
<Message>Updating git-version.h</Message>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
@ -461,7 +461,7 @@
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||||
</Link>
|
</Link>
|
||||||
<PreBuildEvent>
|
<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>
|
<Message>Updating git-version.h</Message>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
@ -500,7 +500,7 @@
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||||
</Link>
|
</Link>
|
||||||
<PreBuildEvent>
|
<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>
|
<Message>Updating git-version.h</Message>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue