Author Topic: "Read Me First" Follow-on Question  (Read 2260 times)

0 Members and 1 Guest are viewing this topic.

Offline Trivial Psychic

  • 212
  • Snoop Junkie
"Read Me First" Follow-on Question
On the advice of Droid, I am following the steps found HERE and have compiled myself a debug build.  My questions are as follows:

I intend to use this to track down a bug for my work with Inferno, which runs as a stand-alone, apart from the FreeSpace2 main folder.  Apart from copying the compiled debug build and running it from the stand-alone directory, are there any other differences in the procedure that I need to follow to get this to work properly?

Should I wish to compile a release build to try out newly committed features or fixes that aren't in a Nightly build, do I only need to select a release build in Step 21 to accomplish this?

Is voice synthesis already compiled in this, or is there something else that I have to do to incorporate it?

I hope that these aren't too noobish questions, but I didn't see them answered in the sticky, and I'd like to know the answer.
The Trivial Psychic Strikes Again!

 

Offline Iss Mneur

  • 210
  • TODO:
Re: "Read Me First" Follow-on Question
I intend to use this to track down a bug for my work with Inferno, which runs as a stand-alone, apart from the FreeSpace2 main folder.
Not strictly standalone if you need the FreeSpace 2 data, but anyway...

Apart from copying the compiled debug build and running it from the stand-alone directory, are there any other differences in the procedure that I need to follow to get this to work properly?
No. Just make sure you select the binary that you built in the launcher if you are using a launcher to run the game (as apposed to just running the .exe directly).

Should I wish to compile a release build to try out newly committed features or fixes that aren't in a Nightly build, do I only need to select a release build in Step 21 to accomplish this?
Correct.  You will need to use TortoiseSVN's apply patch tool (right click on a .diff or a .patch and it will be the TortoiseSVN menu).

Is voice synthesis already compiled in this, or is there something else that I have to do to incorporate it?
No.  Getting voice to Text To Speech (TTS) to compile with the express versions of Visual Studio is interesting to get to work (which is why the nightlies we release also do not have TTS enabled).  That being said, how to enable TTS should still be documented in the Readme that is in the source (you need to change some compiler options and install the TTS SDK).

I should also note, I personally have not setup TTS on this machine though I did on the previous one (but that was quite a while ago now).

I hope that these aren't too noobish questions, but I didn't see them answered in the sticky, and I'd like to know the answer.
No problem. Trying to explain to people that are not familiar with programming and/or compilers is hard, but having people willing to work through it with us helps us to refine our instruction and/or technique for future travellers :D.
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: "Read Me First" Follow-on Question
I intend to use this to track down a bug for my work with Inferno, which runs as a stand-alone, apart from the FreeSpace2 main folder.
Not strictly standalone if you need the FreeSpace 2 data, but anyway...

Apart from copying the compiled debug build and running it from the stand-alone directory, are there any other differences in the procedure that I need to follow to get this to work properly?
No. Just make sure you select the binary that you built in the launcher if you are using a launcher to run the game (as apposed to just running the .exe directly).

Thanks for your responses, but it seems that I AM missing some step somewhere.  Just to clarify, I copied the compiled FSO debug exe to the standalone directory, which is located in D:\Games\InfernoR1U\, then I activate Microsoft Visual C++ 2010 Express by running Freespace2.sln, and then activated by pressing F5.  Prior to that, I made sure that I'd selected the compiled exe in the launcher (in the stand-along directory), selected window and debug spew, and also reduced the resolution to 800/600.  First of all, it dumps the entire screen down to (it must be) 640/480 or 800/600 because I only get the top corner of anything, and secondly I get a black screen.  I used crtl+alt+del to switch out of the game and got this message:


Web cursor bitmap not found.  This is most likely due to one of three reasons:
   1) You're running FreeSpace Open from somewhere other than your FreeSpace 2 folder;
   2) You've somehow corrupted your FreeSpace 2 installation, e.g. by modifying or removing the retail VP files;
   3) You haven't installed FreeSpace 2 at all.  (Note that installing FreeSpace Open does NOT remove the need for a FreeSpace 2 installation.)
Number 1 can be fixed by simply moving the FreeSpace Open executable file to the FreeSpace 2 folder.  Numbers 2 and 3 can be fixed by installing or reinstalling FreeSpace 2.

