Esempio n. 1
0
def main():
    if 'py2exe' in argv:
        py2exe()
        create_batch_file()
        zip_directory()
    else:
        other()
Esempio n. 2
0
        f.close()
        try:
            subprocess.call('"C:\Program Files\NSIS\makensis.exe" /V2 ' + path, shell=True)
        except Exception as e:
            print(path)
            traceback.print_exc(e)
        else:
            os.remove(path)

if __name__ == '__main__':

    print('Create EXE')
    print('Deleting build and distribution/dist')
    PY2EXE_BUILD = os.path.join('build')
    PY2EXE_DIST = os.path.join('distribution', 'dist')
    if os.path.exists(PY2EXE_BUILD):
        shutil.rmtree(PY2EXE_BUILD)
    if os.path.exists(PY2EXE_DIST):
        shutil.rmtree(PY2EXE_DIST)
    print(PY2EXE_DIST, PY2EXE_BUILD)
    py2exe(PY2EXE_DIST, PY2EXE_BUILD)
    print('Deleting build')
    if os.path.exists('locale'):
        shutil.copytree('locale', os.path.join(PY2EXE_DIST, 'locale'))
    if os.path.exists(PY2EXE_BUILD):
        shutil.rmtree(PY2EXE_BUILD)
    print('Building Installer')
    installer = NSISInstaller(
        "SubDownloader2", APP_VERSION, PY2EXE_DIST, 'distribution')
    installer.build()
Esempio n. 3
0
        f.close()
        try:
            subprocess.call('"C:\Program Files\NSIS\makensis.exe" /V2 ' + path, shell=True)
        except Exception as e:
            print(path)
            traceback.print_exc(e)
        else:
            os.remove(path)


if __name__ == "__main__":

    print("Create EXE")
    print("Deleting build and distribution/dist")
    PY2EXE_BUILD = os.path.join("build")
    PY2EXE_DIST = os.path.join("distribution", "dist")
    if os.path.exists(PY2EXE_BUILD):
        shutil.rmtree(PY2EXE_BUILD)
    if os.path.exists(PY2EXE_DIST):
        shutil.rmtree(PY2EXE_DIST)
    print(PY2EXE_DIST, PY2EXE_BUILD)
    py2exe(PY2EXE_DIST, PY2EXE_BUILD)
    print("Deleting build")
    if os.path.exists("locale"):
        shutil.copytree("locale", os.path.join(PY2EXE_DIST, "locale"))
    if os.path.exists(PY2EXE_BUILD):
        shutil.rmtree(PY2EXE_BUILD)
    print("Building Installer")
    installer = NSISInstaller("SubDownloader2", APP_VERSION, PY2EXE_DIST, "distribution")
    installer.build()