protected function compileInitialization(Buffer $buffer)
    {
        $configurationLoader = new Configuration\ConfigurationLoader(
            $this->staticConfig,
            new FileLocator(array(getcwd())),
            new Configuration\FileLoader(
                new Configuration\PathDefaultFileLocator(
                    'ZPLUGINPATH',
                    $this->staticPluginPaths
                )
            )
        );

        $compiler = new ContainerCompiler($configurationLoader->processConfiguration(), array());
        $this->phar['container.php'] = $compiler->compileContainerCode();
        $buffer->writeln('$container = require_once \'phar://z.phar/container.php\';');

        foreach ($configurationLoader->getPlugins() as $name => $plugin) {
            $className = get_class($plugin);
            $embeddedFilename = 'plugins/' . $name . '.php';

            $class = new \ReflectionClass($className);

            $this->phar[$embeddedFilename] = file_get_contents($class->getFileName());
            $buffer->write('require_once ')->asPhp('phar://z.phar/' . $embeddedFilename)->raw(';')->eol();
            $buffer->write('$p = new ')->write($className)->raw('();')->eol();
            $buffer->writeln('$p->setContainer($container);');
        }
        $buffer
            ->writeln('Zicht\Tool\Application::$HEADER = \'\';')
            ->write('$app = new Zicht\Tool\Application(')
            ->asPhp($this->appName)
            ->raw(', Zicht\Version\Version::fromString(')
            ->asPhp($this->appVersion)
            ->raw(') ?: new Zicht\Version\Version());')
            ->eol()
        ;
        $buffer->writeln('$app->setContainer($container);');
    }