Drop support for old OS X and update README and Xcode project

This commit is contained in:
Martin Hrubý (hrubymar10) 2020-08-24 15:44:30 +02:00
parent 5e5df83db6
commit 576bd8a419
No known key found for this signature in database
GPG key ID: 3042E73421447651
6 changed files with 76 additions and 85 deletions

View file

@ -1,6 +1,10 @@
## Version 1.15.4+dev
### Language and i18n
* Updated translations: Polish, Russian
### Miscellaneous and bug fixes
* Minimum required version of OS X is now OS X 10.11 .
### Packaging
* macOS package distributed through SourceForge is now a UDIF lzfse-compressed image. The image size may be slightly larger but opening and copying from this image is much faster.
## Version 1.15.4
### Add-ons client

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
#
# Fix_Xcode_Dependencies
# Martin Hrubý (hrubymar10), 2016 - 2018
# Martin Hrubý (hrubymar10), 2016 - 2020
# Victor Sergienko (singalen), 2018
#
@ -9,33 +9,33 @@ starttimestamp=$(date +%s)
###Functions
time_interval_to_string() {
local START=$1
local END=$2
local START=$1
local END=$2
declare -i timestamp
declare -i days
declare -i hours
declare -i minutes
declare -i seconds
timestamp=$END-$START
declare -i timestamp
declare -i days
declare -i hours
declare -i minutes
declare -i seconds
timestamp=$END-$START
days=$timestamp/60/60/24
hours=$((($timestamp-($days*60*60*24))/60/60))
minutes=$((($timestamp-($days*60*60*24)-($hours*60*60))/60))
seconds=$((($timestamp-($days*60*60*24)-($hours*60*60)-($minutes*60))))
if [ $days -eq 0 ]; then
if [ $hours -eq 0 ]; then
if [ $minutes -eq 0 ]; then
echo "==> Operation took $seconds seconds ..."
else
echo "==> Operation took $minutes minutes and $seconds seconds ..."
fi
else
echo "==> Operation took $hours hours $minutes minutes and $seconds seconds ..."
fi
else
echo "==> Operation took $days days $hours hours $minutes minutes and $seconds seconds ..."
fi
days=$timestamp/60/60/24
hours=$((($timestamp-($days*60*60*24))/60/60))
minutes=$((($timestamp-($days*60*60*24)-($hours*60*60))/60))
seconds=$((($timestamp-($days*60*60*24)-($hours*60*60)-($minutes*60))))
if [ $days -eq 0 ]; then
if [ $hours -eq 0 ]; then
if [ $minutes -eq 0 ]; then
echo "==> Operation took $seconds seconds ..."
else
echo "==> Operation took $minutes minutes and $seconds seconds ..."
fi
else
echo "==> Operation took $hours hours $minutes minutes and $seconds seconds ..."
fi
else
echo "==> Operation took $days days $hours hours $minutes minutes and $seconds seconds ..."
fi
}
###/Functions
@ -43,44 +43,39 @@ starttimestamp=`date +%s`
MY_PATH=$(cd `dirname $0` && pwd)
if [ -z "$MY_PATH" ] ; then
# error; for some reason, the path is not accessible
# to the script (e.g. permissions re-evaled after suid)
echo 'Error: Script path is for some reason not accessible' >&2
exit 1 # fail
# error; for some reason, the path is not accessible
# to the script (e.g. permissions re-evaled after suid)
echo 'Error: Script path is for some reason not accessible' >&2
exit 1 # fail
fi
cd "$MY_PATH"
cd "${MY_PATH}"
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
echo 'Error: I am in bad directory! I must be in wesnoth/projectfiles/Xcode !' >&2
exit 1
fi
if ! [ -x "$(command -v git)" ]; then
echo 'Error: Git is not installed. Use for example Homebrew to install git. https://brew.sh/' >&2
exit 1
echo 'Error: Git is not installed. Use for example Homebrew to install git. https://brew.sh/' >&2
exit 1
fi
if ! [ -d temp ]; then
mkdir temp
if ! [ -d "temp" ]; then
mkdir "temp"
fi
cd temp
if ! [ -d MacCompileStuff-1.14 ]; then
git clone -b 1.14 https://github.com/hrubymar10/MacCompileStuff MacCompileStuff-1.14
cd "temp"
if ! [ -d "MacCompileStuff-master" ]; then
git clone -b "master" --depth 1 "https://github.com/hrubymar10/MacCompileStuff" "MacCompileStuff-master"
fi
cd MacCompileStuff-1.14
git pull
cd ..
cd ..
cd "MacCompileStuff-master"
git pull --depth 1
cd "${MY_PATH}"
if ! [ -L "Headers" ]; then
rm -rf Headers
ln -s temp/MacCompileStuff-1.14/Headers
fi
rm -rf "Headers"
ln -s "temp/MacCompileStuff-master/Headers"
if ! [ -L "lib" ]; then
rm -rf lib
ln -s temp/MacCompileStuff-1.14/lib
fi
rm -rf "lib"
ln -s "temp/MacCompileStuff-master/lib"
echo "==> DONE ..."
echo

View file

@ -5,7 +5,7 @@
<key>ATSApplicationFontsPath</key>
<string>fonts/</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<string>en_US</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>

View file

