rubyinstaller-build 0.1.0

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.
Files changed (136) hide show
  1. checksums.yaml +7 -0
  2. data/.github/ISSUE_TEMPLATE.md +8 -0
  3. data/.gitignore +12 -0
  4. data/.yardopts +7 -0
  5. data/CHANGELOG-2.4.md +166 -0
  6. data/CHANGELOG-2.5.md +87 -0
  7. data/CHANGELOG-2.6.md +62 -0
  8. data/CHANGELOG-2.7.md +22 -0
  9. data/Gemfile +6 -0
  10. data/LICENSE.txt +25 -0
  11. data/README.md +114 -0
  12. data/Rakefile +164 -0
  13. data/appveyor-key.asc.asc +61 -0
  14. data/appveyor.yml +141 -0
  15. data/docker/Dockerfile +50 -0
  16. data/docker/Rakefile +22 -0
  17. data/gems/rubyinstaller-build.yaml +2 -0
  18. data/lib/devkit.rb +3 -0
  19. data/lib/ruby_installer.rb +3 -0
  20. data/lib/ruby_installer/build.rb +23 -0
  21. data/lib/ruby_installer/build/ca_cert_file.rb +66 -0
  22. data/lib/ruby_installer/build/colors.rb +45 -0
  23. data/lib/ruby_installer/build/components/01_msys2.rb +97 -0
  24. data/lib/ruby_installer/build/components/02_pacman_update.rb +35 -0
  25. data/lib/ruby_installer/build/components/03_dev_tools.rb +68 -0
  26. data/lib/ruby_installer/build/components/base.rb +58 -0
  27. data/lib/ruby_installer/build/components_installer.rb +53 -0
  28. data/lib/ruby_installer/build/dll_directory.rb +97 -0
  29. data/lib/ruby_installer/build/erb_compiler.rb +61 -0
  30. data/lib/ruby_installer/build/gem_version.rb +5 -0
  31. data/lib/ruby_installer/build/gems.rb +74 -0
  32. data/lib/ruby_installer/build/msys2_installation.rb +280 -0
  33. data/lib/ruby_installer/build/openstruct.rb +29 -0
  34. data/lib/ruby_installer/build/release.rb +120 -0
  35. data/lib/ruby_installer/build/singleton.rb +45 -0
  36. data/lib/ruby_installer/build/task.rb +20 -0
  37. data/lib/ruby_installer/build/utils.rb +110 -0
  38. data/lib/ruby_installer/runtime.rb +18 -0
  39. data/lib/ruby_installer/runtime/ridk.rb +195 -0
  40. data/packages/ri-msys/Rakefile +72 -0
  41. data/packages/ri-msys/recipes/sandbox/70-add-msys2-installation.rake +18 -0
  42. data/packages/ri/Rakefile +60 -0
  43. data/recipes/archive-7z/10-define-variables.rake +2 -0
  44. data/recipes/archive-7z/70-create-archive.rake +10 -0
  45. data/recipes/archive-7z/90-define-main-task.rake +2 -0
  46. data/recipes/installer-inno/10-define-variables.rake +2 -0
  47. data/recipes/installer-inno/50-generate-filelist.rake +28 -0
  48. data/recipes/installer-inno/60-generate-iss-file.rake +8 -0
  49. data/recipes/installer-inno/70-run-iscc.rake +19 -0
  50. data/recipes/installer-inno/90-define-main-task.rake +2 -0
  51. data/recipes/installer-inno/events.iss +88 -0
  52. data/recipes/installer-inno/images/fake.bmp +0 -0
  53. data/recipes/installer-inno/images/wizard-large.bmp +0 -0
  54. data/recipes/installer-inno/images/wizard-logo.bmp +0 -0
  55. data/recipes/installer-inno/ri_gui.iss +286 -0
  56. data/recipes/installer-inno/rubyinstaller.iss.erb +157 -0
  57. data/recipes/installer-inno/util.iss +271 -0
  58. data/recipes/msys2/10-define-variables.rake +6 -0
  59. data/recipes/msys2/30-download-msys2-base.rake +4 -0
  60. data/recipes/msys2/40-extract-msys2-base.rake +9 -0
  61. data/recipes/msys2/50-init-msys.rake +8 -0
  62. data/recipes/msys2/50-install-components.rake +19 -0
  63. data/recipes/msys2/90-define-main-task.rake +2 -0
  64. data/recipes/sandbox/10-define-variables.rake +6 -0
  65. data/recipes/sandbox/20-add-runtime-files.rake +15 -0
  66. data/recipes/sandbox/20-define-import-files.rake +16 -0
  67. data/recipes/sandbox/20-define-import-readline.rake +28 -0
  68. data/recipes/sandbox/20-extend-irb.rake +13 -0
  69. data/recipes/sandbox/40-fix-rake-shebang.rake +6 -0
  70. data/recipes/sandbox/40-generate-rake-cmd.rake +7 -0
  71. data/recipes/sandbox/40-generate-version-file.rake +20 -0
  72. data/recipes/sandbox/50-do-import-files.rake +17 -0
  73. data/recipes/sandbox/50-gather-sandbox-files.rake +6 -0
  74. data/recipes/sandbox/60-define-gem-wrappers.rake +5 -0
  75. data/recipes/sandbox/60-side-by-side-assembly.rake +81 -0
  76. data/recipes/sandbox/70-add-gem-bin-wrappers.rake +10 -0
  77. data/recipes/sandbox/70-install-gems.rake +11 -0
  78. data/recipes/sandbox/80-copy-msys-files.rake +8 -0
  79. data/recipes/sandbox/90-define-main-task.rake +2 -0
  80. data/recipes/sandbox/LICENSE.txt +24 -0
  81. data/recipes/sandbox/rubyinstaller-2.3.4-x64.files +4 -0
  82. data/recipes/sandbox/rubyinstaller-2.3.4-x86.files +4 -0
  83. data/recipes/sandbox/rubyinstaller-2.3.4.files +43 -0
  84. data/recipes/sandbox/rubyinstaller-2.4.10-x64.files +4 -0
  85. data/recipes/sandbox/rubyinstaller-2.4.10-x86.files +4 -0
  86. data/recipes/sandbox/rubyinstaller-2.4.10.files +44 -0
  87. data/recipes/sandbox/rubyinstaller-2.5.8-x64.files +6 -0
  88. data/recipes/sandbox/rubyinstaller-2.5.8-x86.files +6 -0
  89. data/recipes/sandbox/rubyinstaller-2.5.8.files +33 -0
  90. data/recipes/sandbox/rubyinstaller-2.6.6-x64.files +6 -0
  91. data/recipes/sandbox/rubyinstaller-2.6.6-x86.files +6 -0
  92. data/recipes/sandbox/rubyinstaller-2.6.6.files +35 -0
  93. data/recipes/sandbox/rubyinstaller-2.7.1-x64.files +6 -0
  94. data/recipes/sandbox/rubyinstaller-2.7.1-x86.files +6 -0
  95. data/recipes/sandbox/rubyinstaller-2.7.1.files +35 -0
  96. data/recipes/sandbox/rubyinstaller-head-x64.files +6 -0
  97. data/recipes/sandbox/rubyinstaller-head-x86.files +6 -0
  98. data/recipes/sandbox/rubyinstaller-head.files +35 -0
  99. data/recipes/unpack/10-define-variables.rake +5 -0
  100. data/recipes/unpack/20-define-msys-packages.rake +1 -0
  101. data/recipes/unpack/30-add-ri2-repo-to-msys.rake +41 -0
  102. data/recipes/unpack/50-install-msys-packages.rake +28 -0
  103. data/recipes/unpack/90-define-main-task.rake +2 -0
  104. data/recipes/unpack/appveyor-repo-key.asc +29 -0
  105. data/resources/files/irbrc_predefiner.rb +21 -0
  106. data/resources/files/operating_system.rb +21 -0
  107. data/resources/files/readline.rb +17 -0
  108. data/resources/files/reline.rb +437 -0
  109. data/resources/files/reline/ansi.rb +177 -0
  110. data/resources/files/reline/config.rb +297 -0
  111. data/resources/files/reline/general_io.rb +75 -0
  112. data/resources/files/reline/history.rb +56 -0
  113. data/resources/files/reline/key_actor.rb +7 -0
  114. data/resources/files/reline/key_actor/base.rb +7 -0
  115. data/resources/files/reline/key_actor/emacs.rb +517 -0
  116. data/resources/files/reline/key_actor/vi_command.rb +518 -0
  117. data/resources/files/reline/key_actor/vi_insert.rb +517 -0
  118. data/resources/files/reline/key_stroke.rb +53 -0
  119. data/resources/files/reline/kill_ring.rb +113 -0
  120. data/resources/files/reline/line_editor.rb +2231 -0
  121. data/resources/files/reline/unicode.rb +527 -0
  122. data/resources/files/reline/unicode/east_asian_width.rb +1145 -0
  123. data/resources/files/reline/version.rb +3 -0
  124. data/resources/files/reline/windows.rb +273 -0
  125. data/resources/files/ridk.cmd +39 -0
  126. data/resources/files/ridk.ps1 +26 -0
  127. data/resources/files/ridk_use/ridk.cmd +13 -0
  128. data/resources/files/ridk_use/ridk.ps1 +17 -0
  129. data/resources/files/ridk_use/ridk_use.rb +221 -0
  130. data/resources/files/setrbvars.cmd +14 -0
  131. data/resources/icons/ruby-doc.ico +0 -0
  132. data/resources/ssl/README-SSL.md +37 -0
  133. data/resources/ssl/c_rehash.rb +167 -0
  134. data/resources/ssl/cacert.pem +4105 -0
  135. data/rubyinstaller-build.gemspec +28 -0
  136. metadata +226 -0
