@@ -26,8 +26,11 @@ Rake::ExtensionTask.new("mysql2", gemspec) do |ext|
26
26
27
27
ext . cross_compiling do |spec |
28
28
Rake ::Task [ 'lib/mysql2/mysql2.rb' ] . invoke
29
+ # vendor/libmysql.dll is invoked from extconf.rb
30
+ Rake ::Task [ 'vendor/README' ] . invoke
29
31
spec . files << 'lib/mysql2/mysql2.rb'
30
32
spec . files << 'vendor/libmysql.dll'
33
+ spec . files << 'vendor/README'
31
34
spec . post_install_message = <<-POST_INSTALL_MESSAGE
32
35
33
36
======================================================================================================
@@ -36,12 +39,10 @@ Rake::ExtensionTask.new("mysql2", gemspec) do |ext|
36
39
It was built using MySQL Connector/C version #{ CONNECTOR_VERSION } .
37
40
It's recommended to use the exact same version to avoid potential issues.
38
41
39
- At the time of building this gem, the necessary DLL files were available
40
- in the following download:
41
-
42
+ At the time of building this gem, the necessary DLL files were retrieved from:
42
43
#{ vendor_mysql_url ( spec . platform ) }
43
44
44
- And put lib \\ libmysql.dll file in your Ruby bin directory, for example C: \\ Ruby \\ bin
45
+ This gem *includes* vendor/ libmysql.dll with redistribution notice in vendor/README.
45
46
46
47
======================================================================================================
47
48
@@ -51,6 +52,13 @@ Rake::ExtensionTask.new("mysql2", gemspec) do |ext|
51
52
end
52
53
Rake ::Task [ :spec ] . prerequisites << :compile
53
54
55
+ file 'vendor/README' do |t |
56
+ connector_dir = File . expand_path ( "../../vendor/#{ vendor_mysql_dir } " , __FILE__ )
57
+ when_writing 'copying Connector/C README' do
58
+ cp "#{ connector_dir } /README" , 'vendor/README'
59
+ end
60
+ end
61
+
54
62
file 'lib/mysql2/mysql2.rb' do |t |
55
63
name = gemspec . name
56
64
File . open ( t . name , 'wb' ) do |f |
0 commit comments