Successful build!!

Help building, determining code organization, and other new-to-project problems.
Post Reply
sdw195
Militia Captain
Militia Captain
Posts: 779
Joined: Wed Nov 18, 2009 1:01 am
Location: Still looking for the csc Antarctica
Contact:

I finally got Transcendence to build from the source, with a lot of help from gambitdash :D

steps after following the readme.

change Linker/Input Additional Dependencies = "dxguid.lib version.lib vfw32.lib winmm.lib dsound.lib ddraw.lib odbc32.lib odbccp32.lib ws2_32.lib" to
"version.lib vfw32.lib winmm.lib dsound.lib odbc32.lib odbccp32.lib ws2_32.lib"

open CScreenMgr.cpp and change
line 402 to m_bWindowedMode = true;
line 430 to m_bDX = false;
line 448 to hr = NULL;


if you get an error about "afxres.h"
change it to "windows.h" in
Transcendence.rc line 10 and
Transcendence.rc line 37

save and build!

you MUST run in windowed mode if you do these changes, otherwise it will crash
Last edited by sdw195 on Thu Apr 12, 2012 5:33 am, edited 3 times in total.
Image
Image
Image
Image
"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
User avatar
GambitDash
Developer
Developer
Posts: 81
Joined: Sat May 10, 2008 7:01 am

Just to provide some background -

The reason why I had sdw195 change those lines is that it was easier than telling him to do the LoadLibrary call and GetProcAddress (see this blog post about the deprecation of the DirectDrawCreateEx and other functions) to get the necessary function call pointer by loading ddraw.dll directly.

If someone wanted to make that change so that it will compile with a DXSDK from this decade (these functions were deprecated in 2002) then I'm sure they would be adopted gratefully :)

Cheers,
--G
User avatar
Ttech
Fleet Admiral
Fleet Admiral
Posts: 2767
Joined: Tue Nov 06, 2007 12:03 am
Location: Traveling in the TARDIS
Contact:

I'm going to have to try this out when I get a chance, mostly just picking at the source when I have free moments.
Image
Image
ronelm2000
Miner
Miner
Posts: 41
Joined: Mon Mar 19, 2012 1:14 am

GambitDash wrote:Just to provide some background -

The reason why I had sdw195 change those lines is that it was easier than telling him to do the LoadLibrary call and GetProcAddress (see this blog post about the deprecation of the DirectDrawCreateEx and other functions) to get the necessary function call pointer by loading ddraw.dll directly.

If someone wanted to make that change so that it will compile with a DXSDK from this decade (these functions were deprecated in 2002) then I'm sure they would be adopted gratefully :)

Cheers,
--G
hmm...

On the assumption that instructions are still needed for compilation, can I ask what are these instructions Gambit is talking about?
sdw195
Militia Captain
Militia Captain
Posts: 779
Joined: Wed Nov 18, 2009 1:01 am
Location: Still looking for the csc Antarctica
Contact:

they are in a readme included in the source
Image
Image
Image
Image
"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
NMS
Militia Captain
Militia Captain
Posts: 569
Joined: Tue Mar 05, 2013 8:26 am

delete
Last edited by NMS on Wed Apr 21, 2021 4:00 am, edited 4 times in total.
NMS
Militia Captain
Militia Captain
Posts: 569
Joined: Tue Mar 05, 2013 8:26 am

Updating again April 20, 2021 since VS 2019 is now required.

First, you'll need Visual Studio Community 2019, available for free here: https://www.visualstudio.com/downloads/

Make sure you select "Desktop Development with C++" and, in the right column, "MSVC v142 ... ".

You don't need any other optional components, but the Just-In-Time debugger takes up negligible space and could be useful for debugging crashes. One item in the build, TransPackage, requires Universal Windows Platform Development and an older SDK, but this takes up an additional 16 GB of disk space and isn't necessary to successfully build the game, at least for me.

You can adjust the installed components by going to Tools -> Get Tools and Features...

Then follow the README:
TRANSCENDENCE SOURCE CODE

Copyright (c) 2016 by Kronosaur Productions, LLC.
http://transcendence.kronosaur.com
[email protected]
@Transcendence

