[Fwd-port] Apply latest changes to Xcode project from 1.14 branch

Commits included:
b677423cdd
662da36ac5
d3eebd61e1
4d08b1eb78
c03ab2e54c
This commit is contained in:
Martin Hrubý (hrubymar10) 2019-01-31 14:17:49 +01:00
parent ed3e1ac0dd
commit 8629cbf91f
No known key found for this signature in database
GPG key ID: 3042E73421447651
11 changed files with 140 additions and 50 deletions

1
.gitignore vendored
View file

@ -36,6 +36,7 @@ projectfiles/Xcode/**/*.mode1v3
projectfiles/Xcode/**/*.pbxuser
projectfiles/Xcode/**/xcuserdata
projectfiles/Xcode/**/*.xcworkspace
!projectfiles/Xcode/**/project.pbxproj
# CodeBlocks
projectfiles/**/.clang

View file

@ -50,7 +50,7 @@ if [ -z "$MY_PATH" ] ; then
fi
cd "$MY_PATH"
if ! [ -d "Wesnoth.xcodeproj" ]; then
if ! [ -d "The Battle for Wesnoth.xcodeproj" ]; then
echo "Error: I am in bad directory! I must be in wesnoth/projectfiles/Xcode !" >&2
exit 1
fi

View file

@ -35,7 +35,7 @@ Builds for maximum compiling speed, and uses the current OS as the SDK. If you j
2. Use `Finder` to navigate into `wesnoth/projectfiles/Xcode` . And now, there will be 2 options.
3. Double click on `Fix_Xcode_Dependencies` script and wait until it will be done.
5. (Optional) Compile translations as it is described in **Translations** section.
6. Now you can open `Wesnoth.xcodeproj` file in Xcode.
6. Now you can open `The Battle for Wesnoth.xcodeproj` file in Xcode.
## Translations
To compile translations you need `gettext-tools` and `scons`. You can obtain these tools using `brew install gettext scons`. In the Terminal, `cd` to the Wesnoth root directory, and run `scons translations`. This will compile all the translations into a translations directory.

View file

