curl-ios-build-scripts icon indicating copy to clipboard operation
curl-ios-build-scripts copied to clipboard

Defaults supporting automagical determination of appropriate SDK versions

Open dci2112 opened this issue 11 years ago • 0 comments

Playing around with the existing build on OS X 10.10 w/ Xcode 6.1 (iOS SDK 8.1) required some tweaks to the defaults. Would it be appropraite to include the defaulting logic so that the latest (or earliest) SDK versions were found out for the user?

Pardon the ugly shell script hack but it works...could likely be cleaned up considerably and made much more ruby-esque--i've not used ruby in a long time. If this type of functionality is worth it i'd invest the time to make a cleaner solution.

curl_builder.rb:

@cmd = %q!xcodebuild -showsdks | grep -E '(OS X [0-9])' | sed 's/.* \([0-9]\{1,2\}\.[0-9]\{1,2\}\).*/\1/' | sort -u |head -1!
@latest_osx_sdk = `#@cmd`.chomp
@cmd =%q!xcodebuild -showsdks | grep -E '(iOS [0-9])' | sed 's/.* \([0-9]\{1,2\}\.[0-9]\{1,2\}\).*/\1/' |sort -u |head -1!
@latest_ios_sdk = `#@cmd`.chomp

  DEFAULT_SETUP = {
    log_level:          "info", # debug, info, warn, error
    verbose:            false,
    debug_symbols:      false,
    curldebug:          false,
    sdk_version:        @latest_ios_sdk,
    osx_sdk_version:    @latest_osx_sdk,
    libcurl_version:    "7.38.0",
    architectures:      %w(i386 armv7 armv7s arm64 x86_64),
    xcode_home:         "/Applications/Xcode.app/Contents/Developer",
    run_on_dir:         Dir::pwd,
    work_dir:           "build",
    result_dir:         "curl",
    clean_and_exit:     false,
    cleanup:            true,
  }

dci2112 avatar Oct 27 '14 02:10 dci2112