2025-01-07 03:59 AM
Hi,
By default, when you open a touchgfx project in the designer, images, texts and fonts come from the asset/ folder.
How can I change that? I'd like to use another folder by default. I haven't found in the config files where this option is.
Thanks in advance.
2025-01-07 04:58 AM
Hello @GMeur ,
I am afraid this is not an option.
TouchGFX stores all the required assets in the asset folder and converts them before compiling and flashing.
It would probably be easier to copy the assets from your other folder to the asset folder to be able to use them in your TouchGFX project.
Regards,
2025-01-07 06:17 AM
How sad…
The thing is I'm doing something a bit unconventional as I'm trying to have two different .touchgfx files with two different resolutions inside a same touchgfx folder as a client wants to use a screen with a different resolution for the exact same project (and we need to maintain both resolutions).
My idea was to use a different asset folders and a different touchgfx project for each configuration, both of them generating files in the same 'generated' folder. Doing so, I can keep using a single VS and IAR projects. I've already managed to generate imgs/texts/fonts from one folder or the other depending on which touchgfx project I use. Pb is, if I change an image (basically changing its size, as both resolutions will use exactly the same images, with the same names, with the exception that the size of most of them will change) in my 'assets-bis' folder, the 'my-application-bis' project doesn't realise it's changed and keeps showing its equivalent in the 'asset' folder. Therefore, hitting the 'generate' button doesn't do anything as it thinks the project is already 'up to date'. I can manage to make it work changing the config of a photo (not ideal but well, it works at least). 'Rebuilding' in VS also works as I import another '.target' file using the 'assets-bis/' folder in case I'm working with a VS config 'my_application-bis'.
However, I'd have really liked to visualize the images actually used in 'my-application-bis' project as it's a bit confusing to see the image from the 'asset' folder yet generate the one from the 'asset-bis' folder.
If you have another idea of how to work with two resolutions on a same project, I'm more than keen to hear it… Creating a whole different project just to manage a different screen resolution seemed an extremely bad idea to me tbh.
Thanks,
Guillaume.
2025-01-15 02:02 AM
Hello @GMeur ,
When you say "the 'my-application-bis' project doesn't realise it's changed and keeps showing its equivalent in the 'asset' folder", you mean in the Images window in TouchGFX Designer? Or is it in the actual asset folder?
The issue seems to be that you would like to force to regenerate the assets, in that case, maybe you can try to change the display configuration like the color depth:
or the image format:
Regards,
2025-01-21 02:22 AM
Yeah, in the Images window of touchgfx. Because it keeps using the 'assets' folder instead of using the 'assets-2'. Same happens for the fonts too…
It's what I do for now, changing a configuration value to force it to regenerate all images but it's not ideal tbh.
2025-01-29 03:06 PM - edited 2025-01-29 03:06 PM
Hello @GMeur ,
The name of the folder which will be used by TouchGFX Designer is unchangeable.
Therefore, I would also suggest copying the content of your "assets-2" folder to the default your "assets" folder :
Let's say you have 2 different config (two different resolution size) , then you have 2 touchgfx files config1.touchgfx and config2.touchgfx. My idea is to have 3 assets folders : "assets" (the default one ) , "assets-config1" , "assets-config2".
I agree that if you open one or the other touchgfx file within TouchGFX designer, it will use the default "assets" folder. However, you can create a batch script that first copies the contents of "assets-config1" to "assets" and then opens your config1.touchgfx application. Side effect of this is that if you want to open your project in TouchGFX Designer, you would need to always use this batch script.