windowscommand-linekivyatlas

Kivy Atlas Creation On Windows


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.


Solution

  • 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!