mirror of
https://github.com/Neo-Desktop/WindowsXPKg
synced 2025-03-22 23:58:55 +02:00
setup automated win32+dos builds
This commit is contained in:
parent
8fb2cf5fdd
commit
fe940d2061
20
.github/workflows/dos-djgpp.yml
vendored
20
.github/workflows/dos-djgpp.yml
vendored
@ -20,7 +20,8 @@
|
|||||||
|
|
||||||
name: C/C++ CI (DOS DJGPP)
|
name: C/C++ CI (DOS DJGPP)
|
||||||
|
|
||||||
on: workflow_dispatch
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CMAKE_C_COMPILER: ${{ github.workspace }}/djgpp/bin/i586-pc-msdosdjgpp-gcc
|
CMAKE_C_COMPILER: ${{ github.workspace }}/djgpp/bin/i586-pc-msdosdjgpp-gcc
|
||||||
@ -43,6 +44,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Download and Setup DJGPP Toolchain
|
- name: Download and Setup DJGPP Toolchain
|
||||||
run: |
|
run: |
|
||||||
|
pushd ${{ github.workspace }}
|
||||||
wget https://github.com/andrewwutw/build-djgpp/releases/download/v3.4/djgpp-linux64-gcc1220.tar.bz2
|
wget https://github.com/andrewwutw/build-djgpp/releases/download/v3.4/djgpp-linux64-gcc1220.tar.bz2
|
||||||
tar xjf djgpp-linux64-gcc1220.tar.bz2
|
tar xjf djgpp-linux64-gcc1220.tar.bz2
|
||||||
cd ${{ github.workspace }}/djgpp
|
cd ${{ github.workspace }}/djgpp
|
||||||
@ -50,16 +52,15 @@ jobs:
|
|||||||
cd watt32/util
|
cd watt32/util
|
||||||
make clean && make linux
|
make clean && make linux
|
||||||
cd ../src
|
cd ../src
|
||||||
source ${{ github.workspace }}/djgpp/setenv.sh
|
source ${{ github.workspace }}/djgpp/setenv
|
||||||
./configur.sh djgpp
|
./configur.sh djgpp
|
||||||
make -f djgpp.mak
|
make -f djgpp.mak
|
||||||
ln -s ${{ github.workspace }}/djgpp/watt32/lib/libwatt.a ${{ github.workspace }}/djgpp/lib
|
ln -s ${{ github.workspace }}/djgpp/watt32/lib/libwatt.a ${{ github.workspace }}/djgpp/lib
|
||||||
|
|
||||||
- name: Checkout and Cross Compile OpenSSL 3.1
|
- name: Checkout and Cross Compile OpenSSL 3.1.2
|
||||||
run: |
|
run: |
|
||||||
git clone https://github.com/UMSKT/openssl.git openssl
|
git clone https://github.com/UMSKT/openssl.git openssl
|
||||||
pushd openssl
|
pushd openssl
|
||||||
git checkout openssl-3.1.1
|
|
||||||
source ${{ github.workspace }}/djgpp/setenv
|
source ${{ github.workspace }}/djgpp/setenv
|
||||||
./Configure no-threads -DOPENSSL_DEV_NO_ATOMICS --prefix=${{ github.workspace }}/djgpp DJGPP
|
./Configure no-threads -DOPENSSL_DEV_NO_ATOMICS --prefix=${{ github.workspace }}/djgpp DJGPP
|
||||||
make && make install
|
make && make install
|
||||||
@ -71,19 +72,18 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
uses: threeal/cmake-action@v1.2.0
|
uses: threeal/cmake-action@v1.2.0
|
||||||
with:
|
with:
|
||||||
c-compiler: ${{ github.workspace }}/djgpp/i586-pc-msdosdjgpp/bin/gcc
|
c-compiler: ${CMAKE_C_COMPILER}
|
||||||
cxx-compiler: ${{ github.workspace }}/djgpp/i586-pc-msdosdjgpp/bin/g++
|
cxx-compiler: ${CMAKE_CXX_COMPILER}
|
||||||
options: OPENSSL_ROOT_DIR:string=${{ github.workspace }}/djgpp DJGPP_WATT32=ON
|
options: DJGPP_WATT32=ON CMAKE_FIND_ROOT_PATH=${CMAKE_FIND_ROOT_PATH} CMAKE_FIND_ROOT_PATH_MODE_PROGRAM=${CMAKE_FIND_ROOT_PATH_MODE_PROGRAM} CMAKE_FIND_ROOT_PATH_MODE_LIBRARY=${CMAKE_FIND_ROOT_PATH_MODE_LIBRARY} CMAKE_FIND_ROOT_PATH_MODE_INCLUDE=${CMAKE_FIND_ROOT_PATH_MODE_INCLUDE} CMAKE_FIND_ROOT_PATH_MODE_PACKAGE=${CMAKE_FIND_ROOT_PATH_MODE_PACKAGE} WATT_ROOT=${WATT_ROOT}
|
||||||
run-build: true
|
run-build: true
|
||||||
|
|
||||||
- name: Move executable to upload directory
|
- name: Move executable to upload directory
|
||||||
run: |
|
run: |
|
||||||
mkdir build/actions_upload
|
mkdir build/actions_upload
|
||||||
tar -czf WindowsXPKg_linux_x86_64.tar.gz -C build xpkey keys.json
|
mv build/umskt.exe build/actions_upload/
|
||||||
mv WindowsXPKg_linux_x86_64.tgz build/actions_upload/
|
|
||||||
|
|
||||||
- name: Upload build artifact
|
- name: Upload build artifact
|
||||||
uses: actions/upload-artifact@v3.1.2
|
uses: actions/upload-artifact@v3.1.2
|
||||||
with:
|
with:
|
||||||
name: Build
|
name: UMSKT-DOS
|
||||||
path: build/actions_upload
|
path: build/actions_upload
|
||||||
|
95
.github/workflows/windows.yml
vendored
95
.github/workflows/windows.yml
vendored
@ -27,19 +27,30 @@ on:
|
|||||||
branches: [ "master" ]
|
branches: [ "master" ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-32bit:
|
build:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- arch: Win32
|
||||||
|
OpenSSL-File: Win32OpenSSL-3_1_1.exe
|
||||||
|
msbuild-arch: Win32
|
||||||
|
cmake-args: -D MSVC_MSDOS_STUB=umskt.exe
|
||||||
|
- arch: Win64
|
||||||
|
OpenSSL-File: Win64OpenSSL-3_1_1.exe
|
||||||
|
msbuild-arch: x64
|
||||||
|
cmake-args: ""
|
||||||
steps:
|
steps:
|
||||||
- name: Install v141_xp
|
- name: Install Windows XP Support for Visual Studio
|
||||||
uses: thepwrtank18/install-vs-components@v1.0.0
|
uses: thepwrtank18/install-vs-components@v1.0.0
|
||||||
with:
|
with:
|
||||||
components: Microsoft.VisualStudio.Component.WinXP
|
components: Microsoft.VisualStudio.Component.WinXP
|
||||||
|
|
||||||
- name: Download And Install 32-bit OpenSSL 3.1.1
|
- name: Download And Install ${{ matrix.OpenSSL-File }}
|
||||||
run: |
|
run: |
|
||||||
$installDir = "$Env:ProgramFiles\OpenSSL"
|
$installDir = "$Env:ProgramFiles\OpenSSL"
|
||||||
$installerURL = "https://slproweb.com/download/Win32OpenSSL-3_1_1.exe"
|
$installerURL = "https://slproweb.com/download/${{ matrix.OpenSSL-File }}"
|
||||||
$installerName = "Win32OpenSSL-3_1_1.exe"
|
$installerName = "${{ matrix.OpenSSL-File }}"
|
||||||
$installerPath = Join-Path -Path "${env:Temp}" -ChildPath "$installerName"
|
$installerPath = Join-Path -Path "${env:Temp}" -ChildPath "$installerName"
|
||||||
|
|
||||||
(New-Object System.Net.WebClient).DownloadFile($installerURL, $installerPath)
|
(New-Object System.Net.WebClient).DownloadFile($installerURL, $installerPath)
|
||||||
@ -54,63 +65,49 @@ jobs:
|
|||||||
- name: Setup MSBuild
|
- name: Setup MSBuild
|
||||||
uses: microsoft/setup-msbuild@v1
|
uses: microsoft/setup-msbuild@v1
|
||||||
|
|
||||||
|
- name: Run DJGPP Compilation
|
||||||
|
if: ${{ matrix.arch }} == "Win32"
|
||||||
|
uses: ./.github/workflows/dos-djgpp.yaml
|
||||||
|
|
||||||
|
- name: Download UMSKT-DJGPP compiled artifact
|
||||||
|
if: ${{ matrix.arch }} == "Win32"
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: UMSKT-DOS
|
||||||
|
|
||||||
- name: Configure UMSKT
|
- name: Configure UMSKT
|
||||||
uses: threeal/cmake-action@v1.2.0
|
uses: threeal/cmake-action@v1.2.0
|
||||||
with:
|
with:
|
||||||
working-directory: build
|
working-directory: build
|
||||||
generator: "Visual Studio 17 2022"
|
generator: "Visual Studio 17 2022"
|
||||||
options: CMAKE_SYSTEM_VERSION="5.1.2600"
|
options: CMAKE_SYSTEM_VERSION="5.1.2600"
|
||||||
args: -A "Win32" -T v141_xp
|
args: -A ${{ matrix.msbuild-arch }} -T v141_xp ${{ matrix.cmake-args }}
|
||||||
|
|
||||||
- name: Build UMSKT
|
- name: Build UMSKT
|
||||||
working-directory: build
|
working-directory: build
|
||||||
run: msbuild ALL_BUILD.vcxproj /P:Configuration=Release /P:XPDeprecationWarning=false
|
run: msbuild ALL_BUILD.vcxproj /P:Configuration=Release /P:XPDeprecationWarning=false
|
||||||
|
|
||||||
- name: Upload build artifact
|
- name: Move executable to upload directory
|
||||||
uses: actions/upload-artifact@v3.1.2
|
|
||||||
with:
|
|
||||||
name: UMSKT-Win32
|
|
||||||
path: build/Release
|
|
||||||
|
|
||||||
build-64bit:
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- name: Install v141_xp
|
|
||||||
uses: thepwrtank18/install-vs-components@v1.0.0
|
|
||||||
with:
|
|
||||||
components: Microsoft.VisualStudio.Component.WinXP
|
|
||||||
|
|
||||||
- name: Download And Install 64-bit OpenSSL 3.1.1
|
|
||||||
run: |
|
run: |
|
||||||
$installDir = "$Env:ProgramFiles\OpenSSL"
|
mkdir build/actions_upload
|
||||||
$installerURL = "https://slproweb.com/download/Win64OpenSSL-3_1_1.exe"
|
Move-Item build/umskt.exe build/actions_upload
|
||||||
$installerName = "Win64OpenSSL-3_1_1.exe"
|
|
||||||
$installerPath = Join-Path -Path "${env:Temp}" -ChildPath "$installerName"
|
|
||||||
|
|
||||||
(New-Object System.Net.WebClient).DownloadFile($installerURL, $installerPath)
|
|
||||||
|
|
||||||
Remove-Item "$installDir" -Force -Recurse
|
|
||||||
$installerArgs = '/silent', '/sp-', '/suppressmsgboxes', "/DIR=`"$installDir`""
|
|
||||||
Start-Process -FilePath $installerPath -ArgumentList $installerArgs -Wait -PassThru
|
|
||||||
|
|
||||||
- name: Checkout Source Tree
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Setup MSBuild
|
|
||||||
uses: microsoft/setup-msbuild@v1
|
|
||||||
|
|
||||||
- name: Configure UMSKT
|
|
||||||
uses: threeal/cmake-action@v1.2.0
|
|
||||||
with:
|
|
||||||
generator: "Visual Studio 17 2022"
|
|
||||||
args: -A "x64" -T v141_xp
|
|
||||||
|
|
||||||
- name: Build UMSKT
|
|
||||||
working-directory: build
|
|
||||||
run: msbuild ALL_BUILD.vcxproj /P:Configuration=Release /P:XPDeprecationWarning=false
|
|
||||||
|
|
||||||
- name: Upload build artifact
|
- name: Upload build artifact
|
||||||
uses: actions/upload-artifact@v3.1.2
|
uses: actions/upload-artifact@v3.1.2
|
||||||
with:
|
with:
|
||||||
name: UMSKT-Win64
|
name: UMSKT-${{ matrix.arch }}
|
||||||
path: build/Release
|
path: build/actions_upload
|
||||||
|
|
||||||
|
- name: Move Win32+DOS executable to upload directory
|
||||||
|
if: ${{ matrix.arch }} == "Win32"
|
||||||
|
run: |
|
||||||
|
Remove-Item "build/actions_upload" -Force -Recurse
|
||||||
|
mkdir build/actions_upload
|
||||||
|
Move-Item build/umskt_win32_dos.exe build/actions_upload/umskt.exe
|
||||||
|
|
||||||
|
- name: Upload build artifact
|
||||||
|
if: ${{ matrix.arch }} == "Win32"
|
||||||
|
uses: actions/upload-artifact@v3.1.2
|
||||||
|
with:
|
||||||
|
name: UMSKT-Win32+DOS
|
||||||
|
path: build/actions_upload
|
||||||
|
@ -141,7 +141,7 @@ SET(LIBUMSKT_SRC src/libumskt/libumskt.cpp src/libumskt/pidgen3/BINK1998.cpp src
|
|||||||
IF (EMSCRIPTEN)
|
IF (EMSCRIPTEN)
|
||||||
ADD_EXECUTABLE(umskt ${LIBUMSKT_SRC})
|
ADD_EXECUTABLE(umskt ${LIBUMSKT_SRC})
|
||||||
TARGET_INCLUDE_DIRECTORIES(umskt PUBLIC ${OPENSSL_INCLUDE_DIR})
|
TARGET_INCLUDE_DIRECTORIES(umskt PUBLIC ${OPENSSL_INCLUDE_DIR})
|
||||||
TARGET_LINK_LIBRARIES(umskt -static OpenSSL::Crypto cryptopp::cryptopp fmt)
|
TARGET_LINK_LIBRARIES(umskt -static OpenSSL::Crypto fmt)
|
||||||
SET(CMAKE_EXECUTABLE_SUFFIX ".html")
|
SET(CMAKE_EXECUTABLE_SUFFIX ".html")
|
||||||
|
|
||||||
SET_TARGET_PROPERTIES(umskt PROPERTIES COMPILE_FLAGS "-Os -sEXPORTED_RUNTIME_METHODS=ccall,cwrap")
|
SET_TARGET_PROPERTIES(umskt PROPERTIES COMPILE_FLAGS "-Os -sEXPORTED_RUNTIME_METHODS=ccall,cwrap")
|
||||||
@ -165,8 +165,14 @@ ELSE()
|
|||||||
TARGET_INCLUDE_DIRECTORIES(umskt PUBLIC ${OPENSSL_INCLUDE_DIR})
|
TARGET_INCLUDE_DIRECTORIES(umskt PUBLIC ${OPENSSL_INCLUDE_DIR})
|
||||||
TARGET_LINK_LIBRARIES(umskt _umskt OpenSSL::Crypto fmt nlohmann_json::nlohmann_json umskt::rc ${UMSKT_LINK_LIBS})
|
TARGET_LINK_LIBRARIES(umskt _umskt OpenSSL::Crypto fmt nlohmann_json::nlohmann_json umskt::rc ${UMSKT_LINK_LIBS})
|
||||||
TARGET_LINK_DIRECTORIES(umskt PUBLIC ${UMSKT_LINK_DIRS})
|
TARGET_LINK_DIRECTORIES(umskt PUBLIC ${UMSKT_LINK_DIRS})
|
||||||
|
|
||||||
|
### UMSKT with specified DOS Stub compilation
|
||||||
IF(MSVC AND MSVC_MSDOS_STUB)
|
IF(MSVC AND MSVC_MSDOS_STUB)
|
||||||
SET_PROPERTY(TARGET umskt APPEND PROPERTY LINK_FLAGS /STUB:${MSVC_MSDOS_STUB})
|
ADD_EXECUTABLE(umskt_win32_dos src/main.cpp src/cli.cpp ${UMSKT_EXE_WINDOWS_EXTRA})
|
||||||
|
TARGET_INCLUDE_DIRECTORIES(umskt_win32_dos PUBLIC ${OPENSSL_INCLUDE_DIR})
|
||||||
|
TARGET_LINK_LIBRARIES(umskt_win32_dos _umskt OpenSSL::Crypto fmt nlohmann_json::nlohmann_json umskt::rc ${UMSKT_LINK_LIBS})
|
||||||
|
TARGET_LINK_DIRECTORIES(umskt_win32_dos PUBLIC ${UMSKT_LINK_DIRS})
|
||||||
|
SET_PROPERTY(TARGET umskt_win32_dos APPEND PROPERTY LINK_FLAGS /STUB:${MSVC_MSDOS_STUB})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
### Copy Shared Libraries and dependency files
|
### Copy Shared Libraries and dependency files
|
||||||
|
Loading…
x
Reference in New Issue
Block a user