def __init__(self, argv, debug=False): super(Application, self).__init__(argv) logging.basicConfig() if debug: # set debug logging logging.getLogger().setLevel(logging.DEBUG) if version.DEVELOPER_MODE: #print "hi devolopper!" # print info about developer's mode to possibly prevent it being # forgotten about when releasing logging.info( "Developer's mode enabled - recompiling all .ui files...") # in case we are in the developer's mode, # lets compile all UI files to ensure they are up to date from ceed import compileuifiles compileuifiles.main() logging.debug("All .ui files recompiled!") from ceed import settings self.qsettings = QSettings("Iromy", "UIromy Editor") self.settings = settings.Settings(self.qsettings) # download all values from the persistence store self.settings.download() showSplash = settings.getEntry("global/app/show_splash").value if showSplash: self.splash = SplashScreen() self.splash.show() # this ensures that the splash screen is shown on all platforms self.processEvents() self.setOrganizationName("Iromy") self.setOrganizationDomain("Iromy.com") self.setApplicationName("UIromY Editor") self.setApplicationVersion(version.CEED) # (we potentially have to compile all UI files first before this is imported, # otherwise out of date compiled .py layouts might be used!) from ceed import mainwindow self.mainWindow = mainwindow.MainWindow(self) self.mainWindow.show() self.mainWindow.raise_() if showSplash: self.splash.finish(self.mainWindow) # import error after UI files have been recompiled # - Truncate exception log, if it exists. from ceed import error self.errorHandler = error.ErrorHandler(self.mainWindow) self.errorHandler.installExceptionHook()
def __init__(self, argv, debug = False): super(Application, self).__init__(argv) logging.basicConfig() if debug: # set debug logging logging.getLogger().setLevel(logging.DEBUG) if version.DEVELOPER_MODE: # print info about developer's mode to possibly prevent it being # forgotten about when releasing logging.info("Developer's mode enabled - recompiling all .ui files...") # in case we are in the developer's mode, # lets compile all UI files to ensure they are up to date from ceed import compileuifiles compileuifiles.main() logging.debug("All .ui files recompiled!") from ceed import settings self.qsettings = QSettings("CEGUI", "CEED") self.settings = settings.Settings(self.qsettings) # download all values from the persistence store self.settings.download() showSplash = settings.getEntry("global/app/show_splash").value if showSplash: self.splash = SplashScreen() self.splash.show() # this ensures that the splash screen is shown on all platforms self.processEvents() self.setOrganizationName("CEGUI") self.setOrganizationDomain("cegui.org.uk") self.setApplicationName("CEED - CEGUI editor") self.setApplicationVersion(version.CEED) # (we potentially have to compile all UI files first before this is imported, # otherwise out of date compiled .py layouts might be used!) from ceed import mainwindow self.mainWindow = mainwindow.MainWindow(self) self.mainWindow.show() self.mainWindow.raise_() if showSplash: self.splash.finish(self.mainWindow) # import error after UI files have been recompiled # - Truncate exception log, if it exists. from ceed import error self.errorHandler = error.ErrorHandler(self.mainWindow) self.errorHandler.installExceptionHook()
from distutils.core import setup from ceed import version from ceed import paths if platform.system() == "Windows": raise NotImplementedError( "Installing CEED like this is not supported on Windows") if version.DEVELOPER_MODE: # Compile UI files to ensure they are up to date before installing # We only do this in developer mode because release tarballs should already # contain compiled UI files. from ceed import compileuifiles compileuifiles.main() else: if not os.path.exists(os.path.join("ceed", "ui", "mainwindow.py")): raise RuntimeError( "version.DEVELOPER_MODE is False but UI files don't seem to be compiled. " "Please run ./maintenance compile-ui-files or use the release tarball." ) def get_packages(): """Returns the whole list of ceed packages""" # Distutils requires us to list all packages, this is very tedious and prone # to errors. While I believe I should know which packages ceed has at all times # I also believe that saving work on my part is a "good thing".
Freezed bundles are most commonly used on Windows but efforts are underway to make this work on MacOSX as well. It does work on Linux but is kind of pointless in my opinion. """ import platform from ceed import version if version.DEVELOPER_MODE: raise RuntimeError("I politely refuse to freeze CEED in developer mode! " "I will only freeze end-user versions.") from ceed import compileuifiles # make sure .ui files are freshly compiled before freezing compileuifiles.main() VERSION = version.CEED # TODO: these should branch depending on the platform GUI_BASE_APP = "Console" CONSOLE_BASE_APP = "Console" EXECUTABLE_EXTENSION = "" if platform.system() == "Windows": # Windows is being special again GUI_BASE_APP = "Win32GUI" EXECUTABLE_EXTENSION = ".exe" from cx_Freeze import setup, Executable buildOptions = dict(