Seems like Kivy APIs are steered towards Linux systems more than anything. Has anyone success created a kivy atlas on windows using the command prompt?
If so, how is it done?
Full working code please.
Seems like Kivy APIs are steered towards Linux systems more than anything. Has anyone success created a kivy atlas on windows using the command prompt?
If so, how is it done?
Full working code please.
Actually this manual works on Windows. You need to use console (press Win+R
, type cmd
and press Enter
).
cd
to your project folder and use the following command (with your image filenames and sizes, obviously). And it's dir
on Windows, not ls
, but otherwise it's the same.
python -m kivy.atlas myatlas 256x256 img1.png img2.png
This simplest way under Windows for me was the following...
Create a script with a string template of the Json code which constructs the atlas.
ImgSize = 512x512
AtlasT = """
{ "run.png": { %s } }
"""
You would then create a loop, that will loop through all directories you specify, gathering all the images and formatting the template.
Save the atlas at the end. All mathematics are calculated by the script based on the size of the images.
If you use the linux terminal command as per the docs, you'll get an error. Just enter this into windows commmand line window - python - m, and hit enter. You'll get an error saying python is not recognized as an external or internal command or something like that.
Linux Ubuntu is far different from Windows. It seems like Linux is always aware of what you install so if you address something by name like, python, you'll get feed back. That's not the same under Windows. In order to use python on windows you really have to point to python.exe.
Don't bother using the kivy docs atlas command line in windows. Windows won't understand kivy.atlas either. It's not Linux!