Skip to content

Commit

Permalink
add OpenWatcom setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalak committed Sep 22, 2024
1 parent 2cfcbbd commit 0a81afd
Show file tree
Hide file tree
Showing 37 changed files with 1,622 additions and 1,682 deletions.
128 changes: 27 additions & 101 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -966,28 +966,24 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Open Watcom setup
uses: open-watcom/setup-watcom@v0
with:
version: "1.9"
target: "nt"
# Cache OpenWatcom because it takes quite a while to download and
# decompress.
- name: Cache OpenWatcom and Dependencies
- name: Cache openzinc
uses: actions/cache@v4
id: cache-watcom-zinc
id: cache-openzinc
with:
path: |
${{github.workspace}}\watcom
key: w32-watcom-1.9+openzinc1
${{github.workspace}}\zinc
key: openzinc1

- name: Get OpenWatcom 1.9 and Dependencies
if: steps.cache-watcom-zinc.outputs.cache-hit != 'true'
- name: Get openzinc
if: steps.cache-openzinc.outputs.cache-hit != 'true'
run: |
if (Test-Path watcom) {
Remove-Item watcom -Force
}
mkdir watcom
cd watcom
wget https://github.com/open-watcom/open-watcom-1.9/releases/download/ow1.9/open-watcom-c-win32-1.9.exe -outfile open-watcom-c-win32-1.9.exe
7z x open-watcom-c-win32-1.9.exe
cd ..
mkdir zinc
cd zinc
wget ${{ env.OPENZINC }} -outfile OZ1.zip
Expand All @@ -997,17 +993,6 @@ jobs:

- name: Full Build
run: |
SET PATH=%WATCOM%\BINW;%PATH%
SET PATH=%WATCOM%\BINNT;%PATH%
SET INCLUDE=%WATCOM%\H\NT;%INCLUDE%
SET INCLUDE=%WATCOM%\H\NT;%INCLUDE%
SET INCLUDE=%INCLUDE%;C:\WATCOM\H\NT\DIRECTX
SET INCLUDE=%INCLUDE%;C:\WATCOM\H\NT\DDK
SET INCLUDE=%WATCOM%\H;%INCLUDE%
SET EDPATH=%WATCOM%\EDDAT
SET WHTMLHELP=%WATCOM%\BINNT\HELP
SET WIPFC=%WATCOM%\WIPFC
call setenv.bat
REM Enable Dynamic SSH just to be sure those bits are buildable
Expand Down Expand Up @@ -1042,20 +1027,8 @@ jobs:
working-directory: ${{ github.workspace }}
env:
ROOT: ${{ github.workspace }}
WATCOM: ${{ github.workspace }}\watcom
- name: Dialer Build
run: |
SET PATH=%WATCOM%\BINW;%PATH%
SET PATH=%WATCOM%\BINNT;%PATH%
SET INCLUDE=%WATCOM%\H\NT;%INCLUDE%
SET INCLUDE=%WATCOM%\H\NT;%INCLUDE%
SET INCLUDE=%INCLUDE%;C:\WATCOM\H\NT\DIRECTX
SET INCLUDE=%INCLUDE%;C:\WATCOM\H\NT\DDK
SET INCLUDE=%WATCOM%\H;%INCLUDE%
SET EDPATH=%WATCOM%\EDDAT
SET WHTMLHELP=%WATCOM%\BINNT\HELP
SET WIPFC=%WATCOM%\WIPFC
call setenv.bat
cd kermit\dialer
call mk.bat
Expand All @@ -1064,7 +1037,6 @@ jobs:
working-directory: ${{ github.workspace }}
env:
ROOT: ${{ github.workspace }}
WATCOM: ${{ github.workspace }}\watcom
- name: Prepare Artifacts
shell: cmd
working-directory: ${{ github.workspace }}\kermit\k95
Expand Down Expand Up @@ -1107,40 +1079,16 @@ jobs:

