Author Topic: Building a release version  (Read 1771 times)

Ildiz

  • Guest
Building a release version
« on: 14 April 2011, 11:04:45 »
So, I've tried to build a release version with my code alterations etc. and it tries to run, then I get the "glestadv.exe has stopped working" crash message.
First I had the "x.dll is missing from your computer" (fixed by moving the .dll files into the release folder).
But this crash doesn't give me any hints as to why it's not working.
It's similar to the "X program is not responding" message, but I can't think why this isn't working.
Possibly a missing copy paste from debug to release in Visual Studios, but I can't think where.

Any ideas?

Cheers,
Matt

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Building a release version
« Reply #1 on: 15 April 2011, 06:41:47 »
Hi Matt,

  With each freshly generated exe, there will also be a glestadv.pdb, this needs to be with the executable if you 'relocate' it.

Cheers.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Ildiz

  • Guest
Re: Building a release version
« Reply #2 on: 15 April 2011, 09:52:16 »
Yeah I copied the entire release folder it generated (which includes the .pdb) and it starts to load (black screen) and then closes itself - like a crash.

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: Building a release version
« Reply #3 on: 15 April 2011, 09:58:30 »
(any useful info if you run Drwtsn32? http://support.microsoft.com/kb/308538 )

Ildiz

  • Guest
Re: Building a release version
« Reply #4 on: 15 April 2011, 10:19:12 »
(any useful info if you run Drwtsn32? http://support.microsoft.com/kb/308538 )

I have no Dr Watson on my PC?
I try both run commands and get nothing, I'm using W7 64 bit btw.

Ildiz

  • Guest
Re: Building a release version
« Reply #5 on: 15 April 2011, 10:26:37 »
Right, for some reason the release version I just built again is working on my HDD when attached to my PC, I just need to get hold of my laptop and use it on that to test if it works on there aswell, or whether it'll throw a fit.

Yay for lending stuff to sisters and not getting it back when you need it -.-

Ildiz

  • Guest
Re: Building a release version
« Reply #6 on: 17 April 2011, 15:38:26 »
Ok so, the release runs on my PC, but not my laptop.
When running it on my laptop it crashes.

Is there any other files I need to include with the .exe other than all the .dlls and the files it createsin the release folder automatically?

Or is it something to do with compatibility between windows 7 (created the release on this one) and Vista (can't run it on this one)? (both 64 bit)
« Last Edit: 17 April 2011, 15:44:50 by Ildiz »

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Building a release version
« Reply #7 on: 17 April 2011, 16:05:56 »
It should run fine on other versions of windows, what are you setting GAE_DATA_DIR to in CMake? How are you laying out the data on the other machine? (ie, where are you putting the data and where is the exe relative to that?)
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Ildiz

  • Guest
Re: Building a release version
« Reply #8 on: 17 April 2011, 16:16:29 »
I was hoping I could just copy over the release folder and that's it. Instead of having to build the entire thing through CMake everytime, since that'll be a pain to try get people to test it :(

I've put the release folder on my external HDD and it runs on my PC but not my laptop, so it's obviously picking things up from somewhere on my desktop, but I have no idea what, it's not giving me any reason for the crashes.

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Building a release version
« Reply #9 on: 17 April 2011, 16:30:47 »
It needs to find the data somewhere, you can check what you have it set to in projectConfig.h (find in your build directory), check the value of DEFAULT_DATA_DIR. This is where it is looking for game data.

If you have it hard-coded to some location (ie, on your desktop machine) then thats why it runs off the HDD on your desktop machine, but not the laptop.

If you have GAE installed on the laptop, then you can set the data dir to '../share/glestae' and rebuild, then replace the exe & pdb in $(ProgramFiles)/glestadv-0.3.2/bin.

If you don't have GAE installed on the laptop, you need to put the game data on it, either copy the contents of $(GIT_DIR)/data/game onto it somewhere (and set the data dir appropriately) or install GAE 0.3.2, and just replace the binaries.

You can also change the data directory on the command line (or in a shortcut) with '-datadir path/to/data'. Point it at some valid data and it should run  :)
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Ildiz

  • Guest
Re: Building a release version
« Reply #10 on: 17 April 2011, 18:23:18 »
Is there a way to get it so that the directory is always found, even when i send it to a mate?

would:
.../release/data/game

work?
or do I have to set a specific path?

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Building a release version
« Reply #11 on: 18 April 2011, 03:33:21 »
Is there a way to get it so that the directory is always found, even when i send it to a mate?

would:
.../release/data/game

work?
or do I have to set a specific path?
You can use relative paths, yes.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Building a release version
« Reply #12 on: 18 April 2011, 07:48:03 »
Is there a way to get it so that the directory is always found, even when i send it to a mate?

Does your mate have GAE installed? If so set the data dir (pref in CMake, but you can just change it in projectConfig.h) to "../share/glestae" then send him/her the the exe & pdb, instructing them to replace those found in "c:\program files\glestae 0.3.2\bin".

If you do this you wont be able to run it 'as is' from the IDE, to get around that set 'glestadv -> properties -> debugging -> working directory' to $(GIT_DIR)/data/game.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

 

anything