Skip to content

Commit

Permalink
ditch GLVideo in favor of latest Video
Browse files Browse the repository at this point in the history
  • Loading branch information
monkstone committed Dec 2, 2019
1 parent 2873e44 commit dc8c432
Showing 1 changed file with 11 additions and 32 deletions.
43 changes: 11 additions & 32 deletions vendors/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ require 'rake/clean'
WARNING = 'WARNING: wget download failed you could do a manual download'
SOUND = 'sound.zip'
SOUND_VERSION = 'v1.3.2'
GLVIDEO = 'processing-glvideo.zip'
VIDEO = 'video-2.zip'
VIDEO_VERSION = '2'
VIDEO = 'video-2.0-beta4.zip'
VIDEO_VERSION = 'r6-v2.0-beta4'
EXAMPLES = '0.5.1'
HOME_DIR = ENV['HOME']
LIBRARY = File.join(HOME_DIR, '.picrate', 'libraries')
CLOBBER.include(EXAMPLES, SOUND, GLVIDEO, VIDEO)
CLOBBER.include(EXAMPLES, SOUND, VIDEO)

def dependency
system 'which wget'
Expand Down Expand Up @@ -40,29 +39,19 @@ task install_sound: %i[init_dir download_sound copy_sound clobber]
desc 'download and copy video library to ~/.picrate'
task install_video: %i[init_dir download_video copy_video clobber]

desc 'download and copy glvideo library to ~/.picrate'
task install_glvideo: %i[init_dir download_glvideo copy_glvideo clobber]

desc 'download, and copy picrate examples'
task download_samples: ["#{EXAMPLES}.tar.gz"]

desc 'download sound library'
task :download_sound do
wget_base = 'wget https://github.com/processing/processing-sound'
wget_base = 'wget -P https://github.com/processing/processing-sound'
wget_string = [wget_base, 'releases/download/latest', SOUND].join('/')
system wget_string
end

desc 'download glvideo library'
task :download_glvideo do
wget_base = 'wget https://github.com/gohai/processing-glvideo'
wget_string = [wget_base, 'releases/download/latest', GLVIDEO].join('/')
system wget_string
end

desc 'download video library'
task :download_video do
wget_base = 'wget https://github.com/processing/processing-video'
wget_base = 'wget -P /tmp https://github.com/processing/processing-video'
wget_string = [wget_base, 'releases/download', VIDEO_VERSION, VIDEO].join('/')
system wget_string
end
Expand Down Expand Up @@ -94,25 +83,15 @@ end

desc 'copy sound library'
task copy_sound: SOUND do
system "unzip #{SOUND}"
system "unzip -d /tmp /tmp/#{SOUND}"
FileUtils.rm_r "#{LIBRARY}/sound" if File.exist? "#{LIBRARY}/sound"
FileUtils.cp_r 'sound', LIBRARY
FileUtils.rm_r 'sound'
FileUtils.cp_r '/tmp/sound', LIBRARY
end

desc 'copy video library'
task copy_video: VIDEO do
system "unzip #{VIDEO}"
task copy_video: "/tmp/#{VIDEO}" do
system "unzip -d /tmp /tmp/#{VIDEO}"
FileUtils.rm_r "#{LIBRARY}/video" if File.exist? "#{LIBRARY}/video"
FileUtils.cp_r 'video', LIBRARY
FileUtils.rm_r 'video'
end

desc 'copy glvideo library'
task copy_glvideo: GLVIDEO do
directory "#{LIBRARY}/glvideo"
system "unzip #{GLVIDEO}"
FileUtils.rm_r "#{LIBRARY}/glvideo" if File.exist? "#{LIBRARY}/glvideo"
FileUtils.cp_r 'glvideo', LIBRARY
FileUtils.rm_r 'glvideo'
FileUtils.mkdir_p "#{LIBRARY}/video/library"
FileUtils.mv Dir.glob("/tmp/video/library/*.jar"), "#{LIBRARY}/video/library"
end

0 comments on commit dc8c432

Please sign in to comment.