hexchat/.github/workflows/windows-build.yml
Patrick Griffis c310862d2c win32: Add files for appx building
This is quite sloppy but it should get the job done.
2021-10-11 15:42:38 -05:00

97 lines
3.8 KiB
YAML

name: Windows Build
on: [push, pull_request]
jobs:
build:
runs-on: windows-2019
strategy:
matrix:
platform: [x64, win32]
arch: [x64, x86]
exclude:
- platform: x64
arch: x86
- platform: win32
arch: x64
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: |
New-Item -Name "deps" -ItemType "Directory"
Invoke-WebRequest http://files.jrsoftware.org/is/5/innosetup-5.5.9-unicode.exe -OutFile deps\innosetup-unicode.exe
& deps\innosetup-unicode.exe /VERYSILENT | Out-Null
Invoke-WebRequest https://dl.hexchat.net/misc/idpsetup-1.5.1.exe -OutFile deps\idpsetup.exe
& deps\idpsetup.exe /VERYSILENT
Invoke-WebRequest https://dl.hexchat.net/gtk/gtk-${{ matrix.platform }}-2018-08-29-openssl1.1.7z -OutFile deps\gtk-${{ matrix.arch }}.7z
& 7z.exe x deps\gtk-${{ matrix.arch }}.7z -oC:\gtk-build\gtk
Invoke-WebRequest https://dl.hexchat.net/gtk-win32/gendef-20111031.7z -OutFile deps\gendef.7z
& 7z.exe x deps\gendef.7z -oC:\gtk-build
Invoke-WebRequest https://dl.hexchat.net/gtk-win32/WinSparkle-20151011.7z -OutFile deps\WinSparkle.7z
& 7z.exe x deps\WinSparkle.7z -oC:\gtk-build\WinSparkle
Invoke-WebRequest https://dl.hexchat.net/misc/perl/perl-5.20.0-${{ matrix.arch }}.7z -OutFile deps\perl-${{ matrix.arch }}.7z
& 7z.exe x deps\perl-${{ matrix.arch }}.7z -oC:\gtk-build\perl-5.20\${{ matrix.platform }}
New-Item -Path "c:\gtk-build" -Name "python-2.7" -ItemType "Directory"
New-Item -Path "c:\gtk-build" -Name "python-3.6" -ItemType "Directory"
New-Item -Path "c:\gtk-build\python-2.7" -Name "${{ matrix.platform }}" -ItemType "SymbolicLink" -Value "C:/hostedtoolcache/windows/Python/2.7.18/${{ matrix.arch }}"
New-Item -Path "c:\gtk-build\python-3.6" -Name "${{ matrix.platform }}" -ItemType "SymbolicLink" -Value "C:/hostedtoolcache/windows/Python/3.6.8/${{ matrix.arch }}"
C:/hostedtoolcache/windows/Python/3.6.8/${{ matrix.arch }}/python.exe -m pip install cffi
C:/hostedtoolcache/windows/Python/2.7.18/${{ matrix.arch }}/python.exe -m pip install -qq cffi
shell: powershell
- name: Build
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"
msbuild win32\hexchat.sln /m /verbosity:minimal /p:Configuration=Release /p:Platform=${{ matrix.platform }}
shell: cmd
- name: Creating Appx
run: |
cp -r ..\hexchat-build\${{ matrix.platform }}\rel ..\hexchat-appx
.\win32\version-template.ps1 win32\AppxManifest.xml.in $(Join-Path $(Resolve-Path ..\hexchat-appx) AppxManifest.xml)
cd ..\hexchat-appx
rm plugins\hcperl.dll
rm plugins\hcpython2.dll
rm plugins\hcpython3.dll
rm plugins\hcupd.dll
rm -r python
rm *.pyd
rm WinSparkle.dll
rm portable-mode
rm hexchat-text.exe
rm thememan.exe
makeappx pack /d . /p hexchat-${{ matrix.arch }}.appx
shell: powershell
- name: Preparing Artifacts
run: |
move ..\hexchat-build\${{ matrix.platform }}\HexChat*.exe .\
move ..\hexchat-appx\hexchat-${{ matrix.arch }}.appx .\
move ..\hexchat-build .\
shell: cmd
- uses: actions/upload-artifact@v2
with:
name: Installer ${{ matrix.arch }}
path: HexChat*.exe
- uses: actions/upload-artifact@v2
with:
name: Build Files ${{ matrix.arch }}
path: hexchat-build
- uses: actions/upload-artifact@v2
with:
name: Appx Files ${{ matrix.arch }}
path: hexchat-${{ matrix.arch }}.appx