Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#5644 closed defect (fixed)

BUILD: MSVC git revision tracked globally

Reported by: wjp Owned by: Templier
Priority: normal Component: Tools
Version: Keywords:
Cc: Game:


This was reported on IRC yesterday.

The scripts/revision.vbs script used in the visual studio project files to determine the git revision apparently stores this in a global environment variable SCUMMVM_REVISION_STRING. This breaks in the situation where you do multiple builds in parallel, or where you have one working copy with git revision detection enabled and one with it disabled.

Ticket imported from: #3280881. Ticket imported from: bugs/5644.

Change History (5)

comment:1 by Templier, 13 years ago

Component: Tools
Owner: set to Templier

comment:2 by Templier, 13 years ago

When I implemented this behavior, I looked at all the other solutions and it looked like the nicer one. From what I could find, setting a preprocessor define in the pre-build step from an external script isn't really easy :)

The easy solution is to just modify internal_version.h, but since it's under version control, it would be a pain to deal with. To fix the current problem, I could add a define to builds with revision detection enabled and only use the environment variable in those cases, but this will break when building from two different branches in parallel.

I'm going to have another look at it (conditional include of a generated .h file with the proper define looks like a better solution and would allow proper concurrent builds).

comment:3 by Templier, 13 years ago

I've opened a pull request with the changes (since they affect files in base/). Can you please test again with the branch code and see if the concurrent builds/separate working copies issues are fixed?

I tested a couple cases with MSVC10, but it will need some testing with earlier versions of Visual Studio.

comment:4 by Templier, 13 years ago

Should be fixed in 11b907e.

comment:5 by Templier, 13 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.