{"id":35,"date":"2012-09-06T03:23:48","date_gmt":"2012-09-06T03:23:48","guid":{"rendered":"http:\/\/burnhamup.com\/?p=35"},"modified":"2012-09-06T03:23:48","modified_gmt":"2012-09-06T03:23:48","slug":"py2exe-packaging-my-python-game","status":"publish","type":"post","link":"https:\/\/burnhamup.com\/blog\/2012\/09\/py2exe-packaging-my-python-game\/","title":{"rendered":"Py2Exe &#8211; Packaging my Python Game"},"content":{"rendered":"<p>I&#8217;m building Eccoes in Python. One of the problems with Python is that not everyone has it. That makes distributing my game all the more difficult. I added some GUI elements to my game yesterday to build a menu using PGU. I also moved all the classes my game uses into some sub folders to better organize it. After these two changes my game would no longer build using py2exe. I tried to point py2exe at the eccoes.py file inside the eccoes package and it could not resolve the dependencies. It also couldn&#8217;t grab the graphics files I needed to use PGU. I finally figured it out, but it was a mess. I ended up moving my launching code to the root folder, and through trial and error figured out how to include the assets for PGU.<\/p>\n<p>Resources that I found helpful:<\/p>\n<ul>\n<li><a href=\"http:\/\/code.google.com\/p\/pgu\/\">PGU<\/a><\/li>\n<li><a href=\"http:\/\/www.py2exe.org\/\">py2exe<\/a><\/li>\n<li><a href=\"http:\/\/www.pygame.org\/wiki\/Pygame2exe\">A py2exe script<\/a><\/li>\n<\/ul>\n<p>After installing PGU I copied the graphics from C:\\python26\\share\\pgu\\themes\\default into the same folder as my\u00a0executable.<\/p>\n<p>I&#8217;m planning on distributing my tech demo of the game soon. I need to figure out what license I&#8217;m required to distribute it under. I think most of my libraries are L-GPL, so&#8230;I&#8217;m actually okay there. My graphics, placeholders for now, are licensed under a version of the Creative Commons. I&#8217;m thinking I&#8217;ll want to do GPL, but I don&#8217;t know if anyone is interested in this yet.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m building Eccoes in Python. One of the problems with Python is that not everyone has it. That makes distributing my game all the more difficult. I added some GUI elements to my game yesterday to build a menu using &hellip; <a href=\"https:\/\/burnhamup.com\/blog\/2012\/09\/py2exe-packaging-my-python-game\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6,10],"tags":[],"_links":{"self":[{"href":"https:\/\/burnhamup.com\/blog\/wp-json\/wp\/v2\/posts\/35"}],"collection":[{"href":"https:\/\/burnhamup.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/burnhamup.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/burnhamup.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/burnhamup.com\/blog\/wp-json\/wp\/v2\/comments?post=35"}],"version-history":[{"count":1,"href":"https:\/\/burnhamup.com\/blog\/wp-json\/wp\/v2\/posts\/35\/revisions"}],"predecessor-version":[{"id":36,"href":"https:\/\/burnhamup.com\/blog\/wp-json\/wp\/v2\/posts\/35\/revisions\/36"}],"wp:attachment":[{"href":"https:\/\/burnhamup.com\/blog\/wp-json\/wp\/v2\/media?parent=35"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/burnhamup.com\/blog\/wp-json\/wp\/v2\/categories?post=35"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/burnhamup.com\/blog\/wp-json\/wp\/v2\/tags?post=35"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}