From 60cc047a5b30636343a1756f8a44796fc7e57a32 Mon Sep 17 00:00:00 2001 From: turborim Date: Fri, 15 Sep 2023 08:39:14 +0400 Subject: [PATCH] fix: lazarus comp --- .../audio_mixed_processor/audio_mixed_processor.dpr | 3 +++ .../audio_mixed_processor/audio_mixed_processor.lpr | 7 ++----- .../audio_module_playing/audio_module_playing.dpr | 3 +++ .../audio_module_playing/audio_module_playing.lpr | 7 ++----- .../audio/audio_music_stream/audio_music_stream.dpr | 3 +++ .../audio/audio_music_stream/audio_music_stream.lpr | 7 ++----- examples/audio/audio_raw_stream/audio_raw_stream.dpr | 3 +++ examples/audio/audio_raw_stream/audio_raw_stream.lpr | 7 ++----- .../audio/audio_sound_loading/audio_sound_loading.dpr | 3 +++ .../audio/audio_sound_loading/audio_sound_loading.lpr | 7 ++----- .../audio_stream_effects/audio_stream_effects.dpr | 3 +++ .../audio_stream_effects/audio_stream_effects.lpr | 7 ++----- examples/core/core_2d_camera/core_2d_camera.dpr | 3 +++ examples/core/core_2d_camera/core_2d_camera.lpr | 7 ++----- .../core_2d_camera_mouse_zoom.dpr | 3 +++ .../core_2d_camera_mouse_zoom.lpr | 7 ++----- .../core_2d_camera_platformer.dpr | 3 +++ .../core_2d_camera_platformer.lpr | 7 ++----- .../core_3d_camera_first_person.dpr | 3 +++ .../core_3d_camera_first_person.lpr | 7 ++----- .../core/core_3d_camera_free/core_3d_camera_free.dpr | 3 +++ .../core/core_3d_camera_free/core_3d_camera_free.lpr | 7 ++----- .../core/core_3d_camera_mode/core_3d_camera_mode.dpr | 3 +++ .../core/core_3d_camera_mode/core_3d_camera_mode.lpr | 7 ++----- examples/core/core_3d_picking/core_3d_picking.dpr | 3 +++ examples/core/core_3d_picking/core_3d_picking.lpr | 7 ++----- .../core_basic_screen_manager.dpr | 3 +++ .../core_basic_screen_manager.lpr | 7 ++----- examples/core/core_basic_window/core_basic_window.dpr | 3 +++ examples/core/core_basic_window/core_basic_window.lpr | 7 ++----- .../core_custom_frame_control.dpr | 3 +++ .../core_custom_frame_control.lpr | 7 ++----- .../core/core_custom_logging/core_custom_logging.dpr | 3 +++ .../core/core_custom_logging/core_custom_logging.lpr | 7 ++----- examples/core/core_drop_files/core_drop_files.dpr | 3 +++ examples/core/core_drop_files/core_drop_files.lpr | 7 ++----- examples/core/core_input_keys/core_input_keys.dpr | 3 +++ examples/core/core_input_keys/core_input_keys.lpr | 7 ++----- examples/core/core_input_mouse/core_input_mouse.dpr | 3 +++ examples/core/core_input_mouse/core_input_mouse.lpr | 7 ++----- .../core_input_mouse_wheel/core_input_mouse_wheel.dpr | 3 +++ .../core_input_mouse_wheel/core_input_mouse_wheel.lpr | 7 ++----- .../core/core_loading_thread/core_loading_thread.dpr | 3 +++ .../core/core_loading_thread/core_loading_thread.lpr | 7 ++----- .../core/core_random_values/core_random_values.dpr | 3 +++ .../core/core_random_values/core_random_values.lpr | 7 ++----- examples/core/core_scissor_test/core_scissor_test.dpr | 3 +++ examples/core/core_scissor_test/core_scissor_test.lpr | 7 ++----- .../core_smooth_pixelperfect.dpr | 3 +++ .../core_smooth_pixelperfect.lpr | 7 ++----- examples/core/core_split_screen/core_split_screen.dpr | 3 +++ examples/core/core_split_screen/core_split_screen.lpr | 7 ++----- .../core/core_storage_values/core_storage_values.dpr | 3 +++ .../core/core_storage_values/core_storage_values.lpr | 7 ++----- examples/core/core_window_flags/core_window_flags.dpr | 3 +++ examples/core/core_window_flags/core_window_flags.lpr | 7 ++----- .../core_window_letterbox/core_window_letterbox.dpr | 3 +++ .../core_window_letterbox/core_window_letterbox.lpr | 7 ++----- .../core_window_should_close.dpr | 3 +++ .../core_window_should_close.lpr | 7 ++----- examples/core/core_world_screen/core_world_screen.dpr | 3 +++ examples/core/core_world_screen/core_world_screen.lpr | 7 ++----- examples/models/models_animation/models_animation.dpr | 3 +++ examples/models/models_animation/models_animation.lpr | 7 ++----- examples/models/models_billboard/models_billboard.dpr | 3 +++ examples/models/models_billboard/models_billboard.lpr | 7 ++----- .../models_box_collisions/models_box_collisions.dpr | 3 +++ .../models_box_collisions/models_box_collisions.lpr | 7 ++----- examples/models/models_cubicmap/models_cubicmap.dpr | 3 +++ examples/models/models_cubicmap/models_cubicmap.lpr | 7 ++----- .../models_draw_cube_texture.dpr | 3 +++ .../models_draw_cube_texture.lpr | 7 ++----- .../models_first_person_maze.dpr | 3 +++ .../models_first_person_maze.lpr | 7 ++----- .../models_geometric_shapes.dpr | 3 +++ .../models_geometric_shapes.lpr | 7 ++----- examples/models/models_heightmap/models_heightmap.dpr | 3 +++ examples/models/models_heightmap/models_heightmap.lpr | 7 ++----- examples/models/models_loading/models_loading.dpr | 3 +++ examples/models/models_loading/models_loading.lpr | 7 ++----- .../models/models_loading_gltf/models_loading_gltf.dpr | 3 +++ .../models/models_loading_gltf/models_loading_gltf.lpr | 7 ++----- .../models/models_loading_m3d/models_loading_m3d.dpr | 3 +++ .../models/models_loading_m3d/models_loading_m3d.lpr | 7 ++----- .../models/models_loading_vox/models_loading_vox.dpr | 3 +++ .../models/models_loading_vox/models_loading_vox.lpr | 7 ++----- .../models_mesh_generation/models_mesh_generation.dpr | 3 +++ .../models_mesh_generation/models_mesh_generation.lpr | 7 ++----- .../models/models_mesh_picking/models_mesh_picking.dpr | 3 +++ .../models/models_mesh_picking/models_mesh_picking.lpr | 7 ++----- .../models_orthographic_projection.dpr | 3 +++ .../models_orthographic_projection.lpr | 7 ++----- .../models_rlgl_solar_system.dpr | 3 +++ .../models_rlgl_solar_system.lpr | 7 ++----- examples/models/models_skybox/models_skybox.dpr | 3 +++ examples/models/models_skybox/models_skybox.lpr | 7 ++----- .../models/models_waving_cubes/models_waving_cubes.dpr | 3 +++ .../models/models_waving_cubes/models_waving_cubes.lpr | 7 ++----- .../models_yaw_pitch_roll/models_yaw_pitch_roll.dpr | 3 +++ .../models_yaw_pitch_roll/models_yaw_pitch_roll.lpr | 7 ++----- examples/project_gen.py | 10 +++++----- .../shaders_basic_lighting/shaders_basic_lighting.dpr | 3 +++ .../shaders_basic_lighting/shaders_basic_lighting.lpr | 7 ++----- .../shaders_custom_uniform/shaders_custom_uniform.dpr | 3 +++ .../shaders_custom_uniform/shaders_custom_uniform.lpr | 7 ++----- .../shaders_eratosthenes/shaders_eratosthenes.dpr | 3 +++ .../shaders_eratosthenes/shaders_eratosthenes.lpr | 7 ++----- examples/shaders/shaders_fog/shaders_fog.dpr | 3 +++ examples/shaders/shaders_fog/shaders_fog.lpr | 7 ++----- .../shaders/shaders_julia_set/shaders_julia_set.dpr | 3 +++ .../shaders/shaders_julia_set/shaders_julia_set.lpr | 7 ++----- .../shaders_mesh_instancing.dpr | 3 +++ .../shaders_mesh_instancing.lpr | 7 ++----- .../shaders_model_shader/shaders_model_shader.dpr | 3 +++ .../shaders_model_shader/shaders_model_shader.lpr | 7 ++----- .../shaders_palette_switch/shaders_palette_switch.dpr | 3 +++ .../shaders_palette_switch/shaders_palette_switch.lpr | 7 ++----- .../shaders_postprocessing/shaders_postprocessing.dpr | 3 +++ .../shaders_postprocessing/shaders_postprocessing.lpr | 7 ++----- .../shaders_raymarching/shaders_raymarching.dpr | 3 +++ .../shaders_raymarching/shaders_raymarching.lpr | 7 ++----- .../shaders_shapes_textures.dpr | 3 +++ .../shaders_shapes_textures.lpr | 7 ++----- .../shaders_simple_mask/shaders_simple_mask.dpr | 3 +++ .../shaders_simple_mask/shaders_simple_mask.lpr | 7 ++----- .../shaders_texture_drawing.dpr | 3 +++ .../shaders_texture_drawing.lpr | 7 ++----- .../shaders_texture_outline.dpr | 3 +++ .../shaders_texture_outline.lpr | 7 ++----- .../shaders_texture_waves/shaders_texture_waves.dpr | 3 +++ .../shaders_texture_waves/shaders_texture_waves.lpr | 7 ++----- .../shapes/shapes_basic_shapes/shapes_basic_shapes.dpr | 3 +++ .../shapes/shapes_basic_shapes/shapes_basic_shapes.lpr | 7 ++----- .../shapes_bouncing_ball/shapes_bouncing_ball.dpr | 3 +++ .../shapes_bouncing_ball/shapes_bouncing_ball.lpr | 7 ++----- .../shapes_collision_area/shapes_collision_area.dpr | 3 +++ .../shapes_collision_area/shapes_collision_area.lpr | 7 ++----- .../shapes_colors_palette/shapes_colors_palette.dpr | 3 +++ .../shapes_colors_palette/shapes_colors_palette.lpr | 7 ++----- examples/shapes/shapes_draw_ring/shapes_draw_ring.dpr | 3 +++ examples/shapes/shapes_draw_ring/shapes_draw_ring.lpr | 7 ++----- .../shapes_easings_ball_anim.dpr | 3 +++ .../shapes_easings_ball_anim.lpr | 7 ++----- .../shapes_easings_box_anim.dpr | 3 +++ .../shapes_easings_box_anim.lpr | 7 ++----- .../shapes_easings_rectangle_array.dpr | 3 +++ .../shapes_easings_rectangle_array.lpr | 7 ++----- .../shapes_following_eyes/shapes_following_eyes.dpr | 3 +++ .../shapes_following_eyes/shapes_following_eyes.lpr | 7 ++----- .../shapes/shapes_lines_bezier/shapes_lines_bezier.dpr | 3 +++ .../shapes/shapes_lines_bezier/shapes_lines_bezier.lpr | 7 ++----- .../shapes/shapes_logo_raylib/shapes_logo_raylib.dpr | 3 +++ .../shapes/shapes_logo_raylib/shapes_logo_raylib.lpr | 7 ++----- .../shapes_logo_raylib_anim.dpr | 3 +++ .../shapes_logo_raylib_anim.lpr | 7 ++----- .../shapes_rectangle_scaling.dpr | 3 +++ .../shapes_rectangle_scaling.lpr | 7 ++----- .../shapes_top_down_lights/shapes_top_down_lights.dpr | 3 +++ .../shapes_top_down_lights/shapes_top_down_lights.lpr | 7 ++----- examples/text/text_font_filters/text_font_filters.dpr | 3 +++ examples/text/text_font_filters/text_font_filters.lpr | 7 ++----- examples/text/text_font_loading/text_font_loading.dpr | 3 +++ examples/text/text_font_loading/text_font_loading.lpr | 7 ++----- examples/text/text_font_sdf/text_font_sdf.dpr | 3 +++ examples/text/text_font_sdf/text_font_sdf.lpr | 7 ++----- .../text/text_font_spritefont/text_font_spritefont.dpr | 3 +++ .../text/text_font_spritefont/text_font_spritefont.lpr | 7 ++----- examples/text/text_format_text/text_format_text.dpr | 3 +++ examples/text/text_format_text/text_format_text.lpr | 7 ++----- examples/text/text_input_box/text_input_box.dpr | 3 +++ examples/text/text_input_box/text_input_box.lpr | 7 ++----- examples/text/text_raylib_fonts/text_raylib_fonts.dpr | 3 +++ examples/text/text_raylib_fonts/text_raylib_fonts.lpr | 7 ++----- .../text_rectangle_bounds/text_rectangle_bounds.dpr | 3 +++ .../text_rectangle_bounds/text_rectangle_bounds.lpr | 7 ++----- examples/text/text_writing_anim/text_writing_anim.dpr | 3 +++ examples/text/text_writing_anim/text_writing_anim.lpr | 7 ++----- .../textures_background_scrolling.dpr | 3 +++ .../textures_background_scrolling.lpr | 7 ++----- .../textures_blend_modes/textures_blend_modes.dpr | 3 +++ .../textures_blend_modes/textures_blend_modes.lpr | 7 ++----- .../textures/textures_bunnymark/textures_bunnymark.dpr | 3 +++ .../textures/textures_bunnymark/textures_bunnymark.lpr | 7 ++----- .../textures_draw_tiled/textures_draw_tiled.dpr | 3 +++ .../textures_draw_tiled/textures_draw_tiled.lpr | 7 ++----- .../textures_fog_of_war/textures_fog_of_war.dpr | 3 +++ .../textures_fog_of_war/textures_fog_of_war.lpr | 7 ++----- .../textures_gif_player/textures_gif_player.dpr | 3 +++ .../textures_gif_player/textures_gif_player.lpr | 7 ++----- .../textures_image_drawing/textures_image_drawing.dpr | 3 +++ .../textures_image_drawing/textures_image_drawing.lpr | 7 ++----- .../textures_image_generation.dpr | 3 +++ .../textures_image_generation.lpr | 7 ++----- .../textures_image_loading/textures_image_loading.dpr | 3 +++ .../textures_image_loading/textures_image_loading.lpr | 7 ++----- .../textures_image_processing.dpr | 3 +++ .../textures_image_processing.lpr | 7 ++----- .../textures_image_text/textures_image_text.dpr | 3 +++ .../textures_image_text/textures_image_text.lpr | 7 ++----- .../textures_logo_raylib/textures_logo_raylib.dpr | 3 +++ .../textures_logo_raylib/textures_logo_raylib.lpr | 7 ++----- .../textures_mouse_painting.dpr | 3 +++ .../textures_mouse_painting.lpr | 7 ++----- .../textures_npatch_drawing.dpr | 3 +++ .../textures_npatch_drawing.lpr | 7 ++----- .../textures_particles_blending.dpr | 3 +++ .../textures_particles_blending.lpr | 7 ++----- .../textures/textures_polygon/textures_polygon.dpr | 3 +++ .../textures/textures_polygon/textures_polygon.lpr | 7 ++----- .../textures/textures_raw_data/textures_raw_data.dpr | 3 +++ .../textures/textures_raw_data/textures_raw_data.lpr | 7 ++----- .../textures_sprite_anim/textures_sprite_anim.dpr | 3 +++ .../textures_sprite_anim/textures_sprite_anim.lpr | 7 ++----- .../textures_sprite_button/textures_sprite_button.dpr | 3 +++ .../textures_sprite_button/textures_sprite_button.lpr | 7 ++----- .../textures_sprite_explosion.dpr | 3 +++ .../textures_sprite_explosion.lpr | 7 ++----- .../textures_srcrec_dstrec/textures_srcrec_dstrec.dpr | 3 +++ .../textures_srcrec_dstrec/textures_srcrec_dstrec.lpr | 7 ++----- .../textures/textures_to_image/textures_to_image.dpr | 3 +++ .../textures/textures_to_image/textures_to_image.lpr | 7 ++----- raylib/raylib.inc | 2 +- turbogen/templates/delphi_template.dpr | 3 +++ turbogen/templates/lazarus_template.lpr | 5 +---- turbogen/templates/raylib.inc | 2 +- 225 files changed, 561 insertions(+), 561 deletions(-) diff --git a/examples/audio/audio_mixed_processor/audio_mixed_processor.dpr b/examples/audio/audio_mixed_processor/audio_mixed_processor.dpr index e8fcbf8..fde9cb1 100644 --- a/examples/audio/audio_mixed_processor/audio_mixed_processor.dpr +++ b/examples/audio/audio_mixed_processor/audio_mixed_processor.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/audio/audio_mixed_processor/audio_mixed_processor.lpr b/examples/audio/audio_mixed_processor/audio_mixed_processor.lpr index 0b1ceec..d3e06cb 100644 --- a/examples/audio/audio_mixed_processor/audio_mixed_processor.lpr +++ b/examples/audio/audio_mixed_processor/audio_mixed_processor.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/audio/audio_module_playing/audio_module_playing.dpr b/examples/audio/audio_module_playing/audio_module_playing.dpr index 0bee83e..1f90be4 100644 --- a/examples/audio/audio_module_playing/audio_module_playing.dpr +++ b/examples/audio/audio_module_playing/audio_module_playing.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/audio/audio_module_playing/audio_module_playing.lpr b/examples/audio/audio_module_playing/audio_module_playing.lpr index 6d0f6af..a619803 100644 --- a/examples/audio/audio_module_playing/audio_module_playing.lpr +++ b/examples/audio/audio_module_playing/audio_module_playing.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/audio/audio_music_stream/audio_music_stream.dpr b/examples/audio/audio_music_stream/audio_music_stream.dpr index db1c2a9..030b2cf 100644 --- a/examples/audio/audio_music_stream/audio_music_stream.dpr +++ b/examples/audio/audio_music_stream/audio_music_stream.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/audio/audio_music_stream/audio_music_stream.lpr b/examples/audio/audio_music_stream/audio_music_stream.lpr index 8aa5c2a..5a75e73 100644 --- a/examples/audio/audio_music_stream/audio_music_stream.lpr +++ b/examples/audio/audio_music_stream/audio_music_stream.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/audio/audio_raw_stream/audio_raw_stream.dpr b/examples/audio/audio_raw_stream/audio_raw_stream.dpr index 16cbf98..47f76ce 100644 --- a/examples/audio/audio_raw_stream/audio_raw_stream.dpr +++ b/examples/audio/audio_raw_stream/audio_raw_stream.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/audio/audio_raw_stream/audio_raw_stream.lpr b/examples/audio/audio_raw_stream/audio_raw_stream.lpr index 9767af3..cab55b9 100644 --- a/examples/audio/audio_raw_stream/audio_raw_stream.lpr +++ b/examples/audio/audio_raw_stream/audio_raw_stream.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/audio/audio_sound_loading/audio_sound_loading.dpr b/examples/audio/audio_sound_loading/audio_sound_loading.dpr index 2ee2b1f..9f7aba3 100644 --- a/examples/audio/audio_sound_loading/audio_sound_loading.dpr +++ b/examples/audio/audio_sound_loading/audio_sound_loading.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/audio/audio_sound_loading/audio_sound_loading.lpr b/examples/audio/audio_sound_loading/audio_sound_loading.lpr index eeab1c4..2cb1bdb 100644 --- a/examples/audio/audio_sound_loading/audio_sound_loading.lpr +++ b/examples/audio/audio_sound_loading/audio_sound_loading.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/audio/audio_stream_effects/audio_stream_effects.dpr b/examples/audio/audio_stream_effects/audio_stream_effects.dpr index 172db3d..b980fbe 100644 --- a/examples/audio/audio_stream_effects/audio_stream_effects.dpr +++ b/examples/audio/audio_stream_effects/audio_stream_effects.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/audio/audio_stream_effects/audio_stream_effects.lpr b/examples/audio/audio_stream_effects/audio_stream_effects.lpr index a462542..2676a3e 100644 --- a/examples/audio/audio_stream_effects/audio_stream_effects.lpr +++ b/examples/audio/audio_stream_effects/audio_stream_effects.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_2d_camera/core_2d_camera.dpr b/examples/core/core_2d_camera/core_2d_camera.dpr index 5395078..161a2c7 100644 --- a/examples/core/core_2d_camera/core_2d_camera.dpr +++ b/examples/core/core_2d_camera/core_2d_camera.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_2d_camera/core_2d_camera.lpr b/examples/core/core_2d_camera/core_2d_camera.lpr index d1dfc58..b05c5dc 100644 --- a/examples/core/core_2d_camera/core_2d_camera.lpr +++ b/examples/core/core_2d_camera/core_2d_camera.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_2d_camera_mouse_zoom/core_2d_camera_mouse_zoom.dpr b/examples/core/core_2d_camera_mouse_zoom/core_2d_camera_mouse_zoom.dpr index 947f2b6..5997e19 100644 --- a/examples/core/core_2d_camera_mouse_zoom/core_2d_camera_mouse_zoom.dpr +++ b/examples/core/core_2d_camera_mouse_zoom/core_2d_camera_mouse_zoom.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_2d_camera_mouse_zoom/core_2d_camera_mouse_zoom.lpr b/examples/core/core_2d_camera_mouse_zoom/core_2d_camera_mouse_zoom.lpr index f8aefe8..5beae34 100644 --- a/examples/core/core_2d_camera_mouse_zoom/core_2d_camera_mouse_zoom.lpr +++ b/examples/core/core_2d_camera_mouse_zoom/core_2d_camera_mouse_zoom.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_2d_camera_platformer/core_2d_camera_platformer.dpr b/examples/core/core_2d_camera_platformer/core_2d_camera_platformer.dpr index 0a136bc..f9d8342 100644 --- a/examples/core/core_2d_camera_platformer/core_2d_camera_platformer.dpr +++ b/examples/core/core_2d_camera_platformer/core_2d_camera_platformer.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_2d_camera_platformer/core_2d_camera_platformer.lpr b/examples/core/core_2d_camera_platformer/core_2d_camera_platformer.lpr index ae6c4cd..fd7b314 100644 --- a/examples/core/core_2d_camera_platformer/core_2d_camera_platformer.lpr +++ b/examples/core/core_2d_camera_platformer/core_2d_camera_platformer.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_3d_camera_first_person/core_3d_camera_first_person.dpr b/examples/core/core_3d_camera_first_person/core_3d_camera_first_person.dpr index e3eec7c..df8630f 100644 --- a/examples/core/core_3d_camera_first_person/core_3d_camera_first_person.dpr +++ b/examples/core/core_3d_camera_first_person/core_3d_camera_first_person.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_3d_camera_first_person/core_3d_camera_first_person.lpr b/examples/core/core_3d_camera_first_person/core_3d_camera_first_person.lpr index 992fe4b..f53fea5 100644 --- a/examples/core/core_3d_camera_first_person/core_3d_camera_first_person.lpr +++ b/examples/core/core_3d_camera_first_person/core_3d_camera_first_person.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_3d_camera_free/core_3d_camera_free.dpr b/examples/core/core_3d_camera_free/core_3d_camera_free.dpr index 58b6a21..57ce1a0 100644 --- a/examples/core/core_3d_camera_free/core_3d_camera_free.dpr +++ b/examples/core/core_3d_camera_free/core_3d_camera_free.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_3d_camera_free/core_3d_camera_free.lpr b/examples/core/core_3d_camera_free/core_3d_camera_free.lpr index 9869e1f..fce37bd 100644 --- a/examples/core/core_3d_camera_free/core_3d_camera_free.lpr +++ b/examples/core/core_3d_camera_free/core_3d_camera_free.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_3d_camera_mode/core_3d_camera_mode.dpr b/examples/core/core_3d_camera_mode/core_3d_camera_mode.dpr index 81b97b9..96e68a6 100644 --- a/examples/core/core_3d_camera_mode/core_3d_camera_mode.dpr +++ b/examples/core/core_3d_camera_mode/core_3d_camera_mode.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_3d_camera_mode/core_3d_camera_mode.lpr b/examples/core/core_3d_camera_mode/core_3d_camera_mode.lpr index fb88ad4..c6520c9 100644 --- a/examples/core/core_3d_camera_mode/core_3d_camera_mode.lpr +++ b/examples/core/core_3d_camera_mode/core_3d_camera_mode.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_3d_picking/core_3d_picking.dpr b/examples/core/core_3d_picking/core_3d_picking.dpr index 0d6b012..f6a178e 100644 --- a/examples/core/core_3d_picking/core_3d_picking.dpr +++ b/examples/core/core_3d_picking/core_3d_picking.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_3d_picking/core_3d_picking.lpr b/examples/core/core_3d_picking/core_3d_picking.lpr index a51b854..65cbf53 100644 --- a/examples/core/core_3d_picking/core_3d_picking.lpr +++ b/examples/core/core_3d_picking/core_3d_picking.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_basic_screen_manager/core_basic_screen_manager.dpr b/examples/core/core_basic_screen_manager/core_basic_screen_manager.dpr index b9f9a58..94a862a 100644 --- a/examples/core/core_basic_screen_manager/core_basic_screen_manager.dpr +++ b/examples/core/core_basic_screen_manager/core_basic_screen_manager.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_basic_screen_manager/core_basic_screen_manager.lpr b/examples/core/core_basic_screen_manager/core_basic_screen_manager.lpr index 15244fc..ee70826 100644 --- a/examples/core/core_basic_screen_manager/core_basic_screen_manager.lpr +++ b/examples/core/core_basic_screen_manager/core_basic_screen_manager.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_basic_window/core_basic_window.dpr b/examples/core/core_basic_window/core_basic_window.dpr index efe8e88..56ebf69 100644 --- a/examples/core/core_basic_window/core_basic_window.dpr +++ b/examples/core/core_basic_window/core_basic_window.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_basic_window/core_basic_window.lpr b/examples/core/core_basic_window/core_basic_window.lpr index c25eb16..12b2e95 100644 --- a/examples/core/core_basic_window/core_basic_window.lpr +++ b/examples/core/core_basic_window/core_basic_window.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_custom_frame_control/core_custom_frame_control.dpr b/examples/core/core_custom_frame_control/core_custom_frame_control.dpr index f6d64d2..9a8f881 100644 --- a/examples/core/core_custom_frame_control/core_custom_frame_control.dpr +++ b/examples/core/core_custom_frame_control/core_custom_frame_control.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_custom_frame_control/core_custom_frame_control.lpr b/examples/core/core_custom_frame_control/core_custom_frame_control.lpr index c3319f3..7d4c11d 100644 --- a/examples/core/core_custom_frame_control/core_custom_frame_control.lpr +++ b/examples/core/core_custom_frame_control/core_custom_frame_control.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_custom_logging/core_custom_logging.dpr b/examples/core/core_custom_logging/core_custom_logging.dpr index f445439..30072d3 100644 --- a/examples/core/core_custom_logging/core_custom_logging.dpr +++ b/examples/core/core_custom_logging/core_custom_logging.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_custom_logging/core_custom_logging.lpr b/examples/core/core_custom_logging/core_custom_logging.lpr index 1a65789..d2c89b4 100644 --- a/examples/core/core_custom_logging/core_custom_logging.lpr +++ b/examples/core/core_custom_logging/core_custom_logging.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_drop_files/core_drop_files.dpr b/examples/core/core_drop_files/core_drop_files.dpr index 9bea1a4..ed4fbbc 100644 --- a/examples/core/core_drop_files/core_drop_files.dpr +++ b/examples/core/core_drop_files/core_drop_files.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_drop_files/core_drop_files.lpr b/examples/core/core_drop_files/core_drop_files.lpr index 7e7ac98..862dd8c 100644 --- a/examples/core/core_drop_files/core_drop_files.lpr +++ b/examples/core/core_drop_files/core_drop_files.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_input_keys/core_input_keys.dpr b/examples/core/core_input_keys/core_input_keys.dpr index 1bdd872..345b0a2 100644 --- a/examples/core/core_input_keys/core_input_keys.dpr +++ b/examples/core/core_input_keys/core_input_keys.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_input_keys/core_input_keys.lpr b/examples/core/core_input_keys/core_input_keys.lpr index 114e770..0b5fba2 100644 --- a/examples/core/core_input_keys/core_input_keys.lpr +++ b/examples/core/core_input_keys/core_input_keys.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_input_mouse/core_input_mouse.dpr b/examples/core/core_input_mouse/core_input_mouse.dpr index 648cf0f..94657bb 100644 --- a/examples/core/core_input_mouse/core_input_mouse.dpr +++ b/examples/core/core_input_mouse/core_input_mouse.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_input_mouse/core_input_mouse.lpr b/examples/core/core_input_mouse/core_input_mouse.lpr index 5846675..83f4c01 100644 --- a/examples/core/core_input_mouse/core_input_mouse.lpr +++ b/examples/core/core_input_mouse/core_input_mouse.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_input_mouse_wheel/core_input_mouse_wheel.dpr b/examples/core/core_input_mouse_wheel/core_input_mouse_wheel.dpr index d64dcdf..b17c26b 100644 --- a/examples/core/core_input_mouse_wheel/core_input_mouse_wheel.dpr +++ b/examples/core/core_input_mouse_wheel/core_input_mouse_wheel.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_input_mouse_wheel/core_input_mouse_wheel.lpr b/examples/core/core_input_mouse_wheel/core_input_mouse_wheel.lpr index 79456d4..f05d6ff 100644 --- a/examples/core/core_input_mouse_wheel/core_input_mouse_wheel.lpr +++ b/examples/core/core_input_mouse_wheel/core_input_mouse_wheel.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_loading_thread/core_loading_thread.dpr b/examples/core/core_loading_thread/core_loading_thread.dpr index 24d896f..5fddbd8 100644 --- a/examples/core/core_loading_thread/core_loading_thread.dpr +++ b/examples/core/core_loading_thread/core_loading_thread.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_loading_thread/core_loading_thread.lpr b/examples/core/core_loading_thread/core_loading_thread.lpr index 326a748..236534f 100644 --- a/examples/core/core_loading_thread/core_loading_thread.lpr +++ b/examples/core/core_loading_thread/core_loading_thread.lpr @@ -10,11 +10,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_random_values/core_random_values.dpr b/examples/core/core_random_values/core_random_values.dpr index e84041d..5fd877f 100644 --- a/examples/core/core_random_values/core_random_values.dpr +++ b/examples/core/core_random_values/core_random_values.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_random_values/core_random_values.lpr b/examples/core/core_random_values/core_random_values.lpr index 0f9c83d..0aec2f9 100644 --- a/examples/core/core_random_values/core_random_values.lpr +++ b/examples/core/core_random_values/core_random_values.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_scissor_test/core_scissor_test.dpr b/examples/core/core_scissor_test/core_scissor_test.dpr index db23a8e..0276e2f 100644 --- a/examples/core/core_scissor_test/core_scissor_test.dpr +++ b/examples/core/core_scissor_test/core_scissor_test.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_scissor_test/core_scissor_test.lpr b/examples/core/core_scissor_test/core_scissor_test.lpr index 45d6c12..61a2fb9 100644 --- a/examples/core/core_scissor_test/core_scissor_test.lpr +++ b/examples/core/core_scissor_test/core_scissor_test.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_smooth_pixelperfect/core_smooth_pixelperfect.dpr b/examples/core/core_smooth_pixelperfect/core_smooth_pixelperfect.dpr index ad02849..8048164 100644 --- a/examples/core/core_smooth_pixelperfect/core_smooth_pixelperfect.dpr +++ b/examples/core/core_smooth_pixelperfect/core_smooth_pixelperfect.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_smooth_pixelperfect/core_smooth_pixelperfect.lpr b/examples/core/core_smooth_pixelperfect/core_smooth_pixelperfect.lpr index b60f5c1..8350d37 100644 --- a/examples/core/core_smooth_pixelperfect/core_smooth_pixelperfect.lpr +++ b/examples/core/core_smooth_pixelperfect/core_smooth_pixelperfect.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_split_screen/core_split_screen.dpr b/examples/core/core_split_screen/core_split_screen.dpr index 5a27fb2..2567824 100644 --- a/examples/core/core_split_screen/core_split_screen.dpr +++ b/examples/core/core_split_screen/core_split_screen.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_split_screen/core_split_screen.lpr b/examples/core/core_split_screen/core_split_screen.lpr index e59ae4c..349cd92 100644 --- a/examples/core/core_split_screen/core_split_screen.lpr +++ b/examples/core/core_split_screen/core_split_screen.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_storage_values/core_storage_values.dpr b/examples/core/core_storage_values/core_storage_values.dpr index b796ad7..1173362 100644 --- a/examples/core/core_storage_values/core_storage_values.dpr +++ b/examples/core/core_storage_values/core_storage_values.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_storage_values/core_storage_values.lpr b/examples/core/core_storage_values/core_storage_values.lpr index 6fd4c2e..e0ff1e2 100644 --- a/examples/core/core_storage_values/core_storage_values.lpr +++ b/examples/core/core_storage_values/core_storage_values.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_window_flags/core_window_flags.dpr b/examples/core/core_window_flags/core_window_flags.dpr index 645baa2..3d9f5d0 100644 --- a/examples/core/core_window_flags/core_window_flags.dpr +++ b/examples/core/core_window_flags/core_window_flags.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_window_flags/core_window_flags.lpr b/examples/core/core_window_flags/core_window_flags.lpr index 31c3bd1..c97506c 100644 --- a/examples/core/core_window_flags/core_window_flags.lpr +++ b/examples/core/core_window_flags/core_window_flags.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_window_letterbox/core_window_letterbox.dpr b/examples/core/core_window_letterbox/core_window_letterbox.dpr index 2aa9192..d996beb 100644 --- a/examples/core/core_window_letterbox/core_window_letterbox.dpr +++ b/examples/core/core_window_letterbox/core_window_letterbox.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_window_letterbox/core_window_letterbox.lpr b/examples/core/core_window_letterbox/core_window_letterbox.lpr index 9dfa747..46767e9 100644 --- a/examples/core/core_window_letterbox/core_window_letterbox.lpr +++ b/examples/core/core_window_letterbox/core_window_letterbox.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_window_should_close/core_window_should_close.dpr b/examples/core/core_window_should_close/core_window_should_close.dpr index 37e0263..1f3847d 100644 --- a/examples/core/core_window_should_close/core_window_should_close.dpr +++ b/examples/core/core_window_should_close/core_window_should_close.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_window_should_close/core_window_should_close.lpr b/examples/core/core_window_should_close/core_window_should_close.lpr index 0a8374a..8e04c1d 100644 --- a/examples/core/core_window_should_close/core_window_should_close.lpr +++ b/examples/core/core_window_should_close/core_window_should_close.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/core/core_world_screen/core_world_screen.dpr b/examples/core/core_world_screen/core_world_screen.dpr index 223159a..a6ea46e 100644 --- a/examples/core/core_world_screen/core_world_screen.dpr +++ b/examples/core/core_world_screen/core_world_screen.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/core/core_world_screen/core_world_screen.lpr b/examples/core/core_world_screen/core_world_screen.lpr index bae01c4..1face7c 100644 --- a/examples/core/core_world_screen/core_world_screen.lpr +++ b/examples/core/core_world_screen/core_world_screen.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/models/models_animation/models_animation.dpr b/examples/models/models_animation/models_animation.dpr index 4bea824..d4df0f8 100644 --- a/examples/models/models_animation/models_animation.dpr +++ b/examples/models/models_animation/models_animation.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/models/models_animation/models_animation.lpr b/examples/models/models_animation/models_animation.lpr index 6d4fb8e..5e80246 100644 --- a/examples/models/models_animation/models_animation.lpr +++ b/examples/models/models_animation/models_animation.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/models/models_billboard/models_billboard.dpr b/examples/models/models_billboard/models_billboard.dpr index a194a15..bb4588f 100644 --- a/examples/models/models_billboard/models_billboard.dpr +++ b/examples/models/models_billboard/models_billboard.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/models/models_billboard/models_billboard.lpr b/examples/models/models_billboard/models_billboard.lpr index 2c100f8..7435e2e 100644 --- a/examples/models/models_billboard/models_billboard.lpr +++ b/examples/models/models_billboard/models_billboard.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/models/models_box_collisions/models_box_collisions.dpr b/examples/models/models_box_collisions/models_box_collisions.dpr index 962418c..638ba8d 100644 --- a/examples/models/models_box_collisions/models_box_collisions.dpr +++ b/examples/models/models_box_collisions/models_box_collisions.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/models/models_box_collisions/models_box_collisions.lpr b/examples/models/models_box_collisions/models_box_collisions.lpr index a4bc429..43f3428 100644 --- a/examples/models/models_box_collisions/models_box_collisions.lpr +++ b/examples/models/models_box_collisions/models_box_collisions.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/models/models_cubicmap/models_cubicmap.dpr b/examples/models/models_cubicmap/models_cubicmap.dpr index d1574f8..2e9fa87 100644 --- a/examples/models/models_cubicmap/models_cubicmap.dpr +++ b/examples/models/models_cubicmap/models_cubicmap.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/models/models_cubicmap/models_cubicmap.lpr b/examples/models/models_cubicmap/models_cubicmap.lpr index a71d648..0b27e9f 100644 --- a/examples/models/models_cubicmap/models_cubicmap.lpr +++ b/examples/models/models_cubicmap/models_cubicmap.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/models/models_draw_cube_texture/models_draw_cube_texture.dpr b/examples/models/models_draw_cube_texture/models_draw_cube_texture.dpr index 7d79eee..0d3a3bd 100644 --- a/examples/models/models_draw_cube_texture/models_draw_cube_texture.dpr +++ b/examples/models/models_draw_cube_texture/models_draw_cube_texture.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/models/models_draw_cube_texture/models_draw_cube_texture.lpr b/examples/models/models_draw_cube_texture/models_draw_cube_texture.lpr index 514e62c..985a1ed 100644 --- a/examples/models/models_draw_cube_texture/models_draw_cube_texture.lpr +++ b/examples/models/models_draw_cube_texture/models_draw_cube_texture.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/models/models_first_person_maze/models_first_person_maze.dpr b/examples/models/models_first_person_maze/models_first_person_maze.dpr index 497ebad..f03d754 100644 --- a/examples/models/models_first_person_maze/models_first_person_maze.dpr +++ b/examples/models/models_first_person_maze/models_first_person_maze.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/models/models_first_person_maze/models_first_person_maze.lpr b/examples/models/models_first_person_maze/models_first_person_maze.lpr index 91e2caa..df8e67e 100644 --- a/examples/models/models_first_person_maze/models_first_person_maze.lpr +++ b/examples/models/models_first_person_maze/models_first_person_maze.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/models/models_geometric_shapes/models_geometric_shapes.dpr b/examples/models/models_geometric_shapes/models_geometric_shapes.dpr index 2e5d056..817bf17 100644 --- a/examples/models/models_geometric_shapes/models_geometric_shapes.dpr +++ b/examples/models/models_geometric_shapes/models_geometric_shapes.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/models/models_geometric_shapes/models_geometric_shapes.lpr b/examples/models/models_geometric_shapes/models_geometric_shapes.lpr index 337cb56..a7c5618 100644 --- a/examples/models/models_geometric_shapes/models_geometric_shapes.lpr +++ b/examples/models/models_geometric_shapes/models_geometric_shapes.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/models/models_heightmap/models_heightmap.dpr b/examples/models/models_heightmap/models_heightmap.dpr index 45ffe4e..6f25e53 100644 --- a/examples/models/models_heightmap/models_heightmap.dpr +++ b/examples/models/models_heightmap/models_heightmap.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/models/models_heightmap/models_heightmap.lpr b/examples/models/models_heightmap/models_heightmap.lpr index e667dc0..e8c1b52 100644 --- a/examples/models/models_heightmap/models_heightmap.lpr +++ b/examples/models/models_heightmap/models_heightmap.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/models/models_loading/models_loading.dpr b/examples/models/models_loading/models_loading.dpr index 2767ea7..0f24507 100644 --- a/examples/models/models_loading/models_loading.dpr +++ b/examples/models/models_loading/models_loading.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/models/models_loading/models_loading.lpr b/examples/models/models_loading/models_loading.lpr index e127b45..7951872 100644 --- a/examples/models/models_loading/models_loading.lpr +++ b/examples/models/models_loading/models_loading.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/models/models_loading_gltf/models_loading_gltf.dpr b/examples/models/models_loading_gltf/models_loading_gltf.dpr index eff0932..f94e3e3 100644 --- a/examples/models/models_loading_gltf/models_loading_gltf.dpr +++ b/examples/models/models_loading_gltf/models_loading_gltf.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/models/models_loading_gltf/models_loading_gltf.lpr b/examples/models/models_loading_gltf/models_loading_gltf.lpr index 7430263..d13f6ac 100644 --- a/examples/models/models_loading_gltf/models_loading_gltf.lpr +++ b/examples/models/models_loading_gltf/models_loading_gltf.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/models/models_loading_m3d/models_loading_m3d.dpr b/examples/models/models_loading_m3d/models_loading_m3d.dpr index f8d10f7..a0b4703 100644 --- a/examples/models/models_loading_m3d/models_loading_m3d.dpr +++ b/examples/models/models_loading_m3d/models_loading_m3d.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/models/models_loading_m3d/models_loading_m3d.lpr b/examples/models/models_loading_m3d/models_loading_m3d.lpr index 2b3465d..2577995 100644 --- a/examples/models/models_loading_m3d/models_loading_m3d.lpr +++ b/examples/models/models_loading_m3d/models_loading_m3d.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/models/models_loading_vox/models_loading_vox.dpr b/examples/models/models_loading_vox/models_loading_vox.dpr index 79f089c..182e223 100644 --- a/examples/models/models_loading_vox/models_loading_vox.dpr +++ b/examples/models/models_loading_vox/models_loading_vox.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/models/models_loading_vox/models_loading_vox.lpr b/examples/models/models_loading_vox/models_loading_vox.lpr index adb3814..45aff2d 100644 --- a/examples/models/models_loading_vox/models_loading_vox.lpr +++ b/examples/models/models_loading_vox/models_loading_vox.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/models/models_mesh_generation/models_mesh_generation.dpr b/examples/models/models_mesh_generation/models_mesh_generation.dpr index 761aafa..84f4fa3 100644 --- a/examples/models/models_mesh_generation/models_mesh_generation.dpr +++ b/examples/models/models_mesh_generation/models_mesh_generation.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/models/models_mesh_generation/models_mesh_generation.lpr b/examples/models/models_mesh_generation/models_mesh_generation.lpr index 7eeb474..2e056ff 100644 --- a/examples/models/models_mesh_generation/models_mesh_generation.lpr +++ b/examples/models/models_mesh_generation/models_mesh_generation.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/models/models_mesh_picking/models_mesh_picking.dpr b/examples/models/models_mesh_picking/models_mesh_picking.dpr index 61dc541..729af49 100644 --- a/examples/models/models_mesh_picking/models_mesh_picking.dpr +++ b/examples/models/models_mesh_picking/models_mesh_picking.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/models/models_mesh_picking/models_mesh_picking.lpr b/examples/models/models_mesh_picking/models_mesh_picking.lpr index 20f9612..9c746bb 100644 --- a/examples/models/models_mesh_picking/models_mesh_picking.lpr +++ b/examples/models/models_mesh_picking/models_mesh_picking.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/models/models_orthographic_projection/models_orthographic_projection.dpr b/examples/models/models_orthographic_projection/models_orthographic_projection.dpr index e5382d3..f2e6bfe 100644 --- a/examples/models/models_orthographic_projection/models_orthographic_projection.dpr +++ b/examples/models/models_orthographic_projection/models_orthographic_projection.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/models/models_orthographic_projection/models_orthographic_projection.lpr b/examples/models/models_orthographic_projection/models_orthographic_projection.lpr index c43a839..3f19087 100644 --- a/examples/models/models_orthographic_projection/models_orthographic_projection.lpr +++ b/examples/models/models_orthographic_projection/models_orthographic_projection.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/models/models_rlgl_solar_system/models_rlgl_solar_system.dpr b/examples/models/models_rlgl_solar_system/models_rlgl_solar_system.dpr index 4f77056..8712fdd 100644 --- a/examples/models/models_rlgl_solar_system/models_rlgl_solar_system.dpr +++ b/examples/models/models_rlgl_solar_system/models_rlgl_solar_system.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/models/models_rlgl_solar_system/models_rlgl_solar_system.lpr b/examples/models/models_rlgl_solar_system/models_rlgl_solar_system.lpr index 8b124c0..d7b13d1 100644 --- a/examples/models/models_rlgl_solar_system/models_rlgl_solar_system.lpr +++ b/examples/models/models_rlgl_solar_system/models_rlgl_solar_system.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/models/models_skybox/models_skybox.dpr b/examples/models/models_skybox/models_skybox.dpr index 1137c93..15f39c3 100644 --- a/examples/models/models_skybox/models_skybox.dpr +++ b/examples/models/models_skybox/models_skybox.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/models/models_skybox/models_skybox.lpr b/examples/models/models_skybox/models_skybox.lpr index 5a5e4ba..e7f775a 100644 --- a/examples/models/models_skybox/models_skybox.lpr +++ b/examples/models/models_skybox/models_skybox.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/models/models_waving_cubes/models_waving_cubes.dpr b/examples/models/models_waving_cubes/models_waving_cubes.dpr index 14d9c3b..7ee64c4 100644 --- a/examples/models/models_waving_cubes/models_waving_cubes.dpr +++ b/examples/models/models_waving_cubes/models_waving_cubes.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/models/models_waving_cubes/models_waving_cubes.lpr b/examples/models/models_waving_cubes/models_waving_cubes.lpr index a4c44fd..645ebd9 100644 --- a/examples/models/models_waving_cubes/models_waving_cubes.lpr +++ b/examples/models/models_waving_cubes/models_waving_cubes.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/models/models_yaw_pitch_roll/models_yaw_pitch_roll.dpr b/examples/models/models_yaw_pitch_roll/models_yaw_pitch_roll.dpr index c5afc49..efbcbb7 100644 --- a/examples/models/models_yaw_pitch_roll/models_yaw_pitch_roll.dpr +++ b/examples/models/models_yaw_pitch_roll/models_yaw_pitch_roll.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/models/models_yaw_pitch_roll/models_yaw_pitch_roll.lpr b/examples/models/models_yaw_pitch_roll/models_yaw_pitch_roll.lpr index 5a204e7..3cd295c 100644 --- a/examples/models/models_yaw_pitch_roll/models_yaw_pitch_roll.lpr +++ b/examples/models/models_yaw_pitch_roll/models_yaw_pitch_roll.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/project_gen.py b/examples/project_gen.py index f530ca8..4a976c1 100644 --- a/examples/project_gen.py +++ b/examples/project_gen.py @@ -270,11 +270,8 @@ def make_lpr_file(project_name, libs): begin try - {{$IFDEF UNIX}} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {{$ENDIF}} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except @@ -306,6 +303,9 @@ def make_dpr_file(project_name, libs): begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shaders/shaders_basic_lighting/shaders_basic_lighting.dpr b/examples/shaders/shaders_basic_lighting/shaders_basic_lighting.dpr index 0351046..7707601 100644 --- a/examples/shaders/shaders_basic_lighting/shaders_basic_lighting.dpr +++ b/examples/shaders/shaders_basic_lighting/shaders_basic_lighting.dpr @@ -14,6 +14,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shaders/shaders_basic_lighting/shaders_basic_lighting.lpr b/examples/shaders/shaders_basic_lighting/shaders_basic_lighting.lpr index 82f7056..fb8b008 100644 --- a/examples/shaders/shaders_basic_lighting/shaders_basic_lighting.lpr +++ b/examples/shaders/shaders_basic_lighting/shaders_basic_lighting.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shaders/shaders_custom_uniform/shaders_custom_uniform.dpr b/examples/shaders/shaders_custom_uniform/shaders_custom_uniform.dpr index 191a885..189732e 100644 --- a/examples/shaders/shaders_custom_uniform/shaders_custom_uniform.dpr +++ b/examples/shaders/shaders_custom_uniform/shaders_custom_uniform.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shaders/shaders_custom_uniform/shaders_custom_uniform.lpr b/examples/shaders/shaders_custom_uniform/shaders_custom_uniform.lpr index c227f1e..00bd1b8 100644 --- a/examples/shaders/shaders_custom_uniform/shaders_custom_uniform.lpr +++ b/examples/shaders/shaders_custom_uniform/shaders_custom_uniform.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shaders/shaders_eratosthenes/shaders_eratosthenes.dpr b/examples/shaders/shaders_eratosthenes/shaders_eratosthenes.dpr index c8b93cc..b77f035 100644 --- a/examples/shaders/shaders_eratosthenes/shaders_eratosthenes.dpr +++ b/examples/shaders/shaders_eratosthenes/shaders_eratosthenes.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shaders/shaders_eratosthenes/shaders_eratosthenes.lpr b/examples/shaders/shaders_eratosthenes/shaders_eratosthenes.lpr index 42aaad0..1f097b5 100644 --- a/examples/shaders/shaders_eratosthenes/shaders_eratosthenes.lpr +++ b/examples/shaders/shaders_eratosthenes/shaders_eratosthenes.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shaders/shaders_fog/shaders_fog.dpr b/examples/shaders/shaders_fog/shaders_fog.dpr index 75123df..a0b4d87 100644 --- a/examples/shaders/shaders_fog/shaders_fog.dpr +++ b/examples/shaders/shaders_fog/shaders_fog.dpr @@ -14,6 +14,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shaders/shaders_fog/shaders_fog.lpr b/examples/shaders/shaders_fog/shaders_fog.lpr index 2640999..b45f67b 100644 --- a/examples/shaders/shaders_fog/shaders_fog.lpr +++ b/examples/shaders/shaders_fog/shaders_fog.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shaders/shaders_julia_set/shaders_julia_set.dpr b/examples/shaders/shaders_julia_set/shaders_julia_set.dpr index aa070fc..4956349 100644 --- a/examples/shaders/shaders_julia_set/shaders_julia_set.dpr +++ b/examples/shaders/shaders_julia_set/shaders_julia_set.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shaders/shaders_julia_set/shaders_julia_set.lpr b/examples/shaders/shaders_julia_set/shaders_julia_set.lpr index 0f1f5f2..3dc0bc1 100644 --- a/examples/shaders/shaders_julia_set/shaders_julia_set.lpr +++ b/examples/shaders/shaders_julia_set/shaders_julia_set.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shaders/shaders_mesh_instancing/shaders_mesh_instancing.dpr b/examples/shaders/shaders_mesh_instancing/shaders_mesh_instancing.dpr index e98edc4..3f96327 100644 --- a/examples/shaders/shaders_mesh_instancing/shaders_mesh_instancing.dpr +++ b/examples/shaders/shaders_mesh_instancing/shaders_mesh_instancing.dpr @@ -14,6 +14,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shaders/shaders_mesh_instancing/shaders_mesh_instancing.lpr b/examples/shaders/shaders_mesh_instancing/shaders_mesh_instancing.lpr index 58d7ef7..cf6ef5f 100644 --- a/examples/shaders/shaders_mesh_instancing/shaders_mesh_instancing.lpr +++ b/examples/shaders/shaders_mesh_instancing/shaders_mesh_instancing.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shaders/shaders_model_shader/shaders_model_shader.dpr b/examples/shaders/shaders_model_shader/shaders_model_shader.dpr index b07f61e..4a86580 100644 --- a/examples/shaders/shaders_model_shader/shaders_model_shader.dpr +++ b/examples/shaders/shaders_model_shader/shaders_model_shader.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shaders/shaders_model_shader/shaders_model_shader.lpr b/examples/shaders/shaders_model_shader/shaders_model_shader.lpr index 5a5fd05..519d50b 100644 --- a/examples/shaders/shaders_model_shader/shaders_model_shader.lpr +++ b/examples/shaders/shaders_model_shader/shaders_model_shader.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shaders/shaders_palette_switch/shaders_palette_switch.dpr b/examples/shaders/shaders_palette_switch/shaders_palette_switch.dpr index b9f2ed2..2459cd3 100644 --- a/examples/shaders/shaders_palette_switch/shaders_palette_switch.dpr +++ b/examples/shaders/shaders_palette_switch/shaders_palette_switch.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shaders/shaders_palette_switch/shaders_palette_switch.lpr b/examples/shaders/shaders_palette_switch/shaders_palette_switch.lpr index 716591c..763e1d4 100644 --- a/examples/shaders/shaders_palette_switch/shaders_palette_switch.lpr +++ b/examples/shaders/shaders_palette_switch/shaders_palette_switch.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shaders/shaders_postprocessing/shaders_postprocessing.dpr b/examples/shaders/shaders_postprocessing/shaders_postprocessing.dpr index 1969de8..6f0155f 100644 --- a/examples/shaders/shaders_postprocessing/shaders_postprocessing.dpr +++ b/examples/shaders/shaders_postprocessing/shaders_postprocessing.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shaders/shaders_postprocessing/shaders_postprocessing.lpr b/examples/shaders/shaders_postprocessing/shaders_postprocessing.lpr index 8a4b6bb..acfd0c4 100644 --- a/examples/shaders/shaders_postprocessing/shaders_postprocessing.lpr +++ b/examples/shaders/shaders_postprocessing/shaders_postprocessing.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shaders/shaders_raymarching/shaders_raymarching.dpr b/examples/shaders/shaders_raymarching/shaders_raymarching.dpr index b415aa8..3fa749b 100644 --- a/examples/shaders/shaders_raymarching/shaders_raymarching.dpr +++ b/examples/shaders/shaders_raymarching/shaders_raymarching.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shaders/shaders_raymarching/shaders_raymarching.lpr b/examples/shaders/shaders_raymarching/shaders_raymarching.lpr index f3998af..f4532ab 100644 --- a/examples/shaders/shaders_raymarching/shaders_raymarching.lpr +++ b/examples/shaders/shaders_raymarching/shaders_raymarching.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shaders/shaders_shapes_textures/shaders_shapes_textures.dpr b/examples/shaders/shaders_shapes_textures/shaders_shapes_textures.dpr index afc1ecd..dd16765 100644 --- a/examples/shaders/shaders_shapes_textures/shaders_shapes_textures.dpr +++ b/examples/shaders/shaders_shapes_textures/shaders_shapes_textures.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shaders/shaders_shapes_textures/shaders_shapes_textures.lpr b/examples/shaders/shaders_shapes_textures/shaders_shapes_textures.lpr index fe25b17..63d848b 100644 --- a/examples/shaders/shaders_shapes_textures/shaders_shapes_textures.lpr +++ b/examples/shaders/shaders_shapes_textures/shaders_shapes_textures.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shaders/shaders_simple_mask/shaders_simple_mask.dpr b/examples/shaders/shaders_simple_mask/shaders_simple_mask.dpr index 524d614..fd94c95 100644 --- a/examples/shaders/shaders_simple_mask/shaders_simple_mask.dpr +++ b/examples/shaders/shaders_simple_mask/shaders_simple_mask.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shaders/shaders_simple_mask/shaders_simple_mask.lpr b/examples/shaders/shaders_simple_mask/shaders_simple_mask.lpr index 90b205a..868ca39 100644 --- a/examples/shaders/shaders_simple_mask/shaders_simple_mask.lpr +++ b/examples/shaders/shaders_simple_mask/shaders_simple_mask.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shaders/shaders_texture_drawing/shaders_texture_drawing.dpr b/examples/shaders/shaders_texture_drawing/shaders_texture_drawing.dpr index ef13337..1f7c49d 100644 --- a/examples/shaders/shaders_texture_drawing/shaders_texture_drawing.dpr +++ b/examples/shaders/shaders_texture_drawing/shaders_texture_drawing.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shaders/shaders_texture_drawing/shaders_texture_drawing.lpr b/examples/shaders/shaders_texture_drawing/shaders_texture_drawing.lpr index fc4cc4a..dc737c6 100644 --- a/examples/shaders/shaders_texture_drawing/shaders_texture_drawing.lpr +++ b/examples/shaders/shaders_texture_drawing/shaders_texture_drawing.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shaders/shaders_texture_outline/shaders_texture_outline.dpr b/examples/shaders/shaders_texture_outline/shaders_texture_outline.dpr index f58b200..c04ab0c 100644 --- a/examples/shaders/shaders_texture_outline/shaders_texture_outline.dpr +++ b/examples/shaders/shaders_texture_outline/shaders_texture_outline.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shaders/shaders_texture_outline/shaders_texture_outline.lpr b/examples/shaders/shaders_texture_outline/shaders_texture_outline.lpr index 6a30081..4fe4c4c 100644 --- a/examples/shaders/shaders_texture_outline/shaders_texture_outline.lpr +++ b/examples/shaders/shaders_texture_outline/shaders_texture_outline.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shaders/shaders_texture_waves/shaders_texture_waves.dpr b/examples/shaders/shaders_texture_waves/shaders_texture_waves.dpr index 9599f4f..2d48b8b 100644 --- a/examples/shaders/shaders_texture_waves/shaders_texture_waves.dpr +++ b/examples/shaders/shaders_texture_waves/shaders_texture_waves.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shaders/shaders_texture_waves/shaders_texture_waves.lpr b/examples/shaders/shaders_texture_waves/shaders_texture_waves.lpr index 51bfc69..cea6391 100644 --- a/examples/shaders/shaders_texture_waves/shaders_texture_waves.lpr +++ b/examples/shaders/shaders_texture_waves/shaders_texture_waves.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shapes/shapes_basic_shapes/shapes_basic_shapes.dpr b/examples/shapes/shapes_basic_shapes/shapes_basic_shapes.dpr index 920f33b..31e4739 100644 --- a/examples/shapes/shapes_basic_shapes/shapes_basic_shapes.dpr +++ b/examples/shapes/shapes_basic_shapes/shapes_basic_shapes.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shapes/shapes_basic_shapes/shapes_basic_shapes.lpr b/examples/shapes/shapes_basic_shapes/shapes_basic_shapes.lpr index 2b9a98d..8bf32be 100644 --- a/examples/shapes/shapes_basic_shapes/shapes_basic_shapes.lpr +++ b/examples/shapes/shapes_basic_shapes/shapes_basic_shapes.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shapes/shapes_bouncing_ball/shapes_bouncing_ball.dpr b/examples/shapes/shapes_bouncing_ball/shapes_bouncing_ball.dpr index 3efad1e..65bfef7 100644 --- a/examples/shapes/shapes_bouncing_ball/shapes_bouncing_ball.dpr +++ b/examples/shapes/shapes_bouncing_ball/shapes_bouncing_ball.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shapes/shapes_bouncing_ball/shapes_bouncing_ball.lpr b/examples/shapes/shapes_bouncing_ball/shapes_bouncing_ball.lpr index 206e2f6..67de673 100644 --- a/examples/shapes/shapes_bouncing_ball/shapes_bouncing_ball.lpr +++ b/examples/shapes/shapes_bouncing_ball/shapes_bouncing_ball.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shapes/shapes_collision_area/shapes_collision_area.dpr b/examples/shapes/shapes_collision_area/shapes_collision_area.dpr index 7d75a80..7f67bad 100644 --- a/examples/shapes/shapes_collision_area/shapes_collision_area.dpr +++ b/examples/shapes/shapes_collision_area/shapes_collision_area.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shapes/shapes_collision_area/shapes_collision_area.lpr b/examples/shapes/shapes_collision_area/shapes_collision_area.lpr index 05ac001..3507888 100644 --- a/examples/shapes/shapes_collision_area/shapes_collision_area.lpr +++ b/examples/shapes/shapes_collision_area/shapes_collision_area.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shapes/shapes_colors_palette/shapes_colors_palette.dpr b/examples/shapes/shapes_colors_palette/shapes_colors_palette.dpr index e284da6..b308a7c 100644 --- a/examples/shapes/shapes_colors_palette/shapes_colors_palette.dpr +++ b/examples/shapes/shapes_colors_palette/shapes_colors_palette.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shapes/shapes_colors_palette/shapes_colors_palette.lpr b/examples/shapes/shapes_colors_palette/shapes_colors_palette.lpr index f9cc9f0..1b2b3f3 100644 --- a/examples/shapes/shapes_colors_palette/shapes_colors_palette.lpr +++ b/examples/shapes/shapes_colors_palette/shapes_colors_palette.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shapes/shapes_draw_ring/shapes_draw_ring.dpr b/examples/shapes/shapes_draw_ring/shapes_draw_ring.dpr index 98c8345..a90f2e3 100644 --- a/examples/shapes/shapes_draw_ring/shapes_draw_ring.dpr +++ b/examples/shapes/shapes_draw_ring/shapes_draw_ring.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shapes/shapes_draw_ring/shapes_draw_ring.lpr b/examples/shapes/shapes_draw_ring/shapes_draw_ring.lpr index 17605d5..147ff80 100644 --- a/examples/shapes/shapes_draw_ring/shapes_draw_ring.lpr +++ b/examples/shapes/shapes_draw_ring/shapes_draw_ring.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shapes/shapes_easings_ball_anim/shapes_easings_ball_anim.dpr b/examples/shapes/shapes_easings_ball_anim/shapes_easings_ball_anim.dpr index aac0911..2425681 100644 --- a/examples/shapes/shapes_easings_ball_anim/shapes_easings_ball_anim.dpr +++ b/examples/shapes/shapes_easings_ball_anim/shapes_easings_ball_anim.dpr @@ -14,6 +14,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shapes/shapes_easings_ball_anim/shapes_easings_ball_anim.lpr b/examples/shapes/shapes_easings_ball_anim/shapes_easings_ball_anim.lpr index 808296b..16305e0 100644 --- a/examples/shapes/shapes_easings_ball_anim/shapes_easings_ball_anim.lpr +++ b/examples/shapes/shapes_easings_ball_anim/shapes_easings_ball_anim.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shapes/shapes_easings_box_anim/shapes_easings_box_anim.dpr b/examples/shapes/shapes_easings_box_anim/shapes_easings_box_anim.dpr index 0ad1271..426faa0 100644 --- a/examples/shapes/shapes_easings_box_anim/shapes_easings_box_anim.dpr +++ b/examples/shapes/shapes_easings_box_anim/shapes_easings_box_anim.dpr @@ -14,6 +14,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shapes/shapes_easings_box_anim/shapes_easings_box_anim.lpr b/examples/shapes/shapes_easings_box_anim/shapes_easings_box_anim.lpr index 0858e79..96adb30 100644 --- a/examples/shapes/shapes_easings_box_anim/shapes_easings_box_anim.lpr +++ b/examples/shapes/shapes_easings_box_anim/shapes_easings_box_anim.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shapes/shapes_easings_rectangle_array/shapes_easings_rectangle_array.dpr b/examples/shapes/shapes_easings_rectangle_array/shapes_easings_rectangle_array.dpr index ec1f386..3740dd1 100644 --- a/examples/shapes/shapes_easings_rectangle_array/shapes_easings_rectangle_array.dpr +++ b/examples/shapes/shapes_easings_rectangle_array/shapes_easings_rectangle_array.dpr @@ -14,6 +14,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shapes/shapes_easings_rectangle_array/shapes_easings_rectangle_array.lpr b/examples/shapes/shapes_easings_rectangle_array/shapes_easings_rectangle_array.lpr index a6a1a04..a21797c 100644 --- a/examples/shapes/shapes_easings_rectangle_array/shapes_easings_rectangle_array.lpr +++ b/examples/shapes/shapes_easings_rectangle_array/shapes_easings_rectangle_array.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shapes/shapes_following_eyes/shapes_following_eyes.dpr b/examples/shapes/shapes_following_eyes/shapes_following_eyes.dpr index 887d182..84d74a2 100644 --- a/examples/shapes/shapes_following_eyes/shapes_following_eyes.dpr +++ b/examples/shapes/shapes_following_eyes/shapes_following_eyes.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shapes/shapes_following_eyes/shapes_following_eyes.lpr b/examples/shapes/shapes_following_eyes/shapes_following_eyes.lpr index 49cd14c..b0eb6cc 100644 --- a/examples/shapes/shapes_following_eyes/shapes_following_eyes.lpr +++ b/examples/shapes/shapes_following_eyes/shapes_following_eyes.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shapes/shapes_lines_bezier/shapes_lines_bezier.dpr b/examples/shapes/shapes_lines_bezier/shapes_lines_bezier.dpr index 2147d41..776f0fb 100644 --- a/examples/shapes/shapes_lines_bezier/shapes_lines_bezier.dpr +++ b/examples/shapes/shapes_lines_bezier/shapes_lines_bezier.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shapes/shapes_lines_bezier/shapes_lines_bezier.lpr b/examples/shapes/shapes_lines_bezier/shapes_lines_bezier.lpr index 7a9e2a7..b75385b 100644 --- a/examples/shapes/shapes_lines_bezier/shapes_lines_bezier.lpr +++ b/examples/shapes/shapes_lines_bezier/shapes_lines_bezier.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shapes/shapes_logo_raylib/shapes_logo_raylib.dpr b/examples/shapes/shapes_logo_raylib/shapes_logo_raylib.dpr index 7319819..11ae623 100644 --- a/examples/shapes/shapes_logo_raylib/shapes_logo_raylib.dpr +++ b/examples/shapes/shapes_logo_raylib/shapes_logo_raylib.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shapes/shapes_logo_raylib/shapes_logo_raylib.lpr b/examples/shapes/shapes_logo_raylib/shapes_logo_raylib.lpr index 2f0473d..ca2e752 100644 --- a/examples/shapes/shapes_logo_raylib/shapes_logo_raylib.lpr +++ b/examples/shapes/shapes_logo_raylib/shapes_logo_raylib.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shapes/shapes_logo_raylib_anim/shapes_logo_raylib_anim.dpr b/examples/shapes/shapes_logo_raylib_anim/shapes_logo_raylib_anim.dpr index fa9c60f..b6458a0 100644 --- a/examples/shapes/shapes_logo_raylib_anim/shapes_logo_raylib_anim.dpr +++ b/examples/shapes/shapes_logo_raylib_anim/shapes_logo_raylib_anim.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shapes/shapes_logo_raylib_anim/shapes_logo_raylib_anim.lpr b/examples/shapes/shapes_logo_raylib_anim/shapes_logo_raylib_anim.lpr index 5c6e9a0..93014ac 100644 --- a/examples/shapes/shapes_logo_raylib_anim/shapes_logo_raylib_anim.lpr +++ b/examples/shapes/shapes_logo_raylib_anim/shapes_logo_raylib_anim.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shapes/shapes_rectangle_scaling/shapes_rectangle_scaling.dpr b/examples/shapes/shapes_rectangle_scaling/shapes_rectangle_scaling.dpr index eb22203..33ce218 100644 --- a/examples/shapes/shapes_rectangle_scaling/shapes_rectangle_scaling.dpr +++ b/examples/shapes/shapes_rectangle_scaling/shapes_rectangle_scaling.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shapes/shapes_rectangle_scaling/shapes_rectangle_scaling.lpr b/examples/shapes/shapes_rectangle_scaling/shapes_rectangle_scaling.lpr index 54d4553..c5ecc99 100644 --- a/examples/shapes/shapes_rectangle_scaling/shapes_rectangle_scaling.lpr +++ b/examples/shapes/shapes_rectangle_scaling/shapes_rectangle_scaling.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/shapes/shapes_top_down_lights/shapes_top_down_lights.dpr b/examples/shapes/shapes_top_down_lights/shapes_top_down_lights.dpr index e5550d2..1ad19ca 100644 --- a/examples/shapes/shapes_top_down_lights/shapes_top_down_lights.dpr +++ b/examples/shapes/shapes_top_down_lights/shapes_top_down_lights.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/shapes/shapes_top_down_lights/shapes_top_down_lights.lpr b/examples/shapes/shapes_top_down_lights/shapes_top_down_lights.lpr index 94f6ffc..ee2ded9 100644 --- a/examples/shapes/shapes_top_down_lights/shapes_top_down_lights.lpr +++ b/examples/shapes/shapes_top_down_lights/shapes_top_down_lights.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/text/text_font_filters/text_font_filters.dpr b/examples/text/text_font_filters/text_font_filters.dpr index d4aa0b2..19f5176 100644 --- a/examples/text/text_font_filters/text_font_filters.dpr +++ b/examples/text/text_font_filters/text_font_filters.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/text/text_font_filters/text_font_filters.lpr b/examples/text/text_font_filters/text_font_filters.lpr index 9e78dea..4664bab 100644 --- a/examples/text/text_font_filters/text_font_filters.lpr +++ b/examples/text/text_font_filters/text_font_filters.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/text/text_font_loading/text_font_loading.dpr b/examples/text/text_font_loading/text_font_loading.dpr index 637fa5f..e00fb40 100644 --- a/examples/text/text_font_loading/text_font_loading.dpr +++ b/examples/text/text_font_loading/text_font_loading.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/text/text_font_loading/text_font_loading.lpr b/examples/text/text_font_loading/text_font_loading.lpr index d116bc4..399b271 100644 --- a/examples/text/text_font_loading/text_font_loading.lpr +++ b/examples/text/text_font_loading/text_font_loading.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/text/text_font_sdf/text_font_sdf.dpr b/examples/text/text_font_sdf/text_font_sdf.dpr index 61ff78a..0184c14 100644 --- a/examples/text/text_font_sdf/text_font_sdf.dpr +++ b/examples/text/text_font_sdf/text_font_sdf.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/text/text_font_sdf/text_font_sdf.lpr b/examples/text/text_font_sdf/text_font_sdf.lpr index 5374269..0df9488 100644 --- a/examples/text/text_font_sdf/text_font_sdf.lpr +++ b/examples/text/text_font_sdf/text_font_sdf.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/text/text_font_spritefont/text_font_spritefont.dpr b/examples/text/text_font_spritefont/text_font_spritefont.dpr index ebf3ef9..ff1b625 100644 --- a/examples/text/text_font_spritefont/text_font_spritefont.dpr +++ b/examples/text/text_font_spritefont/text_font_spritefont.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/text/text_font_spritefont/text_font_spritefont.lpr b/examples/text/text_font_spritefont/text_font_spritefont.lpr index 46e5ea1..a014a59 100644 --- a/examples/text/text_font_spritefont/text_font_spritefont.lpr +++ b/examples/text/text_font_spritefont/text_font_spritefont.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/text/text_format_text/text_format_text.dpr b/examples/text/text_format_text/text_format_text.dpr index 2758348..4aa0038 100644 --- a/examples/text/text_format_text/text_format_text.dpr +++ b/examples/text/text_format_text/text_format_text.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/text/text_format_text/text_format_text.lpr b/examples/text/text_format_text/text_format_text.lpr index 8eb4fbe..fdd9937 100644 --- a/examples/text/text_format_text/text_format_text.lpr +++ b/examples/text/text_format_text/text_format_text.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/text/text_input_box/text_input_box.dpr b/examples/text/text_input_box/text_input_box.dpr index d3cbb99..cb291ee 100644 --- a/examples/text/text_input_box/text_input_box.dpr +++ b/examples/text/text_input_box/text_input_box.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/text/text_input_box/text_input_box.lpr b/examples/text/text_input_box/text_input_box.lpr index 223ab00..705c7eb 100644 --- a/examples/text/text_input_box/text_input_box.lpr +++ b/examples/text/text_input_box/text_input_box.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/text/text_raylib_fonts/text_raylib_fonts.dpr b/examples/text/text_raylib_fonts/text_raylib_fonts.dpr index 420d4c4..fad1b6a 100644 --- a/examples/text/text_raylib_fonts/text_raylib_fonts.dpr +++ b/examples/text/text_raylib_fonts/text_raylib_fonts.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/text/text_raylib_fonts/text_raylib_fonts.lpr b/examples/text/text_raylib_fonts/text_raylib_fonts.lpr index 5b22c58..cb06cca 100644 --- a/examples/text/text_raylib_fonts/text_raylib_fonts.lpr +++ b/examples/text/text_raylib_fonts/text_raylib_fonts.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/text/text_rectangle_bounds/text_rectangle_bounds.dpr b/examples/text/text_rectangle_bounds/text_rectangle_bounds.dpr index fb320f0..af752e4 100644 --- a/examples/text/text_rectangle_bounds/text_rectangle_bounds.dpr +++ b/examples/text/text_rectangle_bounds/text_rectangle_bounds.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/text/text_rectangle_bounds/text_rectangle_bounds.lpr b/examples/text/text_rectangle_bounds/text_rectangle_bounds.lpr index 5906def..1c9d8cc 100644 --- a/examples/text/text_rectangle_bounds/text_rectangle_bounds.lpr +++ b/examples/text/text_rectangle_bounds/text_rectangle_bounds.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/text/text_writing_anim/text_writing_anim.dpr b/examples/text/text_writing_anim/text_writing_anim.dpr index c4f166f..35de381 100644 --- a/examples/text/text_writing_anim/text_writing_anim.dpr +++ b/examples/text/text_writing_anim/text_writing_anim.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/text/text_writing_anim/text_writing_anim.lpr b/examples/text/text_writing_anim/text_writing_anim.lpr index 20dc9b7..f5140cf 100644 --- a/examples/text/text_writing_anim/text_writing_anim.lpr +++ b/examples/text/text_writing_anim/text_writing_anim.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/textures/textures_background_scrolling/textures_background_scrolling.dpr b/examples/textures/textures_background_scrolling/textures_background_scrolling.dpr index b045747..e10791f 100644 --- a/examples/textures/textures_background_scrolling/textures_background_scrolling.dpr +++ b/examples/textures/textures_background_scrolling/textures_background_scrolling.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/textures/textures_background_scrolling/textures_background_scrolling.lpr b/examples/textures/textures_background_scrolling/textures_background_scrolling.lpr index f6d6e7c..dddf93a 100644 --- a/examples/textures/textures_background_scrolling/textures_background_scrolling.lpr +++ b/examples/textures/textures_background_scrolling/textures_background_scrolling.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/textures/textures_blend_modes/textures_blend_modes.dpr b/examples/textures/textures_blend_modes/textures_blend_modes.dpr index 8cabc08..d589c21 100644 --- a/examples/textures/textures_blend_modes/textures_blend_modes.dpr +++ b/examples/textures/textures_blend_modes/textures_blend_modes.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/textures/textures_blend_modes/textures_blend_modes.lpr b/examples/textures/textures_blend_modes/textures_blend_modes.lpr index 41675f5..16b8ae7 100644 --- a/examples/textures/textures_blend_modes/textures_blend_modes.lpr +++ b/examples/textures/textures_blend_modes/textures_blend_modes.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/textures/textures_bunnymark/textures_bunnymark.dpr b/examples/textures/textures_bunnymark/textures_bunnymark.dpr index 26f5c25..e350906 100644 --- a/examples/textures/textures_bunnymark/textures_bunnymark.dpr +++ b/examples/textures/textures_bunnymark/textures_bunnymark.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/textures/textures_bunnymark/textures_bunnymark.lpr b/examples/textures/textures_bunnymark/textures_bunnymark.lpr index 26786f3..755167f 100644 --- a/examples/textures/textures_bunnymark/textures_bunnymark.lpr +++ b/examples/textures/textures_bunnymark/textures_bunnymark.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/textures/textures_draw_tiled/textures_draw_tiled.dpr b/examples/textures/textures_draw_tiled/textures_draw_tiled.dpr index ced46d5..1bcd2e5 100644 --- a/examples/textures/textures_draw_tiled/textures_draw_tiled.dpr +++ b/examples/textures/textures_draw_tiled/textures_draw_tiled.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/textures/textures_draw_tiled/textures_draw_tiled.lpr b/examples/textures/textures_draw_tiled/textures_draw_tiled.lpr index 389e67e..842223f 100644 --- a/examples/textures/textures_draw_tiled/textures_draw_tiled.lpr +++ b/examples/textures/textures_draw_tiled/textures_draw_tiled.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/textures/textures_fog_of_war/textures_fog_of_war.dpr b/examples/textures/textures_fog_of_war/textures_fog_of_war.dpr index 1e561f3..3630be0 100644 --- a/examples/textures/textures_fog_of_war/textures_fog_of_war.dpr +++ b/examples/textures/textures_fog_of_war/textures_fog_of_war.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/textures/textures_fog_of_war/textures_fog_of_war.lpr b/examples/textures/textures_fog_of_war/textures_fog_of_war.lpr index 5f2dde8..8ac256c 100644 --- a/examples/textures/textures_fog_of_war/textures_fog_of_war.lpr +++ b/examples/textures/textures_fog_of_war/textures_fog_of_war.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/textures/textures_gif_player/textures_gif_player.dpr b/examples/textures/textures_gif_player/textures_gif_player.dpr index b9b4b06..6c967fc 100644 --- a/examples/textures/textures_gif_player/textures_gif_player.dpr +++ b/examples/textures/textures_gif_player/textures_gif_player.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/textures/textures_gif_player/textures_gif_player.lpr b/examples/textures/textures_gif_player/textures_gif_player.lpr index 6933b0b..43ee6ad 100644 --- a/examples/textures/textures_gif_player/textures_gif_player.lpr +++ b/examples/textures/textures_gif_player/textures_gif_player.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/textures/textures_image_drawing/textures_image_drawing.dpr b/examples/textures/textures_image_drawing/textures_image_drawing.dpr index 9018214..78778fd 100644 --- a/examples/textures/textures_image_drawing/textures_image_drawing.dpr +++ b/examples/textures/textures_image_drawing/textures_image_drawing.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/textures/textures_image_drawing/textures_image_drawing.lpr b/examples/textures/textures_image_drawing/textures_image_drawing.lpr index e1ebc47..c11b1d7 100644 --- a/examples/textures/textures_image_drawing/textures_image_drawing.lpr +++ b/examples/textures/textures_image_drawing/textures_image_drawing.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/textures/textures_image_generation/textures_image_generation.dpr b/examples/textures/textures_image_generation/textures_image_generation.dpr index 9db6f61..a6a0cf7 100644 --- a/examples/textures/textures_image_generation/textures_image_generation.dpr +++ b/examples/textures/textures_image_generation/textures_image_generation.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/textures/textures_image_generation/textures_image_generation.lpr b/examples/textures/textures_image_generation/textures_image_generation.lpr index f0dffa5..db134af 100644 --- a/examples/textures/textures_image_generation/textures_image_generation.lpr +++ b/examples/textures/textures_image_generation/textures_image_generation.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/textures/textures_image_loading/textures_image_loading.dpr b/examples/textures/textures_image_loading/textures_image_loading.dpr index 22903e9..714d113 100644 --- a/examples/textures/textures_image_loading/textures_image_loading.dpr +++ b/examples/textures/textures_image_loading/textures_image_loading.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/textures/textures_image_loading/textures_image_loading.lpr b/examples/textures/textures_image_loading/textures_image_loading.lpr index 1a8d80d..4e103a1 100644 --- a/examples/textures/textures_image_loading/textures_image_loading.lpr +++ b/examples/textures/textures_image_loading/textures_image_loading.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/textures/textures_image_processing/textures_image_processing.dpr b/examples/textures/textures_image_processing/textures_image_processing.dpr index cf0e54b..d1d6886 100644 --- a/examples/textures/textures_image_processing/textures_image_processing.dpr +++ b/examples/textures/textures_image_processing/textures_image_processing.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/textures/textures_image_processing/textures_image_processing.lpr b/examples/textures/textures_image_processing/textures_image_processing.lpr index fed2961..346bb00 100644 --- a/examples/textures/textures_image_processing/textures_image_processing.lpr +++ b/examples/textures/textures_image_processing/textures_image_processing.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/textures/textures_image_text/textures_image_text.dpr b/examples/textures/textures_image_text/textures_image_text.dpr index 6d57981..42c22a8 100644 --- a/examples/textures/textures_image_text/textures_image_text.dpr +++ b/examples/textures/textures_image_text/textures_image_text.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/textures/textures_image_text/textures_image_text.lpr b/examples/textures/textures_image_text/textures_image_text.lpr index c093746..4a65e34 100644 --- a/examples/textures/textures_image_text/textures_image_text.lpr +++ b/examples/textures/textures_image_text/textures_image_text.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/textures/textures_logo_raylib/textures_logo_raylib.dpr b/examples/textures/textures_logo_raylib/textures_logo_raylib.dpr index 0da2512..6c9aa5c 100644 --- a/examples/textures/textures_logo_raylib/textures_logo_raylib.dpr +++ b/examples/textures/textures_logo_raylib/textures_logo_raylib.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/textures/textures_logo_raylib/textures_logo_raylib.lpr b/examples/textures/textures_logo_raylib/textures_logo_raylib.lpr index 7b48d17..1dc9cd5 100644 --- a/examples/textures/textures_logo_raylib/textures_logo_raylib.lpr +++ b/examples/textures/textures_logo_raylib/textures_logo_raylib.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/textures/textures_mouse_painting/textures_mouse_painting.dpr b/examples/textures/textures_mouse_painting/textures_mouse_painting.dpr index 05a604e..08f53af 100644 --- a/examples/textures/textures_mouse_painting/textures_mouse_painting.dpr +++ b/examples/textures/textures_mouse_painting/textures_mouse_painting.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/textures/textures_mouse_painting/textures_mouse_painting.lpr b/examples/textures/textures_mouse_painting/textures_mouse_painting.lpr index d0a978a..aebda19 100644 --- a/examples/textures/textures_mouse_painting/textures_mouse_painting.lpr +++ b/examples/textures/textures_mouse_painting/textures_mouse_painting.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/textures/textures_npatch_drawing/textures_npatch_drawing.dpr b/examples/textures/textures_npatch_drawing/textures_npatch_drawing.dpr index c087476..d7e5a98 100644 --- a/examples/textures/textures_npatch_drawing/textures_npatch_drawing.dpr +++ b/examples/textures/textures_npatch_drawing/textures_npatch_drawing.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/textures/textures_npatch_drawing/textures_npatch_drawing.lpr b/examples/textures/textures_npatch_drawing/textures_npatch_drawing.lpr index 151e64d..0929dd4 100644 --- a/examples/textures/textures_npatch_drawing/textures_npatch_drawing.lpr +++ b/examples/textures/textures_npatch_drawing/textures_npatch_drawing.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/textures/textures_particles_blending/textures_particles_blending.dpr b/examples/textures/textures_particles_blending/textures_particles_blending.dpr index ac1f457..7737be5 100644 --- a/examples/textures/textures_particles_blending/textures_particles_blending.dpr +++ b/examples/textures/textures_particles_blending/textures_particles_blending.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/textures/textures_particles_blending/textures_particles_blending.lpr b/examples/textures/textures_particles_blending/textures_particles_blending.lpr index c5050d4..4f86d10 100644 --- a/examples/textures/textures_particles_blending/textures_particles_blending.lpr +++ b/examples/textures/textures_particles_blending/textures_particles_blending.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/textures/textures_polygon/textures_polygon.dpr b/examples/textures/textures_polygon/textures_polygon.dpr index 9291fb0..bf60866 100644 --- a/examples/textures/textures_polygon/textures_polygon.dpr +++ b/examples/textures/textures_polygon/textures_polygon.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/textures/textures_polygon/textures_polygon.lpr b/examples/textures/textures_polygon/textures_polygon.lpr index 39c3afa..48c952b 100644 --- a/examples/textures/textures_polygon/textures_polygon.lpr +++ b/examples/textures/textures_polygon/textures_polygon.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/textures/textures_raw_data/textures_raw_data.dpr b/examples/textures/textures_raw_data/textures_raw_data.dpr index bed83e8..ea36c03 100644 --- a/examples/textures/textures_raw_data/textures_raw_data.dpr +++ b/examples/textures/textures_raw_data/textures_raw_data.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/textures/textures_raw_data/textures_raw_data.lpr b/examples/textures/textures_raw_data/textures_raw_data.lpr index 79734a5..7dbddc7 100644 --- a/examples/textures/textures_raw_data/textures_raw_data.lpr +++ b/examples/textures/textures_raw_data/textures_raw_data.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/textures/textures_sprite_anim/textures_sprite_anim.dpr b/examples/textures/textures_sprite_anim/textures_sprite_anim.dpr index b05a04b..c9e5358 100644 --- a/examples/textures/textures_sprite_anim/textures_sprite_anim.dpr +++ b/examples/textures/textures_sprite_anim/textures_sprite_anim.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/textures/textures_sprite_anim/textures_sprite_anim.lpr b/examples/textures/textures_sprite_anim/textures_sprite_anim.lpr index 58b6bb8..d5d509e 100644 --- a/examples/textures/textures_sprite_anim/textures_sprite_anim.lpr +++ b/examples/textures/textures_sprite_anim/textures_sprite_anim.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/textures/textures_sprite_button/textures_sprite_button.dpr b/examples/textures/textures_sprite_button/textures_sprite_button.dpr index c740a7b..c0e91dc 100644 --- a/examples/textures/textures_sprite_button/textures_sprite_button.dpr +++ b/examples/textures/textures_sprite_button/textures_sprite_button.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/textures/textures_sprite_button/textures_sprite_button.lpr b/examples/textures/textures_sprite_button/textures_sprite_button.lpr index f92b25d..0ca9c73 100644 --- a/examples/textures/textures_sprite_button/textures_sprite_button.lpr +++ b/examples/textures/textures_sprite_button/textures_sprite_button.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/textures/textures_sprite_explosion/textures_sprite_explosion.dpr b/examples/textures/textures_sprite_explosion/textures_sprite_explosion.dpr index 7b56353..8220d66 100644 --- a/examples/textures/textures_sprite_explosion/textures_sprite_explosion.dpr +++ b/examples/textures/textures_sprite_explosion/textures_sprite_explosion.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/textures/textures_sprite_explosion/textures_sprite_explosion.lpr b/examples/textures/textures_sprite_explosion/textures_sprite_explosion.lpr index 54dc29d..dc7d457 100644 --- a/examples/textures/textures_sprite_explosion/textures_sprite_explosion.lpr +++ b/examples/textures/textures_sprite_explosion/textures_sprite_explosion.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/textures/textures_srcrec_dstrec/textures_srcrec_dstrec.dpr b/examples/textures/textures_srcrec_dstrec/textures_srcrec_dstrec.dpr index aaff43e..4e8ca77 100644 --- a/examples/textures/textures_srcrec_dstrec/textures_srcrec_dstrec.dpr +++ b/examples/textures/textures_srcrec_dstrec/textures_srcrec_dstrec.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/textures/textures_srcrec_dstrec/textures_srcrec_dstrec.lpr b/examples/textures/textures_srcrec_dstrec/textures_srcrec_dstrec.lpr index ee16a79..6abe067 100644 --- a/examples/textures/textures_srcrec_dstrec/textures_srcrec_dstrec.lpr +++ b/examples/textures/textures_srcrec_dstrec/textures_srcrec_dstrec.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/examples/textures/textures_to_image/textures_to_image.dpr b/examples/textures/textures_to_image/textures_to_image.dpr index a73d9a2..58747e8 100644 --- a/examples/textures/textures_to_image/textures_to_image.dpr +++ b/examples/textures/textures_to_image/textures_to_image.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/examples/textures/textures_to_image/textures_to_image.lpr b/examples/textures/textures_to_image/textures_to_image.lpr index 365d248..ee8d9ca 100644 --- a/examples/textures/textures_to_image/textures_to_image.lpr +++ b/examples/textures/textures_to_image/textures_to_image.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. - SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); Main(); except diff --git a/raylib/raylib.inc b/raylib/raylib.inc index 71a2aff..4f8a9b7 100644 --- a/raylib/raylib.inc +++ b/raylib/raylib.inc @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------------------------ // _ __ ________ _ __ ______ _ ________ _ __ ________________ // _ __ ____ __/___ ___________ /__________ __ \_____ _____ ____ /__(_)__ /_ // _ __ / _ / / /_ ___/_ __ \ __ \_ /_/ / __ `/_ / / /_ /__ /__ __ \ diff --git a/turbogen/templates/delphi_template.dpr b/turbogen/templates/delphi_template.dpr index 99ee047..ed8706b 100644 --- a/turbogen/templates/delphi_template.dpr +++ b/turbogen/templates/delphi_template.dpr @@ -13,6 +13,9 @@ uses begin try + // set current directory to exe path + SetCurrentDir(ExtractFilePath(ParamStr(0))); + Main(); except on E: Exception do diff --git a/turbogen/templates/lazarus_template.lpr b/turbogen/templates/lazarus_template.lpr index 8c51f59..4b916d5 100644 --- a/turbogen/templates/lazarus_template.lpr +++ b/turbogen/templates/lazarus_template.lpr @@ -6,11 +6,8 @@ begin try - {$IFDEF UNIX} - // Another "greatness" of UNIX, the current directory can be "/" or other trash, - // when App opened from Finder, etc. This breaks load resources. 10/10. + // set current directory to exe path SetCurrentDir(ExtractFilePath(ParamStr(0))); - {$ENDIF} Main(); except diff --git a/turbogen/templates/raylib.inc b/turbogen/templates/raylib.inc index a32f865..d595c53 100644 --- a/turbogen/templates/raylib.inc +++ b/turbogen/templates/raylib.inc @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------------------------------------------ // ▄████▄▓██ ██▓ ▄▄▄▄ ▓█████ ██▀███ ██▓███ ██████▓██ ██▓ ▄████▄ ██░ ██ ▒█████ ██████ ██▓ ██████ // ▒██▀ ▀█ ▒██ ██▒▓█████▄ ▓█ ▀ ▓██ ▒ ██▒▓██░ ██▒▒██ ▒ ▒██ ██▒▒██▀ ▀█ ▓██░ ██▒▒██▒ ██▒▒██ ▒ ▓██▒▒██ ▒ // ▒▓█ ▄ ▒██ ██░▒██▒ ▄██▒███ ▓██ ░▄█ ▒▓██░ ██▓▒░ ▓██▄ ▒██ ██░▒▓█ ▄ ▒██▀▀██░▒██░ ██▒░ ▓██▄ ▒██▒░ ▓██▄