# Cache OpenWatcom because it takes quite a while to download and
# decompress.
- name: Cache OpenWatcom
uses: actions/cache@v4
id: cache-watcom
- name: Open Watcom setup
uses: open-watcom/setup-watcom@v0
with:
path: |
${{github.workspace}}\watcom
key: nt-watcom-1.9
- name: Get OpenWatcom 1.9
if: steps.cache-watcom.outputs.cache-hit != 'true'
run: |
if (Test-Path watcom) {
Remove-Item watcom -Force
}
mkdir watcom
cd watcom
wget https://github.com/open-watcom/open-watcom-1.9/releases/download/ow1.9/open-watcom-c-win32-1.9.exe -outfile open-watcom-c-win32-1.9.exe
7z x open-watcom-c-win32-1.9.exe
shell: powershell
version: "1.9"
target: "nt"
- name: Full Build
run: |
SET PATH=%WATCOM%\BINW;%PATH%
SET PATH=%WATCOM%\BINNT;%PATH%
SET INCLUDE=%WATCOM%\H\NT;%INCLUDE%
SET INCLUDE=%WATCOM%\H\NT;%INCLUDE%
SET INCLUDE=%INCLUDE%;C:\WATCOM\H\NT\DIRECTX
SET INCLUDE=%INCLUDE%;C:\WATCOM\H\NT\DDK
SET INCLUDE=%WATCOM%\H;%INCLUDE%
SET EDPATH=%WATCOM%\EDDAT
SET WHTMLHELP=%WATCOM%\BINNT\HELP
SET WIPFC=%WATCOM%\WIPFC
REM Build for Windows NT 3.50 (and, someday, NT 3.1)
set CKT_NT31=yes
call ..\setenv.bat
cd p95
call mknt.bat
Expand Down Expand Up @@ -1168,7 +1116,6 @@ jobs:
working-directory: ${{ github.workspace }}\kermit
env:
ROOT: ${{ github.workspace }}
WATCOM: ${{ github.workspace }}\watcom

- name: Fetch Docs
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -1203,28 +1150,23 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Open Watcom setup
uses: open-watcom/setup-watcom@v0
with:
version: "1.9"
target: "os2"
# Cache OpenWatcom because it takes quite a while to download and
# decompress.
- name: Cache OpenWatcom
- name: Cache openzinc
uses: actions/cache@v4
id: cache-watcom-zinc
id: cache-openzinc
with:
path: |
${{github.workspace}}\watcom
${{github.workspace}}\zinc
key: os2-watcom-1.9+openzinc1+v2
- name: Get OpenWatcom 1.9
if: steps.cache-watcom-zinc.outputs.cache-hit != 'true'
key: openzinc1
- name: Get openzinc
if: steps.cache-openzinc.outputs.cache-hit != 'true'
run: |
if (Test-Path watcom) {
Remove-Item watcom -Force
}
mkdir watcom
cd watcom
wget https://github.com/open-watcom/open-watcom-1.9/releases/download/ow1.9/open-watcom-c-win32-1.9.exe -outfile open-watcom-c-win32-1.9.exe
7z x open-watcom-c-win32-1.9.exe
cd ..
mkdir zinc
cd zinc
wget ${{ env.OPENZINC }} -outfile OZ1.zip
Expand All @@ -1234,14 +1176,8 @@ jobs:
shell: powershell
- name: Kermit/2 Build
run: |
SET PATH=%WATCOM%\BINW;%PATH%
SET PATH=%WATCOM%\BINNT;%PATH%
SET INCLUDE=%WATCOM%\H;%INCLUDE%
SET EDPATH=%WATCOM%\EDDAT
SET WHTMLHELP=%WATCOM%\BINNT\HELP
SET WIPFC=%WATCOM%\WIPFC
call setenv.bat
cd kermit\k95
call mkos2.bat
Expand All @@ -1262,31 +1198,21 @@ jobs:
working-directory: ${{ github.workspace }}
env:
ROOT: ${{ github.workspace }}
WATCOM: ${{ github.workspace }}\watcom
- name: Dialer Build
run: |
SET PATH=%WATCOM%\BINW;%PATH%
SET PATH=%WATCOM%\BINNT;%PATH%
SET INCLUDE=%WATCOM%\H;%INCLUDE%
SET EDPATH=%WATCOM%\EDDAT
SET WHTMLHELP=%WATCOM%\BINNT\HELP
SET WIPFC=%WATCOM%\WIPFC
call setenv.bat
cd kermit\dialer
call mkos2.bat
shell: cmd
working-directory: ${{ github.workspace }}
env:
ROOT: ${{ github.workspace }}
WATCOM: ${{ github.workspace }}\watcom
- name: Make Dialer Distribution
run: mkdist-os2.bat
shell: cmd
working-directory: ${{ github.workspace }}\kermit\dialer
env:
ROOT: ${{ github.workspace }}
WATCOM: ${{ github.workspace }}\watcom
- name: Prepare Artifact
shell: cmd
working-directory: ${{ github.workspace }}\kermit\k95
Expand Down
21 changes: 10 additions & 11 deletions kermit/dialer/k95dial.mak
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ CL = wcl386
# ----- Windows NT compiler options -----------------------------------------
# for debug: add /Zi to CPP_OPTS
# add /DEBUG:MAPPED,FULL /DEBUGTYPE:CV to LINK_OPTS
WNT_CPP=cl
WNT_LINK=link
WNT_LIBRARIAN=lib
WNT_CPP=cl /nologo
WNT_LINK=link /nologo
WNT_LIBRARIAN=lib /nologo

