This repository was archived by the owner on Mar 26, 2024. It is now read-only.
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|
17
17
ext . config_options = [ "--with-mysql-dir=#{ connector_dir } " ]
18
18
else
19
19
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' ]
21
21
ext . cross_config_options << {
22
22
'x86-mingw32' => "--with-mysql-dir=" + File . expand_path ( "../../vendor/#{ vendor_mysql_dir ( 'x86' ) } " , __FILE__ ) ,
23
23
'x86-mswin32-60' => "--with-mysql-dir=" + File . expand_path ( "../../vendor/#{ vendor_mysql_dir ( 'x86' ) } " , __FILE__ ) ,
87
87
end
88
88
end
89
89
90
- desc "Build the windows binary gems per rake-compiler-dock"
90
+ desc "Build binary gems for Windows with rake-compiler-dock"
91
91
task 'gem:windows' do
92
92
require 'rake_compiler_dock'
93
93
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
96
104
EOT
97
105
end
You can’t perform that action at this time.
0 commit comments