Permalink
Browse files

[gh-7] Update -static-link-runtime-shared-libraries to work as the fl…

  • Loading branch information...
1 parent 9402bc4 commit f4eff6b097de771c866fac98b4c2e96efcc197a4 @apinstein apinstein committed Sep 5, 2011
@@ -911,9 +911,14 @@ class CompilerBase < Sprout::Executable::Base
##
# Statically link the libraries specified by the {#runtime_shared_libraries} option.
#
+ # Default changed to false in Flex 4: http://opensource.adobe.com/wiki/display/flexsdk/Linking+RSLs+by+Default
+ #
+ # We respect this new default.
+ #
# @see #runtime_shared_libraries
#
- add_param :static_link_runtime_shared_libraries, Boolean, { :default => true }
+ add_param :static_link_runtime_shared_libraries, Boolean, { :default => false, :hidden_value => false, :delimiter => '=' }
+
##
# Alias for {#static_link_runtime_shared_libraries}
View
@@ -12,12 +12,11 @@ class FakeMXMLC
def initialize args
#puts ">> ARGS: #{args.inspect}"
- if(args.size == 3 &&
+ if(args.size == 2 &&
args[0].include?('SomeFile.swf') &&
- args[1].include?('-static-link-runtime-shared-libraries') &&
- args[2].include?('SomeFile.as'))
+ args[1].include?('SomeFile.as'))
compile_simple_swf args
- elsif args == ["-output=test/fixtures/air/simple/bin/SomeProject.swf", "-static-link-runtime-shared-libraries", "test/fixtures/air/simple/SomeProject.as"]
+ elsif args == ["-output=test/fixtures/air/simple/bin/SomeProject.swf", "test/fixtures/air/simple/SomeProject.as"]
compile_amxmlc_swf args
else
raise "Unexpected args sent to mxmlc stub #{args.join(', ')}"
View
@@ -20,7 +20,7 @@ class ACOMPCTest < Test::Unit::TestCase
compc = FlashSDK::ACOMPC.new
compc.output = @expected_output
compc.include_sources << @fixture
- assert_equal '--output=test/fixtures/acompc/simple/SomeAirFile.swc --static-link-runtime-shared-libraries --include-sources+=test/fixtures/acompc/simple', compc.to_shell
+ assert_equal '--output=test/fixtures/acompc/simple/SomeAirFile.swc --include-sources+=test/fixtures/acompc/simple', compc.to_shell
end
end
View
@@ -20,7 +20,7 @@ class AMXMLCTest < Test::Unit::TestCase
amxmlc = FlashSDK::AMXMLC.new
amxmlc.input = @input
amxmlc.source_path << @fixture
- assert_equal '-source-path+=test/fixtures/air/simple -static-link-runtime-shared-libraries test/fixtures/air/simple/SomeProject.as', amxmlc.to_shell
+ assert_equal '-source-path+=test/fixtures/air/simple test/fixtures/air/simple/SomeProject.as', amxmlc.to_shell
end
end
@@ -39,7 +39,6 @@ class AMXMLCTest < Test::Unit::TestCase
should "assign default-size" do
amxmlc = FlashSDK::AMXMLC.new
amxmlc.default_size = '800,500'
- amxmlc.static_link_runtime_shared_libraries = false
assert_equal '-default-size=800,500', amxmlc.to_shell
end
@@ -48,7 +47,7 @@ class AMXMLCTest < Test::Unit::TestCase
t = amxmlc 'bin/SomeProject.swf' do |t|
t.input = @input
end
- assert_equal '-output=bin/SomeProject.swf -static-link-runtime-shared-libraries test/fixtures/air/simple/SomeProject.as', t.to_shell
+ assert_equal '-output=bin/SomeProject.swf test/fixtures/air/simple/SomeProject.as', t.to_shell
end
end
end
View
@@ -20,7 +20,7 @@ class COMPCTest < Test::Unit::TestCase
compc = FlashSDK::COMPC.new
compc.output = @expected_output
compc.include_sources << @fixture
- assert_equal '--output=test/fixtures/compc/simple/SomeFile.swc --static-link-runtime-shared-libraries --include-sources+=test/fixtures/compc/simple', compc.to_shell
+ assert_equal '--output=test/fixtures/compc/simple/SomeFile.swc --include-sources+=test/fixtures/compc/simple', compc.to_shell
end
end
@@ -148,18 +148,18 @@ class FlexCompilerOptionsTest < Test::Unit::TestCase
end
# -static-link-runtime-shared-libraries
- should "default to static-link-runtime-shared-libraries=true" do
- assert_equal true, @mxmlc.static_link_runtime_shared_libraries
+ should "default to static-link-runtime-shared-libraries=false" do
+ assert_equal false, @mxmlc.static_link_runtime_shared_libraries
end
- should "not include a -static-link-runtime-shared-libraries flag if :static-link-runtime-shared-libraries is set to true" do
+ should "include a -static-link-runtime-shared-libraries=true flag if :static-link-runtime-shared-libraries is set to true" do
@mxmlc.static_link_runtime_shared_libraries = true
- assert_no_match /-static-link-runtime-shared-libraries/, @mxmlc.to_shell
+ assert_equal '-static-link-runtime-shared-libraries=true', @mxmlc.to_shell
end
- should "include -static-link-runtime-shared-libraries=false flag if :static-link-runtime-shared-libraries is set to false" do
+ should "not include -static-link-runtime-shared-libraries=false flag if :static-link-runtime-shared-libraries is set to false" do
@mxmlc.static_link_runtime_shared_libraries = false
- assert_equal '-static-link-runtime-shared-libraries=false', @mxmlc.to_shell
+ assert_no_match /-static-link-runtime-shared-libraries/, @mxmlc.to_shell
end
# -strict
View
@@ -34,14 +34,13 @@ class MXMLCTest < Test::Unit::TestCase
mxmlc = FlashSDK::MXMLC.new
mxmlc.input = 'test/fixtures/mxmlc/simple/SomeFile.as'
mxmlc.source_path << 'test/fixtures/mxmlc/simple'
- assert_equal '-source-path+=test/fixtures/mxmlc/simple -static-link-runtime-shared-libraries test/fixtures/mxmlc/simple/SomeFile.as', mxmlc.to_shell
+ assert_equal '-source-path+=test/fixtures/mxmlc/simple test/fixtures/mxmlc/simple/SomeFile.as', mxmlc.to_shell
end
end
should "assign default-size" do
mxmlc = FlashSDK::MXMLC.new
mxmlc.default_size = '800,500'
- mxmlc.static_link_runtime_shared_libraries = false
assert_equal '-default-size=800,500', mxmlc.to_shell
end

0 comments on commit f4eff6b

Please sign in to comment.