@ -2,8 +2,8 @@
This README describes the way to create the wesnoth release packages for macOS.
### Requirements for building Wesnoth
* Xcode 5.1.1 or higher...
* Mac OS X 10.8.5 or higher...
* Xcode 8.2.1 or higher...
* Mac OS X 10.11.6 or higher...
* `git`
* `scons` and `gettext` (if you want to compile translations)
@ -26,7 +26,7 @@ Builds the lua library for Wesnoth.
## Configurations
* **Release**:
Builds for maximum (runtime) speed and compatibility; it builds for 64-bit, with the latest SDK, but targets 10.8. You do not however need 10.8 SDK to build it. This is what's used for official releases.
Builds for maximum (runtime) speed and compatibility; it builds for 64-bit, with the latest SDK, but targets 10.11. You do not however need 10.11 SDK to build it. This is what's used for official releases.
* **Debug**:
Builds for maximum compiling speed, and uses the current OS as the SDK. If you just want to compile for testing things yourself, this is the way to go.
@ -72,7 +72,7 @@ When compiling Wesnoth for an official release, the following steps should be ta
* Now copy dmg template from `/PATH/TO/PROJECT/packaging/macOS/Wesnoth_dmg_packaging_template.dmg`
* Convert this template to the R/W image using `hdiutil convert /PATH/TO/TEMPLATE.dmg -format UDRW -o /PATH/TO/NEW/RW_IMAGE.dmg` and mount it.
* Copy new wesnoth package using `cp -R /PATH/TO/THE/EXPORTED/PACKAGE.app "/Volumes/The Battle for Wesnoth/The Battle for Wesnoth.app"`.
* Unmount R/W image and convert it to final ro image using `hdiutil convert /PATH/TO/RW_IMAGE.dmg -format UDBZ -o /PATH/TO/NEW/IMAGE.dmg` command.
* Unmount R/W image and convert it to final ro image using `hdiutil convert /PATH/TO/RW_IMAGE.dmg -format ULFO -o /PATH/TO/NEW/IMAGE.dmg` command.
* Rename disk image to match new release version. Example: `Wesnoth_1.15.2.dmg`
* Sign newly created ro image using `codesign -s "Developer ID Application: Wesnoth, Inc (N5CYW96P9T)" /PATH/TO/NEW/IMAGE.dmg`. (You must have Wesnoth's signing certificate.)
* Verify that you signed `.dmg` properly using `spctl -a -t open --context context:primary-signature -v /PATH/TO/NEW/IMAGE.dmg`.

View file

@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 48;
objects = {
/* Begin PBXBuildFile section */
@ -4847,9 +4847,10 @@
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0900;
LastUpgradeCheck = 1200;
TargetAttributes = {
8D1107260486CEB800E47090 = {
ProvisioningStyle = Manual;
SystemCapabilities = {
com.apple.HardenedRuntime = {
enabled = 1;
@ -4859,14 +4860,11 @@
};
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "The Battle for Wesnoth" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
compatibilityVersion = "Xcode 8.0";
developmentRegion = en;
hasScannedForEncodings = 1;
knownRegions = (
English,
Japanese,
French,
German,
en,
);
mainGroup = 29B97314FDCFA39411CA2CEA /* Wesnoth */;
projectDirPath = "";
@ -6210,9 +6208,9 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"LOCALEDIR=\\\"translations\\\"",
@ -6231,6 +6229,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"LOCALEDIR=\\\"translations\\\"",
@ -6249,9 +6248,9 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"LOCALEDIR=\\\"translations\\\"",
"LUA_USE_MACOSX=1",
@ -6276,6 +6275,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"LOCALEDIR=\\\"translations\\\"",
@ -6301,9 +6301,9 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"LOCALEDIR=\\\"translations\\\"",
@ -6337,11 +6337,13 @@
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_ENTITLEMENTS = Resources/Wesnoth.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"LOCALEDIR=\\\"translations\\\"",
@ -6370,6 +6372,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = org.wesnoth.Wesnoth;
PRODUCT_NAME = "The Battle for Wesnoth";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = NO;
WRAPPER_EXTENSION = app;
};
@ -6381,6 +6384,7 @@
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_ENTITLEMENTS = Resources/Wesnoth.entitlements;
CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = N5CYW96P9T;
ENABLE_HARDENED_RUNTIME = YES;
@ -6412,6 +6416,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = org.wesnoth.Wesnoth;
PRODUCT_NAME = "The Battle for Wesnoth";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = NO;
WRAPPER_EXTENSION = app;
};
@ -6476,7 +6481,7 @@
);
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/lib";
MACOSX_DEPLOYMENT_TARGET = 10.8;
MACOSX_DEPLOYMENT_TARGET = 10.11;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "-Wall";
OTHER_LDFLAGS = (
@ -6521,7 +6526,7 @@
);
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/lib";
MACOSX_DEPLOYMENT_TARGET = 10.8;
MACOSX_DEPLOYMENT_TARGET = 10.11;
OTHER_LDFLAGS = (
"-lz",
"-lbz2",

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0460"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@ -29,17 +29,6 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B597C4970FACD3CD00CE81F5"
BuildableName = "unit_tests"
BlueprintName = "unit_tests"
ReferencedContainer = "container:The Battle for Wesnoth.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@ -79,8 +68,6 @@
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"