Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors in examples (Delphi) #518

Open
peardox opened this issue Jul 5, 2023 · 6 comments
Open

Errors in examples (Delphi) #518

peardox opened this issue Jul 5, 2023 · 6 comments

Comments

@peardox
Copy link
Collaborator

peardox commented Jul 5, 2023

I'm running AllExamples (laborius even when automated)

./research_special_rendering_methods/transform_feedback/transform_feedback.dproj
./research_special_rendering_methods/radiance_transfer/visualize_spherical_harmonics/visualize_spherical_harmonics.dpro
./research_special_rendering_methods/radiance_transfer/precompute/precompute_radiance_transfer.dproj
./research_special_rendering_methods/radiance_transfer/radiance_transfer.dproj
./research_special_rendering_methods/dynamic_ambient_occlusion/dynamic_ambient_occlusion.dproj

The above fail - note not everything in research_special_rendering_methods fails - 2 pass (thought Jenkins was doing this?)

@peardox
Copy link
Collaborator Author

peardox commented Jul 5, 2023

FPC Only (so why do we create dproj files in the first place?)
./localization/gettext/po_files/generator/po_generator.dproj
./localization/gettext/localization_test.dproj
./localization/gettext/po_files/generator/po_generator.dproj

Fail to compile
./physics/physics_3d_collisions_layers/physics_3d_collisions_layers_standalone.dproj
./network/tcp_connection/client/client.dproj
./network/tcp_connection/server/server.dproj
./network/custom_url_handler/read_game_data_from_zip_standalone.dproj
./castlescript/image_make_by_script/image_make_by_script.dproj

Now I can take this sanitied group project and see if 10.2.1 will also compile them all

AllExamples.zip
Updated...

Additionally castle-engine-output should be removed by the Clean option in all auto-generated dproj files (sep issue I guess but in the middle of juggling stuff around)

@michaliskambi
Copy link
Member

I see we indeed left some examples only for FPC, and decided "too low priority to fix it now for Delphi". It was a known TODO, but admittedly landed in my long TODO list. It's time to deal with it.

Jenkins test (make examples-delphi) had a rule to avoid some directories, like examples/research_special_rendering_methods, that's one reason why it didn't catch most failures . IOW, this was known TODO in most cases. Details below as I'll fix stuff.

I'll fix it all, thanks. For now:

./research_special_rendering_methods/transform_feedback/transform_feedback.dproj
./research_special_rendering_methods/radiance_transfer/visualize_spherical_harmonics/visualize_spherical_harmonics.dpro
./research_special_rendering_methods/radiance_transfer/precompute/precompute_radiance_transfer.dproj
./research_special_rendering_methods/radiance_transfer/radiance_transfer.dproj

Fixed. Nothing special, just were missing small details, and ignored by make examples-delphi as these examples have low value.

We will likely move radiance_transfer stuff to some separate repo, to not confuse people. It's an interesting technique, but we're not looking now to extend it more.

./physics/physics_3d_collisions_layers/physics_3d_collisions_layers_standalone.dproj

Fixed. This was not known to fail. In this case the Jenkins was checking it, but Jenkins test uses DCC from command-line, ignoring DPROJ. And the DPROJ was wrong (outdated).

I am still looking into how it could be outdated, because we have automatic tests to ensure that exactly this never happens (tools\internal\cge_shell_tests). Anyway, the example is fixed.

@peardox
Copy link
Collaborator Author

peardox commented Jul 5, 2023

Everything is looking good for 10.2.1 so far. Done 75+ Million lines - currently compiling test_rendering_opengl_capabilities_standalone.dproj (not got a clue how far thru I am)

I'll let this run til it finishes then 10.2.1 will also have built all examples as well. By extrapolation anything higher has a 99.9999% chance of building as well (unpatched 11.0 would fail tho)

@peardox
Copy link
Collaborator Author

peardox commented Jul 6, 2023

OK, after some sleep it sucessfully built everything under 10.2.1 and prior to that did the same under 11.3 (not in VM so faster)

Some stats...

124 projects
15 hints
177 warnings
153,030,030 total lines
32,028 files in 372 folders occupying 7,829,008,102 bytes
Compile time : about 7 hours (VM in crap machine)

Owing to the rather esxtensive compile time I'm not doing this too often
It seems prudent to mention that if compiling AllExamples the user will be in for a long wait (but less that 7 hours)
Possibly having a project group in each TLD makes sense?

@peardox
Copy link
Collaborator Author

peardox commented Jul 8, 2023

See #519 - VM was at fault

michaliskambi added a commit that referenced this issue Jul 9, 2023
michaliskambi added a commit that referenced this issue Jul 11, 2023
- use views,
- have nice README,
- use CGE UI (not TCastleWindow menu)

See #518
michaliskambi added a commit that referenced this issue Jul 11, 2023
…lphi, using TZipFile

Also improve FPC zip reading, no need for temporary subdirectory anymore.

See #518
@michaliskambi
Copy link
Member

Summary:

./research_special_rendering_methods/dynamic_ambient_occlusion/dynamic_ambient_occlusion.dproj

Fixed, and example modernized a bit (use TCastleView, use UI design in CGE editor, be cross-platform).

./network/tcp_connection/client/client.dproj
./network/tcp_connection/server/server.dproj

Fixed. Delphi includes Indy, so these are actually a bit simpler to compile in Delphi than in FPC, they just compile out-of-the-box with Delphi.

./network/custom_url_handler/read_game_data_from_zip_standalone.dproj

Fixed. Added a unit to unpack from ZIP specific file -> TStream, with both FPC and Delphi (hiding away differences in what FPC and Delphi provide in standard library to handle ZIP). Also improved FPC case, to not use any temp files.

Remaining:

./castlescript/image_make_by_script/image_make_by_script.dproj

TODO: port rest of CastleScript to Delphi.

./localization/gettext/po_files/generator/po_generator.dproj
./localization/gettext/localization_test.dproj
./localization/gettext/po_files/generator/po_generator.dproj

TODO: use DxGetText in Delphi. Assuming it works OK. Hopefully yes, Thomas Mueller maintains it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants