<commit_before>import qbs 1.0
import qbs.fileinfo as FileInfo
import '../utils.js' as ModUtils
import "bundle-tools.js" as BundleTools
import "darwin-tools.js" as DarwinTools

UnixGCC {
    condition: false

    compilerDefines: ["__GNUC__", "__APPLE__"]
    dynamicLibrarySuffix: ".dylib"

    property path infoPlistFile
    property var infoPlist
    property bool processInfoPlist: true
    property string infoPlistFormat: {
        if (qbs.targetOS.contains("osx"))
            return infoPlistFile ? "same-as-input" : "xml1"
        else if (qbs.targetOS.contains("ios"))
            return "binary1"
    }
    property bool buildDsym: qbs.buildVariant === "release"
    property var buildEnv: {
        var env = {
            "LANG": "en_US.US-ASCII"
        }
        if (minimumIosVersion)
            env["IPHONEOS_DEPLOYMENT_TARGET"] = minimumIosVersion;
        if (minimumOsxVersion)
            env["MACOSX_DEPLOYMENT_TARGET"] = minimumOsxVersion;
        return env;
    }

    setupBuildEnvironment: {
        var v = new ModUtils.EnvironmentVariable("PATH", ":", false);
        v.prepend(platformPath + "/Developer/usr/bin");
        var platformPathL = platformPath.split("/");
        platformPathL.pop();
        platformPathL.pop();
        var devPath = platformPathL.join("/")
        v.prepend(devPath + "/usr/bin");
        v.set();
        for (var key in buildEnv) {
            v = new ModUtils.EnvironmentVariable(key);
            v.value = buildEnv[key];
            v.set();
        }
    }

    readonly property var defaultInfoPlist: {
        var dict = {
            CFBundleDevelopmentRegion: "en", // default localization
            CFBundleDisplayName: product.targetName, // localizable
            CFBundleExecutable: product.targetName,
            CFBundleIdentifier: "org.example." + DarwinTools.rfc1034(product.targetName),
            CFBundleInfoDictionaryVersion: "6.0",
            CFBundleName: product.targetName, // short display name of the bundle, localizable<commit_msg>Allow empty platform path when setting build env for Apple platforms.<commit_after>import qbs 1.0
import qbs.fileinfo as FileInfo
import '../utils.js' as ModUtils
import "bundle-tools.js" as BundleTools
import "darwin-tools.js" as DarwinTools

UnixGCC {
    condition: false

    compilerDefines: ["__GNUC__", "__APPLE__"]
    dynamicLibrarySuffix: ".dylib"

    property path infoPlistFile
    property var infoPlist
    property bool processInfoPlist: true
    property string infoPlistFormat: {
        if (qbs.targetOS.contains("osx"))
            return infoPlistFile ? "same-as-input" : "xml1"
        else if (qbs.targetOS.contains("ios"))
            return "binary1"
    }
    property bool buildDsym: qbs.buildVariant === "release"
    property var buildEnv: {
        var env = {
            "LANG": "en_US.US-ASCII"
        }
        if (minimumIosVersion)
            env["IPHONEOS_DEPLOYMENT_TARGET"] = minimumIosVersion;
        if (minimumOsxVersion)
            env["MACOSX_DEPLOYMENT_TARGET"] = minimumOsxVersion;
        return env;
    }

    setupBuildEnvironment: {
        var v = new ModUtils.EnvironmentVariable("PATH", ":", false);
        if (platformPath) {
            v.prepend(platformPath + "/Developer/usr/bin");
            var platformPathL = platformPath.split("/");
            platformPathL.pop();
            platformPathL.pop();
            var devPath = platformPathL.join("/")
            v.prepend(devPath + "/usr/bin");
            v.set();
        }
        for (var key in buildEnv) {
            v = new ModUtils.EnvironmentVariable(key);
            v.value = buildEnv[key];
            v.set();
        }
    }

    readonly property var defaultInfoPlist: {
        var dict = {
            CFBundleDevelopmentRegion: "en", // default localization
            CFBundleDisplayName: product.targetName, // localizable
            CFBundleExecutable: product.targetName,
            CFBundleIdentifier: "org.example." + DarwinTools.rfc1034(product.targetName),
            CFBundleInfoDictionaryVersion: "6.0",
            CFBundleName: product.targetName, // short display name of the bundle, localizable
{'fraction_non_alphanumeric': 0.10598086124401913, 'fraction_numerical': 0.004784688995215311, 'mean_word_length': 2.382686084142395, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3850642', 'n_tokens_mistral': 1222, 'n_tokens_neox': 1183, 'n_words': 275}