2024-12-04 03:11 PM
Hi
I just noticed that when building the Simulator using TouchGFXDesigner 4.24.1 the files
/config/gcc/app.mk
and
/config/msvs/Application.props
are updated with the relative path to the TouchGFX env folder, for instance:
# Location of the TouchGFX Environment
touchgfx_env := ../../../../../TouchGFX/4.24.1/env
If I try to overwrite these paths the files are just overwritten when I run the Simulator from TouchGFX Designer.
This is a problem when working on a project with multiple people that may have the project check out at different folder depths. I don't think the solution is to require that the project is checkout out at the same folder depth for everyone on the same project.
You can argue that it isn't a big problem as TouchGFX Designer updates the path for anyone creating the Simulator.
But it does create 'noise' in the repository.
Any suggestions on how to solve this ?
//Jesper
2024-12-04 04:02 PM
> I don't think the solution is to require that the project is checkout out at the same folder depth for everyone on the same project.
Why? This is called "convention over configuration". What is good for one, is good for all. Everyone uses same settings, everyone is happy.
> 'noise' in the repository
Specially to avoid unwanted changes, git has commit hooks. It is a script that can detect forbidden changes and fail pushes to the common repository. Or it can remove offending bits and continue.
2024-12-05 01:24 AM
Thanks for your reply !
I think this is really a TouchGFX Designer issue.
It mixes tool run-time configuration with project specific settings in app.mk.
Since the tool knows the relative path at compile time - why does it need to store it in a configuration file ?
This makes it a tool enforced "requirement" to place the project root folder at a given folder depth.
>Why? This is called "convention over configuration". What is good for one, is good for all. Everyone uses same >settings, everyone is happy.
For a project that uses multiple platforms it is not feasible!
And yes, I am ware that TouchGFX Designer is currently only running on windows.
I am not convinced this is an example of "convention over configuration".
( in general I feel pretty sure I agree with you. Limit the number of concerns a developer is forced to face. )
What is the convention and what is the configuration in this case ?
Basically TouchGFX Designer writes a configuration to the project files that needs to be under version control.
It does this regardless of what convention you adopt.
As long as everyone keeps the relative path the same everything is good.
But this becomes a requirement, a configuration. That needs to be documented so new users can get up and running.
It can -never- be considered a convention; because then it would not have to be documented!
Unless the convention is that everyone using TouchGFX Designer should always place their project source files at a specific relative path to the install folder of TouchGFX Designer.
Good luck selling that one.
I think I may just have argued that it is TouchGFX Designer that should adhere to the paradigm "convention over configuration" ?
> Specially to avoid unwanted changes, git has commit hooks. It is a script that can detect forbidden changes and fail pushes to the common repository. Or it can remove offending bits and continue.
Urgh.. sounds like a configuration to me :)
In this case I would want "git status" to ignore changes to specific lines in specific files.
I think I'd rather take the repository 'noise' any day .. with TouchGFX there is a lot of 'noise' from the generated files anyway.
I may have missed it somewhere - but it is not easy to know which files TouchGFX is updating outside of the generated folder and which lines are user configurable.
I find that I am spending an increasing time struggling with the development tools ( and understanding what they do ) and thus less time coding..
2024-12-05 01:54 AM
Hi @Jesper_MCI
Few times this crossed my mind as well. I've just looked into it and it seems scripts responsible for updates are here:
c:\TouchGFX\4.24.1\env\MinGW\msys\1.0\Ruby30-x64\lib\ruby\gems\3.0.0\gems\touchgfx-cli-4.24.1\lib\touchgfx\generators\
When you search for 'touchgfx_env'. I wonder if these could be adapted to your needs.
2024-12-05 02:05 AM
"This is a problem when working on a project with multiple people that may have the project check out at different folder depths."
Not sure if I understand your setup. This path wil be changed based on current folder depth. I work with the same propject in different depth without any problem.