Sha256: ef0a7686f87d9e1ec3b7f4a1312ed0da0e681e37d57e979964b37ffa17f94f55

Contents?: true

Size: 1.7 KB

Versions: 14

Compression:

Stored size: 1.7 KB

Contents

require 'fileutils'

USE_STLPORT = true

puts "Mediaplayer extension !"

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?

    $xcodebuild = ENV['XCODEBUILD']	
    raise "XCODEBUILD is not set" if $xcodebuild.nil?
 
    $configuration = ENV['CONFIGURATION']	
    raise "CONFIGURATION is not set" if $configuration.nil?

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

    $bindir = ENV['PLATFORM_DEVELOPER_BIN_DIR']
    raise "PLATFORM_DEVELOPER_BIN_DIR is not set" if $bindir.nil?
    
    $sdkroot = ENV['SDKROOT']
    raise "SDKROOT is not set" if $sdkroot.nil?

    $arch = ENV['ARCHS']
    raise "ARCHS is not set" if $arch.nil?
    
    $gccbin = $bindir + '/gcc-4.2'
    $arbin = $bindir + '/ar'

  end

  task :all => :config do

    iphone_path = '.'

    simulator = $sdk =~ /iphonesimulator/

    if $configuration == 'Distribution'
       $configuration = 'Release'
    end

    result_lib = iphone_path + '/build/' + $configuration + '-' + ( simulator ? "iphonesimulator" : "iphoneos") + '/libMediaplayer.a'
    target_lib = $targetdir + '/libMediaplayer.a'

    rm_rf 'build'
    rm_rf target_lib

    args = ['build', '-target', 'Mediaplayer', '-configuration', $configuration, '-sdk', $sdk]

    require File.join(ENV['RHO_ROOT'], 'platform','iphone','rbuild','iphonecommon')

    ret = IPhoneBuild.run_and_trace($xcodebuild,args)

    # copy result to $targetdir
    cp result_lib,target_lib

  end


end

task :default => "build:all"

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
rhodes-7.1.17 lib/commonAPI/mediaplayer/ext/platform/iphone/Rakefile
rhodes-6.2.0 lib/commonAPI/mediaplayer/ext/platform/iphone/Rakefile
rhodes-6.0.11 lib/commonAPI/mediaplayer/ext/platform/iphone/Rakefile
rhodes-5.5.18 lib/commonAPI/mediaplayer/ext/platform/iphone/Rakefile
rhodes-5.5.17 lib/commonAPI/mediaplayer/ext/platform/iphone/Rakefile
rhodes-5.5.15 lib/commonAPI/mediaplayer/ext/platform/iphone/Rakefile
rhodes-5.5.0.22 lib/commonAPI/mediaplayer/ext/platform/iphone/Rakefile
rhodes-5.5.2 lib/commonAPI/mediaplayer/ext/platform/iphone/Rakefile
rhodes-5.5.0.7 lib/commonAPI/mediaplayer/ext/platform/iphone/Rakefile
rhodes-5.5.0.3 lib/commonAPI/mediaplayer/ext/platform/iphone/Rakefile
rhodes-5.5.0 lib/commonAPI/mediaplayer/ext/platform/iphone/Rakefile
tauplatform-1.0.3 lib/commonAPI/mediaplayer/ext/platform/iphone/Rakefile
tauplatform-1.0.2 lib/commonAPI/mediaplayer/ext/platform/iphone/Rakefile
tauplatform-1.0.1 lib/commonAPI/mediaplayer/ext/platform/iphone/Rakefile