Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
Page 1 of 2 1 2
#4503922 - 01/16/20 10:58 AM How to compile the source code  
Joined: Feb 2007
Posts: 410
GlynD Offline
Member
GlynD  Offline
Member

Joined: Feb 2007
Posts: 410
Shropshire UK
Hi there I am having problems with the above. Hoping some kind soul can help and offer me some pointers please. confused

I read the guide here and followed the steps below

  • Got access to the source code
  • Downloaded and installed OpenWatcom version 1.9 and re-booted my PC
  • Copied the contents from the "Lib" and "Include" directories from the DirectX SDK to the "lib386\nt" and "h\nt" directories respectively in the Watcom install
  • Unzipped the source files to the "D:\EECH dev\eech_source_code-master" folder
  • Made a directory "linklib" under the "/modules" folder and copied all the libs from "DXSDK\lib" (in the DirectX SDK files) to that new directory [See attached image 01]
  • Edited the paths in the batch files (in the "aphavoc" folder) to point to the "D:\EECH dev\eech_source_code-master" folder [See attached image 02]
  • Opened up Open Watcom IDE, created a new project and set the target settings to set Win32 and Windows Executable .exe [See attached image 03]
  • Saved the Watcom project to the "D:\EECH dev\eech_source_code-master\aphavoc" folder [See attached image 04]

OK so far so good. thumbsup

However when I try to compile the project I do not get a EECH.exe produced and just get a list of warnings and errors [See attached Watcom 1-9 IDE log.txt]

So looking at the Watcom IDE window [See attached image 05] should there be a list of files in that window? Should all of the .am .c .h and .imf files that are in the "D:\EECH dev\eech_source_code-master\aphavoc\source" folder be listed in there?

And if so is there a quick way of adding ALL the files from ALL of the folders in the "D:\EECH dev\eech_source_code-master\aphavoc\source" folder? The only way I could see was, right click in window > select "New Source..." > browse for files > add the contents of each folder one-by-one.

I have also downloaded an ISO file for VS2008 Express with SP1. Should I install that and use that to compile the code? (I do have Community versions of 2015 and 2017 installed but I guess those would modify the code and may not work.)

Many thanks
Glyn





Attached Files 01.png02.png03.png04.png05.png
Watcom 1-9 IDE log.txt (48 downloads)
Watcom log
#4503926 - 01/16/20 11:52 AM Re: How to compile the source code [Re: GlynD]  
Joined: Dec 2012
Posts: 1,377
thealx Offline
Member
thealx  Offline
Member

Joined: Dec 2012
Posts: 1,377
I think you are doing it wrong.
After project added - no need to select target files. Just save it, then select Actions - Run Batch and type "dmake".

Firebird did practice compiling by VS, but it has very strict rules so it may no longer work because of commits made since then.

OpenAL steps are no longer required, as I remember.


Attached Files Untitled-126.jpg
Last edited by thealx; 01/16/20 11:57 AM.
#4503927 - 01/16/20 12:12 PM Re: How to compile the source code [Re: thealx]  
Joined: Feb 2007
Posts: 410
GlynD Offline
Member
GlynD  Offline
Member

Joined: Feb 2007
Posts: 410
Shropshire UK
Hi thealx.

OK So I setup a new project:

  • The "New Target" box popped up (as shown in 03.png of the previous post)
  • I clicked the "Cancel" button and saved the project
  • Then went to Actions > Run Batch...
  • Typed in "dmake" and clicked the "OK" button
  • The IDE log filled up with some text

But no EXE file was created... I have attached my log file.

Cheers
Glyn

Attached Files
#4503928 - 01/16/20 12:29 PM Re: How to compile the source code [Re: GlynD]  
Joined: Dec 2012
Posts: 1,377
thealx Offline
Member
thealx  Offline
Member

Joined: Dec 2012
Posts: 1,377
I have same 1.9 version but my logs completely different. For some reason, your compiler arguing about makefile which should not happen.
I recommend to delete created project, make new one from scratch without adding any targets, or selecting "makefile", choose Run Batch - remake, then Run Batch - dmake
On succeed you should see something like that (*.c and *.h files started to compiling)

