GPUImage2 icon indicating copy to clipboard operation
GPUImage2 copied to clipboard

Cocoapods version

Open souzainf3 opened this issue 8 years ago • 18 comments

Its generate a version for CocoaPods?

souzainf3 avatar Apr 17 '16 01:04 souzainf3

Not sure what you're asking, but I haven't done anything to support Cocoapods with this. I probably won't tag it with a version until everything is stable and at feature parity with the old GPUImage.

BradLarson avatar Apr 18 '16 03:04 BradLarson

@BradLarson Pretty sure he's just requesting that you create a cocoapod for this.

mitchellporter avatar Apr 18 '16 03:04 mitchellporter

Sorry for not having asked in English, I swear I had done it, just realized my mistake now. That's right @mitchellporter. But also understand the position of the @BradLarson. Thank you, grateful for positioning.

souzainf3 avatar Apr 18 '16 03:04 souzainf3

You can use local podspec this way:

  Pod::Spec.new do |s|
    s.name     = 'GPUImage2'
    s.version  = '0.1.0'
    s.license  = 'BSD'
    s.summary  = 'An open source iOS framework for GPU-based image and video processing.'
    s.homepage = 'https://github.com/BradLarson/GPUImage2'
    s.author   = { 'Brad Larson' => '[email protected]' }
    s.source   = { :git => 'https://github.com/BradLarson/GPUImage2.git', :branch => "master" }

    s.source_files = 'framework/Source/**/*.{swift}'
    s.resources = 'framework/Source/Operations/Shaders/*.{fsh}'
    s.requires_arc = true
    s.xcconfig = { 'CLANG_MODULES_AUTOLINK' => 'YES',
                          'OTHER_SWIFT_FLAGS' => "$(inherited) -DGLES"}

    s.ios.deployment_target = '8.0'
    s.ios.exclude_files = 'framework/Source/Mac', 'framework/Source/Linux', 'framework/Source/Operations/Shaders/ConvertedShaders_GL.swift'
    s.frameworks   = ['OpenGLES', 'CoreMedia', 'QuartzCore', 'AVFoundation']


  end

And in Podfile

 pod 'GPUImage2', :podspec => './GPUImage2.podspec'

m1entus avatar Jun 25 '16 13:06 m1entus

@m1entus where do you add this podspec?

waltermvp avatar Oct 06 '16 15:10 waltermvp

In local directory with project

m1entus avatar Oct 10 '16 19:10 m1entus

Thanks for the tips!

brizzly avatar Nov 24 '16 17:11 brizzly

I published the GPUImage2 podspec from above as EVGPUImage2 (so that GPUImage2 remains available)

You can just add pod "EVGPUImage2" in your pod file

I'm currently using this in https://github.com/evermeer/PassportScanner

evermeer avatar Jan 04 '17 00:01 evermeer

@evermeer when I use your cocoapod I get an apple-match-o-link error saying it cannot find the EVGPUImage2 framework.

schetty avatar Apr 19 '17 23:04 schetty

@evermeer Are there any other steps other than adding EVGPUImage2 to the podfile and then doing import GPUImage in the code? I'm doing that, but getting "no such module 'GPUImage'" when trying to compile.

SuperTango avatar Aug 21 '17 07:08 SuperTango

It should be enough. Is the library added to your pods project? You could have a look at the. HTTP://github.com/evermeer/passportscanner demo app to see how it should worked

Op ma 21 aug. 2017 om 09:22 schreef Alex Tang [email protected]

@evermeer https://github.com/evermeer Are there any other steps other than adding EVGPUImage2 to the podfile and then doing import GPUImage in the code? I'm doing that, but getting "no such module 'GPUImage'" when trying to compile.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/BradLarson/GPUImage2/issues/1#issuecomment-323666162, or mute the thread https://github.com/notifications/unsubscribe-auth/AAH_Er6xs46_04WCb8aAvkfF0bf9pvibks5saTARgaJpZM4IJEEx .

evermeer avatar Aug 21 '17 08:08 evermeer

@evermeer I looked but can 't find anything ATM. I just tried with a brand new repo with nothing in it, and it also failed.

https://github.com/SuperTango/EVGPUTest

Any other hints?

SuperTango avatar Aug 21 '17 23:08 SuperTango

Sorry for the late response... I was on a holiday. Thanks for the demo project. That helped.

You should use import EVGPUImage2 instead of import GPUImage

