最終更新:2015-09-07 (月) 07:13:47 (1851d)  

pylauncher
Top / pylauncher

http://bazaar.launchpad.net/~ubuntu-installer/wubi/trunk/files/head:/src/pylauncher/

Pylauncher extracts a lzma? archive that can be appended to this executable and containing:

  • /main.pyo # main script to run
  • ./data # data
  • ./lib # python modules, ./lib is added to PYTHONPATH
  • ./python.dll # python dll

pack.py

  • def make_self_extracting_exe(target_dir):
        header = ajoin(dirname(__file__), 'header.exe')
        archive = ajoin(dirname(target_dir),'archive.7z')
        target = ajoin(dirname(target_dir), 'application.exe')
        signature = ajoin(dirname(target_dir), 'signature')
        f = open(signature, 'wb')
        f.write(SIGNATURE)
        f.close()
        print "Creating self extracting file %s" % target
        cat(target, header, signature, archive)

関連

  • pyrun?