Attached Files Untitled-127.jpg
#4503930 - 01/16/20 01:36 PM Re: How to compile the source code [Re: thealx]  
Joined: Feb 2007
Posts: 410
GlynD Offline
Member
GlynD  Offline
Member

Joined: Feb 2007
Posts: 410
Shropshire UK
Thanks will try that - could you send me your batch files (remake and dmake) so I can compare them to mine please?

Mine look like this:
dmake
Code
@echo off
SET EECH_ROOTDIR=D:\EECH dev\eech_source_code-master

del project.exe

echo ################### Make Timings ####################### >> maketime.txt
time < dmake.bat >> maketime.txt

wmake debug=1

time < dmake.bat >> maketime.txt
echo ######################################################## >> maketime.txt
   
type maketime.txt 

del maketime.txt


and remake
Code
@echo off
SET EECH_ROOTDIR=D:\EECH dev\eech_source_code-master

	cd %EECH_ROOTDIR%\aphavoc

	del *.exe

	del *.lnk

	del *.pch
	
	del project.map
	
	del project.sym

	cd %EECH_ROOTDIR%\aphavoc\source

	del /s *.obj

	cd %EECH_ROOTDIR%\modules

	del /s *.obj

	cd %EECH_ROOTDIR%\aphavoc

Cheers
Glyn

Last edited by GlynD; 01/16/20 01:44 PM. Reason: Added dmake and remake
#4503931 - 01/16/20 02:04 PM Re: How to compile the source code [Re: thealx]  
Joined: Feb 2007
Posts: 410
GlynD Offline
Member
GlynD  Offline
Member

Joined: Feb 2007
Posts: 410
Shropshire UK
Hi thealx

Tried remake and then dmake. I have attached the Watcom log files.

Cheers
Glyn

Attached Files
Watcom remake 16-01.txt (44 downloads)
remake
Watcom 1-9 IDE log 16-01 after remake.txt (45 downloads)
dmake after remake
#4503936 - 01/16/20 02:46 PM Re: How to compile the source code [Re: GlynD]  
Joined: Dec 2012
Posts: 1,377
thealx Offline
Member
thealx  Offline
Member

Joined: Dec 2012
Posts: 1,377
BAT files are perfectly fine. because of "out of place Path Specifier" I am thinking maybe it's Watcom issue? it should have some variables specified in Environment Variables, not all required but you can give it a try:

WATCOM = C:\WATCOM
PATH = C:\WATCOM\BINNT
EDPATH = C:\WATCOM\EDDAT
WIPFC = C:\WATCOM\WIPFC
INCLUDE = C:\WATCOM\H;C:\WATCOM\H\NT

*replace C:\WATCOM with actual path

they can be set from Advanced System Settings: https://www.java.com/en/download/help/path.xml
in my case PATH is configured for another compiler, but still Watcom works fine

usually two sections available there - User and System variables, if you are main user on that PC you can set variables into System section, then reboot Windows.

#4504030 - 01/17/20 11:58 AM Re: How to compile the source code [Re: GlynD]  
Joined: Dec 2010
Posts: 1,699
messyhead Offline
messyhead  Offline

Member

Joined: Dec 2010
Posts: 1,699
I don't use the watcom ide, I just run the dmake batch file from the command line. I've got watcom location set in the system variables as thealx mentioned and it works ok.

#4504047 - 01/17/20 02:13 PM Re: How to compile the source code [Re: messyhead]  
Joined: Feb 2007
Posts: 410
GlynD Offline
Member
GlynD  Offline
Member

Joined: Feb 2007
Posts: 410
Shropshire UK
Thanks Messyhead - will try this tonight. Couldn't do anything last night as I had places to be smile

Cheers
Glyn

#4504066 - 01/17/20 05:11 PM Re: How to compile the source code [Re: GlynD]  
Joined: Dec 2009
Posts: 624
AndyB Offline
Member
AndyB  Offline
Member

Joined: Dec 2009
Posts: 624
Ayrshire, Scotland
HI Glynn,

How is the Apache coming along ?

Cheers,

