Permalink
Browse files

Merge pull request #185 from ashbb/develop

Patches for Windows
  • Loading branch information...
2 parents 53a1ab9 + 938e470 commit ac5122bb175494c4756888950310e6ae11c06328 @wasnotrice wasnotrice committed Mar 26, 2012
View
@@ -1,10 +1,17 @@
+$:.unshift '.'
+
+require 'rubygems'
require 'rake'
require 'rake/clean'
-# require_relative 'platform/skel'
+if RUBY_VERSION != '1.8.7'
+require_relative 'platform/skel'
+else
+require File.join(File.dirname(__FILE__), 'platform/skel')
+end
require 'fileutils'
require 'find'
-include FileUtils
require 'yaml'
+include FileUtils
YAML::ENGINE.yamler = 'syck' # Use Syck for backward compatibility
@@ -59,7 +66,9 @@ REVISION = (`#{GIT} rev-list HEAD`.split.length + 1).to_s
VERS = ENV['VERSION'] || "0.r#{REVISION}"
PKG = "#{NAME}-#{VERS}"
APPARGS = APP['run']
-FLAGS = %w[DEBUG]
+FLAGS = %w[DEBUG VIDEO]
+VLC_VERSION = (RUBY_PLATFORM =~ /win32/ ? "0.8": `vlc --version 2>/dev/null`.split[2])
+VLC_0_8 = VLC_VERSION !~ /^0\.9/
BIN = "*.{bundle,jar,o,so,obj,pdb,pch,res,lib,def,exp,exe,ilk}"
CLEAN.include ["{bin,shoes}/#{BIN}", "req/**/#{BIN}", "dist/**/*", "dist", "*.app"]
@@ -69,6 +78,10 @@ RUBY_V = RbConfig::CONFIG['ruby_version']
RUBY_LIB_BASE = File.basename(RbConfig::CONFIG['libdir'])
RUBY_PROGRAM_VERSION = RbConfig::CONFIG['RUBY_PROGRAM_VERSION']
SHOES_RUBY_ARCH = RbConfig::CONFIG['arch']
+RUBY_1_9 = (RUBY_V =~ /^1\.9/)
+if RUBY_1_9
+ $: << "."
+end
if ENV['APP']
%w[dmg icons].each do |subk|
@@ -135,8 +148,8 @@ end
task "dist/VERSION.txt" do |t|
File.open(t.name, 'w') do |f|
- f << %{shoes #{RELEASE_NAME.downcase} (0.r#{REVISION}) [#{SHOES_RUBY_ARCH} Ruby#{RUBY_PROGRAM_VERSION}]}
- %w[DEBUG].each { |x| f << " +#{x.downcase}" if ENV[x] }
+ f << %{shoes #{RELEASE_NAME.downcase} (0.r#{REVISION}) [#{RUBY_PLATFORM} Ruby#{RUBY_VERSION}]}
+ %w[VIDEO DEBUG].each { |x| f << " +#{x.downcase}" if ENV[x] }
f << "\n"
end
end
Oops, something went wrong. Retry.

0 comments on commit ac5122b

Please sign in to comment.