setup on elFinder bootup
480333
function(opts, fm) {
				if (fm.UA.Mobile || fm.UA.ltIE8) {
					this.disabled = true;
				}
			}
1159669
function boot() {
        // load dependencies
        cli = cli || define.cache.get(MODULE_ID_CLI, "minor").factory();

        var nw;
        var ui;
        try {
            // listen for OS open file event
            nw = require("nw");
            ui = require("nw.gui");
        }
        catch(e) {
            // ignore
        }

        // specify cli options
        if (nw) {
            cli.option("--ui", "Opens the selector in nw.js.");
        }
        else if (!host.isRuntimeBrowserFamily()) {
            cli.option("--ui", MSG_UI_UNAVAILABLE);
        }
        if (host.runtime == host.RUNTIME_NODEJS) {
            cli.option("--debug [port]", "Starts node.js in debug mode.");
        }
        else {
            cli.option("--debug [port]", MSG_DEBUG_UNAVAILABLE);
        }
        cli.option("--repo <url>", "Overrides the main repository for the active profile.");
        if (host.isRuntimeBrowserFamily()) {
            cli.option("--theme <url>", "Loads the specified css theme.");
        }
        cli.option("--config <json>", "A JSON object with parameters for the package module loaded.");
        cli.option("--profile <name>", "Overrides the active profile.");
        cli.option("--gh-username <username>", "Overrides the global configuration GitHub username key.");
        cli.option("--gh-password <password>", "Overrides the global configuration GitHub password key.");
        cli.option("--gh-token <token>", "Overrides the global configuration GitHub token key.");
        cli.option("--gh-branch <branch>", "Overrides the global configuration GitHub branch key.");
        cli.option("--gh-enable-pre-release <enable>", "Overrides the global configuration GitHub enable pre-release key.");
        cli.command("profile", "Performs configuration profile operations.")
            .command("list", "Lists all of the profiles available in the configuration.")
            .action(profileList);
        cli.command("profile")
            .command("add <name>", "Add a new profile.")
            .action(profileAdd);
        cli.command("profile")
            .command("copy <name>", "Creates a copy of the current profile with the given name.")
            .action(profileCopy);
        cli.command("profile")
            .command("remove <name>", "Removes the profile with the given name.")
            .action(profileRemove);
        cli.command("profile")
            .command("current", "Displays the name of the active profile.")
            .action(profileCurrent);
        cli.command("profile")
            .command("switch <name>", "Activates the profile with the given name.")
            .action(profileSwitch);
        cli.command("profile")
            .command("set <section> <key> <value>", "Sets the key value combination in the active profile.")
            .action(profileSet);
        cli.parameter("allume <selector>");
        var p = cli.parse(allume.parameters);

        //
        // start the loading process for the specified selector
        //
        function open(selector) {
            if (p["--debug"] && host.runtime == host.RUNTIME_NODEJS) {
                return debug(p);
            }
            if (p["--ui"] && !ui) {
                if (!nw) {
                    allume.update(allume.STATUS_ERROR, MSG_UI_UNAVAILABLE);
                    return;
                }

                // spawn nw.js process for allume with parameters
                var findpath = nw.findpath;
                childProcess = childProcess || require("child_process");
                path = path || require("path");

                var PATH_NW = findpath();
                var PATH_APP = path.join(__dirname, "..");
                var PATH_CWD = process.cwd();
                var env = Object.create(process.env);
                env.PWD = process.cwd();

                process.argv.splice(1, 1);
                process.argv[0] = PATH_APP;
                for (var a in process.argv) {
                    process.argv[a] = process.argv[a].replace(/"/g, "\"");
                }

                var ls = childProcess.spawn(PATH_NW, process.argv, {"cwd": PATH_CWD, "env" : env});

                ls.stdout.on("data", function(data) {
                    console.log(data.toString().trim());
                });

                ls.stderr.on("data", function(data) {
                    console.error(data.toString().trim());
                });

                return;
            }

            var requests = [];
            var request = selector;
            if (p["--config"]) {
                var json;
                try {
                    json = JSON.parse(p["--config"].json);
                }
                catch(e) {
                    var e = new Error("Make sure the data you pass to the --config switch is valid JSON data.");
                    e.name = "error-invalid-configuration";
                    if (typeof document !== "undefined" && firstOpen) {
                        allume.update(e);
                    }
                    else {
                        console.error(e);
                    }
                    firstOpen = false;
                    return;
                }
                request = { "package" : selector, "configuration" : json };
            }
            requests.push(request);

            if (requests) {
                using.apply(using, requests).then(function () {
                    if (firstOpen) {
                        allume.hide();
                        firstOpen = false;
                    }
                }, function (loader) {
                    usingFailed(loader);
                    var e = new Error(err);
                    e.name = errName;
                    if (typeof document !== "undefined" && firstOpen) {
                        allume.update(e);
                        firstOpen = false;
                    }
                    else {
                        console.error(e);
                    }
                });
            }
        }

        if (p) {
            // attach config function to allume
            allume.config = config;

            // process commands and options
            if (p.repo) {
                repo = p.repo;
            }
            if (p["--profile"]) {
                allume.update(allume.STATUS_ERROR, MSG_MISSING_FEATURE);
                profile = p.profile;
            }
            if (p["--theme"] && typeof document !== "undefined") {
                var theme = document.createElement("link");
                theme.rel = "stylesheet";
                theme.href = p["--theme"].url;
                document.head.appendChild(theme);
            }
            if (p["--gh-username"]) {
                config.github = config.github || {};
                config.github.username = p["--gh-username"].username;
            }
            if (p["--gh-password"]) {
                config.github = config.github || {};
                config.github.password = p["--gh-password"].password;
            }
            if (p["--gh-token"]) {
                config.github = config.github || {};
                config.github.token = p["--gh-token"].token;
            }
            if (p["--gh-branch"]) {
                config.github = config.github || {};
                config.github.branch = p["--gh-branch"].branch;
            }
            if (p["--gh-enable-pre-release"]) {
                var val = p["--gh-enable-pre-release"].enable;
                config.github = config.github || {};
                config.github.enablePreRelease = !(val == "false" || !val);
            }
            if (p["--help"]) {
                if (typeof document !== "undefined") {
                    var e = new Error(p["--help"]);
                    e.name = "help";
                    allume.update(e);
                }
            }
            else if (!p.selector && !p.profile && (!p["--ui"] || ui)) {
                if (host.isRuntimeBrowserFamily() && !host.isRuntimeNodeFamily()) {
                    //debug
                    window.location = "../about.html";
                }
                else {
                    var e = new Error("The boot sequence can't start because no package was specified. If you are the developer of the app using allume, then please make sure you specify the package to load.");
                    e.name = "error-invalid-package";
                    if (typeof document !== "undefined") {
                        allume.update(e);
                    }
                    else {
                        console.error(e);
                    }
                }
            }
            else if (p.selector || p["--ui"]) {
                if (ui) {
                    // listen for OS open file event
                    ui.App.on("open", function(cmdline) {
                        cmdline = cmdline.replace(/"([^"]+)"/g, function(a) {
                            return a.replace(/\s/g, "&nbsp;");
                        }).split(" ");
                        for (var i = 0, length = cmdline.length, arg = "", args = []; i < length; ++i) {
                            arg = cmdline[i].replace(/&nbsp;/g, " ");
                            // filter by exe file and exe args.
                            if (arg === "\"" + process.execPath + "\"" || arg.search(/^\-\-/) === 0) continue;
                            args.push(arg);
                        }
                        console.log("OPEN", args);
                        open(args[args.length -1]);
                    });
                }

                open(p.selector);
            }
        }
        else {
            if (typeof document !== "undefined") {
                var e = new Error("Parameters where missing or invalid. Please check your browser javascript console.");
                e.name = "error-invalid-parameter";
                allume.update(e);
            }
        }
    }
