15 Commits

Author SHA1 Message Date
a0e7a2561f move msys 2025-07-07 15:28:52 -05:00
8d92cc123d Update README.md 2025-07-07 14:37:44 -05:00
7af4a1fbcf Update README.md 2025-07-07 14:37:33 -05:00
2796923983 Update README.md 2025-07-07 14:36:04 -05:00
6fda0c9ab8 lets see 2025-07-07 14:18:57 -05:00
5e9ebe10cd i686 2025-07-07 14:07:37 -05:00
f216019046 what the fuck is this naming scheme 2025-07-07 13:57:44 -05:00
9663669c0c i486 2025-07-07 13:48:01 -05:00
af35f41c3f add the atomic lib (2) 2025-07-07 13:30:44 -05:00
0a4561b1cd add the atomic lib 2025-07-07 13:15:47 -05:00
fe8e7c72e0 no atomics 2025-07-07 13:00:58 -05:00
f630ed1e53 compatibility fixes 2025-07-07 12:53:00 -05:00
7c8a7dd54c Compile OpenSSL in-action (#134) 2025-07-07 11:27:04 -05:00
befe149285 let's actually check that 2025-07-06 16:31:21 -05:00
5eb3ed11f8 use CWSDSTUB to avoid needing CWSDPMI (#131) 2025-07-06 15:08:03 -05:00
4 changed files with 160 additions and 27 deletions

View File

@ -42,7 +42,7 @@ jobs:
- name: Setup build environment - name: Setup build environment
run: | run: |
sudo apt -y update 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 - name: Download and Setup DJGPP Toolchain
run: | run: |
@ -50,6 +50,7 @@ jobs:
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
tree . -S
git clone https://github.com/UMSKT/Watt-32.git watt32 git clone https://github.com/UMSKT/Watt-32.git watt32
cd watt32/util cd watt32/util
make clean && make linux make clean && make linux
@ -84,12 +85,18 @@ jobs:
path: | path: |
${{ github.workspace }}/djgpp ${{ github.workspace }}/djgpp
key: openssl-3.1.2-${{ hashFiles('**/CMakeLists.txt') }} 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 - name: Build
run: | run: |
source ${{ github.workspace }}/djgpp/setenv source ${{ github.workspace }}/djgpp/setenv
pushd build 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 make
- name: Setup DOSBox test environment - name: Setup DOSBox test environment
@ -97,7 +104,7 @@ jobs:
mkdir -p dosbox_test mkdir -p dosbox_test
cp build/umskt.exe dosbox_test/ cp build/umskt.exe dosbox_test/
# Download DPMI server directly # 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 # Create test batch file
cat > dosbox_test/test.bat << EOL cat > dosbox_test/test.bat << EOL
@echo off @echo off
@ -119,6 +126,7 @@ jobs:
[sdl] [sdl]
nosound=true nosound=true
[cpu] [cpu]
cputype=386
core=dynamic core=dynamic
cycles=max cycles=max
[autoexec] [autoexec]

View File

@ -30,6 +30,7 @@ jobs:
build: build:
runs-on: windows-latest runs-on: windows-latest
strategy: strategy:
fail-fast: false
matrix: matrix:
arch: [x64, x86, arm64] arch: [x64, x86, arm64]
steps: steps:
@ -59,28 +60,112 @@ jobs:
- name: Checkout Source Tree - name: Checkout Source Tree
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Download OpenSSL-TDM release asset - name: Cache OpenSSL 3.1.2 (32-bit)
if: matrix.arch != 'arm64' 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: matrix.arch != 'arm64' && 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: matrix.arch != 'arm64' && 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 shell: pwsh
run: | run: |
if ('${{ matrix.arch }}' -eq 'x64') { echo "OPENSSL_ROOT=$env:GITHUB_WORKSPACE/OpenSSL-TDM-32" | Out-File -FilePath $env:GITHUB_ENV -Append
$url = "https://github.com/UMSKT/winactiontest/releases/download/openssl/OpenSSL-TDM-64.zip" echo "OPENSSL_LIBDIR=lib" | Out-File -FilePath $env:GITHUB_ENV -Append
$dest = "$env:GITHUB_WORKSPACE/OpenSSL-TDM-64" echo "CMAKE_FLAGS=-m32" | Out-File -FilePath $env:GITHUB_ENV -Append
$libdir = "lib64"
$cmake_flags = "-m64" - name: Set OpenSSL Environment (64-bit)
$openssl_root = "$env:GITHUB_WORKSPACE/OpenSSL-TDM-64" if: matrix.arch == 'x64'
} else { shell: pwsh
$url = "https://github.com/UMSKT/winactiontest/releases/download/openssl/OpenSSL-TDM-32.zip" run: |
$dest = "$env:GITHUB_WORKSPACE/OpenSSL-TDM-32" echo "OPENSSL_ROOT=$env:GITHUB_WORKSPACE/OpenSSL-TDM-64" | Out-File -FilePath $env:GITHUB_ENV -Append
$libdir = "lib32" echo "OPENSSL_LIBDIR=lib" | Out-File -FilePath $env:GITHUB_ENV -Append
$cmake_flags = "-m32" echo "CMAKE_FLAGS=-m64" | Out-File -FilePath $env:GITHUB_ENV -Append
$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 - name: Setup vcpkg for ARM64
if: matrix.arch == 'arm64' if: matrix.arch == 'arm64'

View File

@ -35,9 +35,11 @@ if (WIN32 AND NOT MSVC)
# Match resource architecture with target architecture # Match resource architecture with target architecture
if(CMAKE_SIZEOF_VOID_P EQUAL 4) 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() 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() endif()
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> -O coff -I${CMAKE_CURRENT_SOURCE_DIR}/src/windows <DEFINES> -i <SOURCE> -o <OBJECT>") 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 # 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_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") 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() ENDIF()
##if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") ##if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
@ -273,4 +276,21 @@ ELSE()
GET_FILENAME_COMPONENT(OPENSSL_CRYPTO_LIBRARY_FILENAME ${OPENSSL_CRYPTO_LIBRARY} NAME) 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) CONFIGURE_FILE(${OPENSSL_CRYPTO_LIBRARY} "${CMAKE_CURRENT_BINARY_DIR}/${OPENSSL_CRYPTO_LIBRARY_FILENAME}" COPYONLY)
ENDIF() 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() ENDIF()

View File

@ -44,6 +44,26 @@ 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
* i686 processor or better
* Windows XP or later
*Note: Processors barely meeting the minimum system requirements for XP may not work. Use the MS-DOS version via NTVDM in that case.*
#### 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** ### **Usage**
#### 1. Download the latest version of UMSKT #### 1. Download the latest version of UMSKT