Andy


Andy's simpit: http://www.simpit.me.uk
#4504109 - 01/18/20 12:13 AM Re: How to compile the source code [Re: AndyB]  
Joined: Feb 2007
Posts: 410
GlynD Offline
Member
GlynD  Offline
Member

Joined: Feb 2007
Posts: 410
Shropshire UK
Hi Andy - it is packed away at the moment, moved house and no space for it at the moment. Not had a chance to work on it for a long time... Yours is a lot more advanced than mine smile

Cheers
Glyn

#4504112 - 01/18/20 12:18 AM Re: How to compile the source code [Re: messyhead]  
Joined: Feb 2007
Posts: 410
GlynD Offline
Member
GlynD  Offline
Member

Joined: Feb 2007
Posts: 410
Shropshire UK
Hi messyhead and thealx

Moved all the files over to another PC and got some more progress - it started to compile then it failed when it got to the "openal.c" bit (see attached log file) I don't have OpenAL installed on this PC should I install it or do I need to do something with the OpenAL SDK? Downloaded both from the https://www.openal.org/ site.

Cheers
Glyn

Attached Files
Watcom log 18-01.txt (46 downloads)
#4504142 - 01/18/20 09:14 AM Re: How to compile the source code [Re: GlynD]  
Joined: Dec 2012
Posts: 1,377
thealx Offline
Member
thealx  Offline
Member

Joined: Dec 2012
Posts: 1,377
My bad, OpenAL first step still required:

Place al.h and alc.h into Watcom h\nt directory. You can get these files from installed OpenAL 1.1 SDK directory.

download OpenAL 1.1 SDK http://downloads.sourceforge.net/project/foobar-openal/foo_dsp_openal/OpenAL%20SDK%20(by%20Creative)/OpenAL11CoreSDK.7z

I believe it's only issue left, after that you will get working EXE. have fun.

#4504252 - 01/19/20 08:56 PM Re: How to compile the source code [Re: thealx]  
Joined: Feb 2007
Posts: 410
GlynD Offline
Member
GlynD  Offline
Member

Joined: Feb 2007
Posts: 410
Shropshire UK
Yay and boo

So after copying al.h and alc.h into Watcom h\nt directory and also another file it was complaining about during compile (copied OpenAL32.lib to the EECH source code "\modules\linklib" folder) it complied and produced an EXE file using dmake!
band

So I ran the EXE it had produced.......... And crash frown lol

I got an error message saying "Error opening file for reading E:\Games\Razorworks\common\fonts\fontbase.dat". The bold bit is probably a registry entry, as I have a working game installed in <E:\Games\Razorworks-1.16.0\cohokum>

Should I copy the "fonts" folder (which contains fontbase.dat [3 KB] and fontdata.dat [24.5 MB]) from this existing install of EECH to the <source code folder>\setup\cohokum folder? And then recomplie?

Thanks for your patience and help with this guys.

Cheers
Glyn

#4504288 - 01/20/20 06:49 AM Re: How to compile the source code [Re: GlynD]  
Joined: Dec 2012
Posts: 1,377
thealx Offline
Member
thealx  Offline
Member

Joined: Dec 2012
Posts: 1,377
So stable version installed in E:\Games\Razorworks-1.16.0\cohokum and works properly?
if not, you have to rename Razorworks-1.16.0 according to register value before launch.
if yes, something wrong with fonts generation. this file is regenerated each time you launch the game, error means game failed to make this file, or load it.

<source code folder>\setup\ is for installer only, it has nothing to do with compilation, so ignore it.
similar issue discussion https://SimHQ.com/forum/ubbthreads.php/topics/4088874/#Post4094789 but no solution though..

#4504319 - 01/20/20 02:06 PM Re: How to compile the source code [Re: thealx]  
Joined: Feb 2007
Posts: 410
GlynD Offline
Member
GlynD  Offline
Member

Joined: Feb 2007
Posts: 410
Shropshire UK
Hi thealx

When I renamed the existing folder to <E:\Games\Razorworks\> it got a bit further this time...

Launched the debug version I had compiled and it hit a DEBUG FATAL error as shown in the attached screen.

