Sha256: 2f517e65ec1d90f23f1afe2a35c0d2e1b5a137e0a5297b5a81124c8057ea8239

Contents?: true

Size: 1.47 KB

Versions: 11

Compression:

Stored size: 1.47 KB

Contents

require 'fileutils'

USE_STLPORT = true


def build_extension(name, arch)
  objects = []
  mkdir_p $tempdir unless File.exists? $tempdir

  mkdir_p $targetdir unless File.exist? $targetdir

  if ENV['RHO_PLATFORM'] == 'wm'
    args = []
    args << "/M4"
    args << name + ".sln"
    args << "\"Release|#{$sdk}\""
    cmdline = "\"" + $vcbuild + "\"" + ' ' + args.join(' ')
    puts cmdline
    puts `#{cmdline}`
    fail "[#{cmdline}]" unless $? == 0

    cp_r File.join($tempdir, "Release", name + ".lib"), $targetdir

  elsif ENV['RHO_PLATFORM'] == 'win32'
    args = []
    args << "/M4"
    args << name + ".sln"
    args << "\"Debug|Win32\""
    cmdline = "\"" + $vcbuild + "\"" + ' ' + args.join(' ')
    puts cmdline
    puts `#{cmdline}`
    fail "[#{cmdline}]" unless $? == 0

    cp_r File.join($tempdir, "Debug", name + ".lib"), $targetdir
  end

    cp_r File.join($tempdir, "Release", name + ".lib"), $targetdir
end

namespace "build" do
  task :config do
    $targetdir = ENV['TARGET_TEMP_DIR']
    raise "TARGET_TEMP_DIR is not set" if $targetdir.nil?
    $tempdir = ENV['TEMP_FILES_DIR']
    raise "TEMP_FILES_DIR is not set" if $tempdir.nil?
    $rootdir = ENV['RHO_ROOT']
    raise "RHO_ROOT is not set" if $rootdir.nil?

      $vcbuild = ENV['VCBUILD']
      raise "VCBUILD is not set" if $vcbuild.nil?
      $sdk = ENV['SDK']
      raise "SDK is not set" if $sdk.nil?

  end

  task :all => :config do

    build_extension('audioCapture', $arch)
  end
end

task :default => "build:all"

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
rhodes-5.5.18 lib/extensions/audiocapture/ext/audiocapture/platform/wm/Rakefile
rhodes-5.5.17 lib/extensions/audiocapture/ext/audiocapture/platform/wm/Rakefile
rhodes-5.5.15 lib/extensions/audiocapture/ext/audiocapture/platform/wm/Rakefile
rhodes-5.5.0.22 lib/extensions/audiocapture/ext/audiocapture/platform/wm/Rakefile
rhodes-5.5.2 lib/extensions/audiocapture/ext/audiocapture/platform/wm/Rakefile
rhodes-5.5.0.7 lib/extensions/audiocapture/ext/audiocapture/platform/wm/Rakefile
rhodes-5.5.0.3 lib/extensions/audiocapture/ext/audiocapture/platform/wm/Rakefile
rhodes-5.5.0 lib/extensions/audiocapture/ext/audiocapture/platform/wm/Rakefile
tauplatform-1.0.3 lib/extensions/audiocapture/ext/audiocapture/platform/wm/Rakefile
tauplatform-1.0.2 lib/extensions/audiocapture/ext/audiocapture/platform/wm/Rakefile
tauplatform-1.0.1 lib/extensions/audiocapture/ext/audiocapture/platform/wm/Rakefile