Banner::destroy ${UAC.Unload} UAC::Exec '' '"$INSTDIR\${PRODUCT_NAME}.exe" --launch-bt --FINISHED_UPDATE' '' '' FunctionEnd ''' % (product_version, outfile, baseFolder) file = open('windows\\build\\updater.nsi', 'w') file.write(nsis) file.close() print('Building Installer') p = subprocess.Popen('"C:\\Program Files\\NSIS\\makensis.exe" updater.nsi', stdout=subprocess.PIPE, shell=True, cwd='windows\\build') print p.communicate()[0] exitStat = p.wait() print("Creating current_version.txt") fileHash = Crypto.hash_file_data("windows\\build\\%s" % (outfile)) f = open("windows\\build\\current_version.txt", "wb") f.write(Globals.VERSION + "\n\n") f.write(fileHash + "\n\n") f.write(versionDescription) f.close() print("uploading") #p = subprocess.Popen(['C:\\Program Files\\winscp\\winscp418.exe', "/console", "/command", "open %s" % (WINSCP_ADDRESS), "put %s\\%s %s" % (os.getcwdu(), LOCAL_FILE_NAME, REMOTE_FILE_NAME), "exit"], cwd="C:\\Program Files\\winscp") #x = p.wait() print("all done")
FunctionEnd Function .onInstFailed Banner::destroy ${UAC.Unload} UAC::Exec '' '"$INSTDIR\${PRODUCT_NAME}.exe" --launch-bt --FINISHED_UPDATE' '' '' FunctionEnd ''' % (product_version, outfile, baseFolder) file=open('windows\\build\\updater.nsi','w') file.write(nsis) file.close() print('Building Installer') p = subprocess.Popen('"C:\\Program Files\\NSIS\\makensis.exe" updater.nsi', stdout=subprocess.PIPE, shell=True, cwd='windows\\build') print p.communicate()[0] exitStat = p.wait() print("Creating current_version.txt") fileHash = Crypto.hash_file_data("windows\\build\\%s" % (outfile)) f = open("windows\\build\\current_version.txt", "wb") f.write(Globals.VERSION + "\n\n") f.write(fileHash + "\n\n") f.write(versionDescription) f.close() print("uploading") #p = subprocess.Popen(['C:\\Program Files\\winscp\\winscp418.exe', "/console", "/command", "open %s" % (WINSCP_ADDRESS), "put %s\\%s %s" % (os.getcwdu(), LOCAL_FILE_NAME, REMOTE_FILE_NAME), "exit"], cwd="C:\\Program Files\\winscp") #x = p.wait() print("all done")
SectionEnd ''' % (product_version, outfile, mui_icon, mui_unicon, baseFolder, SURVEY_ADDRESS) file=open(os.path.join(BUILD_DIR, "installer.nsi"),'w') file.write(nsis) file.close() print('Building Installer') #os.chdir('windows\\build') p = subprocess.Popen('makensis.exe installer.nsi', stdout=subprocess.PIPE, shell=True, cwd=BUILD_DIR) print p.communicate()[0] exitStat = p.wait() assert exitStat == 0 print("Creating current_version.txt") fileHash = Crypto.hash_file_data(os.path.join(BUILD_DIR, outfile)) f = open(os.path.join(BUILD_DIR, "releases", "current_version.txt"), "wb") f.write(Globals.VERSION + "\n\n") f.write(fileHash + "\n\n") f.write(versionDescription) f.close() if DO_ARCHIVE: #archive the build: print("Archiving release") archiveLocation = os.path.join(BUILD_DIR, "releases", product_version) if os.path.exists(archiveLocation): shutil.rmtree(archiveLocation, True) shutil.move(os.path.join(BUILD_DIR, "release"), archiveLocation) archiveBuild = os.path.join(BUILD_DIR, "releases", outfile) if os.path.exists(archiveBuild):