Difference between revisions of "Development"

From EECH Central
Jump to: navigation, search
(OpenWatcom)
(Updating details for getting an account)
(5 intermediate revisions by 2 users not shown)
Line 11: Line 11:
 
=== Acquire source code ===
 
=== Acquire source code ===
  
Developers have their own mailing-list. To subscribe to the list send an email to:
+
The source code is hosted in a [http://en.wikipedia.org/wiki/Git_%28software%29 Git] repository. In order to download a copy ('clone') of the source code, you will need an account.
  
<code>eech-dev-subscribe@bollocks.net.nz</code>
+
In order to get one, ask for an account for access to the repository at [http://simhq.com/forum/ubbthreads.php/topics/4195250/EECH_source_code] section of SimHQ forums, or send a Private Message to the user Executioner and an account can be created for you (please provide your firstname/lastname and a username). State that you agree to the [[EECH_License|EECH License]]. Please note that usually people are only given a read-only account at first. For instructions on how to download the copy once an account was created, see [[GitHelp|this page]].
  
The source code is hosted in a [http://en.wikipedia.org/wiki/Git_%28software%29 Git] repository. In order to download a copy ('clone') of the source code, you will need an account. In order to get one, ask for an account on the development list (please provide your firstname/lastname and a username), and state that you agree to the [[EECH_License|EECH License]]. Please note that usually people are only given a read-only account at first. For instructions on how to download the copy once an account was created, see [[GitHelp|this page]].
+
=== [http://www.openwatcom.org/index.php/Main_Page OpenWatcom] ===
  
=== [http://en.wikipedia.org/wiki/OpenWatcom OpenWatcom] ===
+
The first step is to get OpenWatcom. [ftp://ftp.openwatcom.org/ Latest version 1.9] is fully compatible. Other compilers or versions may work, but you will probably have to fix some errors for it to compile.
 +
[ftp://ftp.openwatcom.org/archive/ Version 1.3 and 1.7a] are known as working, but in 1.7 you will have to add "#undef INTERFACE" right before "include <ole2.h>" in dplay.h (one of the files from the directx SDK, see next paragraph).
  
The first step is to get OpenWatcom. [ftp://ftp.openwatcom.org/archive/| Version 1.3 and 1.7a] are known to compile. Other compilers or versions may work, but you will probably have to fix some errors for it to compile, OpenWatcom 1.3 should compile it without problem, in 1.7 you will have to add "#undef INTERFACE" right before "include <ole2.h>" in dplay.h (one of the files from the directx SDK, see next paragraph).
+
[[Image:Download.png|20px]] download [ftp://ftp.openwatcom.org/open-watcom-c-win32-1.9.exe OpenWatcom Win32 1.9]
  
 
=== [http://en.wikipedia.org/wiki/Direct_X DirectX SDK] ===
 
=== [http://en.wikipedia.org/wiki/Direct_X DirectX SDK] ===
  
You will also need Microsoft's DirectX SDK.
+
You will also need Microsoft's DirectX 9 SDK.
  
For Watcom to find the DirectX libraries and headers, copy the content from the <code>Lib</code> and <code>Include</code> directories from the DirectX SDK to the <code>lib386\nt</code> and <code>h\nt</code> directories respectively in the Watcom install.
+
For Watcom to find the DirectX libraries and headers, copy the content from the <code>Lib</code> and <code>Include</code> directories from the installed DirectX SDK to the <code>lib386\nt</code> and <code>h\nt</code> directories respectively in the Watcom install.
  
[[Image:Download.png|20px]] download [http://msdn2.microsoft.com/en-us/xna/aa937788.aspx DirectX SDK]
+
[[Image:Download.png|20px]] download [http://download.fileplanet.com/ftp1/fpnew/miscellaneous/dx90bsdk.exe DirectX 9b SDK]
  
 
== Compiling ==
 
== Compiling ==
Line 33: Line 34:
 
First make a directory linklib under /modules and copy all the libs from DXSDK\lib (in the DirectX SDK files) to that new directory.
 
First make a directory linklib under /modules and copy all the libs from DXSDK\lib (in the DirectX SDK files) to that new directory.
  
To compile go to the <code>aphavoc</code> directory in the source. There are several scripts used for compiling there. The most useful are:
+
There are several scripts used for compiling there. The most useful are:
  
 
* <code>dmake</code>, to make a debug build
 
* <code>dmake</code>, to make a debug build
 
* <code>cmake</code>, to make a release build
 
* <code>cmake</code>, to make a release build
* <code>remake</code>, to make one from the other
+
* <code>remake</code>, to clear all temporary compilation files
  
 
It is important to edit the scripts <code>dmake</code> and <code>cmake</code> to have the correct ROOTPATH before start building. This is the directory where the source is installed.
 
It is important to edit the scripts <code>dmake</code> and <code>cmake</code> to have the correct ROOTPATH before start building. This is the directory where the source is installed.
 +
 +
To compile launch OpenWatcom IDE and create new project in the the <code>aphavoc</code> directory in the source. At the next window choose Win32 environment and Windowed Executable type. You can save project to use it in the future.
 +
Now you can choose '''Launch - Run Batch''' and type proper script name (<code>cmake</code> for example).
 +
 +
By default DirectSound version is compiling. If you want to make executable with OpenAL support you have to follow these steps:
 +
 +
* Place <code>al.h</code> and <code>alc.h</code> into Watcom <code>h\nt</code> directory. You can get these files from installed OpenAL 1.1 SDK directory.
 +
* Define <code>openal</code> variable. You can open <code>aphavoc/makefile</code> add <code>!define openal</code> somewhere at the top of this file.
 +
 +
[[Image:Download.png|20px]] download [http://downloads.sourceforge.net/project/foobar-openal/foo_dsp_openal/OpenAL%20SDK%20(by%20Creative)/OpenAL11CoreSDK.7z?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Ffoobar-openal%2Ffiles%2Ffoo_dsp_openal%2FOpenAL%2520SDK%2520%2528by%2520Creative%2529%2F&ts=1390249375&use_mirror=softlayer-dal OpenAL 1.1 SDK]
  
 
== See also ==
 
== See also ==

Revision as of 04:34, 28 May 2016

Feather.png

This page is for those who intend to develop this game by programming the source code. Please note that the code was made available under the terms of this licence.

About the source code

The source code is written in C.

Prerequisites

Acquire source code

The source code is hosted in a Git repository. In order to download a copy ('clone') of the source code, you will need an account.

In order to get one, ask for an account for access to the repository at [1] section of SimHQ forums, or send a Private Message to the user Executioner and an account can be created for you (please provide your firstname/lastname and a username). State that you agree to the EECH License. Please note that usually people are only given a read-only account at first. For instructions on how to download the copy once an account was created, see this page.

OpenWatcom

The first step is to get OpenWatcom. Latest version 1.9 is fully compatible. Other compilers or versions may work, but you will probably have to fix some errors for it to compile. Version 1.3 and 1.7a are known as working, but in 1.7 you will have to add "#undef INTERFACE" right before "include <ole2.h>" in dplay.h (one of the files from the directx SDK, see next paragraph).

Download.png download OpenWatcom Win32 1.9

DirectX SDK

You will also need Microsoft's DirectX 9 SDK.

For Watcom to find the DirectX libraries and headers, copy the content from the Lib and Include directories from the installed DirectX SDK to the lib386\nt and h\nt directories respectively in the Watcom install.

Download.png download DirectX 9b SDK

Compiling

First make a directory linklib under /modules and copy all the libs from DXSDK\lib (in the DirectX SDK files) to that new directory.

There are several scripts used for compiling there. The most useful are:

  • dmake, to make a debug build
  • cmake, to make a release build
  • remake, to clear all temporary compilation files

It is important to edit the scripts dmake and cmake to have the correct ROOTPATH before start building. This is the directory where the source is installed.

To compile launch OpenWatcom IDE and create new project in the the aphavoc directory in the source. At the next window choose Win32 environment and Windowed Executable type. You can save project to use it in the future. Now you can choose Launch - Run Batch and type proper script name (cmake for example).

By default DirectSound version is compiling. If you want to make executable with OpenAL support you have to follow these steps:

  • Place al.h and alc.h into Watcom h\nt directory. You can get these files from installed OpenAL 1.1 SDK directory.
  • Define openal variable. You can open aphavoc/makefile add !define openal somewhere at the top of this file.

Download.png download OpenAL 1.1 SDK

See also