File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ Rake::ExtensionTask.new("mysql2", gemspec) do |ext|
1717 ext . config_options = [ "--with-mysql-dir=#{ connector_dir } " ]
1818 else
1919 ext . cross_compile = true
20- ext . cross_platform = [ 'x86-mingw32' , 'x86-mswin32-60' , 'x64-mingw32' ]
20+ ext . cross_platform = ENV [ 'CROSS_PLATFORMS' ] ? ENV [ 'CROSS_PLATFORMS' ] . split ( ':' ) : [ 'x86-mingw32' , 'x86-mswin32-60' , 'x64-mingw32' ]
2121 ext . cross_config_options << {
2222 'x86-mingw32' => "--with-mysql-dir=" + File . expand_path ( "../../vendor/#{ vendor_mysql_dir ( 'x86' ) } " , __FILE__ ) ,
2323 'x86-mswin32-60' => "--with-mysql-dir=" + File . expand_path ( "../../vendor/#{ vendor_mysql_dir ( 'x86' ) } " , __FILE__ ) ,
8787 end
8888end
8989
90- desc "Build the windows binary gems per rake-compiler-dock"
90+ desc "Build binary gems for Windows with rake-compiler-dock"
9191task 'gem:windows' do
9292 require 'rake_compiler_dock'
9393 RakeCompilerDock . sh <<-EOT
94- bundle install "--without=test benchmarks development rbx" &&
95- rake cross native gem
94+ bundle install
95+ rake clean
96+ rm vendor/libmysql.dll
97+ rake cross native gem CROSS_PLATFORMS=x86-mingw32:x86-mswin32-60
98+ EOT
99+ RakeCompilerDock . sh <<-EOT
100+ bundle install
101+ rake clean
102+ rm vendor/libmysql.dll
103+ rake cross native gem CROSS_PLATFORMS=x64-mingw32
96104 EOT
97105end
You can’t perform that action at this time.
0 commit comments