buildr-hx 0.0.24.pre → 0.0.25.pre
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/buildr-hx.gemspec +2 -2
- data/lib/buildr/hx/compiler/haxe_compiler_base.rb +10 -12
- data/lib/buildr/hx/compiler/hxlib.rb +8 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.25.pre
|
data/buildr-hx.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "buildr-hx"
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.25.pre"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Dominic Graefen"]
|
12
|
-
s.date = "2012-05-
|
12
|
+
s.date = "2012-05-04"
|
13
13
|
s.description = "Build like you code - now supporting haXe"
|
14
14
|
s.email = "dominic @nospam@ devboy.org"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -16,7 +16,7 @@ module Buildr
|
|
16
16
|
check_options options, COMPILE_OPTIONS
|
17
17
|
@output = get_output_file(target)
|
18
18
|
is_test = is_test?(sources, target, dependencies)
|
19
|
-
args =
|
19
|
+
args = %w(haxe)
|
20
20
|
sources += @project.compile.sources.map(&:to_s) if is_test
|
21
21
|
args += generate_source_args sources
|
22
22
|
args += generate_dependency_args dependencies
|
@@ -50,7 +50,7 @@ module Buildr
|
|
50
50
|
args << '-debug' if options[:debug]
|
51
51
|
args += options[:resources].map{|id,path| "-resource #{path}@#{id.to_s}"} unless options[:resources].nil?
|
52
52
|
options[:flags] << "ENV_#{Buildr.environment.upcase}"
|
53
|
-
args += options[:flags].map{|flag| "-D #{flag.to_s}"} unless options[:flags].nil?
|
53
|
+
args += options[:flags].uniq.map{|flag| "-D #{flag.to_s}"} unless options[:flags].nil?
|
54
54
|
args + Array(options[:args])
|
55
55
|
end
|
56
56
|
|
@@ -64,19 +64,17 @@ module Buildr
|
|
64
64
|
spec = HaxeLib.path_to_spec(dep)
|
65
65
|
if spec
|
66
66
|
args << "-lib #{spec[:id]}:#{spec[:version]}"
|
67
|
-
#elsif File.extname(dep) == ".zip" && Buildr.zip(dep).contain?("haxelib.xml")
|
68
|
-
# xml = Zip::ZipFile.open(dep) { |zip| zip.file.read("haxelib.xml") }
|
69
|
-
# require 'rexml/document'
|
70
|
-
# doc = REXML::Document.new(xml)
|
71
|
-
# id = doc.root.attribute("name")
|
72
|
-
# version = doc.root.elements['version'].attribute("name")
|
73
|
-
# fail "Could not install #{id}:#{version}." unless install_haxelib_zip dep
|
74
|
-
# args << "-lib #{id}:#{version}"
|
75
67
|
elsif File.extname(dep) == ".swf"
|
76
68
|
args << "-swf-lib #{dep}"
|
77
69
|
elsif File.extname(dep) == ".hxlib"
|
78
70
|
args += File.read(dep).split("\n").map{ |dep|
|
79
|
-
dep.start_with?("-cp")
|
71
|
+
if dep.start_with?("-cp")
|
72
|
+
"-cp #{File.join(root_project_dir, dep.gsub("-cp ", "").strip )}"
|
73
|
+
elsif dep.start_with?("-swf-lib")
|
74
|
+
"-swf-lib #{File.join(root_project_dir, dep.gsub("-swf-lib ", "").strip )}"
|
75
|
+
else
|
76
|
+
dep
|
77
|
+
end
|
80
78
|
}
|
81
79
|
end
|
82
80
|
}
|
@@ -101,7 +99,7 @@ module Buildr
|
|
101
99
|
def create_hxml( args, is_test )
|
102
100
|
file = File.join(@project.base_dir, options[:hxml] || is_test ? "test.hxml" : "compile.hxml")
|
103
101
|
puts "Creating hxml '#{file}'"
|
104
|
-
with_path =
|
102
|
+
with_path = %w(cp swf-lib swf js as3 cpp neko xml swf9 resource).map{|p|"-#{p}"}
|
105
103
|
File.open(file, 'w') {|f| f.write(
|
106
104
|
args.reject{|a| a == "haxe"}.
|
107
105
|
map{|a|
|
@@ -12,9 +12,15 @@ module Buildr
|
|
12
12
|
|
13
13
|
def compile(sources, target, dependencies)
|
14
14
|
dependency_list = (generate_dependency_args(dependencies) + generate_source_args(sources)).
|
15
|
-
reject{|dep| !( dep.start_with?("-cp") || dep.start_with?("-lib") ) }.
|
15
|
+
reject{|dep| !( dep.start_with?("-cp") || dep.start_with?("-lib") || dep.start_with?("-swf-lib") ) }.
|
16
16
|
map{ |dep|
|
17
|
-
dep.start_with?("-cp")
|
17
|
+
if dep.start_with?("-cp")
|
18
|
+
"-cp #{relative_path( dep.gsub("-cp ", "").strip, root_project_dir )}"
|
19
|
+
elsif dep.start_with?("-swf-lib")
|
20
|
+
"-swf-lib #{relative_path( dep.gsub("-swf-lib ", "").strip, root_project_dir )}"
|
21
|
+
else
|
22
|
+
dep
|
23
|
+
end
|
18
24
|
}
|
19
25
|
file = get_output_file(target)
|
20
26
|
FileUtils.mkdir_p File.dirname(file)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: buildr-hx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.25.pre
|
5
5
|
prerelease: 7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: buildr
|
@@ -213,7 +213,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
213
213
|
version: '0'
|
214
214
|
segments:
|
215
215
|
- 0
|
216
|
-
hash:
|
216
|
+
hash: 705849060145704839
|
217
217
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
218
218
|
none: false
|
219
219
|
requirements:
|