cli deletes cached fonts from the cache folder
Closed this issue · 1 comments
I'm having this issue with Prism-Menu where the first time I build, the fonts get created correctly:
PrismMenu.vcxproj -> C:\Users\marca\Desktop\projects\geode\mods\Prism-Menu\build\RelWithDebInfo\firee.PrismMenu.dll
| Info | Fetching font PrismMenu
| Info | Font is not cached, building from scratch
| Info | Creating normal font
| Info | Creating HD font
| Info | Creating UHD font
| Done | Built font PrismMenu
| Info | Copying files
| Info | Zipping
| Done | Successfully packaged firee.PrismMenu.geode
| Done | Installed firee.PrismMenu.geode
The fonts appear in the cache folder and in the .geode file
The next builds, the cli tries to extract the fonts from the cache. The files disappear from the cache folder and they don't appear in the .geode file either (making the mod not work at all)
PrismMenu.vcxproj -> C:\Users\marca\Desktop\projects\geode\mods\Prism-Menu\build\RelWithDebInfo\firee.PrismMenu.dll
| Info | Fetching font PrismMenu
| Info | Using cached files
| Info | Extracting 'resources\firee.PrismMenu\PrismMenu.png' from cache
| Info | Extracting 'resources\firee.PrismMenu\PrismMenu.fnt' from cache
| Info | Extracting 'resources\firee.PrismMenu\PrismMenu-hd.png' from cache
| Info | Extracting 'resources\firee.PrismMenu\PrismMenu-hd.fnt' from cache
| Info | Extracting 'resources\firee.PrismMenu\PrismMenu-uhd.png' from cache
| Info | Extracting 'resources\firee.PrismMenu\PrismMenu-uhd.fnt' from cache
| Done | Fetched PrismMenu from cache
| Info | Copying files
| Info | Zipping
| Done | Successfully packaged firee.PrismMenu.geode
| Done | Installed firee.PrismMenu.geode
My guess is that the cli should not be removing the cached files, cli version geode 2.9.0
When i delete the .geode file from the build folder, cli generates the fonts again
I can reproduce the issue consistently
- Clone prism menu
- Configure
- Build (creates fonts)
- Build again (tries to extract from cache)
- Delete .geode file from build
- Build (creates fonts)
- Build again (tries to extract from cache)
can reproduce on my own project. if anyone reading this also encounters this issue, you can add the following to your CMakeLists.txt
(requires geode cli in PATH
, change command if needed):
ADD_CUSTOM_TARGET(clear_cache ALL WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND geode.exe project clear-cache)