This package contains the source code for building the Transcendence.exe client,
which is used to run any Transcendence adventure, including "Domina & Oracus".

BUILD INSTRUCTIONS

If you are downloading the repos in order to submit future pull requests, it is
worthwhile to keep repositories synced with kronosaur:

https://help.github.com/articles/syncing-a-fork/

General help on using git is available through official sources:

https://help.github.com
Also see Getting started with git and github.
You will need to install the February 2010 DirectX SDK release, as later versions
do not include necessary libraries. The correct DirectX SDK can be downloaded
here:

http://www.microsoft.com/en-us/download ... x?id=10084

Note the DirectX SDK's install location on your computer.

It may be necessary to uninstall certain Microsoft Visual C++ Redistributables
when installing DirectX SDKs:

http://support.microsoft.com/kb/2728613
I had to run the installer in compatibility mode for Windows 7, but otherwise had no trouble.
Use Microsoft Visual Studio 2010 2019 or later. Load Transcendence/Transcendence.sln,
which is the Transcendence solution file. The following warnings, if shown under
Output from Solution, may be safely ignored:

<root dir>\Alchemy\zlib-1.2.7\contrib\vstudio\vc10\zlibstat.vcxproj :
warning : Platform 'Itanium' referenced in the project file 'zlibstat'
cannot be found.

<root dir>\TransCore\TransCore.vcxproj : error : Project
"...\TransCore\TransCore.vcxproj" could not be found.

Select the Transcendence project as the StartUp project. Ensure that the correct
locations of the DirectX SDK Include and Lib folders are specified for the
Transcendence project (under the Transcendence solution) by bringing up the
project's Properties page, and checking the following property sets:

Configuration Properties > VC++ Directories > General > Include Directories
Configuration Properties > VC++ Directories > General > Library Directories

Always point the Library Directories variable to the \Lib\x86 folder of the SDK.

Build the solution. Executables will be placed in the Transcendence/Game
directory.
Let's not get ahead of ourselves here.
For security reasons the source code does not include certain files to
communicate with the Hexarc arcology (the cloud service). The code will compile
without it, however, as long as you add CHexarcServiceStub.cpp to the build.

In Visual Studio, find the CHexarcServiceStub.cpp file in the TSUI project under
the \Source Files\CloudInterface Files folder. Bring up the Properties page for
the file and under General properties set "Exclude from Build" to "No".
Similarly, you also have to set CHexarcService.cpp to be excluded.

Now you should be able to build the game engine.

Note that changing the files included in your build will change the config file Mammoth/TSUI/TSUI.vcxproj. Assuming you also want to be able to submit pull requests, you should avoid pushing this change to your remote so it doesn't show up in them. There are a few ways to do this:

1. You can get git to ignore local changes to this file without changing your remote with the command:

Code: Select all

git update-index --assume-unchanged Mammoth/TSUI/TSUI.vcxproj
You can put this in a .bat file like this:

Code: Select all

cd path-to-your-repository
call git update-index --assume-unchanged Mammoth/TSUI/TSUI.vcxproj
This may occasionally make git unhappy when you try to pull or rebase. If it does, you can undo it with a similar command or .bat file, replacing --assume-unchanged with --no-assume-unchanged. Then do what you need to do, change your build configuration back if necessary, and run the --assume-unchanged command again.

2. Always avoid including this file when pushing to your remote. When rebasing, stash your changes first, then restore them after.

3. Delete your changes to this file before pushing. Then change your build configuration again before building.

4. Change this file on a branch. Use that branch to build, but other branches to submit pull requests.
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5447
Joined: Tue Feb 05, 2008 1:10 am
Location: At the VSS Shipyards in the frontier, designing new ships.

Once the associated PR for this ticket is merged (https://ministry.kronosaur.com/record.hexm?id=103673), the whole song & dance with messing around w/ the hexarcServicesStub will be over, just use use the project configuration

Code: Select all

Debug For Contributors
(shpOrder gPlayership 'barrelRoll)

<New tutorials, modding resources, and official extension stuff coming to this space soon!>
Post Reply