I want to put python and pyinstaller on my u-disk, thus the driver letter in pyinstaller\config.dat changes frequently if I use different PC. So I made some modification
1.at the end of Configure.py, added

drv,other=os.path.splitdrive(os.path.realpath(__file__))
inf= open(configfile)
config=inf.read()
inf.close()

config= config.replace(drv, '%drv%')
outf = open(configfile, 'w')
outf.write(config)
outf.close()

2. in Makespec.py, changed
try:
    config = eval(open(os.path.join(HOME, 'config.dat'), 'r').read())
to

try:
    drv,other=os.path.splitdrive(os.path.realpath(__file__))
    config = eval(open(os.path.join(HOME, 'config.dat'), 'r').read().replace('%drv%', drv))

3. in Build.py, changed
try:
    config = eval(open(os.path.join(HOMEPATH, 'config.dat'), 'r').read())
to

try:
    drv,other=os.path.splitdrive(os.path.realpath(__file__))
    config = eval(open(os.path.join(HOMEPATH, 'config.dat'), 'r').read().replace('%drv%', drv))

I hope this can be merged into the official pyinstaller release :) 
_______________________________________________
PyInstaller mailing list
[email protected]
http://lists.hpcf.upr.edu/mailman/listinfo/pyinstaller

Reply via email to