Windows MSYS2 MinGW64 environment development
Moderators: another_commander, winston
-
another_commander
- Quite Grand Sub-Admiral

- Posts: 7136
- Joined: Wed Feb 28, 2007 7:54 am
Re: Windows MSYS2 MinGW64 environment development
Will do in a few hours once I am back at the dev PC. In the meantime I just remembered something else that I encountered during yesterday's attempt. While the script was running, Oolite started building normally (before reaching the point of failure). But when I tried to execute a manual make debug=no from the prompt, I got an error message that common.make could not be found. Common.make is part of gnustep-make and it looks like the required environment variables were not set outside of the script. This is something to look out for, the build should be doable at any time after launching the dev environment.
-
another_commander
- Quite Grand Sub-Admiral

- Posts: 7136
- Joined: Wed Feb 28, 2007 7:54 am
Re: Windows MSYS2 MinGW64 environment development
OK, back on the dev pc, here are the results:
The good news: It built Oolite successfully inside the Windows Sandbox environment. We are looking pretty good.
The not so good news: The game does not run correctly yet. Apart from the Expansion Manager requiring an external executable to function, there are also a few other problems when running the game involving creating the cache folders. Below is the log of my test run in the sandbox.

What I should normally see here is .GNUstepDefaults. Not sure what the consequences of not using the expected defaults file name are. That's one thing to look at.
Second thing to look at is why the cache file cannot be created. The latest gnustep-base is doing something strange here.
The good news: It built Oolite successfully inside the Windows Sandbox environment. We are looking pretty good.
The not so good news: The game does not run correctly yet. Apart from the Expansion Manager requiring an external executable to function, there are also a few other problems when running the game involving creating the cache folders. Below is the log of my test run in the sandbox.
Note that it fails to write the cache file twice. In addition to that, looking into the GNUstep/Defaults folder I am seeing something very strange:Latest.log wrote:Opening log for Oolite version 1.91 (x86-64 test release) under Windows 10.0.26100.6725 64-bit at 2025-10-11 13:53:52 +0300.
12th Gen Intel(R) Core(TM) i7-12700H 20 processors detected. System RAM: 4094 MB (free: 2755 MB).
Build options: OpenAL, GLSL shaders, new planets, JavaScript console support, OXP verifier, localization tools, debug GraphViz support, JavaScript profiling.
Note that the contents of the log file can be adjusted by editing logcontrol.plist.
13:53:52.019 [dataCache.notFound]: No data cache found, starting from scratch.
13:53:52.020 [dataCache.write.buildPath.failed]: Could not create folder C:/oodev/oolite/oolite.app/GNUstep/Library/Caches.
13:53:52.022 [process.args]: Startup command: oolite
13:53:52.088 [display.initGL]: V-Sync requested.
13:53:52.088 [display.mode.list.native]: Windows native resolution detected: 1920 x 1040
13:53:52.088 [display.initGL]: Trying 8-bpcc, 24-bit depth buffer
13:53:52.736 [gamma.set.failed]: ----- WARNING: Could not set gamma: Gamma ramp manipulation not supported
13:53:52.736 [display.initGL]: Achieved color / depth buffer sizes (bits):
13:53:52.736 [display.initGL]: Red: 8
13:53:52.736 [display.initGL]: Green: 8
13:53:52.736 [display.initGL]: Blue: 8
13:53:52.736 [display.initGL]: Alpha: 8
13:53:52.737 [display.initGL]: Depth Buffer: 24
13:53:52.737 [display.initGL]: Pixel type is float : 0
13:53:52.737 [display.initGL]: Pixel format index: 10
13:53:52.764 [joystick.init]: Number of joysticks detected: 0
13:53:52.764 [rendering.opengl.version]: OpenGL renderer version: 4.6.0 ("4.6.0 NVIDIA 572.16"). Vendor: "NVIDIA Corporation". Renderer: "NVIDIA GeForce RTX 3050 Laptop GPU/PCIe/SSE2".
13:53:52.765 [rendering.opengl.extensions]: OpenGL extensions (404):
GL_ARB_shader_objects, GL_NV_geometry_shader4, GL_ARB_shading_language_include, GL_EXT_draw_buffers2, GL_NV_pixel_data_range, GL_NVX_gpu_memory_info, GL_NV_register_combiners2, GL_ARB_fragment_program, GL_NV_vertex_program3, GL_ARB_polygon_offset_clamp, GL_ARB_texture_gather, GL_ARB_fragment_shader_interlock, GL_ARB_texture_filter_anisotropic, GL_NV_shader_atomic_int64, GL_ARB_texture_rectangle, GL_ARB_multi_bind, GL_ARB_shader_viewport_layer_array, GL_NV_bindless_multi_draw_indirect_count, GL_NV_timeline_semaphore, GL_EXT_texture_mirror_clamp, GL_NV_gpu_program4_1, GL_ARB_texture_rgb10_a2ui, GL_ARB_seamless_cube_map, GL_ARB_multitexture, GL_ARB_vertex_buffer_object, GL_ARB_texture_barrier, GL_IBM_texture_mirrored_repeat, GL_EXT_texture_cube_map, GL_ARB_texture_cube_map_array, GL_ARB_enhanced_layouts, GL_ARB_shader_image_load_store, GL_EXT_framebuffer_blit, GL_ARB_texture_multisample, GL_NV_gpu_program_fp64, GL_NV_gpu_program5_mem_extended, GL_EXT_semaphore_win32, GL_ARB_fragment_shader, GL_EXT_texture_compression_rgtc, GL_ARB_shader_precision, GL_EXT_blend_subtract, GL_AMD_vertex_shader_viewport_index, GL_EXT_texture3D, GL_EXT_bindable_uniform, GL_ARB_ES2_compatibility, GL_ARB_texture_float, WGL_EXT_swap_control, GL_NVX_blend_equation_advanced_multi_draw_buffers, GL_ARB_draw_instanced, GL_NV_texture_rectangle_compressed, GL_ARB_texture_buffer_object_rgb32, GL_NV_transform_feedback2, GL_EXT_packed_depth_stencil, GL_NV_command_list, GL_NV_explicit_multisample, GL_NV_texgen_reflection, GL_NV_primitive_restart, GL_ARB_depth_clamp, GL_ARB_shading_language_packing, GL_AMD_multi_draw_indirect, GL_NV_fragment_shader_interlock, GL_ARB_texture_stencil8, GL_EXT_texture_edge_clamp, GL_ARB_texture_filter_minmax, GL_ARB_explicit_uniform_location, GL_NV_conservative_raster_pre_snap_triangles, GL_KHR_context_flush_control, GL_ARB_occlusion_query2, GL_NV_conditional_render, GL_ARB_vertex_type_10f_11f_11f_rev, GL_NV_memory_attachment, GL_KHR_shader_subgroup, GL_EXT_framebuffer_multisample_blit_scaled, GL_EXT_texture_sRGB_R8, GL_ARB_texture_query_levels, GL_KHR_debug, GL_ARB_shader_clock, GL_EXT_polygon_offset_clamp, GL_EXT_Cg_shader, GL_NV_query_resource_tag, GL_ARB_debug_output, GL_ARB_sample_shading, GL_EXT_provoking_vertex, GL_EXT_blend_minmax, GL_ARB_vertex_attrib_binding, GL_NV_point_sprite, GL_NV_path_rendering_shared_edge, GL_EXT_blend_equation_separate, GL_EXT_shadow_funcs, GL_ARB_draw_buffers, GL_ARB_uniform_buffer_object, GL_ARB_robust_buffer_access_behavior, GL_NV_float_buffer, GL_ATI_texture_mirror_once, GL_KHR_blend_equation_advanced, GL_NV_ES3_1_compatibility, GL_NV_draw_texture, GL_ARB_shading_language_100, GL_NV_gpu_shader5, GL_ARB_seamless_cubemap_per_texture, GL_ARB_pixel_buffer_object, GL_SGIS_generate_mipmap, GL_NV_uniform_buffer_std430_layout, GL_ARB_direct_state_access, GL_ARB_vertex_array_bgra, GL_ARB_ES3_compatibility, GL_EXT_blend_color, GL_KHR_blend_equation_advanced_coherent, GL_ARB_stencil_texturing, GL_ARB_parallel_shader_compile, GL_ARB_multisample, GL_EXT_multiview_timer_query, GL_ARB_compute_shader, GL_NV_texture_dirty_tile_map, GL_NV_feature_query, GL_EXT_texture_sRGB, GL_EXT_window_rectangles, GL_ARB_transform_feedback2, GL_NV_register_combiners, GL_ARB_texture_compression_bptc, GL_ARB_texture_border_clamp, GL_NV_texture_env_combine4, GL_ARB_shader_draw_parameters, GL_ARB_shader_ballot, GL_ARB_imaging, GL_AMD_vertex_shader_layer, GL_EXT_blend_func_separate, GL_ARB_copy_image, GL_ARB_vertex_attrib_64bit, GL_ARB_multi_draw_indirect, GL_ARB_depth_buffer_float, GL_ARB_texture_buffer_object, GL_ARB_sampler_objects, GL_NV_copy_image, GL_ARB_conditional_render_inverted, GL_ARB_blend_func_extended, GL_NV_conservative_raster, GL_NV_fill_rectangle, GL_EXT_shader_image_load_formatted, GL_ARB_sparse_texture2, GL_ARB_timer_query, GL_EXT_gpu_shader4, GL_WIN_swap_hint, GL_EXT_vertex_array_bgra, GL_EXT_texture_swizzle, GL_ARB_query_buffer_object, GL_ARB_arrays_of_arrays, GL_NV_gpu_multicast, GL_NV_shader_atomic_float64, GL_ARB_texture_env_combine, GL_NV_shader_thread_shuffle, GL_NVX_gpu_multicast2, GL_EXT_bgra, GL_ARB_transpose_matrix, GL_NV_query_resource, GL_EXT_fog_coord, GL_EXT_depth_bounds_test, GL_NV_fragment_program_option, GL_EXT_framebuffer_multisample, GL_ARB_transform_feedback3, GL_NV_blend_equation_advanced_coherent, GL_SUN_slice_accum, GL_ARB_base_instance, GL_NV_fragment_program, GL_ARB_ES3_1_compatibility, GL_ARB_transform_feedback_instanced, GL_NV_draw_vulkan_image, GL_ARB_vertex_program, GL_ATI_draw_buffers, GL_NV_vertex_array_range2, GL_EXT_texture_filter_minmax, GL_NV_scissor_exclusive, GL_ARB_invalidate_subdata, GL_NVX_nvenc_interop, GL_KHR_parallel_shader_compile, GL_EXT_texture_storage, GL_EXT_shader_integer_mix, GL_NV_primitive_shading_rate, GL_NV_fragment_coverage_to_color, GL_NV_framebuffer_multisample_coverage, GL_ARB_sync, GL_NV_vertex_program, GL_EXT_compiled_vertex_array, GL_ARB_program_interface_query, GL_NV_mesh_shader, GL_ARB_shader_storage_buffer_object, GL_NV_path_rendering, GL_EXT_multiview_texture_multisample, GL_ARB_vertex_type_2_10_10_10_rev, GL_ARB_get_texture_sub_image, GL_ARB_indirect_parameters, GL_NV_transform_feedback, GL_EXT_secondary_color, GL_ARB_texture_buffer_range, GL_ARB_texture_storage, GL_NV_packed_depth_stencil, GL_NV_blend_minmax_factor, GL_NV_internalformat_sample_query, GL_NV_blend_equation_advanced, GL_ARB_shader_atomic_counter_ops, GL_KHR_no_error, GL_ARB_shader_texture_lod, GL_ARB_clear_buffer_object, GL_NV_sample_mask_override_coverage, GL_ARB_sample_locations, GL_EXT_packed_float, GL_NV_geometry_shader_passthrough, GL_NV_fog_distance, GL_NV_ES1_1_compatibility, GL_EXT_texture_object, GL_SGIX_depth_texture, GL_EXT_texture_integer, GL_EXT_multi_draw_arrays, GL_ARB_spirv_extensions, GL_NV_framebuffer_mixed_samples, GL_ARB_half_float_vertex, GL_NV_blend_square, GL_EXT_gpu_program_parameters, GL_ARB_texture_env_dot3, GL_NVX_conditional_render, GL_EXT_texture_shared_exponent, GL_NV_shader_buffer_load, GL_NV_compute_program5, GL_EXT_packed_pixels, GL_ARB_framebuffer_no_attachments, GL_EXT_texture_lod_bias, GL_ARB_ES3_2_compatibility, GL_ARB_window_pos, GL_NV_multisample_coverage, GL_NV_copy_depth_to_color, GL_ARB_buffer_storage, GL_NV_shader_storage_buffer_object, GL_ARB_occlusion_query, GL_EXT_import_sync_object, GL_ARB_post_depth_coverage, GL_ARB_draw_elements_base_vertex, GL_EXT_draw_range_elements, GL_ARB_texture_non_power_of_two, GL_ARB_gpu_shader_fp64, GL_NV_half_float, GL_EXT_texture_env_dot3, GL_EXT_texture_buffer_object, GL_NV_light_max_exponent, GL_EXT_texture_compression_dxt1, GL_ARB_derivative_control, GL_NV_texture_barrier, GL_NV_memory_object_sparse, GL_ARB_texture_mirrored_repeat, GL_ARB_vertex_array_object, GL_EXT_memory_object_win32, GL_NV_conservative_raster_dilate, GL_EXT_texture_lod, GL_EXT_vertex_array, GL_NV_fence, GL_NV_multisample_filter_hint, GL_ARB_sparse_buffer, GL_KTX_buffer_region, GL_ARB_geometry_shader4, GL_ARB_fragment_program_shadow, GL_KHR_robust_buffer_access_behavior, GL_EXT_pixel_buffer_object, GL_NV_depth_buffer_float, GL_NV_bindless_multi_draw_indirect, GL_EXT_direct_state_access, GL_NV_texture_shader2, GL_ARB_texture_cube_map, GL_ARB_map_buffer_range, GL_EXT_raster_multisample, GL_NV_texture_compression_vtc, GL_ARB_gpu_shader5, GL_EXT_texture_compression_latc, GL_ARB_texture_storage_multisample, GL_EXT_transform_feedback2, GL_ARB_tessellation_shader, GL_ARB_point_parameters, GL_ARB_fragment_layer_viewport, GL_EXT_geometry_shader4, GL_ARB_shader_subroutine, GL_EXT_texture_shadow_lod, GL_EXT_separate_shader_objects, GL_ARB_texture_mirror_clamp_to_edge, GL_ARB_conservative_depth, GL_NV_compute_shader_derivatives, GL_NV_uniform_buffer_unified_memory, GL_EXT_vertex_attrib_64bit, GL_NVX_progress_fence, GL_EXTX_framebuffer_mixed_formats, GL_NV_clip_space_w_scaling, GL_EXT_texture_env_add, GL_ARB_framebuffer_sRGB, GL_EXT_draw_instanced, GL_EXT_separate_specular_color, GL_NV_viewport_array2, GL_ARB_pipeline_statistics_query, GL_NVX_linked_gpu_multicast, GL_NV_texture_rectangle, GL_NV_conservative_raster_pre_snap, GL_EXT_point_parameters, GL_ARB_shader_bit_encoding, GL_ARB_sparse_texture, GL_NV_texture_shader3, GL_NV_occlusion_query, GL_EXT_texture_sRGB_decode, GL_EXT_texture_env_combine, GL_ARB_texture_compression, GL_S3_s3tc, GL_NV_vertex_array_range, GL_EXT_framebuffer_sRGB, GL_ARB_texture_env_add, GL_EXT_timer_query, GL_EXT_framebuffer_object, GL_OVR_multiview, GL_NV_fragment_shader_barycentric, GL_NV_bindless_texture, GL_EXT_stencil_two_side, GL_ARB_transform_feedback_overflow_query, GL_ARB_clip_control, GL_NV_depth_clamp, GL_ARB_sparse_texture_clamp, GL_ARB_gpu_shader_int64, GL_ARB_draw_buffers_blend, GL_NV_fragment_program2, GL_NV_shader_thread_group, GL_ARB_compressed_texture_pixel_storage, GL_EXT_stencil_wrap, GL_ATI_texture_float, GL_ARB_texture_query_lod, GL_ARB_compatibility, GL_NVX_multigpu_info, GL_ARB_texture_swizzle, GL_ARB_shader_texture_image_samples, GL_ARB_provoking_vertex, GL_ARB_internalformat_query2, GL_EXT_texture_array, GL_NV_conservative_raster_underestimation, GL_NV_alpha_to_coverage_dither_control, GL_ARB_shadow, GL_ARB_get_program_binary, GL_EXT_memory_object, GL_ARB_texture_env_crossbar, GL_ARB_texture_view, GL_OVR_multiview2, GL_NV_vertex_attrib_integer_64bit, GL_EXT_rescale_normal, GL_ARB_shading_language_420pack, GL_NV_viewport_swizzle, GL_AMD_seamless_cubemap_per_texture, GL_NV_gpu_program4, GL_NV_shader_atomic_counters, GL_EXT_texture_compression_s3tc, GL_ARB_texture_compression_rgtc, GL_ARB_separate_shader_objects, GL_NV_vertex_program1_1, GL_NV_vertex_program2_option, GL_IBM_rasterpos_clip, GL_NV_shader_atomic_float, GL_ARB_gl_spirv, GL_ARB_depth_texture, GL_NV_sample_locations, GL_EXT_texture_filter_anisotropic, GL_ARB_explicit_attrib_location, GL_ARB_shader_image_size, GL_ARB_robustness, GL_ARB_compute_variable_group_size, GL_NV_parameter_buffer_object2, GL_ARB_draw_indirect, GL_NV_texture_shader, GL_ARB_copy_buffer, GL_EXT_semaphore, GL_ARB_color_buffer_float, GL_ARB_viewport_array, GL_NV_shading_rate_image, GL_EXT_sparse_texture2, GL_ARB_half_float_pixel, GL_EXT_shader_image_load_store, GL_ARB_shader_group_vote, GL_SGIS_texture_lod, GL_NV_parameter_buffer_object, GL_NV_gpu_program5, GL_ARB_shader_atomic_counters, GL_ARB_cull_distance, GL_NV_stereo_view_rendering, GL_ARB_clear_texture, GL_SGIX_shadow, GL_NV_texture_multisample, GL_ARB_map_buffer_alignment, GL_EXT_win32_keyed_mutex, GL_NV_shader_subgroup_partitioned, GL_NV_shader_atomic_fp16_vector, GL_NV_vertex_program2, GL_ARB_internalformat_query, GL_EXT_post_depth_coverage, GL_ARB_texture_rg, GL_ARB_point_sprite, GL_ARB_fragment_coord_conventions, GL_NV_vertex_buffer_unified_memory, GL_KHR_robustness, GL_ARB_framebuffer_object, GL_NV_gpu_program_multiview, GL_ARB_vertex_shader, GL_ARB_instanced_arrays, GL_NV_representative_fragment_test, GL_NV_shader_texture_footprint, GL_EXT_abgr, GL_ARB_bindless_texture
13:53:52.771 [rendering.opengl.shader.support]: Shaders are supported.
13:53:52.784 [dataCache.notFound]: No data cache found, starting from scratch.
13:53:52.786 [searchPaths.dumpAll]: Resource paths:
Resources
../AddOns
../AddOns/Basic-debug.oxp
13:53:52.791 [MSAA.setup]: Multisample anti-aliasing not requested.
13:53:52.819 [shipData.load.begin]: Loading ship data.
13:53:52.991 [script.javascript.init]: JavaScript reset successful.
13:53:52.995 [texture.load.png.warning]: ----- A PNG loading warning occurred for Resources/Textures/trumblekit.png: iCCP: profile 'ICC Profile': 'RGB ': RGB color space not permitted on grayscale PNG.
13:53:55.186 [debugTCP.disconnect]: No connection to debug console: "Connection to debug console failed: 'No connection could be made because the target machine actively refused it.
' (outStream status: 1, inStream status: 7)."
13:53:55.188 [debugTCP.send.warning]: Error sending packet header, retrying.
13:53:55.213 [debugTCP.send.error]: The following packet could not be sent: {"Oolite version" = "1.91"; "packet type" = "Request Connection"; "protocol version" = 65792; }
13:53:55.218 [debugTCP.disconnect]: No connection to debug console: "Connection to debug console failed: 'bad stream.' (outStream status: 0, inStream status: 0)."
13:53:55.218 [debugTCP.connect.failed]: Failed to connect to debug console at address 127.0.0.1:8563.
13:53:55.218 [display.initGL]: Requested a new surface of 1280 x 720, windowed.
13:53:55.238 [display.initGL]: Created a new surface of 1280 x 720, windowed.
13:53:55.299 [startup.complete]: ========== Loading complete in 3.28 seconds. ==========
13:53:55.340 [dataCache.write.buildPath.failed]: Could not create folder C:/oodev/oolite/oolite.app/GNUstep/Library/Caches.
13:53:55.340 [dataCache.write.failed]: Failed to write data cache.
13:53:56.457 [shipData.load.begin]: Loading ship data.
13:53:56.610 [script.javascript.init]: JavaScript reset successful.
13:53:56.613 [texture.load.png.warning]: ----- A PNG loading warning occurred for Resources/Textures/trumblekit.png: iCCP: profile 'ICC Profile': 'RGB ': RGB color space not permitted on grayscale PNG.
13:53:56.613 [texture.load.png.warning]: ----- A PNG loading warning occurred for Resources/Textures/trumblekit.png: iCCP: profile 'ICC Profile': 'RGB ': RGB color space not permitted on grayscale PNG.
13:53:56.636 [script.javascript.init]: JavaScript reset successful.
13:53:56.691 [script.load.world.listAll]: Loaded 16 world scripts:
Oolite Equipment Control 1.91
Oolite Ship Library 1.91
oolite-cloaking-device 1.91
oolite-constrictor-hunt 1.91
oolite-contracts-cargo 1.91
oolite-contracts-helpers 1.91
oolite-contracts-parcels 1.91
oolite-contracts-passengers 1.91
oolite-libPriorityAI 1.91
oolite-nova 1.91
oolite-populator 1.91
oolite-primable-equipment-register 1.91
oolite-registership 1.91
oolite-thargoid-plans 1.91
oolite-trumbles 1.91
oolite-tutorial 1.91
13:54:26.514 [exit.context]: Exiting: Shift-escape pressed.
13:54:26.518 [gameController.exitApp]: .GNUstepDefaults synchronized.
Closing log at 2025-10-11 13:54:26 +0300.