@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14113" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14113"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14460.31"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -15,10 +14,10 @@
</customObject>
<menu title="SDLMain" systemMenu="main" id="29" userLabel="MainMenu">
<items>
<menuItem title="Wesnoth" id="56">
<menu key="submenu" title="Wesnoth" systemMenu="apple" id="57">
<menuItem title="The Battle for Wesnoth" id="56">
<menu key="submenu" title="The Battle for Wesnoth" systemMenu="apple" id="57">
<items>
<menuItem title="About Wesnoth" id="58">
<menuItem title="About The Battle for Wesnoth" id="58">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="orderFrontStandardAboutPanel:" target="-2" id="142"/>
@ -27,7 +26,7 @@
<menuItem isSeparatorItem="YES" id="196">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Wesnoth Homepage" id="493">
<menuItem title="The Battle for Wesnoth Homepage" id="493">
<connections>
<action selector="openHomepage:" target="194" id="497"/>
</connections>
@ -45,7 +44,7 @@
<menuItem isSeparatorItem="YES" id="495">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Hide Wesnoth" keyEquivalent="h" id="134">
<menuItem title="Hide The Battle for Wesnoth" keyEquivalent="h" id="134">
<connections>
<action selector="hide:" target="-2" id="152"/>
</connections>
@ -64,7 +63,7 @@
<menuItem isSeparatorItem="YES" id="149">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Quit Wesnoth" keyEquivalent="q" id="136">
<menuItem title="Quit The Battle for Wesnoth" keyEquivalent="q" id="136">
<connections>
<action selector="terminate:" target="-1" id="292"/>
</connections>
@ -130,7 +129,7 @@
</menu>
<customObject id="194" userLabel="SDLMain" customClass="SDLMain"/>
<customObject id="253" userLabel="Font Manager" customClass="NSFontManager"/>
<window title="License" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" animationBehavior="default" id="485" userLabel="Window (License)">
<window title="License" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="485" userLabel="Window (License)">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="471" y="210" width="475" height="420"/>
@ -142,14 +141,15 @@
<scrollView horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" id="489">
<rect key="frame" x="20" y="20" width="435" height="380"/>
<autoresizingMask key="autoresizingMask"/>
<clipView key="contentView" id="e1k-1y-EyP">
<clipView key="contentView" drawsBackground="NO" id="e1k-1y-EyP">
<rect key="frame" x="1" y="1" width="433" height="378"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textView editable="NO" importsGraphics="NO" verticallyResizable="YES" usesFontPanel="YES" findStyle="panel" continuousSpellChecking="YES" usesRuler="YES" spellingCorrection="YES" smartInsertDelete="YES" id="492">
<rect key="frame" x="0.0" y="-12" width="433" height="4272"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
<size key="minSize" width="433" height="378"/>
<size key="maxSize" width="853" height="10000000"/>
<attributedString key="textStorage">
@ -458,6 +458,7 @@ bywgdXNlIHRoZSBHTlUgTGlicmFyeSBHZW5lcmFsClB1YmxpYyBMaWNlbnNlIGluc3RlYWQgb2YgdGhp
cyBMaWNlbnNlLgo
</mutableString>
<attributes>
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
<font key="NSFont" metaFont="label"/>
<paragraphStyle key="NSParagraphStyle" alignment="justified" lineBreakMode="wordWrapping" baseWritingDirection="natural">
<tabStops>
@ -562,10 +563,9 @@ cyBMaWNlbnNlLgo
</attributes>
</fragment>
</attributedString>
<color key="insertionPointColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<color key="insertionPointColor" name="textColor" catalog="System" colorSpace="catalog"/>
</textView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</clipView>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="510">
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
@ -579,7 +579,7 @@ cyBMaWNlbnNlLgo
</subviews>
</view>
</window>
<window title="Changelog" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" animationBehavior="default" id="500" userLabel="Window (Changelog)">
<window title="Changelog" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="500" userLabel="Window (Changelog)">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="489" y="172" width="524" height="503"/>
@ -591,19 +591,21 @@ cyBMaWNlbnNlLgo
<scrollView horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" id="502">
<rect key="frame" x="41" y="35" width="457" height="408"/>
<autoresizingMask key="autoresizingMask"/>
<clipView key="contentView" id="Pg7-qf-R9o">
<clipView key="contentView" drawsBackground="NO" id="Pg7-qf-R9o">
<rect key="frame" x="1" y="1" width="455" height="406"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textView editable="NO" importsGraphics="NO" verticallyResizable="YES" usesFontPanel="YES" findStyle="panel" usesRuler="YES" id="503">
<rect key="frame" x="0.0" y="-2" width="455" height="2258.6101379394531"/>
<rect key="frame" x="0.0" y="-2" width="455" height="2259"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
<size key="minSize" width="455" height="406"/>
<size key="maxSize" width="897" height="100000"/>
<attributedString key="textStorage">
<fragment content="Version 1.14.4">
<attributes>
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
<font key="NSFont" size="10" name="HelveticaNeue-Bold"/>
<paragraphStyle key="NSParagraphStyle" alignment="justified" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0" allowsDefaultTighteningForTruncation="NO">
<tabStops>
@ -780,6 +782,7 @@ cyBMaWNlbnNlLgo
</mutableString>
<attributes>
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
<font key="NSFont" size="10" name="HelveticaNeue"/>
<paragraphStyle key="NSParagraphStyle" alignment="justified" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0" allowsDefaultTighteningForTruncation="NO">
<tabStops>
@ -885,6 +888,7 @@ cyBMaWNlbnNlLgo
</fragment>
<fragment content="Version 1.14.3">
<attributes>
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
<font key="NSFont" size="10" name="HelveticaNeue-Bold"/>
<paragraphStyle key="NSParagraphStyle" alignment="justified" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0" allowsDefaultTighteningForTruncation="NO">
<tabStops>
@ -1042,6 +1046,7 @@ cyBMaWNlbnNlLgo
</mutableString>
<attributes>
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
<font key="NSFont" size="10" name="HelveticaNeue"/>
<paragraphStyle key="NSParagraphStyle" alignment="justified" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0" allowsDefaultTighteningForTruncation="NO">
<tabStops>
@ -1147,6 +1152,7 @@ cyBMaWNlbnNlLgo
</fragment>
<fragment content="Version 1.14.2:">
<attributes>
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
<font key="NSFont" size="10" name="HelveticaNeue-Bold"/>
<paragraphStyle key="NSParagraphStyle" alignment="justified" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0" allowsDefaultTighteningForTruncation="NO">
<tabStops>
@ -1278,6 +1284,7 @@ cyBMaWNlbnNlLgo
</mutableString>
<attributes>
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
<font key="NSFont" size="10" name="HelveticaNeue"/>
<paragraphStyle key="NSParagraphStyle" alignment="justified" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0" allowsDefaultTighteningForTruncation="NO">
<tabStops>
@ -1383,6 +1390,7 @@ cyBMaWNlbnNlLgo
</fragment>
<fragment content="Version 1.14.1:">
<attributes>
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
<font key="NSFont" size="10" name="HelveticaNeue-Bold"/>
<paragraphStyle key="NSParagraphStyle" alignment="justified" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0" allowsDefaultTighteningForTruncation="NO">
<tabStops>
@ -1512,6 +1520,7 @@ cyBMaWNlbnNlLgo
</mutableString>
<attributes>
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
<font key="NSFont" size="10" name="HelveticaNeue"/>
<paragraphStyle key="NSParagraphStyle" alignment="justified" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0" allowsDefaultTighteningForTruncation="NO">
<tabStops>
@ -1617,6 +1626,7 @@ cyBMaWNlbnNlLgo
</fragment>
<fragment content="Version 1.14.0:">
<attributes>
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
<font key="NSFont" size="10" name="HelveticaNeue-Bold"/>
<paragraphStyle key="NSParagraphStyle" alignment="justified" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0" allowsDefaultTighteningForTruncation="NO">
<tabStops>
@ -1734,6 +1744,7 @@ cyBMaWNlbnNlLgo
* Miscellaneous and bug fixes
* macOS user data directory is now ~/Library/Application Support/Wesnoth_1.14</string>
<attributes>
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
<font key="NSFont" size="10" name="HelveticaNeue"/>
<paragraphStyle key="NSParagraphStyle" alignment="justified" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0" allowsDefaultTighteningForTruncation="NO">
<tabStops>
@ -1842,6 +1853,7 @@ cyBMaWNlbnNlLgo
For full players_changelog please visit:</string>
<attributes>
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
<font key="NSFont" size="10" name="LucidaGrande"/>
<paragraphStyle key="NSParagraphStyle" alignment="justified" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0" allowsDefaultTighteningForTruncation="NO">
<tabStops>
@ -1950,6 +1962,7 @@ For full players_changelog please visit:</string>
Cg
</string>
<attributes>
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
<font key="NSFont" size="12" name="LucidaGrande-Bold"/>
<paragraphStyle key="NSParagraphStyle" alignment="justified" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0" allowsDefaultTighteningForTruncation="NO">
<tabStops>
@ -2055,6 +2068,7 @@ Cg
</fragment>
<fragment content="https://github.com/wesnoth/wesnoth/blob/1.14/changelog.md">
<attributes>
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
<font key="NSFont" size="11" name="LucidaGrande"/>
<paragraphStyle key="NSParagraphStyle" alignment="justified" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0" allowsDefaultTighteningForTruncation="NO">
<tabStops>
@ -2159,7 +2173,7 @@ Cg
</attributes>
</fragment>
</attributedString>
<color key="insertionPointColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<color key="insertionPointColor" name="textColor" catalog="System" colorSpace="catalog"/>
<attributedString key="userComments">
<fragment content="jhjhj">
<attributes>
@ -2170,7 +2184,6 @@ Cg
</attributedString>
</textView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</clipView>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="0.82954547621987129" horizontal="YES" id="512">
<rect key="frame" x="-100" y="-100" width="87" height="18"/>

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
</dict>
</plist>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Move</key>
<array>
<string>${ApplicationSupport}/Wesnoth_1.15</string>
</array>
</dict>
</plist>

