Skip to content

Commit

Permalink
Update xcodeproj version, generate a compatible one for Xcode 7+
Browse files Browse the repository at this point in the history
Certain newer Xcode features such as parallel builds require a newer
version to be specified in the project file. Currently, even though we
have enabled `BuildIndependentTargetsInParallel` in the project file,
because the objectVersion is still set at 47 (Xcode 6.3), the setting is
not used and we get a warning during build time. Upgrade the version to
54 (as automatically done by Xcode) which is Xcode 12 compatible in
order to take advantage of parallle builds.

One caveat of incrementing the version is that older Xcode versions will
not be able to open the project anymore (despite them being able to
build it in command-line using xcodebuild). Generate a new xcodeproj
with the old objectVersion and have CI check that it's not out of date
whenever we change the original xcodeproj, so people using older Xcode
versions can still debug and use Xcode with MacVim.

Note that the compatible version is compatible with Xcode 6.4, but the
xib files are only buildable in Xcode 8+, so we just call it
MacVim_xcode8.xcodeproj.

Related: #1100
  • Loading branch information
ychin committed Oct 22, 2023
1 parent bb85aff commit 7edaf3e
Show file tree
Hide file tree
Showing 6 changed files with 1,417 additions and 8 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/ci-macvim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
# Oldest version of Xcode supported on GitHub Action to test source code backwards compatibility
- os: macos-11
xcode: '11.7'
extra: [vimtags]
extra: [vimtags, check-xcodeproj-compat]

# Older version of Xcode, and used to publish legacy builds (for macOS 10.9 - 10.12)
- os: macos-12
Expand Down Expand Up @@ -300,6 +300,16 @@ jobs:
make -C runtime/doc vimtags VIMEXE=../../${VIM_BIN}
git diff --exit-code -- runtime/doc/tags
- name: Check Xcode project compatibility version
if: contains(matrix.extra, 'check-xcodeproj-compat')
run: |
# Confirm that the compatibility version of xcodeproj is correct and not outdated.
rm -rf src/MacVim/MacVim_xcode7.xcodeproj
make -C src macvim-xcodeproj-compat
if ! git diff --exit-code -- src/MacVim/MacVim_xcode7.xcodeproj; then
echo 'MacVim_xcode7.xcodeproj is outdated. Run "make -C src macvim-xcodeproj-compat" to re-generate it.'; false
fi
- name: Build test binaries
run: |
# Build the unit test binaries first. With link-time-optimization they take some time to link. Running them
Expand Down
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ src/kword_test
# From MacVim
.*.swp
.DS_Store
src/MacVim/MacVim.xcodeproj/*.mode1
src/MacVim/MacVim.xcodeproj/*.mode1v3
src/MacVim/MacVim.xcodeproj/*.pbxuser
src/MacVim/MacVim.xcodeproj/project.xcworkspace
src/MacVim/MacVim.xcodeproj/xcuserdata
src/MacVim/MacVim*.xcodeproj/*.mode1
src/MacVim/MacVim*.xcodeproj/*.mode1v3
src/MacVim/MacVim*.xcodeproj/*.pbxuser
src/MacVim/MacVim*.xcodeproj/project.xcworkspace
src/MacVim/MacVim*.xcodeproj/xcuserdata
src/MacVim/icons/*.pyc
src/MacVim/icons/*.ttf
src/MacVim/icons/*.reg
Expand Down
2 changes: 1 addition & 1 deletion src/MacVim/MacVim.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 47;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down
Loading

0 comments on commit 7edaf3e

Please sign in to comment.