action='store_true', help='Build the console application if present') group.add_argument('--gui', required=False, action='store_true', help='Build the gui application if present') args = parser.parse_args() # Decide whether we are building console or gui gui = args.gui or not args.console logging.info('Creating Application Information Object') try: appinfo = build_utils.AppInfo(gui=gui) except Exception, e: logging.error('Failed to initialize AppInfo') logging.error(str(e)) sys.exit(1) logging.info('Getting Spec file') specfile = appinfo.getspecfile() if not specfile: logging.error('Specfile was not found. Check for presence') sys.exit(1) logging.info('Begin operations') logging.info('Cleaning up backups') try: appinfo.clean_srcdir_backups()
logging.basicConfig( format='%(levelname)s: %(message)s', level=logging.INFO) import build_utils iscc_cmd = ['iscc',] if __name__ == '__main__': parser = argparse.ArgumentParser(description='Prepare iss file and build setup file') parser.add_argument('--iss', action='store_true', help='do only prepare the iss file') args = parser.parse_args() logging.info('Creating Application Information Object') try: appinfo = build_utils.AppInfo() except Exception, e: logging.error('Failed to initialize AppInfo') logging.error(str(e)) sys.exit(1) logging.info('Checking AppId') retval, uuid = appinfo.validappid() if not retval: logging.error('The application has not yet defined an Application UUID and the setup cannot be generated') logging.error('Please add AppId="%s" to your appconstants file', uuid) sys.exit(1) logging.info('Getting the InnoSetup file') issfile = appinfo.getissfile() if not issfile:
import argparse, logging, os.path, sys logging.basicConfig( format='%(levelname)s: %(message)s', level=logging.INFO) import build_utils if __name__ == '__main__': parser = argparse.ArgumentParser(description='Prepare spec file and generate executable') args = parser.parse_args() logging.info('Creating Application Information Object') try: scriptname = sys.executable if getattr(sys, 'frozen', False) else sys.argv[0] scriptpath = os.path.dirname(scriptname) appinfo = build_utils.AppInfo(initdir=scriptpath) except Exception, e: logging.error('Failed to initialize AppInfo') logging.error(str(e)) sys.exit(1) logging.info('Begin operations') logging.info('Making (deleting if needed) previous executable generation directories') try: appinfo.make_dirs_zip() except OSError, e: logging.error('Directory operation failed') logging.error(str(e)) sys.exit(1) logging.info('Creating zipfile')