flyx / OpenGLAda

Thick Ada binding for OpenGL and GLFW
flyx.github.io/OpenGLAda/
MIT License
95 stars 13 forks source link

How to stop gpr file importing scenario data? #73

Closed rogermc2 closed 7 years ago

rogermc2 commented 7 years ago

Whenever GNAT GPS saves a .gpr file after its initial generation it includes scenario information apparently inherited from opengl-glfw.gpr, opengl.gpr and opengl_shared.gpr which means that before committing updates I have to manually edit .gpr files to remove the scenario data or regenerate the project which produces a .gpr file containing only the required data (that is, without scenario data). Is there any way of preventing GNAT GPS from including scenario data in my .gpr files?

flyx commented 7 years ago

Well for that reason, I never edit my projects using GPS' GUI. GPS lets you edit the project's source file with a right click on the project, so I just manually add the necessary changes and reload the project. As long as you let GPS only read the project files and not save them, nothing bad happens.

rogermc2 commented 7 years ago

Thanks for the advice. How do I prevent GPS from writing project files? At the moment, this seems to me an automatic gps function. The problem doesn't occur on the initial generation of the project file.

flyx commented 7 years ago

My GPS does not do this, I am unsure what's happening with yours. Do you ever open the project settings dialog?

rogermc2 commented 7 years ago

Yes, I use the Project->Properties... dialog regularly to set directories and select files for inclusion or removal from projects. If there's no real solution for this; not so much of a problem. I was just hoping that there might be some setting that I hadn't discovered. Actually, my easiest solution at the moment is to keep a copy of a "good" .gpr file and use that to replace the messed up one before committing etc.

flyx commented 7 years ago

Well I guess GPS saves the project file when closing the project properties dialog, since when compiling, it just calls gprbuild (or gnatmake) on the project file, so it needs the project file to be up-to-date in the file system. You could of course include or exclude files by editing the gpr-file by hand, which is what I do. I'm closing this since I don't know of any better solution.

rogermc2 commented 7 years ago

Fine thanks. Yes, editing the gpr-file by hand is something I often do to fix it.