14 Commits
Author SHA1 Message Date
Ryan C. Gordon aa8f842232 Work to make OS/2 API available to native apps, not just OS/2 binaries.
GLoaderState is moved to a new lib2ine library, which everything links
to and sets up what it can in a DLL constructor, so your app can just
link to doscalls or whatever and it'll have what it needs without
something like lx_loader doing a lot of heavy lifting before your
main() runs.
2018-02-27 23:18:51 -05:00
Ryan C. Gordon 6821de5ed7 Automate handling of support code for OS/2 binaries.
Now a perl script parses our headers and generates glue code, export tables,
etc. This automates all the macro nonsense and bridge code, and separates
out all the stuff you need for binary compat with OS/2, so you can remove it
all from the build if you want to just build native libraries that supply
the OS/2 API to native apps (like Winelib vs Wine).

This makes upkeep details less nasty, and easier to build native binaries
when implementing and improving APIs, so you can debug directly without
a lot of drama.
2018-02-27 03:25:21 -05:00
Ryan C. Gordon dcf40e843b Added header comments to everything. 2018-02-26 12:54:16 -05:00
Ryan C. Gordon b6c47ee91d Implemented enough of the Presentation Manager API to draw a blank window. 2018-01-15 02:33:27 -05:00
Ryan C. Gordon b72ccd6e5a Implemented just enough of tcpip32.dll and dependencies to run FINGER.EXE.
Finger (etc) also rely on MPTN\DLL\tnls32.dll, which I pulled out a copy of
OS/2 Warp 4.52, which loads and limps along enough to not be a problem.
Reimplementing that library is going to be a pain, so that's a job for another
day. Inexplicably, tnls32 references pmgpi.dll's GpiQueryTextBox(), so I put a
stub for that in, too, but we're nowhere near really implementing GPI yet.

This is enough to run "finger.exe icculus@icculus.org" and see my .plan file,
which I consider a victory. A few more TCP/IP command line tools aren't far
behind.
2017-12-21 17:53:05 -05:00
Ryan C. Gordon fabd3be3e6 Some minor build fixes. 2017-12-21 17:44:50 -05:00
Ryan C. Gordon 2481f59a28 Bunch of work on getting java.exe to start up. Not there yet.
Lots of fixes, improvements, and a few more APIs implemented.
2016-10-27 03:20:02 -04:00
Ryan C. Gordon 26a52988a6 16-bit support!
This gets us everything we need (I hope!) to support 16-bit code in LX
binaries and call into 16-bit OS/2 APIs. This is just enough to call
into VioGetMode() (which isn't otherwise implemented yet) as an example.

If this is ever used Winelib-style to provide an OS/2 API to native Linux
binaries, the 16-bit system APIs are 32-bit clean and C callable, as one
might expect them to be. All the tapdancing is to support existing LX
binaries in the loader and bridge between the 32-bit clean APIs and
existing 16-bit code that expects to call 16-bit APIs.

This was a staggering amount of effort, but yay!

Other fixes and improvements probably leaked into this commit, as a
lot of code got touched and a lot of research and debugging took place.
2016-10-27 01:44:26 -04:00
Ryan C. Gordon 68aa18c5a1 Consolidate and turn off all the debug logging for now. 2016-10-14 02:51:37 -04:00
Ryan C. Gordon 0349122bd7 Bunch More Work: more APIs, subprocesses, multithreading.
EMX's GCC compiler can now build hello.c when run from lx_loader!
2016-10-14 02:39:17 -04:00
Ryan C. Gordon 262b428f51 Implemented DosGetDateTime() and DosOpen(). 2016-10-06 15:56:20 -04:00
Ryan C. Gordon fae99dc048 Turn off some debug output. I'm sure I'll regret this soon. :) 2016-10-05 15:45:23 -04:00
Ryan C. Gordon f681be1b1f Reworked the native module loading code. 2016-10-02 18:18:31 -04:00
Ryan C. Gordon bee2afe62b Bunch More Work, mostly cleanup and organization.
Wanted to do this now before it gets out of hand.

Ideally, this can be used for a Winelib-like option eventually, too, where you
don't load OS/2 binaries at all but rather compile and link your OS/2-based
source code against this API reimplementation.
2016-09-30 15:58:48 -04:00