Skip to content

Commit

Permalink
fix: core/samples
Browse files Browse the repository at this point in the history
  • Loading branch information
turborium committed Dec 23, 2022
1 parent 1e5395c commit 7dae9f3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
7 changes: 0 additions & 7 deletions examples/core/core_3d_camera_mode/core_3d_camera_mode_src.pas
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,5 @@ procedure Main();
//---------------------------------------------------------------------------------------------
end;

begin
try
Main();
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
end.

4 changes: 4 additions & 0 deletions examples/core/core_loading_thread/core_loading_thread.lpr
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
program core_loading_thread;

uses
{$IFDEF UNIX}
cthreads,
cmem,
{$ENDIF}
SysUtils,
core_loading_thread_src;

Expand Down
11 changes: 7 additions & 4 deletions examples/project_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,14 @@ def make_dproj_file(project_name, index, libs):
</Project>
""".split('\n', 1)[1]

def make_lpr_file(project_name):
def make_lpr_file(project_name, libs):
text_libs = ''
if 'cthreads' in libs:
text_libs += "\n {$IFDEF UNIX}\n cthreads,\n cmem,\n {$ENDIF}"
return f"""
program {project_name};
uses
uses{text_libs}
SysUtils,
{project_name}_src;
Expand Down Expand Up @@ -308,7 +311,7 @@ def make_lazarus_project(params, index):
file.write(make_lpi_file(project_name, 'libraylib.420.dylib', extra_libs))
# lpr
with open(os.path.join(dir, project_name + '.lpr'), 'w') as file:
file.write(make_lpr_file(project_name))
file.write(make_lpr_file(project_name, extra_libs))
# dproj
with open(os.path.join(dir, project_name + '.dproj'), 'w') as file:
file.write(make_dproj_file(project_name, index, extra_libs))
Expand All @@ -334,7 +337,7 @@ def make_lazarus_project(params, index):
'core/core_input_keys',
'core/core_input_mouse',
'core/core_input_mouse_wheel',
'core/core_loading_thread',
['core/core_loading_thread', ['cthreads']],
'core/core_random_values',
'core/core_scissor_test',
'core/core_smooth_pixelperfect',
Expand Down

0 comments on commit 7dae9f3

Please sign in to comment.