I can't find how to save my full debug log file or copy and paste it, if it will help. (Have increased the size of the debug log and watch screens - see attached)

Cheers
Glyn

Attached Files 20-01 ASSERT buffers openal.c 383.png20-01 Debug log and watch.png
#4504320 - 01/20/20 02:28 PM Re: How to compile the source code [Re: GlynD]  
Joined: Dec 2012
Posts: 1,377
thealx Offline
Member
thealx  Offline
Member

Joined: Dec 2012
Posts: 1,377
try to "remake" then "dmake" again, seems like some .h files outdated

bad thing about Watcom that it does not detect changes in referenses, so if you will make change in C file and run dmake/cmake it will be re-loaded by compiller, H file updated or added - it will be ignored. in best case something will be missed in the game, worst - game crashed.

assert, btw, is a safe-check that forces process to close only in debug mode. in release this error will be ignored but possibly can cause crash or memory leak.

Last edited by thealx; 01/20/20 02:31 PM.
#4504327 - 01/20/20 04:16 PM Re: How to compile the source code [Re: thealx]  
Joined: Feb 2007
Posts: 410
GlynD Offline
Member
GlynD  Offline
Member

Joined: Feb 2007
Posts: 410
Shropshire UK
Hi thealx

Fired up "remake" and the "dmake" batch files to clean the project and then rebuild it. No joy crashed again at the same place. frown

I remembered an old setting in the INI file. The line below is in 1.15 INI file (in the [Sounds] section) but NOT in the 1.16 one:

[hdwrbuf=50 # hardware buffers to use for sound (0 = software only, n = number of hard buffers) (def = 0)]

Could this be what is causing the crash, when it is being ignored in the release version of the EXE?

Cheers
Glyn

#4504330 - 01/20/20 04:42 PM Re: How to compile the source code [Re: GlynD]  
Joined: Dec 2012
Posts: 1,377
thealx Offline
Member
thealx  Offline
Member

Joined: Dec 2012
Posts: 1,377
DirectSound was removed from 1.16 so it's fine that hdwrbuf is missing.

DEBUG.exe in same folder works fine, no asserts triggered? it can happen because of missing or empty wav or pcm files, but not only in custom build..

you can cheat - comment out
Code
ASSERT ( buffers[sample_index].size );

in openal.c and run dmake again, but you still have a problem somewhere.

#4504341 - 01/20/20 06:18 PM Re: How to compile the source code [Re: GlynD]  
Joined: Feb 2007
Posts: 410
GlynD Offline
Member
GlynD  Offline
Member

Joined: Feb 2007
Posts: 410
Shropshire UK
Hi thealx - sorted it. Yay. thumbsup

What was in the <E:\Games\Razorworks\> was a clean install of the GOG version. I had then copied this to <E:\Games\Razorworks-1.15.0> and <E:\Games\Razorworks-1.16.0> Then ran the different EECH mods installers (and pointed them to the different folders) to get the different playable versions...

What I did was re-name <E:\Games\Razorworks-1.16.0> to <E:\Games\Razorworks> and then the debug EXE I had compiled in my dev folder fired up fine.

It is probably using the registry entries to look for folders and load stuff, am I correct? Whereas the release version probably gets its stuff from where it is running from?

Cheers
Glyn

Page 1 of 2 1 2

Moderated by  messyhead, RacerGT 

Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
Kung Fury
by Chucky. 11/26/20 08:12 PM
Need a laugh ?
by WangoTango. 11/26/20 07:02 PM
Fantasy NHL League
by WangoTango. 11/26/20 06:36 PM
Thanksgiving In America!
by Blade_Meister. 11/26/20 03:00 PM
Thanksgiving
by NoFlyBoy. 11/25/20 07:16 PM
Uh oh...
by Nixer. 11/24/20 09:12 PM
meaning of a deck of playing cards
by KraziKanuK. 11/24/20 03:27 PM
Criterion Collection BR/DVD sale
by Patrocles. 11/24/20 03:26 PM
Ex Nazi can be deported
by NoFlyBoy. 11/23/20 11:10 PM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0