diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 8ca9521536..10bcb4dac8 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -20,9 +20,16 @@ jobs: runs-on: ${{ matrix.image }} strategy: matrix: - platform: [x86, x64] + platform: [x86, x64, arm64] configuration: [Light, Release] image: [windows-2019, windows-2022] + include: + - platform: x86 + setenv: amd64_x86 + - platform: x64 + setenv: amd64 + - platform: arm64 + setenv: amd64_arm64 env: OPENPACE_VER: 1.1.3 steps: @@ -31,11 +38,6 @@ jobs: - name: Git describe id: ghd uses: proudust/gh-describe@v2 - - name: Package name - shell: bash - run: | - echo PACKAGE_NAME=OpenSC-${{ steps.ghd.outputs.tag }} >> $GITHUB_ENV - echo ARTIFACT=OpenSC-${{ steps.ghd.outputs.tag }}_${{ matrix.platform == 'x86' && 'win32' || 'win64' }}${{ matrix.configuration == 'Light' && '-Light' || '' }} >> $GITHUB_ENV - name: Install CPDK run: choco install windows-cryptographic-provider-development-kit -y > $null - name: Install autotools @@ -60,7 +62,7 @@ jobs: - name: Setup dev env uses: ilammy/msvc-dev-cmd@v1 with: - arch: ${{ matrix.platform }} + arch: ${{ matrix.setenv }} - name: Prepare vcpkg if: matrix.configuration == 'Release' uses: lukka/run-vcpkg@v7 @@ -98,7 +100,7 @@ jobs: ca_lib.c cv_cert.c cvc_lookup.c x509_lookup.c eac_asn1.c eac.c eac_ca.c eac_dh.c ` eac_ecdh.c eac_kdf.c eac_lib.c eac_print.c eac_util.c misc.c pace.c pace_lib.c ` pace_mappings.c ri.c ri_lib.c ta.c ta_lib.c objects.c ssl_compat.c - lib /nologo /machine:${{ matrix.platform }} /out:libeac.lib ` + lib /nologo /out:libeac.lib ` ca_lib.obj cv_cert.obj cvc_lookup.obj x509_lookup.obj eac_asn1.obj eac.obj eac_ca.obj eac_dh.obj ` eac_ecdh.obj eac_kdf.obj eac_lib.obj eac_print.obj eac_util.obj misc.obj pace.obj pace_lib.obj ` pace_mappings.obj ri.obj ri_lib.obj ta.obj ta_lib.obj objects.obj ssl_compat.obj @@ -118,16 +120,17 @@ jobs: - name: Build OpenSC run: | nmake /nologo /f Makefile.mak opensc.msi - move win32\OpenSC.msi OpenSC-${env:ARTIFACT}.msi - - name: Debug symbols - run: | - Get-ChildItem -recurse . -exclude vc*.pdb *.pdb | % { - 7z a -tzip ${env:ARTIFACT}-Debug.zip $_.FullName - } + move win32\OpenSC.msi OpenSC-${{ steps.ghd.outputs.tag }}_${{ matrix.platform }}${{ matrix.configuration == 'Light' && '-Light' || '' }}.msi - name: Archive artifacts uses: actions/upload-artifact@v4 with: name: msi_${{ matrix.image }}_${{ matrix.platform }}_${{ matrix.configuration }} path: | ./*.msi - ./*-Debug.zip + - name: Archive debug artifacts + uses: actions/upload-artifact@v4 + with: + name: debug_${{ matrix.image }}_${{ matrix.platform }}_${{ matrix.configuration }} + path: | + ./src/**/*.pdb + !./src/**/vc*.pdb diff --git a/win32/Make.rules.mak b/win32/Make.rules.mak index bd2d988dd0..430357e725 100644 --- a/win32/Make.rules.mak +++ b/win32/Make.rules.mak @@ -124,8 +124,8 @@ COPTS = /nologo /Zi /GS /W3 /WX /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_WAR /DWINVER=0x0601 /D_WIN32_WINNT=0x0601 /DWIN32_LEAN_AND_MEAN /DOPENSC_FEATURES="\"$(OPENSC_FEATURES)\"" \ $(DEBUG_DEF) $(OPENPACE_DEF) $(OPENSSL_DEF) $(ZLIB_DEF) $(MINIDRIVER_DEF) $(SM_DEF) $(TESTS_DEF) $(OPENSSL_EXTRA_CFLAGS) \ /I$(TOPDIR)\win32 /I$(TOPDIR)\src $(OPENPACE_INCL_DIR) $(OPENSSL_INCL_DIR) $(ZLIB_INCL_DIR) $(CPDK_INCL_DIR) -LINKFLAGS = /nologo /machine:$(PLATFORM) /INCREMENTAL:NO /NXCOMPAT /DYNAMICBASE /DEBUG /NODEFAULTLIB:MSVCRT /NODEFAULTLIB:MSVCRTD -LIBFLAGS = /nologo /machine:$(PLATFORM) +LINKFLAGS = /nologo /INCREMENTAL:NO /NXCOMPAT /DYNAMICBASE /DEBUG /NODEFAULTLIB:MSVCRT /NODEFAULTLIB:MSVCRTD +LIBFLAGS = /nologo WIXFLAGS = -arch $(PLATFORM) $(WIXFLAGS) !IF "$(DEBUG_DEF)" == "/DDEBUG" diff --git a/win32/OpenSC.wxs.in b/win32/OpenSC.wxs.in index 62636c7428..75d32266ed 100644 --- a/win32/OpenSC.wxs.in +++ b/win32/OpenSC.wxs.in @@ -6,6 +6,17 @@ + + + + + + + + + + + @@ -13,6 +24,8 @@ + + + InstallerVersion="500"> @@ -57,7 +70,7 @@ - + @@ -106,20 +119,18 @@ - - - - - - + + + + - + @@ -127,12 +138,8 @@ - - - - - - + + @@ -158,22 +165,18 @@ - + - - - + - - - + - +