mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Fixed version issue on Windows artifacts
This commit is contained in:
1 parent
2622576cc2
commit
e95b157597
1 file changed
+19
@@ -41,6 +41,25 @@ jobs:
|
||||
- name: Add MSBuild to PATH
|
||||
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
|
||||
|
||||
- name: Fetch tags
|
||||
# This is required for git describe --always to work for git-version.cpp.
|
||||
run: git fetch --deepen=15000 --no-recurse-submodules --tags || exit 0
|
||||
|
||||
- name: Create git-version.cpp for Windows # Not sure why the one at git-version-gen.cmd couldn't get the version properly.
|
||||
#if: github.ref_type == 'tag'
|
||||
run: |
|
||||
$GIT_VERSION=git describe --always --tags
|
||||
echo "Test GitVer = ${{ github.ref_name }} / $GIT_VERSION / ${GITHUB_REF_NAME}"
|
||||
echo "const char *PPSSPP_GIT_VERSION = `"$GIT_VERSION`";" > git-version.cpp
|
||||
echo "#define PPSSPP_GIT_VERSION_NO_UPDATE 1" >> git-version.cpp
|
||||
|
||||
# Generate Windows/win-version.h too.
|
||||
$WIN_VERSION_COMMA=$GIT_VERSION -replace '^v', '' -replace '-g[0-9a-f]+$', '' -replace '[-\.]', ','
|
||||
echo "Test WinVer = $WIN_VERSION_COMMA"
|
||||
echo "#define PPSSPP_WIN_VERSION_STRING `"$GIT_VERSION`"" > Windows/win-version.h
|
||||
echo "#define PPSSPP_WIN_VERSION_COMMA $WIN_VERSION_COMMA" >> Windows/win-version.h
|
||||
echo "#define PPSSPP_WIN_VERSION_NO_UPDATE 1" >> Windows/win-version.h
|
||||
|
||||
- name: Build Windows
|
||||
working-directory: ${{ env.GITHUB_WORKSPACE }}
|
||||
run: msbuild /m /p:TrackFileAccess=false /p:Configuration=${{ env.BUILD_CONFIGURATION }} /p:Platform=${{ matrix.platform }} Windows/PPSSPP.sln
|
||||
|
||||
Reference in new issue
Block a user