private function initTargets($installDir, $filename)
    {
        if ($installDir === false) {
            $installDir = getcwd();
        }
        $this->installPath = rtrim($installDir, '/') . '/'. $filename;

        if (!is_writable($installDir)) {
            throw new RuntimeException('The installation directory "' . $installDir . '" is not writable');
        }

        $this->target = $installDir . DIRECTORY_SEPARATOR . $filename;
        $this->tmpPharPath = $installDir . DIRECTORY_SEPARATOR . basename($this->target, '.phar') . '-temp.phar';
        $this->tmpPubkeyPath = $this->tmpPharPath . '.pubkey';
    }