diff --git a/.jazzy.yaml b/.jazzy.yaml
index 21d85342..0b6549cb 100644
--- a/.jazzy.yaml
+++ b/.jazzy.yaml
@@ -3,11 +3,11 @@ sourcekitten_sourcefile: docs.json
clean: true
author: Timofey Solomko
module: SWCompression
-module_version: 4.5.5
+module_version: 4.5.6
copyright: '© 2020 Timofey Solomko'
readme: README.md
github_url: https://github.com/tsolomko/SWCompression
-github_file_prefix: https://github.com/tsolomko/SWCompression/tree/4.5.5
+github_file_prefix: https://github.com/tsolomko/SWCompression/tree/4.5.6
theme: fullwidth
custom_categories:
diff --git a/.travis.yml b/.travis.yml
index 35832465..e9f7d142 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -47,6 +47,27 @@ jobs:
- ./utils.py prepare-workspace macos
script:
- ./utils.py ci script-macos
+ - stage: test
+ language: swift
+ os: osx
+ osx_image: xcode12 # Swift 5.3
+ env:
+ - HOMEBREW_NO_INSTALL_CLEANUP=1
+ before_install:
+ - brew update
+ install:
+ - ./utils.py ci install-macos
+ before_script:
+ # - ./utils.py prepare-workspace macos
+ # TODO: Remove lines below when Carthage gets a workaround for problems with Xcode 12
+ - xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
+ - trap 'rm -f "$xcconfig"' INT TERM HUP EXIT
+ - echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
+ - echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig
+ - export XCODE_XCCONFIG_FILE="$xcconfig"
+ - carthage bootstrap
+ script:
+ - ./utils.py ci script-macos
- stage: test
language: generic
os: linux
@@ -77,6 +98,16 @@ jobs:
- ./utils.py ci install-linux
script:
- ./utils.py ci script-linux
+ - stage: test
+ language: generic
+ os: linux
+ dist: xenial
+ env:
+ - SWIFT_VERSION=5.3
+ install:
+ - eval "$(curl -sL https://swiftenv.fuller.li/install.sh)"
+ script:
+ - ./utils.py ci script-linux
- stage: deploy
if: tag IS present
language: generic
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 176170f2..fae75d4a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog
+## 4.5.6
+
+- Fixed a compiling issue on Linux with Swift 5.3.
+
## 4.5.5
- Fixed a crash which was sometimes happening when encountering non well-formed Extended Timestamp in ZIP files.
diff --git a/SWCompression.podspec b/SWCompression.podspec
index 04fa93a9..8d3a1fe9 100644
--- a/SWCompression.podspec
+++ b/SWCompression.podspec
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "SWCompression"
- s.version = "4.5.5"
+ s.version = "4.5.6"
s.summary = "A framework with functions for working with compression, archives and containers."
s.description = "A framework with (de)compression algorithms and functions for processing various archives and containers."
diff --git a/SWCompression.xcodeproj/SWCompression.plist b/SWCompression.xcodeproj/SWCompression.plist
index d7de5a11..518b2856 100644
--- a/SWCompression.xcodeproj/SWCompression.plist
+++ b/SWCompression.xcodeproj/SWCompression.plist
@@ -15,9 +15,9 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 4.5.5
+ 4.5.6
CFBundleVersion
- 72
+ 73
NSHumanReadableCopyright
Copyright © 2020 Timofey Solomko. All rights reserved.
diff --git a/SWCompression.xcodeproj/TestSWCompression.plist b/SWCompression.xcodeproj/TestSWCompression.plist
index 3b2d716f..46874253 100644
--- a/SWCompression.xcodeproj/TestSWCompression.plist
+++ b/SWCompression.xcodeproj/TestSWCompression.plist
@@ -15,8 +15,8 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- 4.5.5
+ 4.5.6
CFBundleVersion
- 72
+ 73
diff --git a/SWCompression.xcodeproj/project.pbxproj b/SWCompression.xcodeproj/project.pbxproj
index 409272b6..83eb2cfa 100644
--- a/SWCompression.xcodeproj/project.pbxproj
+++ b/SWCompression.xcodeproj/project.pbxproj
@@ -1240,7 +1240,7 @@
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- CURRENT_PROJECT_VERSION = 72;
+ CURRENT_PROJECT_VERSION = 73;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@@ -1299,7 +1299,7 @@
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- CURRENT_PROJECT_VERSION = 72;
+ CURRENT_PROJECT_VERSION = 73;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
"FRAMEWORK_SEARCH_PATHS[sdk=appletvos*]" = "\"$(SRCROOT)/Carthage/Build/tvOS\"";
@@ -1339,7 +1339,7 @@
APPLICATION_EXTENSION_API_ONLY = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 72;
+ DYLIB_CURRENT_VERSION = 73;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = SWCompression.xcodeproj/SWCompression.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
@@ -1366,7 +1366,7 @@
APPLICATION_EXTENSION_API_ONLY = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 72;
+ DYLIB_CURRENT_VERSION = 73;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = SWCompression.xcodeproj/SWCompression.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
diff --git a/Sources/ZIP/ByteReader+Zip.swift b/Sources/ZIP/ByteReader+Zip.swift
index 0087a54c..75bf73bc 100644
--- a/Sources/ZIP/ByteReader+Zip.swift
+++ b/Sources/ZIP/ByteReader+Zip.swift
@@ -33,7 +33,11 @@ extension LittleEndianByteReader {
fileprivate extension String {
#if os(Linux)
- static let cp437Encoding: CFStringEncoding = UInt32(truncatingIfNeeded: UInt(kCFStringEncodingDOSLatinUS))
+ #if compiler(>=5.3)
+ static let cp437Encoding: CFStringEncoding = CFStringEncoding(CFStringEncodings.dosLatinUS.rawValue)
+ #else
+ static let cp437Encoding: CFStringEncoding = UInt32(truncatingIfNeeded: UInt(kCFStringEncodingDOSLatinUS))
+ #endif
static let cp437Available: Bool = CFStringIsEncodingAvailable(cp437Encoding)
#else
static let cp437Encoding = CFStringEncoding(CFStringEncodings.dosLatinUS.rawValue)
diff --git a/Sources/swcomp/main.swift b/Sources/swcomp/main.swift
index 9b8654a5..e90ac2a3 100644
--- a/Sources/swcomp/main.swift
+++ b/Sources/swcomp/main.swift
@@ -7,7 +7,7 @@ import Foundation
import SWCompression
import SwiftCLI
-let cli = CLI(name: "swcomp", version: "4.5.5",
+let cli = CLI(name: "swcomp", version: "4.5.6",
description: """
swcomp - a small command-line client for SWCompression framework.
Serves as an example of SWCompression usage.