What I should normally see here is .GNUstepDefaults. Not sure what the consequences of not using the expected defaults file name are. That's one thing to look at.
Second thing to look at is why the cache file cannot be created. The latest gnustep-base is doing something strange here.
Re: Windows MSYS2 MinGW64 environment development
$(PRODUCT_BUNDLE_IDENTIFIER).plist is also present (and used) on source builds for linux trunk & stable on archlinux.
The generic installer for linux 64-bit does use .GNUstepDefaults .
Maybe the method used to create pre-built binaries makes changes to the sourcecode/config settings before building ?
The generic installer for linux 64-bit does use .GNUstepDefaults .
Maybe the method used to create pre-built binaries makes changes to the sourcecode/config settings before building ?
OS : Arch Linux 64-bit - rolling release
From: The Netherlands, Europe
OXPs : My user page (needs updating)
Retired, occasionally active
From: The Netherlands, Europe
OXPs : My user page (needs updating)
Retired, occasionally active
-
another_commander
- Quite Grand Sub-Admiral

- Posts: 7136
- Joined: Wed Feb 28, 2007 7:54 am
Re: Windows MSYS2 MinGW64 environment development
There are more bad news I'm afraid. The game cannot download oxzs from the expansion manager because it cannot create the Library folder. All downloads (after adding gdnc.exe in the game's binaries) fail.
It is critical to investigate what is going on with the Library folder.
It is critical to investigate what is going on with the Library folder.
Re: Windows MSYS2 MinGW64 environment development
It seems to be that the bulk of the problems boil down to GNUstep failing to create folders, so if we can work out why and fix, that should resolve them.another_commander wrote: ↑Sat Oct 11, 2025 3:36 pmThere are more bad news I'm afraid. The game cannot download oxzs from the expansion manager because it cannot create the Library folder. All downloads (after adding gdnc.exe in the game's binaries) fail.
It is critical to investigate what is going on with the Library folder.
One easy way to investigate could be to make a standalone ObjC test that creates folders.
Re: Windows MSYS2 MinGW64 environment development
Turns out the fix is simple to find. I commented out #if OOLITE_WINDOWS in the code below in oolite_mingw64_environment\oolite\src\Core\NSFileManagerOOExtensions.m. I've checked in that change into the modern_build branch of my fork. You can git pull it after cding into the oolite folder within the environment.another_commander wrote: ↑Sat Oct 11, 2025 3:36 pmThere are more bad news I'm afraid. The game cannot download oxzs from the expansion manager because it cannot create the Library folder. All downloads (after adding gdnc.exe in the game's binaries) fail.
It is critical to investigate what is going on with the Library folder.
Code: Select all
- (BOOL) oo_createDirectoryAtPath:(NSString *)path attributes:(NSDictionary *)attributes
{
// #if OOLITE_WINDOWS
// return [self createDirectoryAtPath:path attributes:attributes];
// #else
// has been in GNUStep since 2008, so it's probably safe to use now.
// .... why do I say things like that, of course it's not safe - CIM
return [self createDirectoryAtPath:path withIntermediateDirectories:YES attributes:attributes error:NULL];
// #endif
}
Re: Windows MSYS2 MinGW64 environment development
That fixed the library creation issue so downloading expansions works, but I see some odd things in my log for the cache:
Not sure why it's trying to use multiple paths instead of one or why the GNUstep/Library/Caches at the end is in my GitHubDesktop folder,
Code: Select all
10:28:27.602 [dataCache.notFound]: No data cache found, starting from scratch.
10:28:27.603 [dataCache.write.buildPath.failed]: Could not create folder C:/Calibre2/;C:/Program Files/NVIDIA Corporation/NVIDIA NvDLISR;C:/Program Files/Git/cmd;C:/ProgramData/chocolatey/bin;C:/Users/mcara/scoop/shims;C:/Users/mcara/AppData/Local/Microsoft/WindowsApps;C:/Program Files/JetBrains/CLion 2025.2/bin;C:/Users/mcara/AppData/Local/GitHubDesktop/bin/GNUstep/Library/Caches.
Re: Windows MSYS2 MinGW64 environment development
If I run Oolite within the MSYS2 MinGW64 prompt then OXP downloading works and the data cache folder is created ok. If I don't get, OXP downloading does not work (probably because it can't create the library folder) and I get the error in the previous comment. Please let me know if this is what you see after pulling the latest modern_build branch of Oolite.
Another thing I discovered is that I cannot delete Logs/Latest.log until the gdnc.exe process is killed which suggests gdnc may have something to do with logging.
I added a release with symbols build for easier debugging:
Another thing I discovered is that I cannot delete Logs/Latest.log until the gdnc.exe process is killed which suggests gdnc may have something to do with logging.
I added a release with symbols build for easier debugging:
Code: Select all
make -f Makefile release-symbols -j16-
another_commander
- Quite Grand Sub-Admiral

