Page 1 of 2

The future for the Mac build

Posted: Thu May 15, 2025 5:19 am
by phkb
For all the Mac users out there, here is a Deployment build of the Mac version, version 1.90, that has a corrected Expansion Manager URL in it: {removed}. If a few people can download and run this on their Macs, and confirm the Expansion Manager is working out of the box, maybe we can host it on the GitHub site. (BTW the version is still 1.90, the "a" is just in the filename of the zip to keep it separate from the original zip.)

I didn't want to have to write this post. I was hoping that with enough perseverance, I could somehow wrangle the Mac code into a functioning state for 1.91. I regret to inform everyone that, even with Bogatyr's brilliance in getting the 1.90 build updated, I still can't get the newest code to work. Apple has quite literally thrown OpenGL under the bus. If it's possible to resurrect the latest trunk on Mac, it will need someone far more knowledgeable than me with Xcode and the Mac in general.

But I'm not quite ready to leave Mac users behind. They may not get to appreciate the graphical updates that have been added to the Windows build, but there are other things that have been added, quite separate to the graphics, that are worth having. The in-game keyboard config for one (and yes, I appreciate that I am quite biased, as I was the one who added that!), but also general bug fixes.

I have a proposal - it's not a very good one, but It's the only plan I can think of that can keep the Mac build going a bit longer. My proposal is to fork the Mac build from the current Oolite project, creating a new Mac-only code base. From there, we can take the build Bogatyr put together, and then individually apply all the patches that have been made to the game in Trunk that aren't related to graphics. By doing this, we bring the Mac build *mostly* up to date, and open up the possibility of actually getting 1.92 over the line (with obviously some work on the Linux build to follow).

The benefit of creating a fork is that we can avoid even more of the "If this is a Mac, do something this way, otherwise do it another way for Windows" code that currently inhabits the codebase. Because it will be just for the Mac, we can do things one way.

The downside of creating a fork is that it effectively doubles the amount of code in the main project. It also means a lot of the documentation will have to be adjusted (specifically code related to building the Mac version).

I'm also fully aware that my ideas aren't always the best, so at this point I'll open the topic up for debate. Maybe there's another option I haven't considered. Please add your comments.

Re: The future for the Mac build

Posted: Thu May 15, 2025 5:37 am
by hiran
Kudos for coming up with a successful rebuild! :-)

Forking the project could prolong the existence for Mac users - but only those on legacy hardware.

Since about 2020 Apple has shifted their CPU architecture (again, as can be seen here). That means the build you created will only be usable on Macs at least five years old, unless there is a major upgrade to the dependencies - including graphics as you pointed out.

Probably a decision to be taken and acted on by Mac users themselves.

Re: The future for the Mac build

Posted: Thu May 15, 2025 5:40 am
by phkb
hiran wrote: Thu May 15, 2025 5:37 am
Kudos for coming up with a successful rebuild!
Thanks goes to Bogatyr - basically I just took his code and compiled it!

Re: The future for the Mac build

Posted: Thu May 15, 2025 6:05 am
by another_commander
Have you investigated the possibility of utilizing an abstraction layer from OpenGL to Metal? A very quick and dirty search reveals a project called MGL but I don't know how feasible it is to set it up for Oolite or, in general, use it.

As for the fork proposal, I'd say that since the alternative is to lose Mac altogether, it might be worth it. But I'd advise doing it first on a personal fork and, if things start taking shape, then move it to the OoliteProject on github, possibly under a separate branch. In any case, the logistics of having to maintain two source trees whenever a change is made will be quite interesting.

You know, it's funny that it seems to be coming full circle with this now: back in 2006 the Mac codebase was its own thing and Linux/Windows were essentially forks. Then the Grand Unified Source Tree for Oolite (GUSTO) was created and the codebases were merged in one. Until now, when the proposal to separate them again, this time making Mac the fork, drops on the table. Fascinating.

Re: The future for the Mac build

