Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Python (http://www.programmingforums.org/forum43.html)
-   -   GUI Problem - py2exe (http://www.programmingforums.org/showthread.php?t=7957)

infinite05 Jan 14th, 2006 10:00 PM

GUI Problem - py2exe
 
Well, I learned how to compile PY files to exe using py2exe, but the thing is that I make my GUIs using PythonCard, and when I compile the PY file that I made with PythonCard, the exe wont work correctly. It wont load the GUI, unless I put the rsrc file on the dist folder. The thing is, im worried that if I put the rsrc file and provide my program to others, that people might rip my codes and/or would edit the rsrc file to change my program around(might name it their own too). So im wondering if theres a way to compile my GUI, without people bieng able to see my rsrc file so they wont rip my codes out.

MicDareall Jan 15th, 2006 1:41 AM

First.... your not including the .rsrc file within the datafile includes in your setup.py file.... that should compile the file....
but if its a small app.... you could always make a stand alone .exe and not have to deal with it......

infinite05 Jan 15th, 2006 9:38 AM

Umm, im sorry to sound like a noob, but whats the code to "include" the rsrc file on the setup.py file?

MicDareall Jan 15th, 2006 12:26 PM

Im pretty much a noob myself... I just had this same problem a while back.......

you need something like this........

setup( name = "Your_Project",
console = ["Your_Project.py"],
data_files = [ (".", [ "Your_Project.rsrc.py"]) ]
)

infinite05 Jan 15th, 2006 3:19 PM

Well, that code you put the the thing that I dont want it to do. It still puts the .rsrc file in the folder so the GUI will work, but they can still go to my codes and edit them >.>.

Arevos Jan 15th, 2006 4:51 PM

You could try importing the rsrc file to make a pyc file, and then using the pyc file as the included datafile. Python bytecode won't be as easy for people to reverse engineer.

infinite05 Jan 15th, 2006 9:03 PM

I tried it, it didnt work. Ill try experimenting around. If anyone has an idea, then pelase tel me.

MicDareall Jan 15th, 2006 11:40 PM

how big is the completed .exe file.... if its not going to be to big, I would suggest making a stand-alone app..... then no-one would have the ability to look at any files.....
...you can do it using py2exe or you can take the full dist file outputed by py2exe and use the NSIS installer to build a stand-alone app<-- with that you can compress the files too...


All times are GMT -5. The time now is 4:58 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC