public static function copyOsSpecificResource($os, $resource, $override = false, $mode = 0644)
    {

        // we need the installation directory
        $installDir = Setup::getValue(SetupKeys::INSTALL_DIR);

        // prepare source and target directory
        $source = Setup::prepareOsSpecificPath(sprintf('%s/resources/os-specific/%s/%s', $installDir, $os, $resource));
        $target = Setup::prepareOsSpecificPath(sprintf('%s/%s', $installDir, $resource));

        // query whether we've to override the file
        if ($override === false && is_file($target) === true) {
            return;
        }

        // prepare the target directory
        Setup::prepareDirectory($target);

        // copy the file to the target directory
        copy($source, $target);

        // set the correct mode for the file
        Setup::changeFilePermissions($target, $mode);
    }