-
Notifications
You must be signed in to change notification settings - Fork 18
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
Cleanup Watcom compilation, setup, as recommended by @jmalak, and remove old sarcastic remarks that have outlived their usefulness. #40
Comments
That's a mess from 10+ years ago that probably needs to be cleaned up, yes. All I cared about when I started DOSLIB in 2008 was making it work, not necessarily cleanly. The makefile system eventually came around through hacks in it's current form by 2012. |
At the time I had Open Watcom 1.8, then Open Watcom 1.9. |
My primary development environment with Open Watcom is on 64-bit Linux. It was on 32-bit Linux when I started, but I eventually made the jump to 64-bit and stuck with it. |
I understand, but this cross-compilation stuff is-not changed by OW any way. |
generaly you should have configured OW for host system and next switch compilation anvironment for target system appropriate way |
linux-ow.sh was made so that DOSLIB can compile without having to first source the Watcom environment script. owenv.sh was made for @sparky4 so that "Project 16" can use DOSLIB as well. |
I am involving into it due to @sparky4 has repeated problems with building by OW |
@jmalak Sounds good to me. I'll remove the sarcastic remarks on my end. |
no problem with notes, we need to fix source of problem |
I think that linux-ow.sh can be removed at all |
linux-ow is not just the OW environment, it also contains the build target list handling. There are also functions in there to locate a 32-bit GCC 7.1.0 for an experimental project to compile Windows 3.1 .386 / .VXD drivers using GCC + wlink. |
However if you mean the script code to set WATCOM variables should be removed, I'm fine with that. |
then name is little confusing |
There are also stubs in linux-ow.sh from long ago when I allowed the compile steps to ALSO regenerate BAT files that could be used to compile DOSLIB from a pure MS-DOS system directly. Those were hard to maintain so they were removed. |
How about removing the WATCOM env setting code and renaming linux-ow.sh to doslib-build-util.sh? |
OK |
Before you do, I will push a commit to linux-ow.sh that corrects a typo I just noticed regarding targeting Windows 1.x, Windows 2.x, and Windows 3.x EDIT: OK DONE |
names for file is your business I am not much familiare with purpose of each file Anyway I will merge on top of main branch and send it as pull request to you to be able review and comment it |
One question about shell definition in the scripts. |
@jmalak Agreed. |
I have a problem with testing on my 64-bit system I get error "i386-pc-linux-gnu-ld: not found" |
@jmalak You're probably trying to compile the Windows .386/.VXD code in windrv/dosboxpi/win9x. You can skip that directory, the VXD is useless at this development stage. |
It's a fun experiment that combines GCC 7.1.0 with the Open Watcom linker to make a Linear Executable that Windows 3.1 will load as a .386 driver in 386 enhanced mode. Hopefully it will be able to make .VXD files for Windows 95 as well someday. |
I am trying to build all to be sure that I didn't break anything. |
@jmalak A quick and dirty way is to chmod -x (remove the executable bit from) the make.sh file in the directory you don't want to compile. buildall.sh will not run it if it's not executable. |
thanks |
Thank you for your patience. DOSLIB grew as a bunch of fun experimental hacking and it shows. |
I suppose you want compatibility with OW1.9 |
Not really. Open Watcom 2.0 has been very good with this code so far. |
Do you use GCC with wmake? |
there is only missing some libraries, but source code is compiled OK |
No. I think some *.mak files will invoke GNU make for some libraries in ext/ though. |
Do the compiled EXE and COM files for DOS run? Most of my development is done either within DOSBox-X or on real hardware over the serial port using the REMSRV.EXE DOS TSR in tool/remctl/serial. When those are not possible, it's either a USB floppy drive to test it from a disk, or copying the file onto the CF card I boot the old hardware with. |
There is also code to compile for NEC PC-98 MS-DOS in hw/necpc98, and each library that supports it has d9886[t,s,m,l,c,h] builds. The code has been tested on real hardware as well. |
I am changing parts related to Linux build |
I submit pullrequest with appropriate change for Linux build. |
I found up a few problems with some mixed targets as hw/dosboxid. |
DOSBOXID is meant to target MS-DOS and Windows. The makefile will generate an additional versions that are more appropriate for use within Windows 3.1 drivers and VXDs. So it should be -bt=dos for MS-DOS and -bt=windows for Windows as appropriate. The Windows builds also target 32-bit, and the DOS builds will also target PC-98. |
I see, the _vxd builds do not provide a -bt value. |
It was my mistake, now I have it working but what value are valid for VXD (TARGET_VXD=1) |
That's a good question. VXDs do not run as Windows applications, they run in a 32-bit kernel atop the Windows environment. I think DOSLIB should treat VXDs as TARGET_WINDOWS=1 and TARGET_VXD=1 |
Now it is build only for these defines |
I think it will require new target make file for VXD to include correct header files path and -bt target |
Windows 95 VXDs use the same linear executable format as Windows 3.1 386 files. |
I should really separate the Windows VXD code out so it doesn't fail the compile. It's very experimental and shouldn't be built by default. I don't expect everyone to have the same GCC 7.1.0 + OW setup I do. |
Is code compiled with Open Watcom supposed to refer to dsound.h as <direct/dsound.h> or should it be accessible as <dsound.h>? DOSAMP isn't compiling right now. Open Watcom has nt/directx/dsound.h |
It is fixed now by adding directx SDK to the include path list |
I will fix -bt=... option, it must be always defined for proper value.
|
After fixing targets zlib code diagnose problem with multiple OS_CODE macro definition which are not same. |
I think now main changes are finished. Following review/correction should be done.
|
I suppose yes, now build of doslib shoud not depend on OW configured target (environment variables), only required executable on the PATH and defined WATCOM environment variable. |
One note about |
@jmalak That makes sense, -zw means "generate code for Microsoft Windows". Could the compiler print a warning if -zw is used for anything other than Windows? |
I have a few ideas how you can improve/simplify OW wmake make files (compatible with both versions OW1.9 and OW2.0) and be more cross-platform independent (independent on host where run)
|
OW has many options and it is not possible to restrict user to use some combination because it can be wanted, in your case you can still use -zw with non-Windows platforms but you must be aware of its behaviour |
I think -zw option is historical for 16-bit Windows |
there is also -zws option (all -z{w|W}* options are related only to 16-bit Windows or OW 32-bit extender) and should not be used with other targets |
Note to VXD target definition file mak/vxd31.mak. |
Please what is purpose of linux-ow.sh and owenv.sh script files?
I don't understand why it has complete messy INCLUDE environment variable.
Why OW tools setup is for 32-bit Windows if you compile for different targets?
It results in following wrong message in shell scripts
"# why is this even necessary? why does dumbshit Watcom insist on including the WINNT headers for Windows 3.1 builds?"
It is caused by previous wrong OW setup.
in other files
<os>_INCLUDE
variables are used and wrongly combined withINCLUDE
variable.Such OW setup can cause some hiden mistakes etc.
You should handle cross-compilation one way only, don't mix multiple mechanism.
<os>_INCLUDE
andINCLUDE
variablesBy example OW build system is fully cross-compilation system and it uses "full handling by command line -I options" for flexibility.
It requires to ignore all
..INCLUDE
variables, it is ensured by using -x compiler option.I thing for your project you could use aproach with
<os>_INCLUDE
andINCLUDE
variablesThe text was updated successfully, but these errors were encountered: