Easy way to add Icons?

Monkey Targets Forums/Android/Easy way to add Icons?

ondesic(Posted 2013) [#1]
I know I can add icons to the .build folder, but sometimes I have to delete the build folder.

Is there a way to add icons with code for android?


Midimaster(Posted 2013) [#2]
That's true. The best solution would be, every project has a resource folder "*.res" outside the build folder like already the "*.data" folder. This folder could be used during building to copy those files like manifests or icons to the build folder.


therevills(Posted 2013) [#3]
I used a batch file to copy my original icons etc to the build folder, which overwrites the icons there.

Something like this:
set OLDDIR=%CD%

XCOPY "%OLDDIR%\drawable-hdpi" "%OLDDIR%\PirateTriPeaksSolitaire.build\android\res\drawable-hdpi" /E /C /R /I /K /Y 

XCOPY "%OLDDIR%\drawable-ldpi" "%OLDDIR%\PirateTriPeaksSolitaire.build\android\res\drawable-ldpi" /E /C /R /I /K /Y 

XCOPY "%OLDDIR%\drawable-mdpi" "%OLDDIR%\PirateTriPeaksSolitaire.build\android\res\drawable-mdpi" /E /C /R /I /K /Y 

COPY "%OLDDIR%\CONFIG.TXT" "%OLDDIR%\PirateTriPeaksSolitaire.build\android\"
COPY "%OLDDIR%\CONFIG.MONKEY" "%OLDDIR%\PirateTriPeaksSolitaire.build\android\"

pause



ElectricBoogaloo(Posted 2013) [#4]
I wrote a quick program in BlitzMax to handle icons.
First, you give it a bunch of .png files, whatever sizes you feel, as Icon_xxx.png files, then it loads them in, flicks through an ini file, and resizes the closest given icon to the required size, saving the icons as needed.

Icon Resizer Tool Thing (Windows exe + .bmx sourcecode included)

MyGame/MyGame.Data
MyGame/MyGame.Build
MyGame/IconResizer <-- shove this app into there..
Run it, and it'll hunt for a .build/android folder. If the build/android folder exists, it'll automagically replace the required icon files in there, while it's at it.
It also creates two folders full of all the various iOS icons, and Launch screens, so you can be lazy and not have to faff about with those, either.


Raph(Posted 2014) [#5]
Alas, the new build system has made IconResizer not find the Android folder. :)