Copyright Notice in Executable
Thomas Heller
thomas.heller at ion-tof.com
Tue Jan 22 05:07:21 EST 2002
"themichmoore" <themichmoore at hotmail.com> wrote in message news:78eff125.0201212005.34b8d5c2 at posting.google.com...
> I have been using py2exe to generate an executable
> for a small program and want to put a copyright
> notice in the executable so that a simple hex editor
> view of the .exe file will display the copyright
> information. However the documentation strings
> and string constants I put in the python code are
> placed in the zip file and end up being compressed.
>
> Anyone have a solution for adding the hex level
> copyright notice string to a py2exe executable ?
You can easily do it with a small change in py2exe/py2exe.py,
near line 700:
Replace
def get_exe_bytes(self, use_runw):
fname = self.get_exe_stub(use_runw)
return open(fname, "rb").read()
# get_exe_bytes()
with
def get_exe_bytes(self, use_runw):
fname = self.get_exe_stub(use_runw)
return open(fname, "rb").read() + "COPYRIGHT BLABLA"
# get_exe_bytes()
Note that the next version of py2exe will allow to
create a versioninfo resource in the exe-file, then
your copyright (among other stuff) will be displayed
in the properties box in windows explorer (right click
on file, select 'properties', or hit ALT+ENTER).
To be politically correct ;-) I should mention that
Gordon McMillan's installer already now can do this.
Thomas
More information about the Python-list
mailing list