mirror of
https://github.com/Neo-Desktop/WindowsXPKg
synced 2025-07-09 22:00:23 +03:00
Compare commits
18 Commits
v0.3.1-bet
...
v0.3.2-bet
Author | SHA1 | Date | |
---|---|---|---|
ed19cf2148 | |||
4de84b6439 | |||
827c26bc45 | |||
a0e7a2561f | |||
8d92cc123d | |||
7af4a1fbcf | |||
2796923983 | |||
6fda0c9ab8 | |||
5e9ebe10cd | |||
f216019046 | |||
9663669c0c | |||
af35f41c3f | |||
0a4561b1cd | |||
fe8e7c72e0 | |||
f630ed1e53 | |||
7c8a7dd54c | |||
befe149285 | |||
5eb3ed11f8 |
16
.github/workflows/dos-djgpp.yml
vendored
16
.github/workflows/dos-djgpp.yml
vendored
@ -42,7 +42,7 @@ jobs:
|
||||
- name: Setup build environment
|
||||
run: |
|
||||
sudo apt -y update
|
||||
sudo apt -y install build-essential cmake wget 7zip git flex libfl-dev nasm libslang2-dev pkg-config libslang2-modules gcc-multilib dosbox
|
||||
sudo apt -y install build-essential cmake wget 7zip git flex libfl-dev nasm libslang2-dev pkg-config libslang2-modules gcc-multilib dosbox tree
|
||||
|
||||
- name: Download and Setup DJGPP Toolchain
|
||||
run: |
|
||||
@ -50,6 +50,7 @@ jobs:
|
||||
wget https://github.com/andrewwutw/build-djgpp/releases/download/v3.4/djgpp-linux64-gcc1220.tar.bz2
|
||||
tar xjf djgpp-linux64-gcc1220.tar.bz2
|
||||
cd ${{ github.workspace }}/djgpp
|
||||
tree . -S
|
||||
git clone https://github.com/UMSKT/Watt-32.git watt32
|
||||
cd watt32/util
|
||||
make clean && make linux
|
||||
@ -84,12 +85,18 @@ jobs:
|
||||
path: |
|
||||
${{ github.workspace }}/djgpp
|
||||
key: openssl-3.1.2-${{ hashFiles('**/CMakeLists.txt') }}
|
||||
|
||||
|
||||
- name: Download stub
|
||||
run: |
|
||||
wget https://web.archive.org/web/20250308092209/https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/util/system/cwsdpmi/csdpmi7b.zip -O CSDPMI7B.ZIP
|
||||
mkdir /home/runner/dpmibin
|
||||
7z e CSDPMI7B.ZIP bin/CWSDSTUB.EXE -o/home/runner/dpmibin
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
source ${{ github.workspace }}/djgpp/setenv
|
||||
pushd build
|
||||
cmake ../ -D DJGPP_WATT32=${WATT_ROOT}/lib/libwatt.a -D CMAKE_FIND_ROOT_PATH=${CMAKE_FIND_ROOT_PATH}
|
||||
cmake ../ -D DJGPP_WATT32=${WATT_ROOT}/lib/libwatt.a -D CMAKE_FIND_ROOT_PATH=${CMAKE_FIND_ROOT_PATH} -D CWSDSTUB_LOCATION=/home/runner/dpmibin/CWSDSTUB.EXE -D DJGPP_BIN_LOCATION=/home/runner/work/UMSKT/UMSKT/djgpp/i586-pc-msdosdjgpp/bin
|
||||
make
|
||||
|
||||
- name: Setup DOSBox test environment
|
||||
@ -97,7 +104,7 @@ jobs:
|
||||
mkdir -p dosbox_test
|
||||
cp build/umskt.exe dosbox_test/
|
||||
# Download DPMI server directly
|
||||
wget https://github.com/UMSKT/winactiontest/raw/refs/heads/main/CWSDPMI.EXE -O dosbox_test/CWSDPMI.EXE
|
||||
# wget https://github.com/UMSKT/winactiontest/raw/refs/heads/main/CWSDPMI.EXE -O dosbox_test/CWSDPMI.EXE
|
||||
# Create test batch file
|
||||
cat > dosbox_test/test.bat << EOL
|
||||
@echo off
|
||||
@ -119,6 +126,7 @@ jobs:
|
||||
[sdl]
|
||||
nosound=true
|
||||
[cpu]
|
||||
cputype=386
|
||||
core=dynamic
|
||||
cycles=max
|
||||
[autoexec]
|
||||
|
182
.github/workflows/windows-arm.yml
vendored
Normal file
182
.github/workflows/windows-arm.yml
vendored
Normal file
@ -0,0 +1,182 @@
|
||||
# This file is a part of the UMSKT Project
|
||||
#
|
||||
# Copyleft (C) 2019-2023 UMSKT Contributors (et.al.)
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# @FileCreated by TheTank20 on 07/08/2025
|
||||
# @Maintainer Neo
|
||||
|
||||
name: C/C++ CI (Windows ARM)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "*" ]
|
||||
paths-ignore: [ '**.md', 'doc/**', '.idea/**']
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- arch: arm32
|
||||
arch_compilename: amd64_arm
|
||||
vcpkg_arch: arm-windows-static
|
||||
cmake_arch: ARM
|
||||
sdk_version: '10.0.17763.0'
|
||||
- arch: arm64
|
||||
arch_compilename: arm64
|
||||
vcpkg_arch: arm64-windows-static
|
||||
cmake_arch: ARM64
|
||||
sdk_version: '10.0.17763.0'
|
||||
steps:
|
||||
- name: Setup MSVC for ${{ matrix.arch }}
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: ${{ matrix.arch_compilename }}
|
||||
sdk: ${{ matrix.sdk_version }}
|
||||
|
||||
- name: Checkout Source Tree
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup vcpkg
|
||||
if: matrix.arch == 'arm64'
|
||||
shell: pwsh
|
||||
run: |
|
||||
git clone https://github.com/Microsoft/vcpkg.git
|
||||
cd vcpkg
|
||||
.\bootstrap-vcpkg.bat
|
||||
echo "VCPKG_ROOT=$env:GITHUB_WORKSPACE/vcpkg" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
echo "VCPKG_DEFAULT_BINARY_CACHE=$env:GITHUB_WORKSPACE/vcpkg/bincache" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
echo "VCPKG_BINARY_SOURCES=clear;default,readwrite" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
|
||||
- name: Cache vcpkg packages
|
||||
if: matrix.arch == 'arm64'
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
${{ github.workspace }}/vcpkg/bincache
|
||||
${{ github.workspace }}/vcpkg/installed
|
||||
${{ github.workspace }}/vcpkg/packages
|
||||
key: vcpkg-${{ matrix.arch }}-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('**/*.cmake') }}
|
||||
restore-keys: |
|
||||
vcpkg-${{ matrix.arch }}-${{ hashFiles('**/CMakeLists.txt') }}-
|
||||
vcpkg-${{ matrix.arch }}-
|
||||
|
||||
- name: Cache OpenSSL Binaries
|
||||
if: matrix.arch == 'arm32'
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
${{ github.workspace }}/openssl-install
|
||||
key: openssl-${{ matrix.arch }}-${{ hashFiles('**/CMakeLists.txt') }}
|
||||
restore-keys: |
|
||||
|
||||
- name: Install OpenSSL
|
||||
shell: pwsh
|
||||
run: |
|
||||
if ("${{ matrix.arch }}" -eq "arm32") {
|
||||
# For ARM32, build OpenSSL from source
|
||||
$opensslVersion = "1.1.1w"
|
||||
$opensslDir = "openssl-src"
|
||||
|
||||
# Download OpenSSL source
|
||||
Invoke-WebRequest -Uri "https://www.openssl.org/source/openssl-$opensslVersion.tar.gz" -OutFile "openssl.tar.gz"
|
||||
tar -xf openssl.tar.gz
|
||||
Rename-Item -Path "openssl-$opensslVersion" -NewName $opensslDir
|
||||
cd $opensslDir
|
||||
|
||||
# Install Perl if needed
|
||||
choco install strawberryperl -y
|
||||
|
||||
# Configure and build OpenSSL for ARM32
|
||||
$env:PATH = "C:\Strawberry\perl\bin;$env:PATH"
|
||||
|
||||
# First set up Visual Studio environment
|
||||
$vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath
|
||||
$vcvarsall = Join-Path $vsPath "VC\Auxiliary\Build\vcvarsall.bat"
|
||||
|
||||
# Configure OpenSSL
|
||||
perl Configure VC-WIN32-ARM no-shared no-asm no-engine --prefix="$env:GITHUB_WORKSPACE/openssl-install"
|
||||
|
||||
# Build using MSVC ARM32 tools
|
||||
cmd /c "call `"$vcvarsall`" amd64_arm && nmake && nmake install_sw"
|
||||
cd ..
|
||||
} else {
|
||||
# For ARM64, use vcpkg as before
|
||||
New-Item -ItemType Directory -Force -Path $env:VCPKG_DEFAULT_BINARY_CACHE
|
||||
& "$env:VCPKG_ROOT\vcpkg.exe" install openssl:${{ matrix.vcpkg_arch }} --clean-after-build
|
||||
echo "OPENSSL_ROOT_DIR=$env:VCPKG_ROOT/installed/${{ matrix.vcpkg_arch }}" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
}
|
||||
|
||||
- name: Save OpenSSL Binaries
|
||||
if: matrix.arch == 'arm32'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: |
|
||||
${{ github.workspace }}/openssl-install
|
||||
key: openssl-${{ matrix.arch }}-${{ hashFiles('**/CMakeLists.txt') }}
|
||||
|
||||
- name: Set OpenSSL Environment
|
||||
if: matrix.arch == 'arm32'
|
||||
shell: pwsh
|
||||
run: |
|
||||
echo "OPENSSL_ROOT=$env:GITHUB_WORKSPACE/openssl-install" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
echo "OPENSSL_LIBDIR=lib" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
|
||||
- name: Configure UMSKT
|
||||
shell: pwsh
|
||||
run: |
|
||||
cmake -G "Visual Studio 17 2022" `
|
||||
-A ${{ matrix.cmake_arch }} `
|
||||
-DWINDOWS_ARM=ON `
|
||||
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" `
|
||||
-DVCPKG_TARGET_TRIPLET=${{ matrix.vcpkg_arch }} `
|
||||
.
|
||||
|
||||
- name: Build UMSKT
|
||||
shell: pwsh
|
||||
run: |
|
||||
cmake --build . --config Release
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: UMSKT-WinNT-${{ matrix.arch }}
|
||||
path: Release/umskt.exe
|
||||
|
||||
test-arm64:
|
||||
needs: build
|
||||
if: success()
|
||||
runs-on: windows-11-arm
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [arm64]
|
||||
steps:
|
||||
- name: Download ARM64 artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: UMSKT-WinNT-${{ matrix.arch }}
|
||||
path: .
|
||||
|
||||
- name: Run tests
|
||||
shell: pwsh
|
||||
run: |
|
||||
Write-Host Test 1 - generating key
|
||||
.\umskt.exe -b 2C -c 365 -s 069420 -v
|
||||
Write-Host Test 2 - generatng confid
|
||||
.\umskt.exe -i 253286028742154311079061239762245184619981623171292574
|
199
.github/workflows/windows-x86-x64.yml
vendored
Normal file
199
.github/workflows/windows-x86-x64.yml
vendored
Normal file
@ -0,0 +1,199 @@
|
||||
# This file is a part of the UMSKT Project
|
||||
#
|
||||
# Copyleft (C) 2019-2023 UMSKT Contributors (et.al.)
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# @FileCreated by TheTank20 on 07/08/2025
|
||||
# @Maintainer Neo
|
||||
|
||||
name: C/C++ CI (Windows x86+64)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "*" ]
|
||||
paths-ignore: [ '**.md', 'doc/**', '.idea/**']
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch: [x64, x86]
|
||||
steps:
|
||||
- name: Setup TDM-GCC
|
||||
run: |
|
||||
Write-Host Downloading TDM-GCC v10.3.0...
|
||||
Invoke-WebRequest -Uri 'https://github.com/jmeubank/tdm-gcc/releases/download/v10.3.0-tdm64-2/tdm64-gcc-10.3.0-2.exe' -OutFile 'C:\Windows\temp\TDM-GCC-64.exe'
|
||||
Write-Host Creating directory...
|
||||
New-Item -ItemType Directory -Path 'C:\TDM-GCC-64'
|
||||
Write-Host Copying files [Set 1/3]...
|
||||
Start-Process '7z' -ArgumentList 'e C:\Windows\temp\TDM-GCC-64.exe -oC:\TDM-GCC-64 -y' -Wait
|
||||
Write-Host Copying files [Set 2/3]...
|
||||
Start-Process '7z' -ArgumentList 'e C:\TDM-GCC-64\*.tar.xz -oC:\TDM-GCC-64 -y' -Wait
|
||||
Write-Host Copying files [Set 3/3]...
|
||||
Start-Process '7z' -ArgumentList 'x C:\TDM-GCC-64\*.tar -oC:\TDM-GCC-64 -y' -Wait
|
||||
Write-Host Adding environment variables...
|
||||
$env:PATH = 'C:\TDM-GCC-64\bin;' + $env:PATH
|
||||
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine)
|
||||
|
||||
- name: Checkout Source Tree
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cache OpenSSL 3.1.2 (32-bit)
|
||||
uses: actions/cache/restore@v4
|
||||
if: matrix.arch == 'x86'
|
||||
id: cache-openssl-32
|
||||
with:
|
||||
path: |
|
||||
${{ github.workspace }}/OpenSSL-TDM-32
|
||||
key: openssl-3.1.2-x86-${{ hashFiles('**/CMakeLists.txt') }}
|
||||
|
||||
- name: Cache OpenSSL 3.1.2 (64-bit)
|
||||
uses: actions/cache/restore@v4
|
||||
if: matrix.arch == 'x64'
|
||||
id: cache-openssl-64
|
||||
with:
|
||||
path: |
|
||||
${{ github.workspace }}/OpenSSL-TDM-64
|
||||
key: openssl-3.1.2-x64-${{ hashFiles('**/CMakeLists.txt') }}
|
||||
|
||||
- name: Setup MSYS2
|
||||
if: steps.cache-openssl-32.outputs.cache-hit != 'true' && steps.cache-openssl-64.outputs.cache-hit != 'true'
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.arch == 'x86' && 'MINGW32' || 'MINGW64' }}
|
||||
update: true
|
||||
install: >-
|
||||
mingw-w64-${{ matrix.arch == 'x86' && 'i686' || 'x86_64' }}-gcc
|
||||
mingw-w64-${{ matrix.arch == 'x86' && 'i686' || 'x86_64' }}-make
|
||||
mingw-w64-x86_64-perl
|
||||
perl
|
||||
git
|
||||
|
||||
- name: Checkout and Compile OpenSSL 3.1.2
|
||||
if: steps.cache-openssl-32.outputs.cache-hit != 'true' && steps.cache-openssl-64.outputs.cache-hit != 'true'
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
# Clone UMSKT's OpenSSL fork
|
||||
echo "Cloning UMSKT OpenSSL fork..."
|
||||
git clone https://github.com/UMSKT/openssl.git --depth 1 openssl-3.1.2
|
||||
|
||||
- name: Checkout and Compile OpenSSL 3.1.2 (32-bit)
|
||||
if: matrix.arch == 'x86' && steps.cache-openssl-32.outputs.cache-hit != 'true'
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
# Set up proper MSYS2 environment
|
||||
export MSYS=winsymlinks:nativestrict
|
||||
export MSYS2_PATH_TYPE=strict
|
||||
export LANG=en_US.UTF-8
|
||||
export PATH="/usr/bin:/mingw64/bin:$PATH"
|
||||
export PATH="/c/TDM-GCC-64/bin:$PATH"
|
||||
export MSYSTEM=MINGW32
|
||||
echo "Compiling 32-bit OpenSSL..."
|
||||
cd openssl-3.1.2
|
||||
/usr/bin/perl Configure mingw --prefix=$(cygpath -u "$GITHUB_WORKSPACE")/OpenSSL-TDM-32 --openssldir=$(cygpath -u "$GITHUB_WORKSPACE")/OpenSSL-TDM-32 no-tests no-sse2 no-asm no-threads -DOPENSSL_DEV_NO_ATOMICS -mno-mmx -mno-sse -mno-sse2 -march=i686 -mtune=generic
|
||||
mingw32-make -j
|
||||
mingw32-make install_sw
|
||||
cd ..
|
||||
|
||||
- name: Checkout and Compile OpenSSL 3.1.2 (64-bit)
|
||||
if: matrix.arch == 'x64' && steps.cache-openssl-64.outputs.cache-hit != 'true'
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
# Set up proper MSYS2 environment
|
||||
export MSYS=winsymlinks:nativestrict
|
||||
export MSYS2_PATH_TYPE=strict
|
||||
export LANG=en_US.UTF-8
|
||||
export PATH="/usr/bin:/mingw64/bin:$PATH"
|
||||
export PATH="/c/TDM-GCC-64/bin:$PATH"
|
||||
export MSYSTEM=MINGW64
|
||||
echo "Compiling 64-bit OpenSSL..."
|
||||
cd openssl-3.1.2
|
||||
/usr/bin/perl Configure mingw64 --prefix=$(cygpath -u "$GITHUB_WORKSPACE")/OpenSSL-TDM-64 --openssldir=$(cygpath -u "$GITHUB_WORKSPACE")/OpenSSL-TDM-64 no-tests no-asm -DOPENSSL_DEV_NO_ATOMICS -mno-mmx
|
||||
mingw32-make -j
|
||||
mingw32-make install_sw
|
||||
cd ..
|
||||
|
||||
- name: Save OpenSSL 3.1.2 (32-bit)
|
||||
if: matrix.arch == 'x86' && steps.cache-openssl-32.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: |
|
||||
${{ github.workspace }}/OpenSSL-TDM-32
|
||||
key: openssl-3.1.2-x86-${{ hashFiles('**/CMakeLists.txt') }}
|
||||
|
||||
- name: Save OpenSSL 3.1.2 (64-bit)
|
||||
if: matrix.arch == 'x64' && steps.cache-openssl-64.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: |
|
||||
${{ github.workspace }}/OpenSSL-TDM-64
|
||||
key: openssl-3.1.2-x64-${{ hashFiles('**/CMakeLists.txt') }}
|
||||
|
||||
- name: Set OpenSSL Environment (32-bit)
|
||||
if: matrix.arch == 'x86'
|
||||
shell: pwsh
|
||||
run: |
|
||||
echo "OPENSSL_ROOT=$env:GITHUB_WORKSPACE/OpenSSL-TDM-32" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
echo "OPENSSL_LIBDIR=lib" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
echo "CMAKE_FLAGS=-m32" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
|
||||
- name: Set OpenSSL Environment (64-bit)
|
||||
if: matrix.arch == 'x64'
|
||||
shell: pwsh
|
||||
run: |
|
||||
echo "OPENSSL_ROOT=$env:GITHUB_WORKSPACE/OpenSSL-TDM-64" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
echo "OPENSSL_LIBDIR=lib" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
echo "CMAKE_FLAGS=-m64" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
|
||||
- name: Configure UMSKT
|
||||
shell: pwsh
|
||||
run: |
|
||||
$env:PATH = 'C:\TDM-GCC-64\bin;' + $env:PATH
|
||||
$OPENSSL_ROOT = "$env:OPENSSL_ROOT"
|
||||
$OPENSSL_LIB = "$OPENSSL_ROOT/$env:OPENSSL_LIBDIR"
|
||||
$OPENSSL_INC = "$OPENSSL_ROOT/include"
|
||||
cmake -G "MinGW Makefiles" `
|
||||
-DCMAKE_C_COMPILER="gcc" `
|
||||
-DCMAKE_CXX_COMPILER="g++" `
|
||||
-DOPENSSL_ROOT_DIR="$OPENSSL_ROOT" `
|
||||
-DOPENSSL_INCLUDE_DIR="$OPENSSL_INC" `
|
||||
-DOPENSSL_CRYPTO_LIBRARY="$OPENSSL_LIB/libcrypto.a" `
|
||||
-DOPENSSL_SSL_LIBRARY="$OPENSSL_LIB/libssl.a" `
|
||||
-DCMAKE_C_FLAGS="$env:CMAKE_FLAGS" `
|
||||
-DCMAKE_CXX_FLAGS="$env:CMAKE_FLAGS" `
|
||||
.
|
||||
|
||||
- name: Build UMSKT
|
||||
shell: pwsh
|
||||
run: |
|
||||
$env:PATH = 'C:\TDM-GCC-64\bin;' + $env:PATH
|
||||
mingw32-make
|
||||
|
||||
- name: Run tests
|
||||
shell: pwsh
|
||||
run: |
|
||||
Write-Host Test 1 - generating key
|
||||
.\umskt.exe -b 2C -c 365 -s 069420 -v
|
||||
Write-Host Test 2 - generatng confid
|
||||
.\umskt.exe -i 253286028742154311079061239762245184619981623171292574
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: UMSKT-WinNT-${{ matrix.arch }}
|
||||
path: umskt.exe
|
191
.github/workflows/windows.yml
vendored
191
.github/workflows/windows.yml
vendored
@ -1,191 +0,0 @@
|
||||
# This file is a part of the UMSKT Project
|
||||
#
|
||||
# Copyleft (C) 2019-2023 UMSKT Contributors (et.al.)
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# @FileCreated by TheTank20 on 06/13/2023
|
||||
# @Maintainer Neo
|
||||
|
||||
name: C/C++ CI (Windows)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "*" ]
|
||||
paths-ignore: [ '**.md', 'doc/**', '.idea/**']
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [x64, x86, arm64]
|
||||
steps:
|
||||
- name: Setup TDM-GCC
|
||||
if: matrix.arch != 'arm64'
|
||||
run: |
|
||||
Write-Host Downloading TDM-GCC v10.3.0...
|
||||
Invoke-WebRequest -Uri 'https://github.com/jmeubank/tdm-gcc/releases/download/v10.3.0-tdm64-2/tdm64-gcc-10.3.0-2.exe' -OutFile 'C:\Windows\temp\TDM-GCC-64.exe'
|
||||
Write-Host Creating directory...
|
||||
New-Item -ItemType Directory -Path 'C:\TDM-GCC-64'
|
||||
Write-Host Copying files [Set 1/3]...
|
||||
Start-Process '7z' -ArgumentList 'e C:\Windows\temp\TDM-GCC-64.exe -oC:\TDM-GCC-64 -y' -Wait
|
||||
Write-Host Copying files [Set 2/3]...
|
||||
Start-Process '7z' -ArgumentList 'e C:\TDM-GCC-64\*.tar.xz -oC:\TDM-GCC-64 -y' -Wait
|
||||
Write-Host Copying files [Set 3/3]...
|
||||
Start-Process '7z' -ArgumentList 'x C:\TDM-GCC-64\*.tar -oC:\TDM-GCC-64 -y' -Wait
|
||||
Write-Host Adding environment variables...
|
||||
$env:PATH = 'C:\TDM-GCC-64\bin;' + $env:PATH
|
||||
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine)
|
||||
|
||||
- name: Setup MSVC for ARM64
|
||||
if: matrix.arch == 'arm64'
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: arm64
|
||||
|
||||
- name: Checkout Source Tree
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download OpenSSL-TDM release asset
|
||||
if: matrix.arch != 'arm64'
|
||||
shell: pwsh
|
||||
run: |
|
||||
if ('${{ matrix.arch }}' -eq 'x64') {
|
||||
$url = "https://github.com/UMSKT/winactiontest/releases/download/openssl/OpenSSL-TDM-64.zip"
|
||||
$dest = "$env:GITHUB_WORKSPACE/OpenSSL-TDM-64"
|
||||
$libdir = "lib64"
|
||||
$cmake_flags = "-m64"
|
||||
$openssl_root = "$env:GITHUB_WORKSPACE/OpenSSL-TDM-64"
|
||||
} else {
|
||||
$url = "https://github.com/UMSKT/winactiontest/releases/download/openssl/OpenSSL-TDM-32.zip"
|
||||
$dest = "$env:GITHUB_WORKSPACE/OpenSSL-TDM-32"
|
||||
$libdir = "lib32"
|
||||
$cmake_flags = "-m32"
|
||||
$openssl_root = "$env:GITHUB_WORKSPACE/OpenSSL-TDM-32"
|
||||
}
|
||||
Invoke-WebRequest -Uri $url -OutFile "OpenSSL-TDM.zip"
|
||||
Expand-Archive -Path "OpenSSL-TDM.zip" -DestinationPath $env:GITHUB_WORKSPACE
|
||||
echo "OPENSSL_ROOT=$openssl_root" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
echo "OPENSSL_LIBDIR=$libdir" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
echo "CMAKE_FLAGS=$cmake_flags" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
|
||||
- name: Setup vcpkg for ARM64
|
||||
if: matrix.arch == 'arm64'
|
||||
shell: pwsh
|
||||
run: |
|
||||
git clone https://github.com/Microsoft/vcpkg.git
|
||||
cd vcpkg
|
||||
.\bootstrap-vcpkg.bat
|
||||
echo "VCPKG_ROOT=$env:GITHUB_WORKSPACE/vcpkg" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
echo "VCPKG_DEFAULT_BINARY_CACHE=$env:GITHUB_WORKSPACE/vcpkg/bincache" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
echo "VCPKG_BINARY_SOURCES=clear;default,readwrite" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
|
||||
- name: Cache vcpkg packages
|
||||
if: matrix.arch == 'arm64'
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
${{ github.workspace }}/vcpkg/bincache
|
||||
${{ github.workspace }}/vcpkg/installed
|
||||
${{ github.workspace }}/vcpkg/packages
|
||||
key: vcpkg-arm64-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('**/*.cmake') }}
|
||||
restore-keys: |
|
||||
vcpkg-arm64-${{ hashFiles('**/CMakeLists.txt') }}-
|
||||
vcpkg-arm64-
|
||||
|
||||
- name: Install OpenSSL for ARM64
|
||||
if: matrix.arch == 'arm64'
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Force -Path $env:VCPKG_DEFAULT_BINARY_CACHE
|
||||
& "$env:VCPKG_ROOT\vcpkg.exe" install openssl:arm64-windows-static --clean-after-build
|
||||
|
||||
- name: Configure UMSKT (TDM-GCC ${{ matrix.arch }})
|
||||
if: matrix.arch != 'arm64'
|
||||
shell: pwsh
|
||||
run: |
|
||||
$env:PATH = 'C:\TDM-GCC-64\bin;' + $env:PATH
|
||||
$OPENSSL_ROOT = "$env:OPENSSL_ROOT"
|
||||
$OPENSSL_LIB = "$OPENSSL_ROOT/$env:OPENSSL_LIBDIR"
|
||||
$OPENSSL_INC = "$OPENSSL_ROOT/include"
|
||||
cmake -G "MinGW Makefiles" `
|
||||
-DCMAKE_C_COMPILER="gcc" `
|
||||
-DCMAKE_CXX_COMPILER="g++" `
|
||||
-DOPENSSL_ROOT_DIR="$OPENSSL_ROOT" `
|
||||
-DOPENSSL_INCLUDE_DIR="$OPENSSL_INC" `
|
||||
-DOPENSSL_CRYPTO_LIBRARY="$OPENSSL_LIB/libcrypto.a" `
|
||||
-DOPENSSL_SSL_LIBRARY="$OPENSSL_LIB/libssl.a" `
|
||||
-DCMAKE_C_FLAGS="$env:CMAKE_FLAGS" `
|
||||
-DCMAKE_CXX_FLAGS="$env:CMAKE_FLAGS" `
|
||||
.
|
||||
|
||||
- name: Configure UMSKT (MSVC ARM64)
|
||||
if: matrix.arch == 'arm64'
|
||||
shell: pwsh
|
||||
run: |
|
||||
cmake -G "Visual Studio 17 2022" `
|
||||
-A ARM64 `
|
||||
-DWINDOWS_ARM=ON `
|
||||
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" `
|
||||
-DVCPKG_TARGET_TRIPLET=arm64-windows-static `
|
||||
.
|
||||
|
||||
- name: Build UMSKT (TDM-GCC ${{ matrix.arch }})
|
||||
if: matrix.arch != 'arm64'
|
||||
shell: pwsh
|
||||
run: |
|
||||
$env:PATH = 'C:\TDM-GCC-64\bin;' + $env:PATH
|
||||
mingw32-make
|
||||
|
||||
- name: Build UMSKT (MSVC ARM64)
|
||||
if: matrix.arch == 'arm64'
|
||||
shell: pwsh
|
||||
run: |
|
||||
cmake --build . --config Release
|
||||
|
||||
- name: Run tests (x86/x64)
|
||||
if: matrix.arch != 'arm64'
|
||||
shell: pwsh
|
||||
run: |
|
||||
Write-Host Test 1 - generating key
|
||||
.\umskt.exe -b 2C -c 365 -s 069420 -v
|
||||
Write-Host Test 2 - generatng confid
|
||||
.\umskt.exe -i 253286028742154311079061239762245184619981623171292574
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: UMSKT-WinNT-${{ matrix.arch }}
|
||||
path: ${{ matrix.arch == 'arm64' && 'Release/umskt.exe' || 'umskt.exe' }}
|
||||
|
||||
test-arm64:
|
||||
needs: build
|
||||
if: success()
|
||||
runs-on: windows-11-arm
|
||||
steps:
|
||||
- name: Download ARM64 artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: UMSKT-WinNT-arm64
|
||||
path: .
|
||||
|
||||
- name: Run tests (ARM64)
|
||||
shell: pwsh
|
||||
run: |
|
||||
Write-Host Test 1 - generating key
|
||||
.\umskt.exe -b 2C -c 365 -s 069420 -v
|
||||
Write-Host Test 2 - generatng confid
|
||||
.\umskt.exe -i 253286028742154311079061239762245184619981623171292574
|
@ -35,9 +35,11 @@ if (WIN32 AND NOT MSVC)
|
||||
|
||||
# Match resource architecture with target architecture
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} -F pe-i386")
|
||||
set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} -F pe-i386 --target=pe-i386")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686 -mtune=generic -mno-sse -mno-sse2 -mno-mmx -mno-3dnow")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i686 -mtune=generic -mno-sse -mno-sse2 -mno-mmx -mno-3dnow")
|
||||
else()
|
||||
set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} -F pe-x86-64")
|
||||
set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} -F pe-x86-64 --target=pe-x86-64")
|
||||
endif()
|
||||
|
||||
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> -O coff -I${CMAKE_CURRENT_SOURCE_DIR}/src/windows <DEFINES> -i <SOURCE> -o <OBJECT>")
|
||||
@ -108,7 +110,8 @@ IF(DJGPP_WATT32)
|
||||
# Maximum compatibility flags for DOS/NTVDM
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i386 -mtune=i386 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow -mno-ssse3 -mno-sse3 -mno-sse4 -mno-sse4.1 -mno-sse4.2 -mno-avx -mno-avx2 -mno-fma -mno-fma4")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i386 -mtune=i386 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow -mno-ssse3 -mno-sse3 -mno-sse4 -mno-sse4.1 -mno-sse4.2 -mno-avx -mno-avx2 -mno-fma -mno-fma4")
|
||||
MESSAGE(STATUS "[UMSKT] Using i386 target for DOS DGJPP")
|
||||
|
||||
MESSAGE(STATUS "[UMSKT] Using i386 target for DOS DGJPP with stub: ${CWSDSTUB_LOCATION}")
|
||||
ENDIF()
|
||||
|
||||
##if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
@ -273,4 +276,21 @@ ELSE()
|
||||
GET_FILENAME_COMPONENT(OPENSSL_CRYPTO_LIBRARY_FILENAME ${OPENSSL_CRYPTO_LIBRARY} NAME)
|
||||
CONFIGURE_FILE(${OPENSSL_CRYPTO_LIBRARY} "${CMAKE_CURRENT_BINARY_DIR}/${OPENSSL_CRYPTO_LIBRARY_FILENAME}" COPYONLY)
|
||||
ENDIF()
|
||||
|
||||
IF (DJGPP_WATT32)
|
||||
message(STATUS "[UMSKT] Configuring DJGPP post-build commands")
|
||||
# Set .exe suffix for DJGPP builds
|
||||
set_target_properties(umskt PROPERTIES SUFFIX ".exe")
|
||||
add_custom_command(TARGET umskt POST_BUILD
|
||||
# Convert exe to coff, removing the default stub
|
||||
COMMAND ${DJGPP_BIN_LOCATION}/exe2coff $<TARGET_FILE:umskt>
|
||||
# Concatenate CWSDSTUB with the COFF file
|
||||
COMMAND ${CMAKE_COMMAND} -E cat ${CWSDSTUB_LOCATION} $<TARGET_FILE_DIR:umskt>/umskt > $<TARGET_FILE:umskt>
|
||||
# Clean up the COFF file
|
||||
COMMAND ${CMAKE_COMMAND} -E rm $<TARGET_FILE_DIR:umskt>/umskt
|
||||
)
|
||||
message(STATUS "[UMSKT] STUBIFY_LOCATION set to: ${STUBIFY_LOCATION}")
|
||||
message(STATUS "[UMSKT] CWSDSTUB_LOCATION set to: ${CWSDSTUB_LOCATION}")
|
||||
message(STATUS "[UMSKT] DJGPP_BIN_LOCATION set to: ${DJGPP_BIN_LOCATION}")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
40
README.md
40
README.md
@ -44,6 +44,33 @@ In light of the recent exponential interest in this project I've decided to put
|
||||
|
||||
------
|
||||
|
||||
### System Requirements
|
||||
#### MS-DOS
|
||||
* i386 processor or better
|
||||
* MS-DOS 6.22 or later
|
||||
* Any DOS-based version of Windows
|
||||
* Windows NT 4.0 or later (via NTVDM)
|
||||
#### Windows (x86/x64)
|
||||
* i686 processor or better
|
||||
* Windows XP or later
|
||||
|
||||
> [!WARNING]
|
||||
> Processors barely meeting the minimum system requirements for XP may not work. Use the MS-DOS version via NTVDM in that case.
|
||||
|
||||
#### Windows (ARM32/64)
|
||||
* Windows 11 21H2 or later
|
||||
|
||||
> [!NOTE]
|
||||
> This is just all we can test. Try to get it to run on Windows RT, make an issue if it doesn't run and we'll try to fix it.
|
||||
#### macOS
|
||||
* Apple Silicon or x86_64 processor
|
||||
* Latest version of macOS
|
||||
#### Linux
|
||||
* modern ARM, x86, or x86_64 processor
|
||||
* Latest version of your Linux distro
|
||||
|
||||
------
|
||||
|
||||
### **Usage**
|
||||
#### 1. Download the latest version of UMSKT
|
||||
|
||||
@ -54,15 +81,14 @@ In light of the recent exponential interest in this project I've decided to put
|
||||
* *(GitHub account \*not\* required)*
|
||||
* Download the latest release for your operating system and architecture from [the releases page](../../releases)
|
||||
|
||||
* **Note:** Before continuing, please ensure you have the `umskt` executable extracted and on UNIX-like systems, have execution permissions (`chmod +x umskt`).
|
||||
> [!IMPORTANT]
|
||||
> Before continuing, please ensure you have the `umskt` executable extracted and on UNIX-like systems, have execution permissions (`chmod +x umskt`).
|
||||
|
||||
#### 2. Install OpenSSL.
|
||||
For Windows, click [here](https://slproweb.com/products/Win32OpenSSL.html) and choose the right version. For other operating systems, consult your package manager.
|
||||
*Note: This only applies if the build you download has OpenSSL embedded (static library) or not. You can usually tell if the download size is measured in KB or MB. If it's MB, you don't need this.*
|
||||
#### 2. Run `umskt` to generate a key, or add `--help` or `-h` to see more options.
|
||||
> [!IMPORTANT]
|
||||
> On macOS, like all unsigned executables, you'll need to hold Ctrl while right clicking and selecting Open to actually open it.
|
||||
|
||||
#### 3. Run `umskt` to generate a key, or add `--help` or `-h` to see more options.
|
||||
*Note: on macOS, like all unsigned executables, you'll need to hold Ctrl while right clicking and selecting Open to actually open it.*
|
||||
#### 4. *(Activation step for `Retail` and `OEM` only)*
|
||||
#### 3. *(Activation step for `Retail` and `OEM` only)*
|
||||
* After installation, you will be prompted to activate Windows.
|
||||
|
||||
|
||||
|
@ -85,7 +85,7 @@ inline QWORD ConfirmationID::__umul128(QWORD a, QWORD b, QWORD* hi)
|
||||
*hi = __umulh(a, b);
|
||||
return a * b;
|
||||
}
|
||||
#elif defined(__i386__) || defined(_M_IX86) || defined(__arm__) || defined(__EMSCRIPTEN__)
|
||||
#elif defined(__i386__) || defined(_M_IX86) || defined(__arm__) || defined(__EMSCRIPTEN__) || defined(_M_ARM)
|
||||
inline QWORD ConfirmationID::__umul128(QWORD multiplier, QWORD multiplicand, QWORD *product_hi) {
|
||||
// multiplier = ab = a * 2^32 + b
|
||||
// multiplicand = cd = c * 2^32 + d
|
||||
|
Reference in New Issue
Block a user