ntdll.dll! NtWaitForSingleObject + 21 bytes
kernel32.dll! WaitForSingleObjectEx + 67 bytes
kernel32.dll! WaitForSingleObject + 18 bytes
fs2_open_3_6_13d_INF_SSE2.exe! SCP_DumpStack + 354 bytes
fs2_open_3_6_13d_INF_SSE2.exe! Error + 229 bytes
fs2_open_3_6_13d_INF_SSE2.exe! gr_init + 873 bytes
fs2_open_3_6_13d_INF_SSE2.exe! game_init + 736 bytes
fs2_open_3_6_13d_INF_SSE2.exe! game_main + 519 bytes
fs2_open_3_6_13d_INF_SSE2.exe! WinMain + 330 bytes
fs2_open_3_6_13d_INF_SSE2.exe! __tmainCRTStartup + 322 bytes
fs2_open_3_6_13d_INF_SSE2.exe! WinMainCRTStartup + 15 bytes
kernel32.dll! BaseThreadInitThunk + 18 bytes
ntdll.dll! RtlInitializeExceptionChain + 99 bytes
ntdll.dll! RtlInitializeExceptionChain + 54 bytes

Do I need to install the entire fs2_open code into my stand-along directory as well?
The Trivial Psychic Strikes Again!

 

Offline Iss Mneur

  • 210
  • TODO:
Re: "Read Me First" Follow-on Question
If you want to run FSO from Visual Studio you need to tell Visual Studio where your game data directory is.

I) You need to add an user environment variable:
1) Right click on "Computer" or "My Computer" and select properties.
1a) If you are one Vista or 7 you will have to then click on "Advanced System settings" in the left hand column. Depending on your UAC settings you may or may not be prompted to elevate your permissions.
2) You should be looking at the "System Properties" dialog.
3) Select the "Advanced" tab if not already selected.
4) Click on "Environment Variables" at the bottom of the window.
5) Another window will pop up.  Check in the "User variables for <user name>" section to see if you have a variable called FS2PATH.
5a) If you already have one called FS2PATH, select it and click edit.
5b) If you don't have one called FS2PATH, click new (remember under "User variables" not "System Variables").
6) Set/verify that the variable name is FS2PATH and the the value is the fully qualified path to the data directory that you want to use (that is it starts with a drive letter).
7) Click Ok for every dialog.
8) Restart your computer (seriously, these variables are only set during boot).

II) Open the Freespace solution file.
1) Right-click on the Freespace2 project and select properties.
2) Change the "configuration" to "All Configurations".
3) In the tree on the left select Configuration Properties > Debugging.
4) Click on Command in the right hand window, and click the down arrow on the far right.
5) Click edit in the drop down menu.
6) In the dialog that comes up enter exactly the following:
Code: (The debug command) [Select]
$(FS2PATH)\$(TargetFileName)
7) Click okay. And click okay again for the Property Pages.

You can now just select the build variant that you want from the drop down at the top center and click the green arrow and Visual Studio will automatically build the binary, then copy the new binary to the game data directory, and then start the binary with the debugger attached.

There are several other variations of this procedure that have other advantages but this is probably the simplest and most pain free becuase you can then forget that you did it after you get it setup (like I did :D).
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Re: "Read Me First" Follow-on Question
Alright.  FSO seems to be working now.  It would seem that it was the step of editing the Environmental Variables to look in the new directory that I missed.

Thanks.  :)
The Trivial Psychic Strikes Again!

 

Offline Iss Mneur

  • 210
  • TODO:
Re: "Read Me First" Follow-on Question
No problem.

For the record, you only need to set the FS2PATH if you want to be able to start FSO from the IDE, for catching crashes (to provide a stack trace) you can just run the built debug binary directly from the FSO directory (like any other .exe) and the debugger will be started automaticly upon a crash.
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: "Read Me First" Follow-on Question
You don't even need it for that as you can simply set the executable in the debugging options of the IDE too. It's just for convenience really.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Iss Mneur

  • 210
  • TODO:
Re: "Read Me First" Follow-on Question
You don't even need it for that as you can simply set the executable in the debugging options of the IDE too. It's just for convenience really.
True, but FS2PATH is already used to do the copy automaticly for you, so if you setup FS2PATH in the debugging command line when you change one, the other gets changed as well.  This way the IDE takes care of both coping the file (making sure that you are actually debugging the most recent binary) and llauncher the binary with the debugger attached.

This also makes is so that if you need a different FS2PATH you can just change the variable and restart, or if you are really clever you can use a batch script to setup/change the FS2PATH and then have it start Visual Studio so that you can switch between two different FS2PATHs without restarting the computer.
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: "Read Me First" Follow-on Question
Oh, I'm not denying it's useful, just that you don't need it.

For instance since Diaspora is a TC and has it's own folder I have to copy builds from my Freespace2 folder to Diaspora. I could change the FS2Path or I could just set the debug path and manually copy them across (which is the one I find easiest).
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]