Chaos Project

Featured Projects => Advanced RPG Creator => ARC Welder => Topic started by: Ryex on April 05, 2011, 11:29:54 pm

Title: Distribution
Post by: Ryex on April 05, 2011, 11:29:54 pm
The distribution of a Python program is actually fairly simple. there are several freezing utilities out there to do the job.
based on my research we need to use a different one for each platform as while a cross platform solution exists the ones designed specifically for a platform work best on those platforms

py2exe  -  for creating widows executables

py2app  -  for creating mac app bundles

cx-freaze  -  for linux binaries

there is also http://www.pyinstaller.org

but I'm not so sure about it, preliminary research suggests that it may be better for linux distros but I'm not sure.


there are several nuances to each system so when it comes time to build the editor we should be familial with each utility and how to best set it up. exspecialy if we are going to include something like an auto updater
Title: Re: Distribution
Post by: ForeverZer0 on April 05, 2011, 11:37:22 pm
* Fixes spelling in title *

I still need to familiarize myself with some of these other platforms, namely Mac. I've been messing around with Linux platforms, but when it comes to Mac, I have 0 experience.

Are the differences large enough that we will need to write the code differently for the actual updates?
Title: Re: Distribution
Post by: Ryex on April 05, 2011, 11:41:53 pm
no you don't have to write the code differently but the utility that builds the executable is different

ps. sorry for the edit to your post, some how I managed to edit your post instead of replying
Title: Re: Distribution
Post by: G_G on April 06, 2011, 01:40:23 am
I need to learn some python again @__@
Title: Re: Distribution
Post by: Ryex on April 06, 2011, 01:43:39 am
python is freakishly easy to learn. don't worry about it. when we get to work on the editor it will come naturally after all your work with ruby.
Title: Re: Distribution
Post by: Blizzard on April 06, 2011, 02:23:24 am
Python is quite similar to Ruby so you shouldn't have any problems.

We use py2exe at Cateia so it's definitely the way to go on Windows platforms.
Title: Re: Distribution
Post by: Ryex on October 21, 2011, 04:41:49 am
ok, I couldn't sleep so I've been trying to get a working test of py2exe so I can test a few specific things, and i'm failing horrdily. I CAN'T get it to create a working single exe that doesn't crash with a missing dll error or an error about loading one incorrectly.

py2exe has been out of development for 4 years or close to it but pyinstaller is actively developed i'm going to give it a try and see if I can get it to work.
Title: Re: Distribution
Post by: Blizzard on October 21, 2011, 05:17:27 am
I think you need to add python25.dll if you use py2exe. o.o;
Title: Re: Distribution
Post by: Ryex on October 21, 2011, 02:01:15 pm
no, I'm using python 2.6 and it just doesn't work. python 2.5 would work but 2.6 doesn't despite their claim that it does
Title: Re: Distribution
Post by: Blizzard on October 21, 2011, 03:07:13 pm
Alright. Good luck with pyinstaller then.
Title: Re: Distribution
Post by: Ryex on October 21, 2011, 06:17:37 pm
Ok then Pyinstaller it is. the SVN now contained the pyinstaller version I used and a bat file to build the main exe. it works perfectly as far as I can tell. the themeing on the exe is a messed up untill you enable compatibility mode on the exe.

also pyinstaller builds exe's that we can sign using SIGNTOOL.EXE and it has an option to include a version resource file as a resource in the exe if we make one at some point.
Title: Re: Distribution
Post by: Ryex on October 25, 2011, 08:35:04 pm
ALL RIGHT BOOYA! I did some more research and managed to get py2exe working. I have to list the dll as a dependent in the manifest. I'll commit the work later. py2exe is safer because Pyinstaller actually unpacks everything to a temp dir.