View file

@ -97,6 +97,7 @@
46BED4DA2050711600842FA5 /* scenario-story.cfg in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 46BED4D92050710800842FA5 /* scenario-story.cfg */; };
46EEFB762087434300E1E75A /* chat_log.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46EEFB742087434200E1E75A /* chat_log.cpp */; };
46EEFB772087434300E1E75A /* chat_log.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46EEFB742087434200E1E75A /* chat_log.cpp */; };
46F302EE220327FE0028938F /* container-migration.plist in Resources */ = {isa = PBXBuildFile; fileRef = 46F302EC220327FD0028938F /* container-migration.plist */; };
46F54C27211DFB7200374A1C /* apple_version.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46F54C26211DFB7200374A1C /* apple_version.mm */; };
46F57084205FCE34007031BF /* base64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 469BDB53205C357400DBF748 /* base64.cpp */; };
46F57085205FCE48007031BF /* crypt_blowfish.c in Sources */ = {isa = PBXBuildFile; fileRef = 46BED4D1205060EA00842FA5 /* crypt_blowfish.c */; };
@ -1505,7 +1506,7 @@
468C1B951F09245E002DF652 /* function_gamestate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = function_gamestate.cpp; sourceTree = "<group>"; };
468C1B961F09245E002DF652 /* function_gamestate.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = function_gamestate.hpp; sourceTree = "<group>"; };
469BDB53205C357400DBF748 /* base64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = base64.cpp; sourceTree = "<group>"; };
469DD17E21F89888008ECF5F /* Vorbis.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Vorbis.framework; path = "lib/Vorbis.framework"; sourceTree = "<group>"; };
469DD17E21F89888008ECF5F /* Vorbis.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Vorbis.framework; path = lib/Vorbis.framework; sourceTree = "<group>"; };
46B58F4121E097900070BB8E /* parse_network_address.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = parse_network_address.cpp; sourceTree = "<group>"; };
46B58F4221E097900070BB8E /* parse_network_address.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = parse_network_address.hpp; sourceTree = "<group>"; };
46BAF784206672240004711F /* libboost_chrono-mt.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libboost_chrono-mt.dylib"; path = "lib/libboost_chrono-mt.dylib"; sourceTree = "<group>"; };
@ -1523,6 +1524,8 @@
46DF5BCC1F46173700BE6D24 /* irdya_datetime.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = irdya_datetime.cpp; sourceTree = "<group>"; };
46EEFB742087434200E1E75A /* chat_log.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = chat_log.cpp; sourceTree = "<group>"; };
46EEFB752087434200E1E75A /* chat_log.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = chat_log.hpp; sourceTree = "<group>"; };
46F302EC220327FD0028938F /* container-migration.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "container-migration.plist"; path = "Resources/container-migration.plist"; sourceTree = "<group>"; };
46F302ED220327FE0028938F /* Wesnoth.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; name = Wesnoth.entitlements; path = Resources/Wesnoth.entitlements; sourceTree = "<group>"; };
46F54C26211DFB7200374A1C /* apple_version.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = apple_version.mm; path = ../../src/desktop/apple_version.mm; sourceTree = "<group>"; };
46F54C28211DFB9100374A1C /* apple_version.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = apple_version.hpp; path = ../../src/desktop/apple_version.hpp; sourceTree = "<group>"; };
46F5709D205FF856007031BF /* fs_commit.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = fs_commit.hpp; sourceTree = "<group>"; };
@ -2012,7 +2015,7 @@
62D24F331519994300350848 /* palette_manager.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = palette_manager.hpp; sourceTree = "<group>"; };
62D24F341519995200350848 /* palette_manager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = palette_manager.cpp; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8D1107320486CEB800E47090 /* Wesnoth.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Wesnoth.app; sourceTree = BUILT_PRODUCTS_DIR; };
8D1107320486CEB800E47090 /* The Battle for Wesnoth.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "The Battle for Wesnoth.app"; sourceTree = BUILT_PRODUCTS_DIR; };
903F959B1ED5489500F1BDD3 /* credentials.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = credentials.cpp; path = preferences/credentials.cpp; sourceTree = "<group>"; };
903F959D1ED5489D00F1BDD3 /* credentials.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = credentials.hpp; path = preferences/credentials.hpp; sourceTree = "<group>"; };
90606A2A1D5599BA00719B40 /* libpcre.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpcre.1.dylib; path = lib/libpcre.1.dylib; sourceTree = "<group>"; };
@ -2970,7 +2973,7 @@
19C28FACFE9D520D11CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
8D1107320486CEB800E47090 /* Wesnoth.app */,
8D1107320486CEB800E47090 /* The Battle for Wesnoth.app */,
B5BB6B4B0F890FBA00444FBF /* wesnothd */,
B597C4980FACD3CD00CE81F5 /* unit_tests */,
91C548CE1D8866ED00FE6A7B /* campaignd */,
@ -3270,6 +3273,7 @@
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
46F302EC220327FD0028938F /* container-migration.plist */,
91273E541C7BF141005E7F81 /* data */,
B5A9914A0ECA4064002BE442 /* fonts */,
B5A9BE290ECE927C002BE442 /* icon.icns */,
@ -3279,6 +3283,7 @@
4654109E2078BC02002BCD13 /* l10n-track */,
B5BB6EFD0F93B83500444FBF /* SDLMain.nib */,
B5A9B2140ECA4074002BE442 /* sounds */,
46F302ED220327FE0028938F /* Wesnoth.entitlements */,
);
name = Resources;
sourceTree = "<group>";
@ -3286,9 +3291,8 @@
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
469DD17E21F89888008ECF5F /* Vorbis.framework */,
46BCC904211A1E68003BDB8C /* IOKit.framework */,
1058C7A2FEA54F0111CA2CBB /* Included Frameworks */,
46BCC904211A1E68003BDB8C /* IOKit.framework */,
46BAF784206672240004711F /* libboost_chrono-mt.dylib */,
ECF9D43F19F4026D00E6C9D9 /* libboost_filesystem-mt.dylib */,
F4EF0D4B13AD4D53003C701D /* libboost_iostreams-mt.dylib */,
@ -3324,6 +3328,7 @@
EC5C243A18EF07B4001FA499 /* libz.1.dylib */,
1058C7A0FEA54F0111CA2CBB /* Linked System Frameworks */,
B5A5E3AD12132C790047782D /* lua */,
469DD17E21F89888008ECF5F /* Vorbis.framework */,
90606A2A1D5599BA00719B40 /* libpcre.1.dylib */,
);
name = Frameworks;
@ -4826,9 +4831,9 @@
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
8D1107260486CEB800E47090 /* Wesnoth */ = {
8D1107260486CEB800E47090 /* The Battle for Wesnoth */ = {
isa = PBXNativeTarget;
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Wesnoth" */;
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "The Battle for Wesnoth" */;
buildPhases = (
46B626461D635BC900863502 /* Update Revision.h */,
8D11072C0486CEB800E47090 /* Sources */,
@ -4845,10 +4850,10 @@
B5BB6DA50F93899E00444FBF /* PBXTargetDependency */,
9107AE391DB3295A001927B0 /* PBXTargetDependency */,
);
name = Wesnoth;
name = "The Battle for Wesnoth";
productInstallPath = "$(HOME)/Applications";
productName = Wesnoth;
productReference = 8D1107320486CEB800E47090 /* Wesnoth.app */;
productReference = 8D1107320486CEB800E47090 /* The Battle for Wesnoth.app */;
productType = "com.apple.product-type.application";
};
9107AE131DB32862001927B0 /* liblua */ = {
@ -4926,7 +4931,7 @@
attributes = {
LastUpgradeCheck = 0900;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Wesnoth" */;
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "The Battle for Wesnoth" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 1;
@ -4940,7 +4945,7 @@
projectDirPath = "";
projectRoot = "";
targets = (
8D1107260486CEB800E47090 /* Wesnoth */,
8D1107260486CEB800E47090 /* The Battle for Wesnoth */,
B5BB6B4A0F890FBA00444FBF /* wesnothd */,
B597C4970FACD3CD00CE81F5 /* unit_tests */,
91C548A01D8866ED00FE6A7B /* campaignd */,
@ -4955,6 +4960,7 @@
buildActionMask = 2147483647;
files = (
465410A02078BC77002BCD13 /* l10n-track in Resources */,
46F302EE220327FE0028938F /* container-migration.plist in Resources */,
B5A9B2290ECA4074002BE442 /* fonts in Resources */,
B5A9BE2A0ECE927C002BE442 /* icon.icns in Resources */,
B5A9B22B0ECA4074002BE442 /* images in Resources */,
@ -4980,7 +4986,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "cd \"$SOURCE_ROOT/../..\"\n./utils/autorevision.sh -t h > src/revision.h";
shellScript = "cd \"$SOURCE_ROOT/../..\"\n./utils/autorevision.sh -t h > src/revision.h\n";
};
91C2A6EB1B843AA900346948 /* Copy Translations (if present) */ = {
isa = PBXShellScriptBuildPhase;
@ -6382,6 +6388,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_ENTITLEMENTS = Resources/Wesnoth.entitlements;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
@ -6409,7 +6416,7 @@
"-llua",
);
PRODUCT_BUNDLE_IDENTIFIER = org.wesnoth.Wesnoth;
PRODUCT_NAME = Wesnoth;
PRODUCT_NAME = "The Battle for Wesnoth";
WRAPPER_EXTENSION = app;
};
name = Debug;
@ -6418,7 +6425,11 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_ENTITLEMENTS = Resources/Wesnoth.entitlements;
CODE_SIGN_IDENTITY = "Mac Developer";
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = N5CYW96P9T;
ENABLE_HARDENED_RUNTIME = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"LOCALEDIR=\\\"translations\\\"",
@ -6430,6 +6441,7 @@
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
OTHER_CODE_SIGN_FLAGS = "--force --deep";
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"-include",
@ -6442,7 +6454,7 @@
"-llua",
);
PRODUCT_BUNDLE_IDENTIFIER = org.wesnoth.Wesnoth;
PRODUCT_NAME = Wesnoth;
PRODUCT_NAME = "The Battle for Wesnoth";
WRAPPER_EXTENSION = app;
};
name = Release;
@ -6614,7 +6626,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Wesnoth" */ = {
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "The Battle for Wesnoth" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C01FCF4B08A954540054247B /* Debug */,
@ -6623,7 +6635,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Wesnoth" */ = {
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "The Battle for Wesnoth" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C01FCF4F08A954540054247B /* Debug */,

View file

@ -17,16 +17,16 @@
BlueprintIdentifier = "B597C4970FACD3CD00CE81F5"
BuildableName = "unit_tests"
BlueprintName = "unit_tests"
ReferencedContainer = "container:Wesnoth.xcodeproj">
ReferencedContainer = "container:The Battle for Wesnoth.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
@ -35,27 +35,31 @@
BlueprintIdentifier = "B597C4970FACD3CD00CE81F5"
BuildableName = "unit_tests"
BlueprintName = "unit_tests"
ReferencedContainer = "container:Wesnoth.xcodeproj">
ReferencedContainer = "container:The Battle for Wesnoth.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "YES"
customWorkingDirectory = "$BUILT_PRODUCTS_DIR/Wesnoth.app/Contents/Resources"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "NO"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B597C4970FACD3CD00CE81F5"
BuildableName = "unit_tests"
BlueprintName = "unit_tests"
ReferencedContainer = "container:Wesnoth.xcodeproj">
ReferencedContainer = "container:The Battle for Wesnoth.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
@ -79,17 +83,19 @@
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release">
<BuildableProductRunnable>
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B597C4970FACD3CD00CE81F5"
BuildableName = "unit_tests"
BlueprintName = "unit_tests"
ReferencedContainer = "container:Wesnoth.xcodeproj">
ReferencedContainer = "container:The Battle for Wesnoth.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>

View file

@ -543,8 +543,44 @@ static const std::string& get_version_path_suffix()
return suffix;
}
#if defined(__APPLE__) && !defined(__IPHONEOS__)
// Starting from Wesnoth 1.14.6, we have to use sandboxing function on macOS
// The problem is, that only signed builds can use sandbox. Unsigned builds
// would use other config directory then signed ones. So if we don't want
// to have two separate config dirs, we have to create symlink to new config
// location if exists. This part of code is only required on macOS.
static void migrate_apple_config_directory_for_unsandboxed_builds()
{
const char* home_str = getenv("HOME");
bfs::path home = home_str ? home_str : ".";
// We don't know which of the two is in PREFERENCES_DIR now.
boost::filesystem::path old_saves_dir = home / "Library/Application Support/Wesnoth_";
old_saves_dir += get_version_path_suffix();
boost::filesystem::path new_saves_dir = home / "Library/Containers/org.wesnoth.Wesnoth/Data/Library/Application Support/Wesnoth_";
new_saves_dir += get_version_path_suffix();
if(bfs::is_directory(new_saves_dir)) {
if(!bfs::exists(old_saves_dir)) {
std::cout << "Apple developer's userdata migration: ";
std::cout << "symlinking " << old_saves_dir << " to " << new_saves_dir << "\n";
bfs::create_symlink(new_saves_dir, old_saves_dir);
} else if(!bfs::symbolic_link_exists(old_saves_dir)) {
std::cout << "Apple developer's userdata migration: ";
std::cout << "Problem! Old (non-containerized) directory " << old_saves_dir << " is not a symlink. Your savegames are scattered around 2 locations.\n";
}
return;
}
}
#endif
static void setup_user_data_dir()
{
#if defined(__APPLE__) && !defined(__IPHONEOS__)
migrate_apple_config_directory_for_unsandboxed_builds();
#endif
if(!create_directory_if_missing_recursive(user_data_dir)) {
ERR_FS << "could not open or create user data directory at " << user_data_dir.string() << '\n';
return;

View file

@ -11,7 +11,7 @@ if [ "$TRAVIS_OS_NAME" = "osx" ]; then
export CCACHE_MAXSIZE=200M
export CCACHE_COMPILERCHECK=content
xcodebuild GCC_GENERATE_DEBUGGING_SYMBOLS=NO -project Wesnoth.xcodeproj -target Wesnoth -configuration Debug
xcodebuild GCC_GENERATE_DEBUGGING_SYMBOLS=NO -project "The Battle for Wesnoth.xcodeproj" -target "The Battle for Wesnoth" -configuration Debug
BUILD_RET=$?