building release / optimized binary from source?
Moderators: winston, another_commander
building release / optimized binary from source?
I've successfully built 1.71.2 from the source tarball (the SVN server rejects me for some reason, I can't pull using tortoise SVN).
The resulting executable seems a bit sluggish, for example there's an obvious lag in between navigating menus and hearing the "pud pud" sound that accompanies moving from one menu item to another, this delay is not in the 1.71.2 binary installed with the installer. I assumed this is due to a debug build, so I edited GNUmakefile and deleted this line:
BUILD_WITH_DEBUG_FUNCTIONALITY = yes
and did another "make clean", "make", "fixwin"
but that didn't make a difference. Is there some other setting for building a release binary? Or is this delay just a bug with the 1.71.2 src tarball?
edit:
ok, actually the right thing to do according to the GNUmakefile is to change "yes " to "no", not delete the line. I did this, "make clean", "maek", but still have the menu sound lag.
Is this source tarball:
http://prdownload.berlios.de/oolite-lin ... .2.tar.bz2
the same one used to produce this release (which doesn't have the menu sound lag"):
http://prdownload.berlios.de/oolite-lin ... 2-test.exe
??
thanks!
The resulting executable seems a bit sluggish, for example there's an obvious lag in between navigating menus and hearing the "pud pud" sound that accompanies moving from one menu item to another, this delay is not in the 1.71.2 binary installed with the installer. I assumed this is due to a debug build, so I edited GNUmakefile and deleted this line:
BUILD_WITH_DEBUG_FUNCTIONALITY = yes
and did another "make clean", "make", "fixwin"
but that didn't make a difference. Is there some other setting for building a release binary? Or is this delay just a bug with the 1.71.2 src tarball?
edit:
ok, actually the right thing to do according to the GNUmakefile is to change "yes " to "no", not delete the line. I did this, "make clean", "maek", but still have the menu sound lag.
Is this source tarball:
http://prdownload.berlios.de/oolite-lin ... .2.tar.bz2
the same one used to produce this release (which doesn't have the menu sound lag"):
http://prdownload.berlios.de/oolite-lin ... 2-test.exe
??
thanks!
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
My best guess would be different GNUstep / SDL_mixer version libraries.
The source tarball from Berlios is the exact same source code used to build the release executable, minus the svn-base files, that basically would serve in only doubling the size of the tarball had they been left in. The only drawback of this is that you cannot build a packaged release with the tarball. You can however build the game locally and play. If you want to build a packaged release, you will have to have NSIS installed and configured, download the source using SVN and run the tools/mkwinsnapshotinst.sh file.
The source tarball from Berlios is the exact same source code used to build the release executable, minus the svn-base files, that basically would serve in only doubling the size of the tarball had they been left in. The only drawback of this is that you cannot build a packaged release with the tarball. You can however build the game locally and play. If you want to build a packaged release, you will have to have NSIS installed and configured, download the source using SVN and run the tools/mkwinsnapshotinst.sh file.
Having downloaded but not yet tried it, is there any reason why your version is about 4x the size of the original? (~8mb vs ~2mb)?
Just out of curiosity, not being up on source-code building...
Editted to add - it also seems to need a gnubase1.15.dll file, which the standard game install doesn't seem to provide.
Just out of curiosity, not being up on source-code building...
Editted to add - it also seems to need a gnubase1.15.dll file, which the standard game install doesn't seem to provide.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
The difference in sizes between CmdrLUke's and official release executables is due to debug information being stripped out from the official exe, but not from CL's. This should have no effect from the end user's standpoint.
However, CL's exe has been compiled using the latest GNUstep version and indeed requires gnustep-base-1_15.dll. It will not run as is on a standard Oolite installation. Probably, even with gnsutep-base-1_15.dll placed in the game folder, it may require the newer version objc-1.dll. So, distribution of this particular exe will be somewhat tricky.
CmdrLUke: Vanilla Oolite is built using GNUstep version 1.13.0. For distribution of home made exes, you will need to either build against this version or distribute the entire set of dlls in your oolite.app folder, together with the executable itself.
However, CL's exe has been compiled using the latest GNUstep version and indeed requires gnustep-base-1_15.dll. It will not run as is on a standard Oolite installation. Probably, even with gnsutep-base-1_15.dll placed in the game folder, it may require the newer version objc-1.dll. So, distribution of this particular exe will be somewhat tricky.
CmdrLUke: Vanilla Oolite is built using GNUstep version 1.13.0. For distribution of home made exes, you will need to either build against this version or distribute the entire set of dlls in your oolite.app folder, together with the executable itself.
another_commander wrote:The difference in sizes between CmdrLUke's and official release executables is due to debug information being stripped out from the official exe, but not from CL's. This should have no effect from the end user's standpoint.
However, CL's exe has been compiled using the latest GNUstep version and indeed requires gnustep-base-1_15.dll. It will not run as is on a standard Oolite installation. Probably, even with gnsutep-base-1_15.dll placed in the game folder, it may require the newer version objc-1.dll. So, distribution of this particular exe will be somewhat tricky.
CmdrLUke: Vanilla Oolite is built using GNUstep version 1.13.0. For distribution of home made exes, you will need to either build against this version or distribute the entire set of dlls in your oolite.app folder, together with the executable itself.
Hmm I figured this may be tricky... But I tried simply copying the oolite.exe from the build area into the c:\Program Files\Oolite\oolite.app, and it worked! Are you saying that there will be problems with running this? I have 1.71.2 installed to start with, maybe that particular release has all the right versions of things already?
Mine's a vanilla 1.71.2 install, and it choked on the dll I mentioned above. Gave error dialogue box saying the dll was missing and went no further...
I guess your machine has the dll's etc onboard somewhere that Windows can find them, which allows it to run. Mine (and probably most other people's) doesn't, so it won't run.
I guess your machine has the dll's etc onboard somewhere that Windows can find them, which allows it to run. Mine (and probably most other people's) doesn't, so it won't run.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
Here's the full oolite.app directory (minus the Resources directory since that should be identical to a 1.71.2 vanilla install)
http://www.box.net/shared/0qqt0t6ihy
This was built from the 1.71.2 tarball with the application of two 1.72 pending fixes and one fix of mine:
+ performance boost in short range chart screen, fixes in-flight performance degredation.
+ Adds "highlight reticle to red" when the target is centered in the reticle (doesn't guarantee a hit, though, as I've found, so it's not a cheat, but it does aid long range targetting, and it's just cool )
+ My personal "crappy joystick centering" fix that treats joysticks "close" (within 6%) to center as being centered.
http://www.box.net/shared/0qqt0t6ihy
This was built from the 1.71.2 tarball with the application of two 1.72 pending fixes and one fix of mine:
+ performance boost in short range chart screen, fixes in-flight performance degredation.
+ Adds "highlight reticle to red" when the target is centered in the reticle (doesn't guarantee a hit, though, as I've found, so it's not a cheat, but it does aid long range targetting, and it's just cool )
+ My personal "crappy joystick centering" fix that treats joysticks "close" (within 6%) to center as being centered.
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
Something is still wrong. The message "This application has failed to start because gnustep-base-1_15.dll was not found. Re-installing the application may fix this problem." still pops up. Apparently, when Oolite starts in your system, it finds gnustep-base-1_15.dll at some place other than the oolite.app folder, most likely at Windows\System32, and uses it. The gnustep-base.dll in oolite.app is ignored.
Try this. Rename gnustep-base.dll in your oolite.app folder to something different, then launch Oolite. Does it start? If yes, then this is it. Probably the best fix would be to copy the following files from your GNUstep installation inside oolite.app, then distribiute it: gnustep-base-1_15.dll, objc-1.dll, libxml2-2.dll, libiconv-2.dll, libcharset-1.dll.
I hope this helps. Feel free to PM if any problems are encountered.
Try this. Rename gnustep-base.dll in your oolite.app folder to something different, then launch Oolite. Does it start? If yes, then this is it. Probably the best fix would be to copy the following files from your GNUstep installation inside oolite.app, then distribiute it: gnustep-base-1_15.dll, objc-1.dll, libxml2-2.dll, libiconv-2.dll, libcharset-1.dll.
I hope this helps. Feel free to PM if any problems are encountered.
OK, I dug deeper and found that my oolite.exe is dependent upon the presence of these two folders (at least to start up correctly, I hope there are no further mid-game dependencies that are hidden):
C:\GNUstep\GNUstep\System\Library
C:\GNUstep\GNUstep\System\Tools
so I've created a skeleton of the GNUstep folder containing only those folders and made it available here (10MB, just under the box.net limit with Ultra compression turned on):
http://www.box.net/shared/y9gaoqb3la
unpack it at the top level of the C drive: C:\
You should get the folders listed above.
Hopefully this will work! Sorry for any confusion or wasted time this may have caused.
C:\GNUstep\GNUstep\System\Library
C:\GNUstep\GNUstep\System\Tools
so I've created a skeleton of the GNUstep folder containing only those folders and made it available here (10MB, just under the box.net limit with Ultra compression turned on):
http://www.box.net/shared/y9gaoqb3la
unpack it at the top level of the C drive: C:\
You should get the folders listed above.
Hopefully this will work! Sorry for any confusion or wasted time this may have caused.
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
I am still not able to run your executable, CmdrLUke. This time I get a window opening, but then nothing happens. The stderr.txt looks like this:
For some reason, valid .plist files cannot be recognized as valid. I am at a loss as to why. I will try some tests when I get the opportunity and see if this can be resolved any easy way.
BTW, if anyone can get it to run, I would be interested to know what they did to achieve it.
Edit: Apparently, there are problems reading XML style plists. NeXTstep format plists seem to be read OK.
May I kindly ask that you upload also your libxml2-2.dll, libiconv-2.dll and libcharset-1.dll, if you have versions different than the standard distributed ones? These are indirect dependencies of gnustep-base.
Code: Select all
2008-09-04 08:26:30.563 oolite[2584] unable to find GNUstep DTD - 'plist-0_9' for '-//Apple Computer//DTD PLIST 1.0//EN'
2008-09-04 08:26:30.563 oolite[2584] File NSDictionary.m: 608. In [GSDictionary -initWithContentsOfFile:] Contents of file 'D:\ookill/oolite.app/Resources/Info-gnustep.plist' does not contain a dictionary
2008-09-04 08:26:30.563 oolite[2584] unable to find GNUstep DTD - 'plist-0_9' for '-//Apple Computer//DTD PLIST 1.0//EN'
2008-09-04 08:26:30.563 oolite[2584] File NSDictionary.m: 608. In [GSDictionary -initWithContentsOfFile:] Contents of file 'D:\ookill/oolite.app/Resources/Info-gnustep.plist' does not contain a dictionary
2008-09-04 08:26:30.563 oolite[2584] [log.header]: Opening log for Oolite version <unknown version> (x86-32) under Windows at 2008-09-04 08:26:30 +0200.
2 processors detected.
Note that the contents of the log file can be adjusted by editing logcontrol.plist.
2008-09-04 08:26:30.579 oolite[2584] [unclassified.MyOpenGLView]: initialising SDL
2008-09-04 08:26:30.766 oolite[2584] [unclassified.JoystickHandler]: init: numSticks=0
2008-09-04 08:26:30.766 oolite[2584] unable to find GNUstep DTD - 'plist-0_9' for '-//Apple Computer//DTD PLIST 1.0//EN'
2008-09-04 08:26:30.766 oolite[2584] File NSDictionary.m: 608. In [GSDictionary -initWithContentsOfFile:] Contents of file 'D:\ookill/oolite.app/Resources/Info-gnustep.plist' does not contain a dictionary
2008-09-04 08:26:30.766 oolite[2584] [unclassified.MyOpenGLView]: CREATING MODE LIST
2008-09-04 08:26:30.766 oolite[2584] [unclassified.MyOpenGLView]: Unknown architecture, defaulting to 1024x768
2008-09-04 08:26:30.766 oolite[2584] [unclassified.MyOpenGLView]: Added res 1440 x 900
2008-09-04 08:26:30.766 oolite[2584] [unclassified.MyOpenGLView]: Added res 1280 x 768
2008-09-04 08:26:30.766 oolite[2584] [unclassified.MyOpenGLView]: Added res 1152 x 864
2008-09-04 08:26:30.766 oolite[2584] [unclassified.MyOpenGLView]: Added res 1024 x 768
2008-09-04 08:26:30.766 oolite[2584] [unclassified.MyOpenGLView]: Added res 900 x 1440
2008-09-04 08:26:30.766 oolite[2584] [unclassified.MyOpenGLView]: Added res 864 x 1152
2008-09-04 08:26:30.766 oolite[2584] [unclassified.MyOpenGLView]: Added res 800 x 600
2008-09-04 08:26:30.766 oolite[2584] [unclassified.MyOpenGLView]: Added res 768 x 1280
2008-09-04 08:26:30.766 oolite[2584] [unclassified.MyOpenGLView]: Added res 640 x 480
2008-09-04 08:26:30.766 oolite[2584] [unclassified.MyOpenGLView]: Added res 600 x 1280
2008-09-04 08:26:30.766 oolite[2584] [unclassified.MyOpenGLView]: Added res 512 x 384
2008-09-04 08:26:30.766 oolite[2584] [unclassified.MyOpenGLView]: Added res 480 x 640
2008-09-04 08:26:30.766 oolite[2584] [unclassified.MyOpenGLView]: Added res 400 x 300
2008-09-04 08:26:30.766 oolite[2584] [unclassified.MyOpenGLView]: Added res 384 x 512
2008-09-04 08:26:30.766 oolite[2584] [unclassified.MyOpenGLView]: Added res 320 x 240
2008-09-04 08:26:30.813 oolite[2584] [unclassified.MyOpenGLView]: drawRect calling initialiseGLWithSize
2008-09-04 08:26:30.813 oolite[2584] [unclassified.MyOpenGLView]: Creating a new surface of 800 x 600
2008-09-04 08:26:30.829 oolite[2584] [unclassified.MyOpenGLView]: no universe, clearning surface
2008-09-04 08:26:30.829 oolite[2584] [rendering.opengl.version]: OpenGL renderer version: 1.5.0 ("1.5.0 - Build 7.14.10.4935")
Vendor: Intel
Renderer: Intel 965/963 Graphics Media Accelerator
2008-09-04 08:26:30.829 oolite[2584] [rendering.opengl.extensions]: OpenGL extensions (52):
GL_ARB_depth_texture GL_ARB_fragment_program GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_point_parameters GL_ARB_shadow GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_env_crossbar GL_ARB_transpose_matrix GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_window_pos GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_compiled_vertex_array GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_packed_pixels GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_two_side GL_ARB_texture_rectangle GL_EXT_texture_rectangle GL_EXT_stencil_wrap GL_EXT_texture_compression_s3tc GL_EXT_texture_env_add GL_EXT_texture_env_combine GL_EXT_texture_lod_bias GL_EXT_texture_filter_anisotropic GL_EXT_texture3D GL_3DFX_texture_compression_FXT1 GL_IBM_texture_mirrored_repeat GL_NV_blend_square GL_NV_texgen_reflection GL_SGIS_generate_mipmap GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_WIN_swap_hint
2008-09-04 08:26:30.829 oolite[2584] [rendering.opengl.shader.support]: Shaders will not be used (OpenGL extension GL_ARB_shader_objects is not available).
2008-09-04 08:26:30.829 oolite[2584] unable to find GNUstep DTD - 'plist-0_9' for '-//Apple Computer//DTD PLIST 1.0//EN'
2008-09-04 08:26:30.829 oolite[2584] File NSDictionary.m: 608. In [GSDictionary -initWithContentsOfFile:] Contents of file 'D:\ookill/oolite.app/Resources/Info-gnustep.plist' does not contain a dictionary
2008-09-04 08:26:30.876 oolite[2584] [dataCache.rebuild]: Data cache version (1.71.2) does not match Oolite version ((nil)), rebuilding cache.
2008-09-04 08:26:30.876 oolite[2584] unable to find GNUstep DTD - 'plist-0_9' for '-//Apple Computer//DTD PLIST 1.0//EN'
2008-09-04 08:26:30.876 oolite[2584] File NSDictionary.m: 608. In [GSDictionary -initWithContentsOfFile:] Contents of file 'D:\ookill/oolite.app/Resources/Info-gnustep.plist' does not contain a dictionary
2008-09-04 08:26:30.876 oolite[2584] unable to find GNUstep DTD - 'plist-0_9' for '-//Apple Computer//DTD PLIST 1.0//EN'
2008-09-04 08:26:30.876 oolite[2584] File NSDictionary.m: 608. In [GSDictionary -initWithContentsOfFile:] Contents of file 'D:\ookill/oolite.app/Resources/Info-gnustep.plist' does not contain a dictionary
2008-09-04 08:26:30.876 oolite[2584] [oxp.versionMismatch]: OXP AddOns/BountyScanner.oxp is incompatible with version (nil) of Oolite.
2008-09-04 08:26:30.891 oolite[2584] unable to find GNUstep DTD - 'plist-0_9' for '-//GNUstep//DTD plist 0.9//EN'
2008-09-04 08:26:31.344 oolite[2584] don't know how to load entity 'http://www.gnustep.org/plist-0_9.xml' id '-//GNUstep//DTD plist 0.9//EN'
.:3: validity error : Validation failed: no DTD found !
<plist version="1.0">
^
2008-09-04 08:26:31.344 oolite[2584] unable to find GNUstep DTD - 'plist-0_9' for '-//Apple Computer//DTD PLIST 1.0//EN'
2008-09-04 08:26:31.344 oolite[2584] File NSDictionary.m: 608. In [GSDictionary -initWithContentsOfFile:] Contents of file 'D:\ookill/oolite.app/Resources/Info-gnustep.plist' does not contain a dictionary
2008-09-04 08:26:31.344 oolite[2584] unable to find GNUstep DTD - 'plist-0_9' for '-//GNUstep//DTD plist 0.9//EN'
BTW, if anyone can get it to run, I would be interested to know what they did to achieve it.
Edit: Apparently, there are problems reading XML style plists. NeXTstep format plists seem to be read OK.
May I kindly ask that you upload also your libxml2-2.dll, libiconv-2.dll and libcharset-1.dll, if you have versions different than the standard distributed ones? These are indirect dependencies of gnustep-base.
-
- Above Average
- Posts: 17
- Joined: Thu Jul 12, 2007 12:35 am
This is quite strange. I compiled SVN rev 1780 yesterday on my system (GNUStep and WinXP) and started Oolite and could play nicely.
Today i wanted to start the game again, but now it complains it cannot find gnustep-base-1_15.dll
Yesterday it ran fine, today it says it cannot find a dll
Another question, though: How do I set the version for the compiled exe? For me it is "nil" now, which means every OXP gives me the 'wrong oolite version" message.
Today i wanted to start the game again, but now it complains it cannot find gnustep-base-1_15.dll
Yesterday it ran fine, today it says it cannot find a dll
Another question, though: How do I set the version for the compiled exe? For me it is "nil" now, which means every OXP gives me the 'wrong oolite version" message.
The version number is read from Info-gnustep.plist in the Resources directory. I had this issue after mucking about with the makefiles and accidentally copying this file with its original filename (Info-Oolite.plist) instead of renaming it.Sotho Tal Ker wrote:Another question, though: How do I set the version for the compiled exe? For me it is "nil" now, which means every OXP gives me the 'wrong oolite version" message.
Make sure your GNU environment variables are setup correctly under Windows in order for Oolite to use all the correct paths. The RunOolite.bat file of the binary distribution is a good starting point.
The glass is twice as big as it needs to be.
-
- Above Average
- Posts: 17
- Joined: Thu Jul 12, 2007 12:35 am
Ok, I got Oolite finally working halfway alright again.
I manually copied over all dll files it needs so i got the SVN version to run again.
Strangely the version compiled from SVN wants to connect to ftp.gnustep.org on startup and if I allow that to happen the game hangs. If i disallow internet access the game starts fine.
Also I could not get the version thingy to work.
I did copy the Info-gnustep.plist from 1.71.2 and it still displays "nil"
I did copy and rename the Info-oolite.plist from SVN to Info-gnustep.plist and it still displays "nil".
Any other thoughts on the version display issue? Maybe it is just me or it is broken?
I manually copied over all dll files it needs so i got the SVN version to run again.
Strangely the version compiled from SVN wants to connect to ftp.gnustep.org on startup and if I allow that to happen the game hangs. If i disallow internet access the game starts fine.
Also I could not get the version thingy to work.
I did copy the Info-gnustep.plist from 1.71.2 and it still displays "nil"
I did copy and rename the Info-oolite.plist from SVN to Info-gnustep.plist and it still displays "nil".
Any other thoughts on the version display issue? Maybe it is just me or it is broken?