mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-15 21:45:19 +00:00
Resolve Swiftgram build variables
This commit is contained in:
parent
5e43306965
commit
0b62196e78
@ -52,7 +52,8 @@ def generate_xcodeproj(build_environment: BuildEnvironment, disable_extensions,
|
||||
file.write('build ' + argument + '\n')
|
||||
|
||||
call_executable(bazel_generate_arguments)
|
||||
|
||||
if app_target_spec == "Telegram:Telegram": # MARK: Swiftgram
|
||||
app_target_spec = "Telegram/Swiftgram"
|
||||
xcodeproj_path = '{}.xcodeproj'.format(app_target_spec.replace(':', '/'))
|
||||
return xcodeproj_path
|
||||
|
||||
|
@ -79,12 +79,22 @@ struct XcodeParse: ParsableCommand {
|
||||
}
|
||||
|
||||
var rawVariables: [String: String] = [:]
|
||||
let requiredBuildSettings: [String] = ["SRCROOT", "PROJECT_DIR", "BAZEL_OUT"]
|
||||
let requiredBuildSettings: [String] = ["SRCROOT", "PROJECT_DIR", "BAZEL_OUT", /* MARK: Swifgram */ "BAZEL_EXTERNAL", "BAZEL_OUTPUT_BASE", "_BAZEL_OUTPUT_BASE:standardizepath" ]
|
||||
for buildConfiguration in xcodeproj.pbxproj.buildConfigurations {
|
||||
if buildConfiguration.name == "Debug" {
|
||||
for name in requiredBuildSettings {
|
||||
for setting in requiredBuildSettings {
|
||||
let components = setting.split(separator: ":", maxSplits: 1, omittingEmptySubsequences: false)
|
||||
let name = String(components[0])
|
||||
let modifier = components.count > 1 ? String(components[1]) : nil
|
||||
|
||||
if let value = buildConfiguration.buildSettings[name]?.stringValue {
|
||||
rawVariables[name] = value
|
||||
var finalValue = value
|
||||
|
||||
if modifier == "standardizepath" {
|
||||
finalValue = (value as NSString).standardizingPath
|
||||
}
|
||||
|
||||
rawVariables[setting] = finalValue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user