- Posts: 7136
- Joined: Wed Feb 28, 2007 7:54 am
Re: Windows MSYS2 MinGW64 environment development
I will check this a bit later and get back to you.mcarans wrote: ↑Sat Oct 11, 2025 10:22 pmIf I run Oolite within the MSYS2 MinGW64 prompt then OXP downloading works and the data cache folder is created ok. If I don't get, OXP downloading does not work (probably because it can't create the library folder) and I get the error in the previous comment. Please let me know if this is what you see after pulling the latest modern_build branch of Oolite.
I think this is the same as what has been noted here.Another thing I discovered is that I cannot delete Logs/Latest.log until the gdnc.exe process is killed which suggests gdnc may have something to do with logging.
The standard make debug=no already includes debug symbols but what you really need for proper debugging is debug symbols also on at least gnustep-base, libobjc and the js library.I added a release with symbols build for easier debugging:
Code: Select all
make -f Makefile release-symbols -j16
Re: Windows MSYS2 MinGW64 environment development
I found something odd when debugging from CLion:another_commander wrote: ↑Sun Oct 12, 2025 9:08 amI will check this a bit later and get back to you.
...The standard make debug=no already includes debug symbols but what you really need for proper debugging is debug symbols also on at least gnustep-base, libobjc and the js library.Code: Select all
make -f Makefile release-symbols -j16
Code: Select all
(gdb) po NSHomeDirectory()
C:stem32/OpenSSH/;C:/Program Files/Calibre2/;C:/Program Files/NVIDIA Corporation/NVIDIA NvDLISR;C:/Program Files/Git/cmd;C:/ProgramData/chocolatey/bin;C:/Users/mcara/scoop/shims;C:/Users/mcara/AppData/Local/Microsoft/WindowsApps;C:/Program Files/JetBrains/CLion 2025.2/bin;C:/Users/mcara/AppData/Local/GitHubDesktop/bin
Code: Select all
// <Install path>\Oolite
basePath = NSHomeDirectory();
// <Install path>\Oolite\Logs
basePath = [basePath stringByAppendingPathComponent:@"Logs"];
if (!DirectoryExistCreatingIfNecessary(basePath)) return nil;
Code: Select all
s = [e objectForKey: @"HOMEPATH"];Code: Select all
(gdb) po s
stem32\OpenSSH\;C:\Program Files\Calibre2\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Git\cmd;C:\ProgramData\chocolatey\bin;C:\Users\mcara\scoop\shims;C:\Users\mcara\AppData\Local\Microsoft\WindowsApps;C:\Program Files\JetBrains\CLion 2025.2\bin;C:\Users\mcara\AppData\Local\GitHubDesktop\bin
Code: Select all
echo %HOMEPATH%
\Users\mcara
I found that in src/SDL/main.m, something weird happens. Before the following line, currentWorkingDir is correct, but after it is that long string earlier.
Code: Select all
SETENVVAR("PATH", finalPath);
Re: Windows MSYS2 MinGW64 environment development
I think it's a bug in main.m. Doing this fixes it:
Code: Select all
// Prepend system PATH env variable with our own executable's path
char *systemPath = SDL_getenv("PATH");
char *finalPath = malloc(strlen(systemPath)+MAX_PATH_LEN);
strcpy(finalPath, "PATH=");
strcat(finalPath, currentWorkingDir);
strcat(finalPath, ";");
strcat(finalPath, systemPath);
SDL_putenv (finalPath);
free(finalPath);
-
another_commander
- Quite Grand Sub-Admiral

