tweecode / twine

UI for creating hypertext stories
http://twinery.org
657 stars 97 forks source link

"Compiling" Twine on newer versions of Python #20

Closed christopherliu closed 12 years ago

christopherliu commented 12 years ago

Twine is built into an executable using py2exe, which supports all subversions of Python 2. However, Twine (which uses wxPython) only seems to work properly on 2.5.

I tried 2.7 a bit and had no luck. Has anyone been able to get Twine working on Python 2.7 (or even 3?)

We might consider moving to a different executable creator as well. cx_Freeze looks like one option. Does anyone have experience with it?

http://www.freehackers.org/Packaging_a_python_program

factorypreset commented 12 years ago

I tried with 2.6 and have not successfully built it yet. At present I am getting the same error described here:

http://stackoverflow.com/questions/323424/py2exe-fails-to-generate-an-executable

Seems to be an issue building with wxPython.

christopherliu commented 12 years ago

Just to add some details: I tried it with 2.7 using the 32bit versions of wx and py2exe. I tried playing around with installing the runtime redistributable (http://www.py2exe.org/index.cgi/Tutorial#Step52) and managed to get different errors, but nothing working.

I'm tempted to see if cx_Freeze is an easy way to fix this...

christopherliu commented 12 years ago

For future reference:

http://cx-freeze.sourceforge.net/ http://stackoverflow.com/questions/505230/py2exe-for-python-3-0#506005

Philip-Sutton commented 12 years ago

Hi all,

I've set up Python 2.6.6 on my Windows XP machine. I've installed the wxPython version that runs with that and installed the version of Py2exe that matches Python 2.6.6.

By the way I can run Twine using the source code on this hybrid Python setup and it works perfectly - so the basic source code seems to be fine and the Python version 2.6.6 seems to e compatable. (I understand that Twine 1.3.5 was written in Python 2.5.x).

I've tried producing a compiled version of the Twine files:

eg. Python buildexe.py py2exe

This runs and creates compiled files BUT it doesn't generate a Twine.exe. Instead I get an App.exe. And when I try to run the App.exe file with the rest of the set of compiled files nothing happens. I'm wondering whether the Buildexe.py script in the source code is actually the right one to drive the compilation of the Twine for Windows files? If not can someone write a new buildexe.py script???

Philip

christopherliu commented 12 years ago

Hi Philip,

1) Try running SET PYTHONPATH in the command line and copy and paste the output you get.

2) Another thing to check: C:\Python27\python.exe -u "buildexe.py" py2exe > output.txt

The contents of that output.txt file might be helpful in debugging your particular build.

christopherliu commented 12 years ago

Based on Stormrose's updates in issue 19, we seem to have gotten py2exe to work properly...however, we're still having some issues with Unicode support not transferring over correctly.

Stormrose commented 12 years ago

If we are building successfully doesn't that solve this issue? Unicode is a different issue. Can we close?

Philip-Sutton commented 12 years ago

Yep!