evermeer avatar Aug 28 '17 05:08 evermeer

Great. Thanks!

SuperTango avatar Aug 28 '17 16:08 SuperTango

For Swift 4, here's an update to @m1entus's local podspec:

# based on https://github.com/BradLarson/GPUImage2/issues/1#issuecomment-228542480

Pod::Spec.new do |s|
  s.name     = 'GPUImage2'
  s.version  = '0.1.0'
  s.license  = 'BSD'
  s.summary  = 'An open source iOS framework for GPU-based image and video processing.'
  s.homepage = 'https://github.com/BradLarson/GPUImage2'
  s.author   = { 'Brad Larson' => '[email protected]' }

  # This commit on that fork of GPUImage should contain just upgrades needed for Swift 4 compatibility. See https://github.com/BradLarson/GPUImage2/pull/212
  # Replace with https://github.com/BradLarson/GPUImage2.git when merged
  # into BradLarson's repository.
  s.source   = { :git => 'https://github.com/andrewcampoli/GPUImage2', :commit => '148c84e6b4194daeba122e77449f5ee9c8188161' }

  s.source_files = 'framework/Source/**/*.{swift}'
  s.resources = 'framework/Source/Operations/Shaders/*.{fsh}'
  s.requires_arc = true
  s.xcconfig = { 'CLANG_MODULES_AUTOLINK' => 'YES', 'OTHER_SWIFT_FLAGS' => "$(inherited) -DGLES"}

  s.ios.deployment_target = '8.0'
  s.ios.exclude_files = 'framework/Source/Mac', 'framework/Source/Linux', 'framework/Source/Operations/Shaders/ConvertedShaders_GL.swift'
  s.frameworks   = ['OpenGLES', 'CoreMedia', 'QuartzCore', 'AVFoundation']

end

Usage

  1. Save this as GPUImage2.podspec in the directory where your Podfile is.
  2. Add the following line to your Podfile: pod 'GPUImage2', :podspec => './GPUImage2.podspec'
  3. run pod install (you may have to close and re-open your Xcode workspace.)
  4. you can now import GPUImage2 😀

arielelkin avatar Feb 21 '18 18:02 arielelkin

Save this as GPUImage2.podspec in the directory where your Podfile is. Add the following line to your Podfile: pod 'GPUImage2', :podspec => './GPUImage2.podspec' run pod install (you may have to close and re-open your Xcode workspace.) you can now import GPUImage 😀

Thank you for your local podspec, but It specifies as 'GPUImage2' in PodFile, so that

'import GPUImage' cannot be resolved it should be 'import GPUImage2'

alkanyunus avatar Feb 23 '18 11:02 alkanyunus

thanks @saxahan, I modified my code above accordingly.

arielelkin avatar Feb 27 '18 16:02 arielelkin

For anyone who wants to run on macOS, here is the podspec file

# based on https://github.com/BradLarson/GPUImage2/issues/1

Pod::Spec.new do |s|
  s.name     = 'EVGPUImage2'
  s.version  = '0.2.0'
  s.license  = 'BSD'
  s.summary  = 'An open source iOS framework for GPU-based image and video processing.'
  s.homepage = 'https://github.com/BradLarson/GPUImage2'
  s.author   = { 'Brad Larson' => '[email protected]' }
  s.swift_version = '4.0'

  s.source   = { :git => 'https://github.com/BradLarson/GPUImage2.git', :branch => "master" }
  s.source_files = 'framework/Source/**/*.{swift}'
  s.resources = 'framework/Source/Operations/Shaders/*.{fsh}'
  s.requires_arc = true
  s.xcconfig = { 'CLANG_MODULES_AUTOLINK' => 'YES', 'OTHER_SWIFT_FLAGS' => "$(inherited) -DGLES"}

  s.ios.deployment_target = '8.0'
  s.osx.deployment_target = '10.9'
  
  s.ios.exclude_files = 'framework/Source/Mac', 'framework/Source/Linux', 'framework/Source/Operations/Shaders/ConvertedShaders_GL.swift'
  s.osx.exclude_files = 'framework/Source/iOS', 'framework/Source/Linux'
  s.ios.frameworks   = ['OpenGLES', 'CoreMedia', 'QuartzCore', 'AVFoundation']
  s.osx.frameworks   = ['OpenGL', 'CoreMedia', 'QuartzCore', 'AVFoundation']
end

jifang avatar Mar 16 '21 01:03 jifang