WNT_CPP_OPTS= -c -W3 -MT -DWIN32 -DOS2 -DNT -DCKODIALER -I..\k95 -noBool
!if $(MSC_VER) < 100
Expand Down Expand Up @@ -87,10 +87,10 @@ WNT_CON_LIBS=libc.lib kernel32.lib w32_zil.lib ndirect.lib nservice.lib nstorage

# ----- OS/2 compiler options -----------------------------------------------
!if "$(CMP)" == "OWCL386"
OS2_CPP=wpp386
OS2_LINK=wlink
OS2_LIBRARIAN=wlib
OS2_RC=wrc
OS2_CPP=wpp386 -zq
OS2_LINK=wlink op quiet
OS2_LIBRARIAN=wlib -zq
OS2_RC=wrc -zq
!else
OS2_CPP=icc
OS2_LINK=ilink
Expand Down Expand Up @@ -122,19 +122,18 @@ OS2_RC=rc
# -O ? Optimize generated code
# -Oi25 -Oe=<num> Set the threshold for auto-inlining to <value> intermediate code instructions
# -Gm ? -bm Link with multithread runtime libraries. Default: /Gm-
# -bt=os2v2 Compile for target OS
# -bt=os2 Compile for target OS
#
# Link Flags - ICC wlink
# /BASE:0x10000
# /PM:PM ? -bw ?
# /NOI
# /NOE
# -l=os2v2_pm Link for OS/2 v2 Presentation Manager
# -x Make name case-sensitive

#
# -c -xs
OS2_CPP_OPTS=-D__OS2__ -DOS2 -DCKODIALER -zp=1 -bm -Fh -bt=os2
OS2_CPP_OPTS=-DOS2 -DCKODIALER -zp=1 -bm -Fh -bt=os2
OS2_LINK_OPTS=SYSTEM os2v2_pm OP ST=96000
OS2_LIB_OPTS=
OS2_RC_OPTS=
Expand Down Expand Up @@ -294,7 +293,7 @@ os2: k2dial.exe

#$(CC) $(CC2) $(LINKFLAGS) $(DEBUG) $(OBJS) $(DEF) $(OUT)$@ $(LIBS) $(LDFLAGS)
# wrc -q -bt=os2 ckoker.res $@
# LINKFLAGS="-l=os2v2 -x" \
# LINKFLAGS="-l=os2v2" \
# os2.def was previously included below but does not exist in the K95 2.1.3
# build tree. I can only assume either this file was supplied by the IBM
Expand Down
6 changes: 3 additions & 3 deletions kermit/dialer/registry/registry.mak
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
!message
!message

WNT_CPP=cl
WNT_LINK=link
WNT_LIBRARIAN=lib
WNT_CPP=cl /nologo
WNT_LINK=link /nologo
WNT_LIBRARIAN=lib /nologo

WNT_CPP_OPTS= -c -MT -W3 -DWIN32 -DOS2 -DNT -I.\.. -J -noBool

Expand Down
6 changes: 3 additions & 3 deletions kermit/dialer/setup/setup.mak
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
# ----- Windows NT compiler options -----------------------------------------
# for debug: add /Zi to CPP_OPTS
# add /DEBUG:MAPPED,FULL /DEBUGTYPE:CV to LINK_OPTS
WNT_CPP=cl
WNT_LINK=link
WNT_LIBRARIAN=lib
WNT_CPP=cl /nologo
WNT_LINK=link /nologo
WNT_LIBRARIAN=lib /nologo

#WNT_CPP_OPTS= -c -W3 -MT -DWIN32 -DOS2 -DNT -I.\.. -noBool
#WNT_LINK_OPTS=-align:0x1000 -subsystem:windows -entry:WinMainCRTStartup /MAP /NODEFAULTLIB:libc
Expand Down
Loading

0 comments on commit 0a81afd

Please sign in to comment.