Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wingui port from @Bill-Gray, backported to the mainline #86

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions wingui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*.a
*.dll
*.err
*.exe
*.exp
*.lib
*.map
*.o
*.obj
*.res
26 changes: 26 additions & 0 deletions wingui/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
cmake_minimum_required(VERSION 3.11)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "MinSizeRel" CACHE STRING "Choose the type of build, options are: Debug, Release, or MinSizeRel." FORCE)
message(STATUS "No build type specified, defaulting to MinSizeRel.")
endif()

PROJECT(wingui VERSION "${PROJECT_VERSION}" LANGUAGES C)

INCLUDE(project_common)

demo_app(../demos version)
demo_app(../demos firework)
demo_app(../demos ozdemo)
demo_app(../demos ptest)
demo_app(../demos rain)
demo_app(../demos testcurs)
demo_app(../demos tuidemo)
demo_app(../demos worm)
demo_app(../demos xmas)

IF(WIN32)
SET_TARGET_PROPERTIES(${PROJECT_NAME}_newtest PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS")
ENDIF(WIN32)

SET(CPACK_COMPONENTS_ALL applications)
85 changes: 85 additions & 0 deletions wingui/Makefile.bcc
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Borland MAKE Makefile for PDCurses library - Win32 BC++ 4.0+
#
# Usage: make -f [path\]Makefile.bcc [DEBUG=] [WIDE=] [UTF8=] [target]
#
# where target can be any of:
# [all|demos|pdcurses.lib|testcurs.exe...]

O = obj

!ifndef PDCURSES_SRCDIR
PDCURSES_SRCDIR = ..
!endif

!include $(PDCURSES_SRCDIR)\version.mif
!include $(PDCURSES_SRCDIR)\libobjs.mif

osdir = $(PDCURSES_SRCDIR)\wingui

CC = bcc32 -q

!ifdef DEBUG
CFLAGS = -N -v -y -DPDCDEBUG
!else
CFLAGS = -O
!endif

!ifdef WIDE
WIDEOPT = -DPDC_WIDE
!endif

!ifdef UTF8
UTF8OPT = -DPDC_FORCE_UTF8
!endif

BUILD = $(CC) -I$(PDCURSES_SRCDIR) -c -Tpe -w32 $(CFLAGS) -w-par \
$(WIDEOPT) $(UTF8OPT)

LIBEXE = tlib /C /E /0 /a

LIBCURSES = pdcurses.lib

all: $(LIBCURSES) $(DEMOS)

clean:
-del *.obj
-del *.lib
-del *.tds
-del *.exe

$(LIBCURSES) : $(LIBOBJS) $(PDCOBJS)
-del $@
$(LIBEXE) $@ $(LIBOBJS) $(PDCOBJS)
-copy $(LIBCURSES) panel.lib

.autodepend

{$(srcdir)\}.c.obj:
$(BUILD) $<

{$(osdir)\}.c.obj:
$(BUILD) $<

{$(demodir)\}.c.obj:
$(BUILD) $<

.c.obj:
$(BUILD) $<

.obj.exe:
$(CC) -e$@ $** $(LIBCURSES)

tuidemo.exe: tuidemo.obj tui.obj $(LIBCURSES)
$(CC) -e$@ $**

tui.obj: $(demodir)\tui.c $(demodir)\tui.h $(PDCURSES_CURSES_H)
$(BUILD) -I$(demodir) $(demodir)\tui.c

tuidemo.obj: $(demodir)\tuidemo.c $(PDCURSES_CURSES_H)
$(BUILD) -I$(demodir) $(demodir)\tuidemo.c

PLATFORM1 = Borland C++ Win32
PLATFORM2 = Borland C/C++ 5.5 for Win32
ARCNAME = pdc$(VER)_bcc_w32

!include $(PDCURSES_SRCDIR)\makedist.mif
248 changes: 248 additions & 0 deletions wingui/Makefile.dmc
Original file line number Diff line number Diff line change
@@ -0,0 +1,248 @@
# Makefile for PDCurses library - WIN32 Digital Mars
#
# Usage: make -f Makefile.dmc [target]
#
# where target can be any of:
# [all|demos|pdcurses.lib|testcurs.exe...]

PDCURSES_SRCDIR = ..

PDCURSES_CURSES_H = $(PDCURSES_SRCDIR)\curses.h
PDCURSES_CURSPRIV_H = $(PDCURSES_SRCDIR)\curspriv.h
PDCURSES_HEADERS = $(PDCURSES_CURSES_H) $(PDCURSES_CURSPRIV_H)

PANEL_HEADER = $(PDCURSES_SRCDIR)\panel.h

srcdir = $(PDCURSES_SRCDIR)\pdcurses
osdir = $(PDCURSES_SRCDIR)\wingui
demodir = $(PDCURSES_SRCDIR)\demos

PDCURSES_WIN_H = $(osdir)\pdcwin.h

CC = dmc

CFLAGS = -c -o+space -Nc

# CPPFLAGS = -I$(PDCURSES_SRCDIR)
CPPFLAGS = -I$(PDCURSES_SRCDIR) -DPDC_WIDE

LINK = dmc
LIBEXE = lib

LIBCURSES = pdcurses.lib

BUILD = $(CC) $(CFLAGS) $(CPPFLAGS)

DEMOS = testcurs.exe ozdemo.exe xmas.exe tuidemo.exe \
firework.exe ptest.exe rain.exe worm.exe

all: $(LIBCURSES) $(DEMOS)

clean:
-del *.obj
-del *.lib
-del *.exe
-del *.map
-del advapi32.def

LIBOBJS = addch.obj addchstr.obj addstr.obj attr.obj beep.obj bkgd.obj \
border.obj clear.obj color.obj delch.obj deleteln.obj getch.obj \
getstr.obj getyx.obj inch.obj inchstr.obj initscr.obj inopts.obj \
insch.obj insstr.obj instr.obj kernel.obj keyname.obj mouse.obj move.obj \
outopts.obj overlay.obj pad.obj panel.obj printw.obj refresh.obj \
scanw.obj scr_dump.obj scroll.obj slk.obj termattr.obj \
touch.obj util.obj window.obj debug.obj

PDCOBJS = pdcclip.obj pdcdisp.obj pdcgetsc.obj pdckbd.obj pdcscrn.obj \
pdcsetsc.obj pdcutil.obj

DEMOOBJS = testcurs.obj ozdemo.obj xmas.obj tuidemo.obj tui.obj \
firework.obj ptest.obj rain.obj worm.obj

LIBS = advapi32.lib gdi32.lib user32.lib shell32.lib comdlg32.lib

$(LIBOBJS) $(PDCOBJS) : $(PDCURSES_HEADERS)
$(PDCOBJS) : $(PDCURSES_WIN_H)
panel.obj ptest.obj: $(PANEL_HEADER)

$(DEMOOBJS) : $(PDCURSES_CURSES_H)
$(DEMOS) : $(LIBCURSES)

$(LIBCURSES) : $(LIBOBJS) $(PDCOBJS)
$(LIBEXE) -c $@ $(LIBOBJS) $(PDCOBJS)
-copy $(LIBCURSES) panel.lib

SRCBUILD = $(BUILD) $(srcdir)\$*.c
OSBUILD = $(BUILD) $(osdir)\$*.c
DEMOBUILD = $(LINK) $(CPPFLAGS) -o+space $@ $**

addch.obj: $(srcdir)\addch.c
$(SRCBUILD)

addchstr.obj: $(srcdir)\addchstr.c
$(SRCBUILD)

addstr.obj: $(srcdir)\addstr.c
$(SRCBUILD)

attr.obj: $(srcdir)\attr.c
$(SRCBUILD)

beep.obj: $(srcdir)\beep.c
$(SRCBUILD)

bkgd.obj: $(srcdir)\bkgd.c
$(SRCBUILD)

border.obj: $(srcdir)\border.c
$(SRCBUILD)

clear.obj: $(srcdir)\clear.c
$(SRCBUILD)

color.obj: $(srcdir)\color.c
$(SRCBUILD)

delch.obj: $(srcdir)\delch.c
$(SRCBUILD)

deleteln.obj: $(srcdir)\deleteln.c
$(SRCBUILD)

getch.obj: $(srcdir)\getch.c
$(SRCBUILD)

getstr.obj: $(srcdir)\getstr.c
$(SRCBUILD)

getyx.obj: $(srcdir)\getyx.c
$(SRCBUILD)

inch.obj: $(srcdir)\inch.c
$(SRCBUILD)

inchstr.obj: $(srcdir)\inchstr.c
$(SRCBUILD)

initscr.obj: $(srcdir)\initscr.c
$(SRCBUILD)

inopts.obj: $(srcdir)\inopts.c
$(SRCBUILD)

insch.obj: $(srcdir)\insch.c
$(SRCBUILD)

insstr.obj: $(srcdir)\insstr.c
$(SRCBUILD)

instr.obj: $(srcdir)\instr.c
$(SRCBUILD)

kernel.obj: $(srcdir)\kernel.c
$(SRCBUILD)

keyname.obj: $(srcdir)\keyname.c
$(SRCBUILD)

mouse.obj: $(srcdir)\mouse.c
$(SRCBUILD)

move.obj: $(srcdir)\move.c
$(SRCBUILD)

outopts.obj: $(srcdir)\outopts.c
$(SRCBUILD)

overlay.obj: $(srcdir)\overlay.c
$(SRCBUILD)

pad.obj: $(srcdir)\pad.c
$(SRCBUILD)

panel.obj: $(srcdir)\panel.c
$(SRCBUILD)

printw.obj: $(srcdir)\printw.c
$(SRCBUILD)

refresh.obj: $(srcdir)\refresh.c
$(SRCBUILD)

scanw.obj: $(srcdir)\scanw.c
$(SRCBUILD)

scr_dump.obj: $(srcdir)\scr_dump.c
$(SRCBUILD)

scroll.obj: $(srcdir)\scroll.c
$(SRCBUILD)

slk.obj: $(srcdir)\slk.c
$(SRCBUILD)

termattr.obj: $(srcdir)\termattr.c
$(SRCBUILD)

touch.obj: $(srcdir)\touch.c
$(SRCBUILD)

util.obj: $(srcdir)\util.c
$(SRCBUILD)

window.obj: $(srcdir)\window.c
$(SRCBUILD)

debug.obj: $(srcdir)\debug.c
$(SRCBUILD)

pdcclip.obj: $(osdir)\pdcclip.c
$(OSBUILD)

pdcdisp.obj: $(osdir)\pdcdisp.c
$(OSBUILD)

pdcgetsc.obj: $(osdir)\pdcgetsc.c
$(OSBUILD)

pdckbd.obj: $(osdir)\pdckbd.c
$(OSBUILD)

pdcscrn.obj: $(osdir)\pdcscrn.c
$(OSBUILD)

pdcsetsc.obj: $(osdir)\pdcsetsc.c
$(OSBUILD)

pdcutil.obj: $(osdir)\pdcutil.c
$(OSBUILD)

firework.exe: $(demodir)\firework.c
$(DEMOBUILD) $(LIBS)

ozdemo.exe: $(demodir)\ozdemo.c
$(DEMOBUILD) $(LIBS)

ptest.exe: $(demodir)\ptest.c
$(DEMOBUILD) $(LIBS)

rain.exe: $(demodir)\rain.c
$(DEMOBUILD) $(LIBS)

testcurs.exe: $(demodir)\testcurs.c
$(DEMOBUILD) $(LIBS)

tuidemo.exe: tuidemo.obj tui.obj
$(DEMOBUILD) $(LIBS)

worm.exe: $(demodir)\worm.c
$(DEMOBUILD) $(LIBS)

xmas.exe: $(demodir)\xmas.c
$(DEMOBUILD) $(LIBS)

tui.obj: $(demodir)\tui.c $(demodir)\tui.h
$(BUILD) -I$(demodir) $(demodir)\$*.c

tuidemo.obj: $(demodir)\tuidemo.c
$(BUILD) -I$(demodir) $(demodir)\$*.c
Loading