@@ -0,0 +1,8 @@
1
+ file self.after_init_filelist => [self.before_init_filelist] do |t|
2
+ chdir self.sandboxdir do
3
+ # initialize MSYS2
4
+ sh "usr/bin/sh", "-lc", "true"
5
+
6
+ sh "find -type f > #{File.basename self.after_init_filelist}"
7
+ end
8
+ end
@@ -0,0 +1,19 @@
1
+ # Use the cache of our main MSYS2 environment for package install
2
+ cachedir = File.join(Build.msys2_installation.msys_path, "/var/cache/pacman/pkg")
3
+
4
+ file self.devtools => [self.after_init_filelist] do |t|
5
+ RubyInstaller::Build.msys2_installation.with_msys_apps_disabled do
6
+ msys = RubyInstaller::Build::Msys2Installation.new(
7
+ msys_path: File.expand_path(self.sandboxdir),
8
+ mingwarch: package.mingwdir,
9
+ mingw_package_prefix: package.pacman_arch
10
+ )
11
+ msys.with_msys_apps_enabled do
12
+ # retrieve the pacman cache dir
13
+ cachedir2 = IO.popen(["cygpath", "-u", cachedir], &:read).chomp
14
+ # Install the development tools
15
+ RubyInstaller::Build::ComponentsInstaller.new(msys: msys, pacman_args: ["--needed", "--noconfirm", "--cachedir=#{cachedir2}"]).install(%w[pacman_update dev_tools])
16
+ end
17
+ touch self.devtools
18
+ end
19
+ end
@@ -0,0 +1,2 @@
1
+ desc "install RubyInstaller embedded msys2 environment"
2
+ task "base" => [self.devtools]
@@ -0,0 +1,6 @@
1
+ self.unpackdirmgw = unpack_task.unpackdirmgw
2
+ self.thisdir = "recipes/sandbox"
3
+ self.sandboxdir = "#{thisdir}/#{package.packagenameverarch}"
4
+ self.import_files = {}
5
+ self.sandboxfiles = []
6
+ self.gem_bin_wrappers = {}
@@ -0,0 +1,15 @@
1
+ # Add "ruby_installer/runtime" libs to the package.
2
+ # Copy certain files from "ruby_installer/build" to "ruby_installer/runtime".
3
+
4
+ REWRITE_MARK = /module Build.*Use for: Build, Runtime/
5
+
6
+ lib_runtime_files = rubyinstaller_build_gem_files.select do |file|
7
+ file.match(%r{^lib/}) &&
8
+ (!file.match(%r{^lib/ruby_installer/build}) || File.binread(ovl_expand_file(file))[REWRITE_MARK])
9
+ end
10
+
11
+ lib_runtime_files.each do |file|
12
+ dfile = file.sub(%r{^lib/}, "")
13
+ dfile.sub!(%r{/build/}, "/runtime/")
14
+ import_files[file] = "lib/ruby/site_ruby/#{package.rubyver2}.0/#{dfile}"
15
+ end
@@ -0,0 +1,16 @@
1
+ # Define files that are imported into the package either from the current working dir or from the rubyinstaller-build gem.
2
+
3
+ self.import_files.merge!({
4
+ "resources/files/ridk.cmd" => "bin/ridk.cmd",
5
+ "resources/files/ridk.ps1" => "bin/ridk.ps1",
6
+ "resources/files/ridk_use/ridk.cmd" => "ridk_use/ridk.cmd",
7
+ "resources/files/ridk_use/ridk.ps1" => "ridk_use/ridk.ps1",
8
+ "resources/files/ridk_use/ridk_use.rb" => "ridk_use/ridk_use.rb",
9
+ "resources/files/setrbvars.cmd" => "bin/setrbvars.cmd",
10
+ "resources/files/operating_system.rb" => "lib/ruby/#{package.rubyver2}.0/rubygems/defaults/operating_system.rb",
11
+ "resources/icons/ruby-doc.ico" => "share/doc/ruby/html/images/ruby-doc.ico",
12
+ "resources/ssl/cacert.pem" => "ssl/cert.pem",
13
+ "resources/ssl/README-SSL.md" => "ssl/README-SSL.md",
14
+ "resources/ssl/c_rehash.rb" => "ssl/certs/c_rehash.rb",
15
+ "#{thisdir}/LICENSE.txt" => "LICENSE.txt",
16
+ })
@@ -0,0 +1,28 @@
1
+ # Define files that are imported into the package either from the current working dir or from the rubyinstaller-build gem.
2
+
3
+ # Ruby-2.7 bundles reline, so that there's no need to backport
4
+ if package.rubyver2 < "2.7"
5
+
6
+ %w[
7
+ readline.rb
8
+ reline.rb
9
+ reline/ansi.rb
10
+ reline/config.rb
11
+ reline/general_io.rb
12
+ reline/history.rb
13
+ reline/key_actor/base.rb
14
+ reline/key_actor/emacs.rb
15
+ reline/key_actor/vi_command.rb
16
+ reline/key_actor/vi_insert.rb
17
+ reline/key_actor.rb
18
+ reline/key_stroke.rb
19
+ reline/kill_ring.rb
20
+ reline/line_editor.rb
21
+ reline/unicode/east_asian_width.rb
22
+ reline/unicode.rb
23
+ reline/version.rb
24
+ reline/windows.rb
25
+ ].each do |f|
26
+ self.import_files["resources/files/#{f}"] = "lib/ruby/site_ruby/#{f}"
27
+ end
28
+ end
@@ -0,0 +1,13 @@
1
+ self.import_files.merge!({
2
+ "resources/files/irbrc_predefiner.rb" => "lib/ruby/site_ruby/#{package.rubyver2}.0/irbrc_predefiner.rb",
3
+ })
4
+
5
+ file File.join(sandboxdir, "bin/irb.cmd") => File.join(unpackdirmgw, "bin/irb.cmd") do |t|
6
+ puts "generate #{t.name}"
7
+ out = File.binread(t.prerequisites.first)
8
+ mod = out.gsub('require "irb"', 'require "irbrc_predefiner"; require "irb"')
9
+ .gsub("load Gem.activate_bin_path('irb', 'irb', version)", "f = Gem.activate_bin_path('irb', 'irb', version); require 'irbrc_predefiner'; load f")
10
+ raise "irb extension not applicable" if out == mod
11
+
12
+ File.binwrite(t.name, mod)
13
+ end
@@ -0,0 +1,6 @@
1
+ file File.join(sandboxdir, "bin/rake") => File.join(unpackdirmgw, "bin/rake") do |t|
2
+ puts "Fix #{t.name} shebang"
3
+ out = File.binread(t.prerequisites.first)
4
+ .sub(%r{#!/.*/ruby.exe}, "#!/usr/bin/env ruby")
5
+ File.binwrite(t.name, out)
6
+ end
@@ -0,0 +1,7 @@
1
+ file File.join(sandboxdir, "bin/rake.cmd") => File.join(unpackdirmgw, "bin/rake.bat") do |t|
2
+ puts "generate #{t.name}"
3
+ out = File.binread(t.prerequisites.first)
4
+ .gsub("\\#{package.mingwdir}\\bin\\", "%~dp0")
5
+ .gsub(/"[^"]*\/bin\/rake"/, "\"%~dp0rake\"")
6
+ File.binwrite(t.name, out)
7
+ end
@@ -0,0 +1,20 @@
1
+ # Create a version file for the rubyinstaller runtime
2
+
3
+ versionfile_rel = "lib/ruby/site_ruby/#{package.rubyver2}.0/ruby_installer/runtime/package_version.rb"
4
+ versionfile = File.join(sandboxdir, versionfile_rel)
5
+ directory File.dirname(versionfile)
6
+ file versionfile => [ File.dirname(versionfile),
7
+ File.exist?('.git/logs/HEAD') && '.git/logs/HEAD',
8
+ ].select{|a|a} do |t|
9
+ puts "generate #{t.name}"
10
+ File.binwrite t.name, <<-EOT
11
+ module RubyInstaller
12
+ module Runtime
13
+ PACKAGE_VERSION = #{package.packagever.inspect}
14
+ GIT_COMMIT = #{`git rev-parse HEAD`.chomp[0, 7].inspect}
15
+ end
16
+ end
17
+ EOT
18
+ end
19
+
20
+ self.sandboxfiles << versionfile
@@ -0,0 +1,17 @@
1
+ # Define copy tasks for import_files.
2
+ # All the files can be overlayed in the current working directory.
3
+
4
+ import_files.each do |source, dest|
5
+ file File.join(sandboxdir, dest) => ovl_expand_file(source) do |t|
6
+ mkdir_p File.dirname(t.name)
7
+ content = File.binread(t.prerequisites.first)
8
+ # Rewrite marked files from RubyInstaller::Build to RubyInstaller::Runtime.
9
+ rewrite_done = false
10
+ content.gsub!(REWRITE_MARK) do
11
+ rewrite_done = true
12
+ "module Runtime # Rewrite from #{t.prerequisites.first}"
13
+ end
14
+ File.binwrite(t.name, content)
15
+ puts "import#{" with rewrite" if rewrite_done} #{t.prerequisites.first} #{t.name}"
16
+ end
17
+ end
@@ -0,0 +1,6 @@
1
+ self.sandboxfile_listfile = "#{thisdir}/rubyinstaller-#{package.rubyver}.files"
2
+ self.sandboxfile_arch_listfile = "#{thisdir}/rubyinstaller-#{package.rubyver}-#{package.arch}.files"
3
+ sandboxfiles_rel = File.readlines(ovl_expand_file(sandboxfile_listfile)) + File.readlines(ovl_expand_file(sandboxfile_arch_listfile))
4
+ sandboxfiles_rel = sandboxfiles_rel.map{|path| path.chomp }
5
+ sandboxfiles_rel += import_files.values
6
+ self.sandboxfiles += sandboxfiles_rel.map{|path| File.join(sandboxdir, path)}
@@ -0,0 +1,5 @@
1
+ # Define the bin executable wrappers that shall be shipped with the package.
2
+
3
+ self.gem_bin_wrappers.merge!({
4
+ # package.install_gems.find{|g| g.start_with?("bundler-") } => ["bundle", "bundle.bat", "bundler", "bundler.bat"],
5
+ })
@@ -0,0 +1,81 @@
1
+ # Move bundled RubyInstaller DLLs to a subdirectory.
2
+ # This avoids interferences with other apps when ruby.exe is in the PATH.
3
+
4
+ libruby_regex = /msvcrt-ruby\d+\.dll$/i
5
+ bin_dir = File.join(sandboxdir, "bin")
6
+ dlls_dir = File.join(sandboxdir, "bin/ruby_builtin_dlls")
7
+ directory bin_dir
8
+ directory dlls_dir
9
+
10
+ # Select the DLLs from "bin/" which shall be moved into "bin/ruby_builtin_dlls/"
11
+ dlls = self.sandboxfiles.select do |destpath|
12
+ destpath.start_with?(bin_dir+"/") && destpath =~ /\.dll$/i && destpath !~ libruby_regex
13
+ end
14
+
15
+ dlls.each do |destpath|
16
+ # Add tasks to write the DLLs into the sub directory
17
+ new_destpath = File.join(File.dirname(destpath), "ruby_builtin_dlls", File.basename(destpath))
18
+ file new_destpath => [destpath.sub(sandboxdir, unpackdirmgw), dlls_dir] do |t|
19
+ cp(t.prerequisites.first, t.name)
20
+ end
21
+
22
+ # Move the DLLs in the dependent files list to the subdirectory
23
+ self.sandboxfiles.delete(destpath)
24
+ self.sandboxfiles << new_destpath
25
+ end
26
+
27
+ # Add a custom manifest to both ruby.exe and rubyw.exe, so that they find the DLLs to be moved
28
+ self.sandboxfiles.select do |destpath|
29
+ destpath =~ /\/rubyw?\.exe$/i
30
+ end.each do |destpath|
31
+ file destpath => [destpath.sub(sandboxdir, unpackdirmgw), bin_dir] do |t|
32
+ puts "patching manifest of #{t.name}"
33
+ libruby = File.basename(self.sandboxfiles.find{|a| a=~libruby_regex })
34
+
35
+ image = File.binread(t.prerequisites.first)
36
+ # The XML elements we want to add to the default MINGW manifest:
37
+ new = <<-EOT
38
+ <dependency>
39
+ <dependentAssembly>
40
+ <assemblyIdentity version="1.0.0.0" type="win32" name="ruby_builtin_dlls" />
41
+ </dependentAssembly>
42
+ </dependency>
43
+ <file name="#{ libruby }"/>
44
+ EOT
45
+
46
+ # There are two regular options to add a custom manifest:
47
+ # 1. Change a given exe file per Microsofts "mt.exe" after the build
48
+ # 2. Specify a the manifest while linking with the MINGW toolchain
49
+ #
50
+ # Since we don't want to depend on particular Microsoft tools and want to avoid additional patching of the ruby build, we do a nifty trick here.
51
+ # We patch the exe file manually.
52
+ # Removing unnecessary spaces and comments from the embedded XML manifest gives us enough space to add the above XML elements.
53
+ # Then the default MINGW manifest gets replaced by our custom XML content.
54
+ # The rest of the available bytes is simply padded with spaces, so that we don't change positions within the EXE image.
55
+ image.gsub!(/<\?xml.*?<assembly.*?<\/assembly>\n/m) do |m|
56
+ newm = m.gsub(/^\s*<\/assembly>\s*$/, new + "</assembly>")
57
+ .gsub(/<!--.*?-->/m, "")
58
+ .gsub(/^ +/, "")
59
+ .gsub(/\n+/m, "\n")
60
+
61
+ raise "replacement manifest to big #{m.bytesize} < #{newm.bytesize}" if m.bytesize < newm.bytesize
62
+ newm + " " * (m.bytesize - newm.bytesize)
63
+ end
64
+ File.binwrite(t.name, image)
65
+ end
66
+ end
67
+
68
+ # Add a detached manifest file within the sub directory that lists all DLLs in question
69
+ manifest2 = File.join(sandboxdir, "bin/ruby_builtin_dlls/ruby_builtin_dlls.manifest")
70
+ file manifest2 => [dlls_dir] do |t|
71
+ puts "generate #{t.name}"
72
+ File.binwrite t.name, <<-EOT
73
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
74
+ <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
75
+ <assemblyIdentity type="win32" name="ruby_builtin_dlls" version="1.0.0.0"></assemblyIdentity>
76
+
77
+ #{ dlls.map{|dll| %Q{<file name="#{File.basename(dll)}"/>} }.join }
78
+ </assembly>
79
+ EOT
80
+ end
81
+ self.sandboxfiles << manifest2
@@ -0,0 +1,10 @@
1
+ self.gem_bin_wrappers.each do |gem, files|
2
+ wrappers = files.map{|w| File.join(sandboxdir, "bin", w) }
3
+
4
+ gemspec = File.join(sandboxdir, "lib/ruby/gems/#{package.rubyver2}.0/specifications/#{gem}.gemspec")
5
+ wrappers.each do |wrapper|
6
+ file wrapper => gemspec
7
+ end
8
+
9
+ self.sandboxfiles += wrappers
10
+ end
@@ -0,0 +1,11 @@
1
+ gem_cmd = File.join(sandboxdir, "bin/gem.cmd")
2
+ package.install_gems.each do |gem|
3
+ gemspec = File.join(sandboxdir, "lib/ruby/gems/#{package.rubyver2}.0/specifications/#{gem}.gemspec")
4
+ file gemspec do
5
+ with_env(GEM_HOME: nil, GEM_PATH: nil, RUBYOPT: nil, RUBYLIB: nil) do
6
+ /(?<gem_name>.*)-(?<gem_ver>.*)/ =~ gem || raise(ArgumentError, "invalid gem name #{gem.inspect}")
7
+ RubyInstaller::Build::Gems.install(gem_name, gem_version: gem_ver, gem_cmd: gem_cmd)
8
+ end
9
+ end
10
+ self.sandboxfiles << gemspec
11
+ end
@@ -0,0 +1,8 @@
1
+ self.sandboxfiles.each do |destpath|
2
+ directory File.dirname(destpath)
3
+ unless Rake::Task.task_defined?(destpath)
4
+ file destpath => [destpath.sub(sandboxdir, unpackdirmgw), File.dirname(destpath)] do |t|
5
+ cp_r(t.prerequisites.first, t.name)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,2 @@
1
+ desc "sandbox for ruby-#{package.rubyver}-#{package.arch}"
2
+ task "sandbox" => ["unpack", __FILE__, ovl_expand_file(sandboxfile_listfile), ovl_expand_file(sandboxfile_arch_listfile)] + sandboxfiles
@@ -0,0 +1,24 @@
1
+ Copyright (c) 2007-2019 RubyInstaller Team.
2
+ All rights reserved.
3
+
4
+ Except:
5
+
6
+ Ruby is copyrighted free software by Yukihiro Matsumoto.
7
+ http://www.ruby-lang.org/en/LICENSE.txt
8
+
9
+ 3rd party libraries (OpenSSL, ZLib, MSYS2, etc.)
10
+
11
+ This software is distributed under the terms of the Modified BSD License.
12
+
13
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
14
+
15
+ * Redistributions of source code must retain the above copyright
16
+ notice, this list of conditions and the following disclaimer.
17
+ * Redistributions in binary form must reproduce the above copyright
18
+ notice, this list of conditions and the following disclaimer in the
19
+ documentation and/or other materials provided with the distribution.
20
+ * Neither the name of the RubyInstaller Team nor the names of its
21
+ contributors may be used to endorse or promote products derived
22
+ from this software without specific prior written permission.
23
+
24
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE RUBYINSTALLER TEAM BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,4 @@
1
+ bin/libgcc_s_seh-1.dll
2
+ bin/libwinpthread-1.dll
3
+ bin/x64-msvcrt-ruby230.dll
4
+ lib/libx64-msvcrt-ruby230.dll.a
@@ -0,0 +1,4 @@
1
+ bin/libgcc_s_dw2-1.dll
2
+ bin/msvcrt-ruby230.dll
3
+ bin/libwinpthread-1.dll
4
+ lib/libmsvcrt-ruby230.dll.a
@@ -0,0 +1,43 @@
1
+ bin/erb
2
+ bin/erb.cmd
3
+ bin/gem
4
+ bin/gem.cmd
5
+ bin/irb
6
+ bin/irb.cmd
7
+ bin/libeay32.dll
8
+ bin/libffi-6.dll
9
+ bin/libgdbm-4.dll
10
+ bin/libgdbm_compat-4.dll
11
+ bin/libgmp-10.dll
12
+ bin/libiconv-2.dll
13
+ bin/libintl-8.dll
14
+ bin/libyaml-0-2.dll
15
+ bin/rake
16
+ bin/rake.cmd
17
+ bin/rdoc
18
+ bin/rdoc.cmd
19
+ bin/ri
20
+ bin/ri.cmd
21
+ bin/ruby.exe
22
+ bin/rubyw.exe
23
+ bin/ssleay32.dll
24
+ bin/zlib1.dll
25
+ include/ruby-2.3.0
26
+ lib/engines/4758ccaeay32.dll
27
+ lib/engines/aepeay32.dll
28
+ lib/engines/atallaeay32.dll
29
+ lib/engines/capieay32.dll
30
+ lib/engines/chileay32.dll
31
+ lib/engines/cswifteay32.dll
32
+ lib/engines/gmpeay32.dll
33
+ lib/engines/gosteay32.dll
34
+ lib/engines/nuroneay32.dll
35
+ lib/engines/padlockeay32.dll
36
+ lib/engines/surewareeay32.dll
37
+ lib/engines/ubseceay32.dll
38
+ lib/pkgconfig/ruby-2.3.pc
39
+ lib/ruby/2.3.0
40
+ lib/ruby/gems/2.3.0
41
+ lib/ruby/site_ruby/2.3.0
42
+ lib/ruby/vendor_ruby/2.3.0
43
+ share/doc/ruby/html
@@ -0,0 +1,4 @@
1
+ bin/libgcc_s_seh-1.dll
2
+ bin/libwinpthread-1.dll
3
+ bin/x64-msvcrt-ruby240.dll
4
+ lib/libx64-msvcrt-ruby240.dll.a
@@ -0,0 +1,4 @@
1
+ bin/libgcc_s_dw2-1.dll
2
+ bin/msvcrt-ruby240.dll
3
+ bin/libwinpthread-1.dll
4
+ lib/libmsvcrt-ruby240.dll.a
@@ -0,0 +1,44 @@
1
+ bin/erb
2
+ bin/erb.cmd
3
+ bin/gem
4
+ bin/gem.cmd
5
+ bin/irb
6
+ bin/irb.cmd
7
+ bin/libeay32.dll
8
+ bin/libffi-7.dll
9
+ bin/libgdbm-6.dll
10
+ bin/libgdbm_compat-4.dll
11
+ bin/libgmp-10.dll
12
+ bin/libiconv-2.dll
13
+ bin/libintl-8.dll
14
+ bin/libssp-0.dll
15
+ bin/libyaml-0-2.dll
16
+ bin/rake
17
+ bin/rake.cmd
18
+ bin/rdoc
19
+ bin/rdoc.cmd
20
+ bin/ri
21
+ bin/ri.cmd
22
+ bin/ruby.exe
23
+ bin/rubyw.exe
24
+ bin/ssleay32.dll
25
+ bin/zlib1.dll
26
+ include/ruby-2.4.0
27
+ lib/engines/4758ccaeay32.dll
28
+ lib/engines/aepeay32.dll
29
+ lib/engines/atallaeay32.dll
30
+ lib/engines/capieay32.dll
31
+ lib/engines/chileay32.dll
32
+ lib/engines/cswifteay32.dll
33
+ lib/engines/gmpeay32.dll
34
+ lib/engines/gosteay32.dll
35
+ lib/engines/nuroneay32.dll
36
+ lib/engines/padlockeay32.dll
37
+ lib/engines/surewareeay32.dll
38
+ lib/engines/ubseceay32.dll
39
+ lib/pkgconfig/ruby-2.4.pc
40
+ lib/ruby/2.4.0
41
+ lib/ruby/gems/2.4.0
42
+ lib/ruby/site_ruby/2.4.0
43
+ lib/ruby/vendor_ruby/2.4.0
44
+ share/doc/ruby/html