import platform import sys, os from version import write_version_file, dpkg_deb_version import shutil from subprocess import call if platform.system() == 'Darwin': print("starting version stript:") write_version_file('dist/Pupil Capture.app/Contents/MacOS') print("created version file in dist folder") shutil.rmtree('dist/Pupil Capture') print('removed the non-app dist bundle') bundle_name = 'pupil_capture_mac_os_x64_v%s' % dpkg_deb_version() bundle_dmg_name = 'Install Pupil Capture' src_dir = 'dist' bundle_app_dir = os.path.join(src_dir, 'Pupil Capture.app/') print("Codesigning now") if call("codesign --force --verify --verbose -s 'Developer ID Application: Pupil Labs UG (haftungsbeschrankt) (R55K9ESN6B)' --deep '%s'" % bundle_app_dir, shell=True) != 0: print(Exception("Codesinging failed")) # if call("spctl --assess --type execute '%s'"%bundle_app_dir,shell=True) != 0: # print Exception("Codesing verification failed") call("ln -s /Applications/ %s/Applications" % src_dir, shell=True) call("hdiutil create -volname '%s' -srcfolder %s -format UDZO '%s.dmg'" % (bundle_dmg_name, src_dir, bundle_name), shell=True)
import platform import sys, os from version import write_version_file,dpkg_deb_version import shutil from subprocess import call if platform.system() == 'Darwin': print "starting version stript:" write_version_file('dist/Pupil Capture.app/Contents/MacOS') print "created version file in dist folder" shutil.rmtree('dist/Pupil Capture') print 'removed the non-app dist bundle' bundle_name = 'pupil_capture_mac_os_x64_v%s'%dpkg_deb_version() bundle_dmg_name = 'Install Pupil Capture' src_dir = 'dist' bundle_app_dir = os.path.join(src_dir,'Pupil Capture.app/' ) print "Codesigning now" if call("codesign --force --verify --verbose -s 'Developer ID Application: Pupil Labs UG (haftungsbeschrankt) (R55K9ESN6B)' --deep '%s'"%bundle_app_dir,shell=True) != 0: print Exception("Codesinging failed") # if call("spctl --assess --type execute '%s'"%bundle_app_dir,shell=True) != 0: # print Exception("Codesing verification failed") call("ln -s /Applications/ %s/Applications"%src_dir,shell=True) call("hdiutil create -volname '%s' -srcfolder %s -format UDZO '%s.dmg'"%(bundle_dmg_name,src_dir,bundle_name),shell=True) elif platform.system() == 'Windows': write_version_file(os.path.join('dist', 'Pupil Capture')) elif platform.system() == 'Linux':
if platform.system() == 'Darwin': print "starting version stript:" write_version_file('dist/Pupil Player.app/Contents/MacOS') print "created version file in app dir" shutil.rmtree('dist/Pupil Player') print 'removed the non-app dist bundle' print "hack injecting file type info in to info.plist" with open("dist/Pupil Player.app/Contents/Info.plist", "r") as f: txt = f.read() # read everything in the file txt = txt.replace(split_str,mac_plist_document_type_str + split_str) with open("dist/Pupil Player.app/Contents/Info.plist", "w") as f: f.write(txt) bundle_name = 'Pupil Player %s MacOS'%dpkg_deb_version() bundle_dmg_name = 'Install Pupil Player' src_dir = 'dist' call("ln -s /Applications/ %s/Applications"%src_dir,shell=True) call("hdiutil create -volname '%s' -srcfolder %s -format UDZO '%s.dmg'"%(bundle_dmg_name,src_dir,bundle_name),shell=True) elif platform.system() == 'Linux': distribtution_dir = 'dist' pupil_player_dir = os.path.join(distribtution_dir, 'pupil_player') print "starting version stript:" write_version_file(pupil_player_dir) print "created version file in dist folder"
import platform import sys, os from version import write_version_file, dpkg_deb_version import shutil from subprocess import call if platform.system() == "Darwin": print("starting version stript:") write_version_file("dist/Pupil Capture.app/Contents/MacOS") print("created version file in dist folder") shutil.rmtree("dist/Pupil Capture") print("removed the non-app dist bundle") bundle_name = "pupil_capture_mac_os_x64_v%s" % dpkg_deb_version() bundle_dmg_name = "Install Pupil Capture" src_dir = "dist" bundle_app_dir = os.path.join(src_dir, "Pupil Capture.app/") print("Codesigning now") if ( call( "codesign --force --verify --verbose -s 'Developer ID Application: Pupil Labs UG (haftungsbeschrankt) (R55K9ESN6B)' --deep '%s'" % bundle_app_dir, shell=True, ) != 0 ): print(Exception("Codesinging failed")) # if call("spctl --assess --type execute '%s'"%bundle_app_dir,shell=True) != 0: # print Exception("Codesing verification failed")
import platform import sys, os from version import write_version_file, dpkg_deb_version import shutil from subprocess import call if platform.system() == 'Darwin': print "starting version stript:" write_version_file('dist/Pupil Capture.app/Contents/MacOS') print "created version file in dist folder" shutil.rmtree('dist/Pupil Capture') print 'removed the non-app dist bundle' bundle_name = 'Pupil Capture %s MacOS' % dpkg_deb_version() bundle_dmg_name = 'Install Pupil Capture' src_dir = 'dist' bundle_app_dir = os.path.join(src_dir, 'Pupil Capture.app/') print "Codesigning now" call( "codesign -s 'Developer ID Application: Pupil Labs UG (haftungsbeschrankt) (R55K9ESN6B)' --deep '%s'" % bundle_app_dir, shell=True) if call("spctl --assess --type execute '%s'" % bundle_app_dir, shell=True) != 0: raise Exception("Codesinging failed") call("ln -s /Applications/ %s/Applications" % src_dir, shell=True) call("hdiutil create -volname '%s' -srcfolder %s -format UDZO '%s.dmg'" % (bundle_dmg_name, src_dir, bundle_name), shell=True)
import platform import sys, os from version import write_version_file,dpkg_deb_version import shutil from subprocess import call if platform.system() == 'Darwin': print "starting version stript:" write_version_file('dist/Pupil Capture.app/Contents/MacOS') print "created version file in dist folder" shutil.rmtree('dist/Pupil Capture') print 'removed the non-app dist bundle' bundle_name = 'Pupil Capture %s MacOS'%dpkg_deb_version() bundle_dmg_name = 'Install Pupil Capture' src_dir = 'dist' bundle_app_dir = os.path.join(src_dir,'Pupil Capture.app/' ) print "Codesigning now" call("codesign -s 'Developer ID Application: Pupil Labs UG (haftungsbeschrankt) (R55K9ESN6B)' --deep '%s'"%bundle_app_dir,shell=True) if call("spctl --assess --type execute '%s'"%bundle_app_dir,shell=True) != 0: raise Exception("Codesinging failed") call("ln -s /Applications/ %s/Applications"%src_dir,shell=True) call("hdiutil create -volname '%s' -srcfolder %s -format UDZO '%s.dmg'"%(bundle_dmg_name,src_dir,bundle_name),shell=True) elif platform.system() == 'Windows': write_version_file(os.path.join('dist', 'Pupil Capture')) elif platform.system() == 'Linux':