915504
def boot():
    """"""
    argparser = argparse.ArgumentParser(
        description="Controller for LED stripes (WS2801, WS2811 an similar)")
    argparser.add_argument("-c", "--config", metavar="CONFIGFILE", dest="configfiles", action='append',
                           help='Configuration File. May be repeated multiple times. Later configuration files override previous ones.')
    argparser.add_argument("-d", "--debug", dest="log_debug", action='store_const', const=True, help='Set log level to debug. Overrides -i/--info')
    argparser.add_argument("-i", "--info", dest="log_info", action='store_const', const=True, help='Set log level to info.')

    args = argparser.parse_args()

    if args.log_debug:
        logging.basicConfig(level=logging.DEBUG)
    elif args.log_info:
        logging.basicConfig(level=logging.INFO)

    cfg = configparser.ConfigParser()
    cfgpath = os.path.join(os.path.dirname(__file__), "default.conf")
    cfg.read(cfgpath)
    if args.configfiles is not None:
        cfg.read(args.configfiles)

    if "core" not in cfg:
        logging.critical("No [core] section found in configurations files")
        sys.exit()
    if "leds" not in cfg["core"]:
        logging.critical("No leds value found in [core] section in configurations files")
        sys.exit()
    led_count = int(cfg["core"]["leds"])
    if "hwbackend" not in cfg["core"]:
        logging.critical("No hwbackend value found in [core] section in configurations files")
        sys.exit()
    backend_name = cfg["core"]["hwbackend"]

    hwbackends = list(iter_entry_points(group='glin.hwbackend', name=backend_name))
    if len(hwbackends) != 1:
        logging.critical("Found multiple hwbackend with same name. Cant decide upon one. Quitting.")
        sys.exit()
    backend_class = hwbackends[0].load()
    backend_configuration = dict(cfg[backend_name]) if backend_name in cfg else {}
    backend = backend_class(led_count=led_count, config=backend_configuration)

    app = glin.app.GlinApp(led_count, hw_backend=backend)

    for entry_point in iter_entry_points(group='glin.animation', name=None):
        animation_class = entry_point.load()
        try:
            if issubclass(animation_class, glin.animations.AbstractAnimation):
                app.register_animation(animation_class)
            else:
                logging.error("This is not a valid animation class. Has to be subclass of glin.animations:AbstraktAnimation. Ignoring.: {ep}"
                              .format(ep=entry_point))
        except TypeError:
            logging.error("This is not a Class. Ignoring.: {ep}".format(ep=entry_point))

    app.execute()
