mindcandy / Teamcity-unity3d-build-runner-plugin

A Teamcity plugin for building Unity3d projects. NOTE: this has an MIT license so feel free to copy / adapt as you need to.
107 stars 59 forks source link

Unity versions windows request #9

Closed FriedrichWessel closed 11 years ago

FriedrichWessel commented 11 years ago

Implemented Issue #6: Detect Unity Version for Windows.

Like in the Mac implementation the Versionnumber is add to the agendConfiguration unity.buildnumber

Instead of the plist ( like in the Mac Version ), I read the Versionnumber from the unity.exe ( Windows PE specification: http://msdn.microsoft.com/en-us/library/windows/desktop/ms680547(v=vs.85).aspx ) using the jna Framwork to abstract windows API.

Happy to get feedback for this Solution, let me know if you have any suggestions.

Friedrich

markltbaker commented 11 years ago

Ah just trying to compile on the mac and failing -- think I'll need to add in the JNA library to dependencies or just the lib folder...

FriedrichWessel commented 11 years ago

If you build with IntelliJ: In the Project Settings add the path to the jna. Then you should get rid of the internal compiler errors. For getting the ANT-Build running you had to place the jna in the project Lib Folder ( pathelement location="${basedir}/lib/jna.jar"/. Maybe this should at another place ?

markltbaker commented 11 years ago

I've got it working now with JNA version 3.4.0 -- was this the one you were using? Later versions seem to give the compile error: unityRunner.agent.FileVersionInfo.VS_FIXEDFILEINFO is not abstract and does not override abstract method getFieldOrder() in com.sun.jna.Structure

I've added it to the dependencies in ant, so it downloads it to the lib/ folder during the build.

FriedrichWessel commented 11 years ago

Okay sorry I forgot to add this dependency. As far as I remember I used Version 3.3.0 from here ; https://java.net/projects/jna/downloads/directory/3.3.0

markltbaker commented 11 years ago

ok, I'll stick with v3.4.0 for now as it seems to work and the dependencies are good. I'll commit this back.

FriedrichWessel commented 11 years ago

Nice. Thx ! I´ll upgrade my jna.jar also to 3.4 then. I just saw that the testcase will fail on mac - need to make this platform dependend. I´ll do this on the weekend.