commit | 270eae09f5577517b817fa35ca2b89b7e0d89475 | [log] [tgz] |
---|---|---|
author | Kyle Teske <kjteske@gmail.com> | Thu Jun 11 09:25:47 2020 -0400 |
committer | Kyle Teske <kjteske@gmail.com> | Thu Jun 11 11:52:08 2020 -0400 |
tree | 53558bebd2b139c11587e279b02d021b282d9838 | |
parent | dad7c85aa96707cf5903907b84a5c8358b516a73 [diff] |
Fix Xcode 11.3.1 detection in an Xcode workspace When using a Tulsi-generated project by itself in Xcode 11.3.1, Xcode sets XCODE_VERSION_ACTUAL to 1131, which Tulsi parses correctly to get the version 11.3.1. But when used in an Xcode workspace, Xcode sets XCODE_VERSION_ACTUAL to 1130, leading to Tulsi parsing 11.3 as the version, and later attempts to use a non-existing version of Xcode to build, which results in an error. Fix by ignoring XCODE_VERSION_ACTUAL because it's unreliable; instead, parse Xcode's version.plist to read the 'CFBundleShortVersionString' entry, which seems to return correct results. Caveat: this implementation uses plistlib, which has a slightly different API in python2 and python3. This change uses the python2 API, and will need to be updated to work with python3 in the future. PiperOrigin-RevId: 315886285
Run build_and_run.sh
. This will install Tulsi.app inside $HOME/Applications
by default. See below for supported options:
-b
: Bazel binary that Tulsi should use to build and install the app (Default is bazel
)-d
: The folder where to install the Tulsi app into (Default is $HOME/Applications
)-x
: The Xcode version Tulsi should be built for (Default is 11.3.1
)Tulsi-generated Xcode projects use Bazel to build, not Xcode. Building in Xcode will cause it to only run a script; the script invokes Bazel to build the configured Bazel target and copies the artifacts to where Xcode expects them to be. This means that many common components of an Xcode project are handled differently than you may be used to. Notable differences:
bazel
invocations, some of which may affect Bazel caching. In order to maximize cache re-use when building from the command line, try using the user_build.py
script which is located in the generated xcodeproj at <xcodeproj>/.tulsi/Scripts/user_build.py
.Tulsi projects contain a few settings which control various behaviors during project generation and builds.
build
flags, customizable per compilation mode (dbg
and opt
)build
startup flags, also customizable per compilation modedbg
or opt
, no fastbuild
) used during project generation.dbg
, swap to opt
if you normally build Release builds in Xcode (i.e. profiling your app). Setting this improperly shouldn't break your project although it may potentially worsen generation and build performance.No
, swap to Yes
if your project contains Swift (even in its dependencies). Setting this improperly shouldn't break your project although it may potentially worsen generation and build performance.