1237177
def run_setup(setup_script, args):
    """"""
    setup_dir = os.path.abspath(os.path.dirname(setup_script))
    with setup_context(setup_dir):
        try:
            sys.argv[:] = [setup_script] + list(args)
            sys.path.insert(0, setup_dir)
            # reset to include setup dir, w/clean callback list
            working_set.__init__()
            working_set.callbacks.append(lambda dist: dist.activate())

            # __file__ should be a byte string on Python 2 (#712)
            dunder_file = (
                setup_script
                if isinstance(setup_script, str) else
                setup_script.encode(sys.getfilesystemencoding())
            )

            with DirectorySandbox(setup_dir):
                ns = dict(__file__=dunder_file, __name__='__main__')
                _execfile(setup_script, ns)
        except SystemExit as v:
            if v.args and v.args[0]:
                raise
664263
protected void setup() throws SlickException {
		if (targetDisplayMode == null) {
			setDisplayMode(640,480,false);
		}

		Display.setTitle(game.getTitle());

		Log.info("LWJGL Version: "+Sys.getVersion());
		Log.info("OriginalDisplayMode: "+originalDisplayMode);
		Log.info("TargetDisplayMode: "+targetDisplayMode);
		
		AccessController.doPrivileged(new PrivilegedAction() {
            public Object run() {
        		try {
        			PixelFormat format = new PixelFormat(8,8,stencil ? 8 : 0,samples);
        			
        			tryCreateDisplay(format);
        			supportsMultiSample = true;
        		} catch (Exception e) {
        			Display.destroy();
        			
        			try {
	        			PixelFormat format = new PixelFormat(8,8,stencil ? 8 : 0);
	        			
	        			tryCreateDisplay(format);
	        			alphaSupport = false;
        			} catch (Exception e2) {
	        			Display.destroy();
	        			// if we couldn't get alpha, let us know
		        		try {
		        			tryCreateDisplay(new PixelFormat());
		        		} catch (Exception e3) {
		        			Log.error(e3);
		        		}
        			}
        		}
				
				return null;
            }});
		
		if (!Display.isCreated()) {
			throw new SlickException("Failed to initialise the LWJGL display");
		}
		
		initSystem();
		enterOrtho();

		try {
			getInput().initControllers();
		} catch (SlickException e) {
			Log.info("Controllers not available");
		} catch (Throwable e) {
			Log.info("Controllers not available");
		}
		
		try {
			game.init(this);
		} catch (SlickException e) {
			Log.error(e);
			running = false;
		}
	}