Posted: Thu May 15, 2025 6:17 am
by phkb
another_commander wrote: Thu May 15, 2025 6:05 am
Have you investigated the possibility of utilizing an abstraction layer from OpenGL to Metal? A very quick and dirty search reveals a project called MGL but I don't know how feasible it is to set it up for Oolite or, in general, use it.
I'll have a look. If it's straightforward to implement, *maybe* my skills will be sufficient. We'll see!
I'd just like to state, for the record, I don't like Xcode. I've been too long programming with Windows tools, so everything in Xcode is difficult.
another_commander wrote: Thu May 15, 2025 6:05 am
But I'd advise doing it first on a personal fork and, if things start taking shape, then move it to the OoliteProject on github, possibly under a separate branch
Good call. Will do. Not quite ready yet, but when it comes time, I'll do it this way.
another_commander wrote: Thu May 15, 2025 6:05 am
You know, it's funny that it seems to be coming full circle with this now: back in 2006 the Mac codebase was its own thing and Linux/Windows were essentially forks. Then the Grand Unified Source Tree for Oolite (GUSTO) was created and the codebases were merged in one. Until now, when the proposal to separate them again, this time making Mac the fork, drops on the table. Fascinating.
That is funny!

Re: The future for the Mac build

Posted: Thu May 15, 2025 10:38 am
by Cholmondely
Downloaded. Unzipped. When I tried to open it (either with or without "control" held down), I got this:


The application “Oolite 1.90a” can’t be opened.

Button: OK




But with all previous versions which worked, I'd get this on clicking the unzipped game:


“Oolite 1.90TR” cannot be opened because the developer cannot be verified.

macOS cannot verify that this app is free from malware.

Waterfox downloaded this file today at 11:27 from oolite.space.


Buttons: Move to Bin <> Cancel




And then I'd reclick with "control" held down and get this



macOS cannot verify the developer of “Oolite 1.90TR”. Are you sure you want to open it?

By opening this app, you will be overriding system security which can expose your computer and personal information to malware that may harm your Mac or compromise your privacy.

Waterfox downloaded this file today at 11:27 from oolite.space.


Buttons: Move to Bin <> Open <> Cancel

Re: The future for the Mac build

Posted: Thu May 15, 2025 10:44 am
by phkb
Hmm. I’ll have to have another look at that on the weekend. Something must’ve gone wrong.

Re: The future for the Mac build

Posted: Thu May 15, 2025 11:00 am
by Cholmondely
I just had another go, using Terminal and the instructions Hiran gave me here

I typed in "./ " and then dragged the unzipped game icon onto it (and then, later, the app hidden inside it)

Each time it spat out this:

zsh: permission denied: ./

Re: The future for the Mac build

Posted: Thu May 15, 2025 11:59 am
by phkb
Yeah, I've done something wrong. I'll have to power up the VM on the weekend and try again. Bit late now.

Re: The future for the Mac build

Posted: Sat May 17, 2025 5:28 am
by phkb
OK, try this download: oolite-1.90a_try.zip

And I did check that this runs correctly:
Image

Re: The future for the Mac build

Posted: Sat May 17, 2025 10:00 pm
by Cholmondely
Congratulations, Sir!

It opened, it loaded, etc.

Thanking thee!

Latest.log looks good to this dumb pilot:

Code: Select all

Opening log for Oolite version 1.90 (x86-64) under Mac OS X Version 10.15.3 (Build 19D2064) at 2025-05-17 21:53:50 +0000.
Machine type: MacBookAir9,1, 8192 MiB memory, 2 (4 logical) x x86 (family 0x38435547) @ 1100 MHz.
Build options: OpenAL, new planets.

Note that the contents of the log file can be adjusted by editing logcontrol.plist.

