Skip to content

Commit 5ce9c26

Browse files
committed
MSI version number
Signed-off-by: Raul Metsma <[email protected]>
1 parent c70be5a commit 5ce9c26

File tree

4 files changed

+16
-18
lines changed

4 files changed

+16
-18
lines changed

.appveyor.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ install:
3636
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
3737
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
3838
throw "There are newer queued builds for this pull request, failing early." }
39-
- ps: $env:PACKAGE_NAME=(git describe --tags --abbrev=0)
39+
- ps: $env:PACKAGE_VERSION=(git describe --tags --abbrev=0)
4040
- ps: $env:OPENSSL_PF = If ($env:Platform -eq "x86") { "Win32" } Else { "Win64" }
41-
- ps: $env:ARTIFACT="OpenSC-${env:PACKAGE_NAME}_${env:OPENSSL_PF}"
41+
- ps: $env:ARTIFACT="OpenSC-${env:PACKAGE_VERSION}_${env:OPENSSL_PF}"
4242
- ps: >-
4343
If ($env:Configuration -Like "*Light*") {
4444
$env:ARTIFACT+="-Light"
@@ -91,7 +91,7 @@ build_script:
9191
$env:OPENPACE_DIR="C:\openpace-${env:OPENSSL_PF}"
9292
}
9393
- nmake /nologo /f Makefile.mak opensc.msi
94-
- move win32\OpenSC.msi %ARTIFACT%.msi
94+
- move win32\OpenSC*.msi %ARTIFACT%.msi
9595
# put all pdb files for dump analysis, but this consumes approx 100 MB per build
9696
- md %ARTIFACT%-Debug
9797
- ps: >-

.github/workflows/windows.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
matrix:
2323
platform: [x86, x64, arm64]
2424
configuration: [Light, Release]
25-
image: [windows-2022]
25+
image: [windows-2025]
2626
include:
2727
- platform: x86
2828
setenv: amd64_x86
@@ -37,9 +37,6 @@ jobs:
3737
steps:
3838
- name: Checkout
3939
uses: actions/checkout@v5
40-
- name: Git describe
41-
id: ghd
42-
uses: proudust/gh-describe@v2
4340
- name: Package name
4441
shell: bash
4542
run: |
@@ -52,7 +49,7 @@ jobs:
5249
else
5350
SUFFIX="-${{ github.base_ref }}-pr${{ github.event.number }}"
5451
fi
55-
echo ARTIFACT=${{ steps.ghd.outputs.tag }}${SUFFIX}_${{ matrix.platform }}${{ matrix.configuration == 'Light' && '-Light' || '' }} >> $GITHUB_ENV
52+
echo "DIST_SUFFIX=${{ matrix.configuration == 'Light' && '-Light' || '' }}${SUFFIX}" >> $GITHUB_ENV
5653
- name: Install CPDK
5754
run: choco install windows-cryptographic-provider-development-kit -y > $null
5855
- name: Setup dev env
@@ -64,7 +61,7 @@ jobs:
6461
uses: actions/cache@v4
6562
with:
6663
path: ${{ github.workspace }}/vcpkg_cache
67-
key: vcpkg-${{ matrix.configuration }}-${{ matrix.platform }}-${{ hashFiles('.github/workflows/windows.yml', '.github/vcpkg.json') }}
64+
key: vcpkg-${{ matrix.configuration }}-${{ matrix.platform }}-${{ hashFiles('.github/vcpkg.json') }}
6865
- name: Prepare vcpkg
6966
if: matrix.configuration == 'Release'
7067
uses: lukka/run-vcpkg@v11
@@ -117,18 +114,16 @@ jobs:
117114
echo "OPENPACE_DEF=/DENABLE_OPENPACE" >> $env:GITHUB_ENV
118115
echo "OPENPACE_DIR=${env:GITHUB_WORKSPACE}\openpace-${env:OPENPACE_VER}" >> $env:GITHUB_ENV
119116
- name: Build OpenSC
120-
run: |
121-
nmake /nologo /f Makefile.mak opensc.msi
122-
move win32\OpenSC.msi OpenSC-${env:ARTIFACT}.msi
117+
run: nmake /nologo /f Makefile.mak opensc.msi
123118
- name: Archive artifacts
124-
uses: actions/upload-artifact@v4
119+
uses: actions/upload-artifact@v5
125120
with:
126121
name: msi_${{ matrix.image }}_${{ matrix.platform }}_${{ matrix.configuration }}
127-
path: ./*.msi
122+
path: ./win32/*.msi
128123
- name: Archive debug artifacts
129-
uses: actions/upload-artifact@v4
124+
uses: actions/upload-artifact@v5
130125
with:
131-
name: OpenSC-${{ env.ARTIFACT }}-Debug
126+
name: debug_${{ matrix.image }}_${{ matrix.platform }}_${{ matrix.configuration }}
132127
path: |
133128
./src/**/*.pdb
134129
./win32/*.pdb

win32/Make.rules.mak

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ MINIDRIVER_DEF = /DENABLE_MINIDRIVER
1818
WIXFLAGS = -d ENABLE_MINIDRIVER $(WIXFLAGS)
1919

2020
#Build MSI with the Windows Installer XML (WIX) toolkit
21+
MSI_NAME = $(PRODUCT_NAME)-$(PACKAGE_VERSION_MAJOR).$(PACKAGE_VERSION_MINOR).$(PACKAGE_VERSION_FIX)_$(PLATFORM)$(DIST_SUFFIX).msi
2122
!IF "$(WIX_PACKAGES)" == ""
2223
WIX_PACKAGES = $(TOPDIR)\win32\packages
2324
WIX_VERSION = 6.0.2

win32/Makefile.mak

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ config.h: winconfig.h
1010
customactions.dll: versioninfo-customactions.res $*.obj $*.def
1111
link /dll $(LINKFLAGS) /out:$@ /def:$*.def versioninfo-customactions.res customactions.obj msi.lib $(WIX_LIBS) Advapi32.lib User32.lib Version.lib Shell32.lib
1212

13-
OpenSC.msi: OpenSC.wxs customactions.dll
14-
wix build -arch $(PLATFORM) -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -d SOURCE_DIR=$(TOPDIR) $(WIXFLAGS) OpenSC.wxs
13+
$(MSI_NAME): OpenSC.wxs customactions.dll
14+
wix build -arch $(PLATFORM) -o $(MSI_NAME) -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -d SOURCE_DIR=$(TOPDIR) $(WIXFLAGS) OpenSC.wxs
15+
16+
OpenSC.msi: $(MSI_NAME)
1517

1618
clean::
1719
del /Q config.h *.msi *.wixobj *.wixpdb

0 commit comments

Comments
 (0)