- Posts: 7136
- Joined: Wed Feb 28, 2007 7:54 am
Re: Windows MSYS2 MinGW64 environment development
Can you please test if this works? It causes minimum disturbance to the existing code.
If it does, I think we can push this change to master.
Code: Select all
// Prepend system PATH env variable with our own executable's path
char *systemPath = SDL_getenv("PATH");
char *finalPath = malloc(strlen(systemPath) + MAX_PATH_LEN);
strcpy(finalPath, currentWorkingDir);
strcat(finalPath, ";");
strcat(finalPath, systemPath);
#define SETENVVAR(var, value) do {\
sprintf(envVarString, "%s=%s", (var), (value));\
SDL_putenv (envVarString);\
} while (0);
SETENVVAR("GNUSTEP_PATH_HANDLING", "windows");
SETENVVAR("PATH", finalPath);
SETENVVAR("GNUSTEP_SYSTEM_ROOT", currentWorkingDir);
SETENVVAR("GNUSTEP_LOCAL_ROOT", currentWorkingDir);
SETENVVAR("GNUSTEP_NETWORK_ROOT", currentWorkingDir);
SETENVVAR("GNUSTEP_USERS_ROOT", currentWorkingDir);
SETENVVAR("HOMEPATH", currentWorkingDir);
SetCurrentDirectory(currentWorkingDir);
free(finalPath);Re: Windows MSYS2 MinGW64 environment development
The problem is envVarString used in sprintf is too small for finalPath: https://github.com/OoliteProject/oolite ... main.m#L82another_commander wrote: ↑Mon Oct 13, 2025 8:14 amCan you please test if this works? It causes minimum disturbance to the existing code.If it does, I think we can push this change to master.Code: Select all
// Prepend system PATH env variable with our own executable's path char *systemPath = SDL_getenv("PATH"); char *finalPath = malloc(strlen(systemPath) + MAX_PATH_LEN); strcpy(finalPath, currentWorkingDir); strcat(finalPath, ";"); strcat(finalPath, systemPath); #define SETENVVAR(var, value) do {\ sprintf(envVarString, "%s=%s", (var), (value));\ SDL_putenv (envVarString);\ } while (0); SETENVVAR("GNUSTEP_PATH_HANDLING", "windows"); SETENVVAR("PATH", finalPath); SETENVVAR("GNUSTEP_SYSTEM_ROOT", currentWorkingDir); SETENVVAR("GNUSTEP_LOCAL_ROOT", currentWorkingDir); SETENVVAR("GNUSTEP_NETWORK_ROOT", currentWorkingDir); SETENVVAR("GNUSTEP_USERS_ROOT", currentWorkingDir); SETENVVAR("HOMEPATH", currentWorkingDir); SetCurrentDirectory(currentWorkingDir); free(finalPath);
Code: Select all
char envVarString[2 * MAX_PATH_LEN];Code: Select all
char *envVarString = malloc(strlen(systemPath) + MAX_PATH_LEN);-
another_commander
- Quite Grand Sub-Admiral

