Skip to content

Commit

Permalink
Merge pull request #93 from onevcat/ChristopherRogers-master
Browse files Browse the repository at this point in the history
Christopher rogers master
  • Loading branch information
onevcat authored Aug 30, 2019
2 parents 2e693ee + a35a86e commit f8ca05f
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Temporary Items
## Build generated
build/
DerivedData
.build/

## Various settings
*.pbxuser
Expand Down
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions APNGKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Pod::Spec.new do |s|
s.source = { :git => "https://github.com/onevcat/APNGKit.git", :tag => s.version }

s.source_files = "APNGKit/*.{h,swift}", "APNGKit/libpng-apng/*.{h,c,S}"
s.public_header_files = ["APNGKit/APNGKit.h", "APNGKit/libpng-apng/png.h", "APNGKit/libpng-apng/pnglibconf.h", "APNGKit/libpng-apng/pngconf.h"]
s.public_header_files = ["APNGKit/APNGKit.h", "APNGKit/libpng-apng/include/png.h", "APNGKit/libpng-apng/include/pnglibconf.h", "APNGKit/libpng-apng/include/pngconf.h"]
s.library = "z"
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.2' }
s.swift_versions = ["4.2"]
end
8 changes: 4 additions & 4 deletions APNGKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,13 @@
4B2132131B8EFA7900A39502 /* XCTAssertSwiftError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XCTAssertSwiftError.swift; sourceTree = "<group>"; };
4B5DF6831B99718C00C4D421 /* demo.png */ = {isa = PBXFileReference; explicitFileType = compiled; name = demo.png; path = images/demo.png; sourceTree = SOURCE_ROOT; };
4B6B68E01B8EB33100C4868A /* png.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = png.c; sourceTree = "<group>"; };
4B6B68E11B8EB33100C4868A /* png.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = png.h; sourceTree = "<group>"; };
4B6B68E21B8EB33100C4868A /* pngconf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pngconf.h; sourceTree = "<group>"; };
4B6B68E11B8EB33100C4868A /* png.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = png.h; path = include/png.h; sourceTree = "<group>"; };
4B6B68E21B8EB33100C4868A /* pngconf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pngconf.h; path = include/pngconf.h; sourceTree = "<group>"; };
4B6B68E31B8EB33100C4868A /* pngdebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pngdebug.h; sourceTree = "<group>"; };
4B6B68E41B8EB33100C4868A /* pngerror.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pngerror.c; sourceTree = "<group>"; };
4B6B68E51B8EB33100C4868A /* pngget.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pngget.c; sourceTree = "<group>"; };
4B6B68E61B8EB33100C4868A /* pnginfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pnginfo.h; sourceTree = "<group>"; };
4B6B68E71B8EB33100C4868A /* pnglibconf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pnglibconf.h; sourceTree = "<group>"; };
4B6B68E71B8EB33100C4868A /* pnglibconf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pnglibconf.h; path = include/pnglibconf.h; sourceTree = "<group>"; };
4B6B68E81B8EB33100C4868A /* pngmem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pngmem.c; sourceTree = "<group>"; };
4B6B68E91B8EB33100C4868A /* pngpread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pngpread.c; sourceTree = "<group>"; };
4B6B68EA1B8EB33100C4868A /* pngpriv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pngpriv.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -692,7 +692,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "ruby ./sync-libpng-apng";
shellScript = "ruby ./sync-libpng-apng\n";
};
/* End PBXShellScriptBuildPhase section */

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
29 changes: 29 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// swift-tools-version:5.1
import PackageDescription

let package = Package(
name: "APNGKit",
platforms: [.macOS(.v10_10), .iOS(.v8)],
products: [
.library(
name: "APNGKit",
targets: ["APNGKit"]),
.library(
name: "Clibpng",
targets: ["Clibpng"]),
],
targets: [
.target(
name: "APNGKit",
dependencies: [
"Clibpng",
],
path: "APNGKit",
exclude: ["libpng-apng"]
),
.target(
name: "Clibpng",
path: "APNGKit/libpng-apng"),
],
swiftLanguageVersions: [.v4_2]
)
12 changes: 9 additions & 3 deletions sync-libpng-apng
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ require 'fileutils'

exit unless File.directory?("./libpng-apng/") && Dir.entries('./libpng-apng/').include?("png.c")

files = ["png.c", "png.h", "pngconf.h", "pngdebug.h", "pngerror.c", "pngget.c", "pnginfo.h", "pngmem.c", "pngpread.c", "pngpriv.h", "pngread.c", "pngrio.c", "pngrtran.c", "pngrutil.c", "pngset.c", "pngstruct.h", "pngtrans.c", "pngwio.c", "pngwrite.c", "pngwtran.c", "pngwutil.c", "arm/filter_neon_intrinsics.c", "arm/filter_neon.S", "arm/arm_init.c"]
files = ["png.c", "pngdebug.h", "pngerror.c", "pngget.c", "pnginfo.h", "pngmem.c", "pngpread.c", "pngpriv.h", "pngread.c", "pngrio.c", "pngrtran.c", "pngrutil.c", "pngset.c", "pngstruct.h", "pngtrans.c", "pngwio.c", "pngwrite.c", "pngwtran.c", "pngwutil.c", "arm/filter_neon_intrinsics.c", "arm/filter_neon.S", "arm/arm_init.c"]
files.map! { |file| "./libpng-apng/" + file}

files.map! {|file| "./libpng-apng/" + file}
include_files = ["pngconf.h", "png.h"]
include_files.map! { |file| "./libpng-apng/" + file}

FileUtils.mkdir_p './APNGKit/libpng-apng/include'

FileUtils.cp files, './APNGKit/libpng-apng'
FileUtils.cp './libpng-apng/scripts/pnglibconf.h.prebuilt', './APNGKit/libpng-apng/pnglibconf.h'
FileUtils.cp include_files, './APNGKit/libpng-apng/include'

FileUtils.cp './libpng-apng/scripts/pnglibconf.h.prebuilt', './APNGKit/libpng-apng/include/pnglibconf.h'

0 comments on commit f8ca05f

Please sign in to comment.