Sha256: 887221cb60832551bbbc11c1a915d1a053a116bd5675d3946aa2fd850bff0bb6

Contents?: true

Size: 871 Bytes

Versions: 5

Compression:

Stored size: 871 Bytes

Contents

begin
  require 'rake'
rescue LoadError
  require 'rubygems'
  gem 'rake', '~> 0.8.3.1'
  require 'rake'
end

require 'pathname'

BASE_PATH = Pathname.new(__FILE__).dirname
LIB_PATH = BASE_PATH + 'lib'
PKG_PATH = BASE_PATH + 'pkg'
DOC_PATH = BASE_PATH + 'rdoc'
P2_PATH = BASE_PATH + 'p2'

$LOAD_PATH.unshift LIB_PATH.to_s
require 'version'

NAME = 'p2ruby'
CLASS_NAME = P2

# Load rakefile tasks
Dir['tasks/*.rake'].sort.each { |file| load file }

# Project-specific tasks

namespace :ole do
  desc "Register P2ClientGate.dll COM/OLE objects with Windows"
  task :register do
    cd P2_PATH
    system 'regsvr32 P2ClientGate.dll'
    cd BASE_PATH
  end

  desc "Generate OLE class stubs from typelib"
  task :generate do
    puts "Generate P2 OLE classes"
    filename = Time.now.strftime "ole%Y%m%d-%H%M%S"
    system "ruby bin/olegen.rb > lib/#{filename}.rb"
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
p2ruby-0.1.5 Rakefile
p2ruby-0.1.4 Rakefile
p2ruby-0.1.2 Rakefile
p2ruby-0.1.1 Rakefile
p2ruby-0.1.0 Rakefile