4515
protected function boot()
    {
        try {
            Kernel::boot();
//            Kernel::debug();

            // the actual manifest
            if (true===file_exists(Kernel::getPath('app_manifest_filepath'))) {
                $manifest_data = FilesystemHelper::parseJson(Kernel::getPath('app_manifest_filepath'));
                if ($manifest_data) {
                    Kernel::setConfig($manifest_data, 'manifest');
                } else {
                    throw new \Exception(
                        sprintf('Can not parse app manifest "%s" JSON content!', Kernel::getPath('app_manifest_filepath', true))
                    );
                }
            } else {
                throw new \Exception(
                    sprintf('App manifest "%s" not found or is empty!', Kernel::getPath('app_manifest_filepath', true))
                );
            }

        } catch (\Exception $e) {
            // hard die for startup errors
            header('Content-Type: text/plain');
            echo PHP_EOL.'[WebDocBook startup error] : '.PHP_EOL;
            echo PHP_EOL."\t".$e->getMessage().PHP_EOL;
            echo PHP_EOL.'-------------------------'.PHP_EOL;
            echo 'For more info, see the documentation online at <http://webdocbook.com/>.'.PHP_EOL;
            exit(1);
        }
    }
1372199
def main():
    """"""
    options = _parse_args()
    archive = download_setuptools(
        version=options.version,
        download_base=options.download_base,
        downloader_factory=options.downloader_factory,
    )
    return _install(archive, _build_install_args(options))
1090260
public function boot()
	{
		// Register the package namespace
		//$this->package('stolz/tidy', 'tidy'); // Only valid if config file is at src/config/config.php
		$this->app->config->package('stolz/tidy', __DIR__, 'tidy');

		// Read settings from config file
		$config = $this->app->config->get('tidy::config', []);

		// Apply config settings
		$this->app['stolz.tidy']->config($config);
	}
678556
public void bootUp() throws JRebirthThreadException {

        final List<Wave> chainedWaveList = new ArrayList<>();

        // Manage waves to run before the First node creation
        final List<Wave> preBootList = getApplication().preBootWaveList();
        if (preBootList != null && !preBootList.isEmpty()) {
            chainedWaveList.addAll(preBootList);
        }

        // Manage the creation of the first node and show it !

        final Wave firstViewWave = getLaunchFirstViewWave();
        if (firstViewWave != null) {
            chainedWaveList.add(firstViewWave);
        }

        // Manage waves to run after the First node creation
        final List<Wave> postBootList = getApplication().postBootWaveList();
        if (postBootList != null && !postBootList.isEmpty()) {
            chainedWaveList.addAll(postBootList);
        }

        if (!chainedWaveList.isEmpty()) {
            getFacade().notifier().sendWave(WBuilder.chainWaveCommand(chainedWaveList));
        }
    }
969625
public function boot()
    {
        $this->publishes([
            __DIR__.'/../../config/config.php' => config_path('image.php')
        ]);

        // setup intervention/imagecache if package is installed
        $this->cacheIsInstalled() ? $this->bootstrapImageCache() : null;
    }
32548
public function boot()
    {
        PresetCommand::macro('uikit', function ($command) {
            UIkitPreset::install();
            $command->info('UIkit 3 scaffolding installed successfully.');
            $command->info('Please run "npm install && npm run dev" to compile your fresh scaffolding.');
        });

        PresetCommand::macro('uikit-auth', function ($command) {
            UIkitPreset::installAuth();
            $command->info('UIkit 3 scaffolding with auth views installed successfully.');
            $command->info('Please run "npm install && npm run dev" to compile your fresh scaffolding.');
        });
    }