22:53:52.136 [oxp.message] +[ResourceManager checkOXPMessagesInPath:] (ResourceManager.m:576): /Users/accountname/Library/Application Support/Oolite/AddOns/LitF+v0.07.oxp: Development version- not recommended for regular play-thru
22:53:53.428 [dataCache.rebuild.pathsChanged] +[ResourceManager checkCacheUpToDateForPaths:] (ResourceManager.m:1156): Cache is stale (search paths have changed). Rebuilding from scratch.
22:53:54.133 [joystick.error.init] -[OOMacJoystickManager init] (OOMacJoystickManager.m:80): Cannot open HID manager; joystick support will not function.
22:53:54.135 [rendering.opengl.version] -[OOOpenGLExtensionManager reset] (OOOpenGLExtensionManager.m:221): OpenGL renderer version: 2.1.0 ("2.1 INTEL-14.4.26"). Vendor: "Intel Inc.". Renderer: "Intel(R) Iris(TM) Plus Graphics OpenGL Engine (1x6x8 (fused) LP".
22:53:54.135 [rendering.opengl.extensions] -[OOOpenGLExtensionManager reset] (OOOpenGLExtensionManager.m:222): OpenGL extensions (128):
GL_EXT_texture_compression_dxt1, GL_EXT_rescale_normal, GL_EXT_transform_feedback, GL_EXT_blend_func_separate, GL_EXT_framebuffer_sRGB, GL_ATI_texture_env_combine3, GL_ARB_draw_elements_base_vertex, GL_EXT_debug_label, GL_EXT_geometry_shader4, GL_EXT_secondary_color, GL_EXT_separate_specular_color, GL_EXT_shadow_funcs, GL_NV_texgen_reflection, GL_NV_blend_square, GL_ARB_texture_compression_rgtc, GL_EXT_stencil_wrap, GL_ARB_texture_env_crossbar, GL_EXT_framebuffer_blit, GL_ATI_separate_stencil, GL_APPLE_vertex_point_size, GL_EXT_texture_rectangle, GL_APPLE_specular_vector, GL_EXT_packed_depth_stencil, GL_EXT_blend_color, GL_ARB_fragment_program_shadow, GL_EXT_texture_env_add, GL_EXT_provoking_vertex, GL_EXT_texture_array, GL_ARB_texture_env_combine, GL_ARB_point_sprite, GL_ARB_multisample, GL_EXT_framebuffer_object, GL_ARB_framebuffer_sRGB, GL_EXT_texture_lod_bias, GL_APPLE_pixel_buffer, GL_ARB_vertex_program, GL_EXT_bgra, GL_APPLE_fence, GL_APPLE_ycbcr_422, GL_EXT_timer_query, GL_EXT_vertex_array_bgra, GL_ARB_depth_clamp, GL_IBM_rasterpos_clip, GL_ARB_pixel_buffer_object, GL_SGIS_generate_mipmap, GL_EXT_framebuffer_multisample_blit_scaled, GL_ARB_shader_texture_lod, GL_ARB_texture_float, GL_ARB_texture_rectangle, GL_ARB_vertex_shader, GL_NV_texture_barrier, GL_ARB_provoking_vertex, GL_ARB_texture_env_add, GL_APPLE_object_purgeable, GL_ARB_texture_env_dot3, GL_APPLE_rgb_422, GL_NV_depth_clamp, GL_ARB_texture_mirrored_repeat, GL_ARB_texture_cube_map, GL_APPLE_element_array, GL_ATI_texture_float, GL_ARB_window_pos, GL_ARB_sync, GL_ARB_vertex_buffer_object, GL_APPLE_texture_range, GL_NV_conditional_render, GL_EXT_stencil_two_side, GL_ARB_texture_compression, GL_ARB_instanced_arrays, GL_EXT_blend_minmax, GL_ARB_texture_border_clamp, GL_EXT_draw_buffers2, GL_ARB_shading_language_100, GL_EXT_blend_equation_separate, GL_ARB_vertex_blend, GL_EXT_blend_subtract, GL_EXT_packed_float, GL_APPLE_aux_depth_stencil, GL_APPLE_row_bytes, GL_NV_light_max_exponent, GL_EXT_abgr, GL_EXT_texture_filter_anisotropic, GL_ARB_vertex_array_bgra, GL_ARB_draw_buffers, GL_ARB_transpose_matrix, GL_ARB_color_buffer_float, GL_EXT_gpu_program_parameters, GL_APPLE_client_storage, GL_ARB_texture_non_power_of_two, GL_ARB_multitexture, GL_EXT_gpu_shader4, GL_APPLE_flush_render, GL_ARB_framebuffer_object, GL_APPLE_vertex_program_evaluators, GL_APPLE_transform_hint, GL_EXT_texture_compression_s3tc, GL_APPLE_flush_buffer_range, GL_EXT_texture_integer, GL_SGIS_texture_edge_clamp, GL_NV_fog_distance, GL_ARB_occlusion_query, GL_ARB_fragment_shader, GL_ARB_texture_rg, GL_ARB_fragment_program, GL_ARB_seamless_cube_map, GL_ARB_shader_objects, GL_EXT_draw_range_elements, GL_APPLE_vertex_array_object, GL_ARB_depth_texture, GL_EXT_texture_sRGB, GL_ARB_half_float_vertex, GL_APPLE_vertex_array_range, GL_ARB_shadow, GL_EXT_multi_draw_arrays, GL_ARB_half_float_pixel, GL_APPLE_packed_pixels, GL_ARB_point_parameters, GL_EXT_debug_marker, GL_EXT_texture_sRGB_decode, GL_EXT_clip_volume_hint, GL_SGIS_texture_lod, GL_EXT_fog_coord, GL_EXT_texture_shared_exponent, GL_ATI_texture_mirror_once, GL_APPLE_float_pixels, GL_EXT_framebuffer_multisample, GL_ARB_depth_buffer_float, GL_ARB_draw_instanced
22:53:54.704 [rendering.opengl.shader.support] -[OOOpenGLExtensionManager reset] (OOOpenGLExtensionManager.m:256): Shaders are supported.
22:53:55.267 [oxp.message] +[ResourceManager checkOXPMessagesInPath:] (ResourceManager.m:576): /Users/accountname/Library/Application Support/Oolite/AddOns/LitF+v0.07.oxp: Development version- not recommended for regular play-thru
22:53:55.273 [dataCache.rebuild.pathsChanged] +[ResourceManager checkCacheUpToDateForPaths:] (ResourceManager.m:1156): Cache is stale (search paths have changed). Rebuilding from scratch.
22:53:55.326 [searchPaths.dumpAll] +[ResourceManager logPaths] (ResourceManager.m:2240): Resource paths: 
Lo-o-o-ng list of OXPs guaranteed to give a_c a chronic case of coruscating conniptions
I will be in touch if any untoward occurences transpire!