- Posts: 7136
- Joined: Wed Feb 28, 2007 7:54 am
Re: Windows MSYS2 MinGW64 environment development
OK, what about this (remember to remove the original declaration of envVarString, located above this part)
Code: Select all
[...]
// Prepend system PATH env variable with our own executable's path
char pathEnvVar[] = "PATH";
char *systemPath = SDL_getenv(pathEnvVar);
size_t currentWorkingdirLen = strlen(currentWorkingDir);
size_t systemPathLen = strlen(systemPath);
char *finalPath = malloc(systemPathLen + currentWorkingdirLen);
// the max possible length of tne string below is systemPath plus the path
// we have determined for us, plus the string "PATH", plus one char for the
// "=" of the final string that will be passed on to SDL_putenv
char *envVarString = malloc(systemPathLen + currentWorkingdirLen + strlen(pathEnvVar) + sizeof(char));
strcpy(finalPath, currentWorkingDir);
strcat(finalPath, ";");
strcat(finalPath, systemPath);
#define SETENVVAR(var, value) do {\
sprintf(envVarString, "%s=%s", (var), (value));\
SDL_putenv (envVarString);\
} while (0);
SETENVVAR("GNUSTEP_PATH_HANDLING", "windows");
SETENVVAR(pathEnvVar, finalPath);
SETENVVAR("GNUSTEP_SYSTEM_ROOT", currentWorkingDir);
SETENVVAR("GNUSTEP_LOCAL_ROOT", currentWorkingDir);
SETENVVAR("GNUSTEP_NETWORK_ROOT", currentWorkingDir);
SETENVVAR("GNUSTEP_USERS_ROOT", currentWorkingDir);
SETENVVAR("HOMEPATH", currentWorkingDir);
SetCurrentDirectory(currentWorkingDir);
free(envVarString);
free(finalPath);
[...]Re: Windows MSYS2 MinGW64 environment development
That looks like it'll work, but just wondering why you used SETENVVAR(pathEnvVar instead of just SETENVVAR("PATH" like the others?another_commander wrote: ↑Tue Oct 14, 2025 6:06 amOK, what about this (remember to remove the original declaration of envVarString, located above this part)Code: Select all
[...] // Prepend system PATH env variable with our own executable's path char pathEnvVar[] = "PATH"; char *systemPath = SDL_getenv(pathEnvVar); size_t currentWorkingdirLen = strlen(currentWorkingDir); size_t systemPathLen = strlen(systemPath); char *finalPath = malloc(systemPathLen + currentWorkingdirLen); // the max possible length of tne string below is systemPath plus the path // we have determined for us, plus the string "PATH", plus one char for the // "=" of the final string that will be passed on to SDL_putenv char *envVarString = malloc(systemPathLen + currentWorkingdirLen + strlen(pathEnvVar) + sizeof(char)); strcpy(finalPath, currentWorkingDir); strcat(finalPath, ";"); strcat(finalPath, systemPath); #define SETENVVAR(var, value) do {\ sprintf(envVarString, "%s=%s", (var), (value));\ SDL_putenv (envVarString);\ } while (0); SETENVVAR("GNUSTEP_PATH_HANDLING", "windows"); SETENVVAR(pathEnvVar, finalPath); SETENVVAR("GNUSTEP_SYSTEM_ROOT", currentWorkingDir); SETENVVAR("GNUSTEP_LOCAL_ROOT", currentWorkingDir); SETENVVAR("GNUSTEP_NETWORK_ROOT", currentWorkingDir); SETENVVAR("GNUSTEP_USERS_ROOT", currentWorkingDir); SETENVVAR("HOMEPATH", currentWorkingDir); SetCurrentDirectory(currentWorkingDir); free(envVarString); free(finalPath); [...]
