![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jan 2006
Posts: 19
Rep Power: 0
![]() |
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.
|
|
|
|
|
|
#2 |
|
Programmer
Join Date: Dec 2005
Posts: 67
Rep Power: 0
![]() |
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...... |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Jan 2006
Posts: 19
Rep Power: 0
![]() |
Umm, im sorry to sound like a noob, but whats the code to "include" the rsrc file on the setup.py file?
|
|
|
|
|
|
#4 |
|
Programmer
Join Date: Dec 2005
Posts: 67
Rep Power: 0
![]() |
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"]) ] ) |
|
|
|
|
|
#5 |
|
Newbie
Join Date: Jan 2006
Posts: 19
Rep Power: 0
![]() |
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 >.>.
|
|
|
|
|
|
#6 |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
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.
|
|
|
|
|
|
#7 |
|
Newbie
Join Date: Jan 2006
Posts: 19
Rep Power: 0
![]() |
I tried it, it didnt work. Ill try experimenting around. If anyone has an idea, then pelase tel me.
|
|
|
|
|
|
#8 |
|
Programmer
Join Date: Dec 2005
Posts: 67
Rep Power: 0
![]() |
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... |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|