Skip to content

Commit

Permalink
Update file copying script to adapt SPM support
Browse files Browse the repository at this point in the history
  • Loading branch information
onevcat committed Aug 30, 2019
1 parent 0781bd1 commit a35a86e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
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.

2 changes: 1 addition & 1 deletion APNGKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
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
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 a35a86e

Please sign in to comment.