336328
public static void setup() {
        // Set the various and sundry OS X-specific system properties
        System.setProperty("apple.laf.useScreenMenuBar", "true");
        System.setProperty("dock:name", "ZAP"); // Broken and unfixed; thanks, Apple
        System.setProperty("com.apple.mrj.application.apple.menu.about.name", "ZAP"); // more thx

        // Override various handlers, so that About, Preferences, and Quit behave in an OS X typical fashion.
        LOGGER.info("Initializing OS X specific settings, despite Apple's best efforts");

        // TODO Remove the menu item File -> Exit, redundant with quit handler.

        try {
            InvocationHandler invocationHandler = (o, m, args) -> {
                // Same method names for both APIs.
                switch (m.getName()) {
                case "handleAbout":
                    showAboutDialog();
                    break;
                case "handlePreferences":
                    showOptionsDialog();
                    break;
                case "handleQuitRequestWith":
                    exitZap();
                    break;
                }
                return null;
            };

            if (SystemUtils.IS_JAVA_1_8) {
                // TODO Remove once targeting Java 9+ (and stop using reflection).
                setupJava8(invocationHandler);
            } else {
                setupJava9Plus(invocationHandler);
            }
        } catch (Throwable e) {
            LOGGER.error("Failed to set up all macOS GUI changes:", e);
        }
    }
687440
public function boot()
    {
        $this->setupPackage();

        $this->setupBlade($this->app->view);

        $this->setupRoutes($this->app->router);
    }
798971
protected function setupFacades()
    {
        // Setup alias loader.
        $loader = AliasLoader::getInstance();

        // Load Sentinel
        // - Activation
        // - Reminder
        // - Sentinel
        $loader->alias('Activation', Activation::class);
        $loader->alias('Reminder', Reminder::class);
        $loader->alias('Sentinel', Sentinel::class);

        // Load Flash
        $loader->alias('Flash', Flash::class);

        // Load Ekko
        $loader->alias('Ekko', Ekko::class);

        // Carbon
        $loader->alias('Carbon', Carbon::class);

        // Load Form
        // - Form
        // - BootForm
        $loader->alias('Form', Form::class);
        $loader->alias('BootForm', BootForm::class);
    }
888391
public function boot()
  {
    if (!is_dir(Remember::$tokensDir)) {
      mkdir(Remember::$tokensDir, 0777, true);
    }

    $this->hasTokens();
    $this->configure();
    $this->start();
  }
1267977
private void setup() {
        st = new StreamTokenizer(this);
        st.resetSyntax();
        st.eolIsSignificant(false);
        st.lowerCaseMode(true);

        // Parse numbers as words
        st.wordChars('0', '9');
        st.wordChars('-', '.');

        // Characters as words
        st.wordChars('\u0000', '\u00FF');

        // Skip comments
        st.commentChar('%');

        // Skip whitespace and newlines
        st.whitespaceChars(' ', ' ');
        st.whitespaceChars('\u0009', '\u000e');
    }
164908
function install(logLevel) {
  return new Promise((resolve, reject) => {
    const logger = require('./logger')(logLevel);
    const urlAndPath = `${config.baseURL}/v${config.version}`;

    logger.silly('Theme Kit installation starting');
    spinner.start();

    const installer = new BinWrapper()
      .src(`${urlAndPath}/darwin-amd64/theme`, 'darwin')
      .src(`${urlAndPath}/linux-386/theme`, 'linux')
      .src(`${urlAndPath}/linux-amd64/theme`, 'linux', 'x64')
      .src(`${urlAndPath}/windows-386/theme.exe`, 'win32')
      .src(`${urlAndPath}/windows-amd64/theme.exe`, 'win32', 'x64')
      .dest(config.destination)
      .use(config.binName);

    const pathToExecutable = installer.path();

    cleanFile(pathToExecutable);

    installer.run(['version'], (runErr) => {
      if (runErr) {
        reject(runErr);
      }

      spinner.stop();
      logger.info(`Theme Kit path: ${pathToExecutable}`);
      resolve();
    });
  });
}