Re: The future for the Mac build

Posted: Sat May 17, 2025 10:17 pm
by phkb
Well that’s a relief! I’ll put a release-worthy version together this afternoon, with an actual version number change in it, and then we can look at source code check-in and hosting.

Re: The future for the Mac build

Posted: Sun May 18, 2025 5:26 am
by hiran
Oh that sounds really great. 8)

Would it feasible to add the '-load" command line option so Oolite-Mac can be started with a savegame, just like on the other platforms?

Then OoliteStarter's value would be much better on the Mac, too. Currently that button is disabled as it would not work anyway.

Re: The future for the Mac build

Posted: Sun May 18, 2025 6:51 am
by Cholmondely
Two issues.

Don't know if they are due to this version of Oolite, or to my OXP cocktail (I only just added in Extra Thargoids and Thargorn Threat).

1) The "music" eventually gave out but the "sound" remained: Arquebus's Jukebox stopped playing after a bit, but the other sounds remained.
2) The frame rate slowed right down when I went into battle with the bugs. Painful! I had to flee. This is new.

It is possible that if I'd carried on playing perhaps the other sounds would have gone too (this happens with the original 1.90). If this happens then the new 1.90 seems to be little improvement on the old (apart from the updated url).

My save files are massive (I'm in G7 with lots of Assassins Guild overwriting and other stuff). And I understand that the latest.log can be tweaked to give more information.

What should I do?

Re: The future for the Mac build

Posted: Sun May 18, 2025 12:15 pm
by phkb
Cholmondely wrote: Sun May 18, 2025 6:51 am
2) The frame rate slowed right down when I went into battle with the bugs. Painful! I had to flee. This is new.
This is concerning. That would mean that something is fundamentally different between the official release and this custom one. But I'm completely at a loss as to what I can do to debug or rectify it. I'm compiling on a Hackintosh VM - that itself could be the problem. Bogatyr's changes could be related - one of the necessary changes was changing the C libraries used to compile, so there could be an issue there.

But more than that - I can't actually play the game in my VM. I can start it, and confirm it loads a new game, I can launch, but not actually play the game. I get like 10fps looking at an empty piece of space. Which drops to about 4fps when looking at a planet. My hope was that it would be sufficient to build the game and package it up and potentially share it. But if there are serious debugging requirements, I don't have the setup to do it.

@Bogatyr, if you're reading this, any help would be great! Jump in any time.

We'll have to press pause here while I reassess what might be possible.

I'm just going to step out for a moment.

I may be some time.