standalone-ruby 1.5.1 → 1.5.2

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 (85) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +53 -48
  3. data/bin/standalone-ruby +3 -3
  4. data/lib/data/c_compilers/tcc/include/_mingw.h +54 -54
  5. data/lib/data/c_compilers/tcc/include/assert.h +71 -71
  6. data/lib/data/c_compilers/tcc/include/conio.h +159 -159
  7. data/lib/data/c_compilers/tcc/include/ctype.h +232 -232
  8. data/lib/data/c_compilers/tcc/include/dir.h +26 -26
  9. data/lib/data/c_compilers/tcc/include/direct.h +95 -95
  10. data/lib/data/c_compilers/tcc/include/dirent.h +96 -96
  11. data/lib/data/c_compilers/tcc/include/dos.h +110 -110
  12. data/lib/data/c_compilers/tcc/include/errno.h +117 -117
  13. data/lib/data/c_compilers/tcc/include/excpt.h +20 -20
  14. data/lib/data/c_compilers/tcc/include/fcntl.h +135 -135
  15. data/lib/data/c_compilers/tcc/include/fenv.h +85 -85
  16. data/lib/data/c_compilers/tcc/include/float.h +224 -224
  17. data/lib/data/c_compilers/tcc/include/inttypes.h +275 -275
  18. data/lib/data/c_compilers/tcc/include/io.h +296 -296
  19. data/lib/data/c_compilers/tcc/include/limits.h +115 -115
  20. data/lib/data/c_compilers/tcc/include/locale.h +100 -100
  21. data/lib/data/c_compilers/tcc/include/malloc.h +87 -87
  22. data/lib/data/c_compilers/tcc/include/math.h +438 -438
  23. data/lib/data/c_compilers/tcc/include/mem.h +8 -8
  24. data/lib/data/c_compilers/tcc/include/memory.h +9 -9
  25. data/lib/data/c_compilers/tcc/include/process.h +158 -158
  26. data/lib/data/c_compilers/tcc/include/setjmp.h +72 -72
  27. data/lib/data/c_compilers/tcc/include/share.h +44 -44
  28. data/lib/data/c_compilers/tcc/include/signal.h +111 -111
  29. data/lib/data/c_compilers/tcc/include/stdarg.h +16 -16
  30. data/lib/data/c_compilers/tcc/include/stdbool.h +10 -10
  31. data/lib/data/c_compilers/tcc/include/stddef.h +26 -26
  32. data/lib/data/c_compilers/tcc/include/stdint.h +184 -184
  33. data/lib/data/c_compilers/tcc/include/stdio.h +413 -413
  34. data/lib/data/c_compilers/tcc/include/stdlib.h +482 -482
  35. data/lib/data/c_compilers/tcc/include/string.h +206 -206
  36. data/lib/data/c_compilers/tcc/include/sys/fcntl.h +8 -8
  37. data/lib/data/c_compilers/tcc/include/sys/file.h +9 -9
  38. data/lib/data/c_compilers/tcc/include/sys/locking.h +52 -52
  39. data/lib/data/c_compilers/tcc/include/sys/stat.h +190 -190
  40. data/lib/data/c_compilers/tcc/include/sys/time.h +3 -3
  41. data/lib/data/c_compilers/tcc/include/sys/timeb.h +82 -82
  42. data/lib/data/c_compilers/tcc/include/sys/types.h +118 -118
  43. data/lib/data/c_compilers/tcc/include/sys/unistd.h +9 -9
  44. data/lib/data/c_compilers/tcc/include/sys/utime.h +89 -89
  45. data/lib/data/c_compilers/tcc/include/tchar.h +367 -367
  46. data/lib/data/c_compilers/tcc/include/time.h +219 -219
  47. data/lib/data/c_compilers/tcc/include/unistd.h +10 -10
  48. data/lib/data/c_compilers/tcc/include/values.h +4 -4
  49. data/lib/data/c_compilers/tcc/include/varargs.h +11 -11
  50. data/lib/data/c_compilers/tcc/include/wchar.h +318 -318
  51. data/lib/data/c_compilers/tcc/include/wctype.h +127 -127
  52. data/lib/data/c_compilers/tcc/include/winapi/basetsd.h +119 -119
  53. data/lib/data/c_compilers/tcc/include/winapi/basetyps.h +144 -144
  54. data/lib/data/c_compilers/tcc/include/winapi/winbase.h +1852 -1852
  55. data/lib/data/c_compilers/tcc/include/winapi/wincon.h +207 -207
  56. data/lib/data/c_compilers/tcc/include/winapi/windef.h +240 -240
  57. data/lib/data/c_compilers/tcc/include/winapi/windows.h +176 -176
  58. data/lib/data/c_compilers/tcc/include/winapi/winerror.h +1054 -1054
  59. data/lib/data/c_compilers/tcc/include/winapi/wingdi.h +2843 -2843
  60. data/lib/data/c_compilers/tcc/include/winapi/winnetwk.h +346 -346
  61. data/lib/data/c_compilers/tcc/include/winapi/winnls.h +651 -651
  62. data/lib/data/c_compilers/tcc/include/winapi/winnt.h +2667 -2667
  63. data/lib/data/c_compilers/tcc/include/winapi/winreg.h +159 -159
  64. data/lib/data/c_compilers/tcc/include/winapi/winsvc.h +309 -309
  65. data/lib/data/c_compilers/tcc/include/winapi/winuser.h +3472 -3472
  66. data/lib/data/c_compilers/tcc/include/winapi/winver.h +133 -133
  67. data/lib/data/c_compilers/tcc/lib/gdi32.def +337 -337
  68. data/lib/data/c_compilers/tcc/lib/kernel32.def +763 -763
  69. data/lib/data/c_compilers/tcc/lib/msvcrt.def +782 -782
  70. data/lib/data/c_compilers/tcc/lib/user32.def +654 -654
  71. data/lib/data/exe_templates/launcher_stub.c +29 -29
  72. data/lib/data/exe_templates/launcher_stub.cpp +31 -31
  73. data/lib/data/launcher_templates/vbs/default_vbs.txt +7 -7
  74. data/lib/data/launcher_templates/vbs/vbs_gui.txt +8 -8
  75. data/lib/data/resource_files/default.rc +17 -17
  76. data/lib/displayer.rb +63 -63
  77. data/lib/exe_packer.rb +72 -68
  78. data/lib/launcher.rb +58 -71
  79. data/lib/launcher_handler.rb +40 -40
  80. data/lib/parameter_parser.rb +215 -201
  81. data/lib/ruby_copy.rb +48 -20
  82. data/lib/standalone_ruby.rb +6 -6
  83. data/lib/version/version.rb +2 -2
  84. metadata +3 -4
  85. data/lib/sfx_generator.rb +0 -9
@@ -1,41 +1,41 @@
1
- require 'fileutils'
2
-
3
- class LauncherHandler
4
- def initialize(params)
5
- @params = params
6
- end
7
-
8
- def handle
9
- begin
10
- puts("\nThe template creation process has been started.")
11
-
12
- ruby_file = @params[:gui] ? "rubyw.exe" : "ruby.exe"
13
-
14
- if @params[:gui] == true
15
- vbs_template = File.join(File.expand_path("data/launcher_templates/vbs", __dir__), "vbs_gui.txt")
16
- else
17
- vbs_template = File.join(File.expand_path("data/launcher_templates/vbs", __dir__), "default_vbs.txt")
18
- end
19
-
20
- puts "Using: #{vbs_template}"
21
-
22
- if File.exist?(vbs_template)
23
- content = File.read(vbs_template)
24
-
25
- content.gsub!("STANDALONE_RUBY_PATH", "#{File.join(File.basename(@params[:ruby_path].to_s), "bin", "#{ruby_file}")}")
26
- content.gsub!("STANDALONE_MAIN_FILE", "#{File.basename(@params[:main_file].to_s)}")
27
-
28
- new_launcher_path = File.join(@params[:project_path].to_s, @params[:launcher_name].to_s)
29
- File.open(new_launcher_path, "w") do |f_man|
30
- f_man.puts content
31
- end
32
-
33
- else
34
- print("Handler Error: ".red); puts("The template file could not be found.")
35
- exit!
36
- end
37
- rescue Exception => e
38
- print("Handler Error: ".red); puts("#{e.message}")
39
- end
40
- end
1
+ require 'fileutils'
2
+
3
+ class LauncherHandler
4
+ def initialize(params)
5
+ @params = params
6
+ end
7
+
8
+ def handle
9
+ begin
10
+ puts("\nThe template creation process has been started.")
11
+
12
+ ruby_file = @params[:gui] ? "rubyw.exe" : "ruby.exe"
13
+
14
+ if @params[:gui] == true
15
+ vbs_template = File.join(File.expand_path("data/launcher_templates/vbs", __dir__), "vbs_gui.txt")
16
+ else
17
+ vbs_template = File.join(File.expand_path("data/launcher_templates/vbs", __dir__), "default_vbs.txt")
18
+ end
19
+
20
+ puts "Using: #{vbs_template}"
21
+
22
+ if File.exist?(vbs_template)
23
+ content = File.read(vbs_template)
24
+
25
+ content.gsub!("STANDALONE_RUBY_PATH", "#{File.join(File.basename(@params[:ruby_path].to_s), "bin", "#{ruby_file}")}")
26
+ content.gsub!("STANDALONE_MAIN_FILE", "#{File.basename(@params[:main_file].to_s)}")
27
+
28
+ new_launcher_path = File.join(@params[:project_path].to_s, @params[:launcher_name].to_s)
29
+ File.open(new_launcher_path, "w") do |f_man|
30
+ f_man.puts content
31
+ end
32
+
33
+ else
34
+ print("Handler Error: ".red); puts("The template file could not be found.")
35
+ exit!
36
+ end
37
+ rescue Exception => e
38
+ print("Handler Error: ".red); puts("#{e.message}")
39
+ end
40
+ end
41
41
  end
@@ -1,201 +1,215 @@
1
- require 'fileutils'
2
- require 'tmpdir'
3
- require 'optparse'
4
-
5
- require_relative 'version/version'
6
-
7
- class ParameterParser
8
- def initialize
9
- @params = {
10
- threads: 5,
11
- sfx_path: Dir.tmpdir,
12
- exe: "program.exe",
13
- resource_file: File.join(File.expand_path("data/resource_files", __dir__), "default.rc"),
14
- launcher: "launcher.vbs",
15
- launcher_name: "launcher.vbs",
16
- launcher_type: "vbs"
17
- }
18
-
19
- end
20
-
21
- def normalize_paths!
22
- @params.each do |key, value|
23
- @params[key] = value.gsub('\\', '/') if value.is_a?(String)
24
- end
25
- end
26
-
27
- def display_help
28
- help_text = <<~EOT
29
- Standalone-Ruby v#{StandaloneRuby::VERSION} - Convert your Ruby projects to exe files!
30
-
31
- Usage: standalone-ruby [--help] [--project-path PROJECT_PATH] [--ruby-path RUBY_PATH] [--main-file MAIN_FILE] [--launcher LAUNCHER] [--gui]
32
- [--template TEMPLATE] [--exe-file EXE_FILE] [--threads THREADS] [--resource-file resource_file] [--gcc] [--version]
33
-
34
- Required Options:
35
- --project-path PROJECT_PATH
36
- Target Ruby project path.
37
-
38
- --ruby RUBY_PATH
39
- Path to the Ruby interpreter.
40
-
41
- --main-file MAIN_FILE
42
- Path to the main Ruby file of the project.
43
-
44
- Extra Options:
45
- --exe-file EXE_FILE
46
- Name of the exe file to be used for output (default is program.exe).
47
-
48
- --threads THREADS
49
- Number of threads to use (default is 5). Determines the number of threads used during the Ruby interpreter
50
- copy process and for Robocopy operations. A higher number of threads can speed up the process, but requires more system resources.
51
-
52
- --resource-file RESOURCE_FILE
53
- Resource file (.rc) for the exe file to be created. Only possible with MinGW.
54
-
55
- --help
56
- Show this help message and exit.
57
-
58
- --version
59
- Show program version and exit.
60
-
61
- --gcc
62
- Use GCC compiler for exe file.
63
-
64
- --gui
65
- This option allows the rubyw.exe file in the bin folder to be used.
66
- You can choose it for projects that include GUI.
67
-
68
- Notes:
69
- - Make sure that the Ruby interpreter you are using includes all the gems required for the target project.
70
- - The Ruby interpreter uses Robocopy for copying, and the number of threads given affects the speed of this operation.
71
-
72
- For more details, please visit the documentation at:
73
- https://github.com/ardatetikbey/Standalone-Ruby
74
-
75
- EOT
76
-
77
- puts help_text
78
- end
79
-
80
- def parse
81
- begin
82
- OptionParser.new do |opts|
83
- note = "Note: https://github.com/ardatetikbey/Standalone-Ruby Don't forget to review my github document to get the best results."
84
- opts.banner = "Usage: ruby #{$0} [options]\n#{note}"
85
-
86
- opts.on("--sfx-path SFX_PATH") do |sfx_path|
87
- @params[:sfx_path] = sfx_path
88
- end
89
-
90
- opts.on("--resource-file RESOURCE_FILE") do |resource_file|
91
- if File.exist?(resource_file)
92
- @params[:resource_file] = resource_file
93
- else
94
- print("Parser Error: ".red); puts("The specified resource file #{resource_file} could not be found!")
95
- exit!
96
- end
97
- end
98
-
99
- opts.on("--one-file-exe") do
100
- @params[:one_file_exe] = true
101
- end
102
-
103
- opts.on("--ruby-path RUBY_PATH") do |ruby_path|
104
- ruby_path.strip!
105
- if Dir.exist?("#{ruby_path}")
106
- if Dir.exist?(File.join(ruby_path, "bin"))
107
- @params[:ruby_path] = ruby_path
108
- end
109
- else
110
- print("Parser Error: ".red); puts("The specified Ruby path #{ruby_path} could not be found!")
111
- exit!
112
- end
113
- end
114
-
115
- opts.on("--project-path PROJECT_PATH", String) do |project_path|
116
- project_path.strip!
117
- if Dir.exist?("#{project_path}")
118
- @params[:project_path] = project_path
119
- else
120
- print("Parser Error: ".red); puts("The specified project path #{project_path} could not be found!")
121
- exit!
122
- end
123
- end
124
-
125
- opts.on("--exe-file EXE_FILE") do |exe|
126
- @params[:exe] = exe
127
- end
128
-
129
- opts.on("--gcc") do
130
- @params[:use_gcc] = true
131
- end
132
-
133
- opts.on("--main-file MAIN_FILE", String) do |main_file|
134
- main_file.strip!
135
- if File.exist?(main_file)
136
- @params[:main_file] = main_file
137
- else
138
- print("Parser Error: ".red); puts("The specified file #{main_file} could not be found!")
139
- exit!
140
- end
141
- end
142
-
143
- opts.on("--threads THREADS", Integer) do |threads|
144
- if threads.is_a?(Integer)
145
- @params[:threads] = threads
146
- else
147
- print("Parser Error: ".red); puts("Invalid value for threads. Please provide an integer.")
148
- exit!
149
- end
150
- end
151
-
152
- opts.on("--gui") do
153
- @params[:gui] = true
154
- end
155
-
156
- opts.on("--version") do
157
- puts "Standalone Ruby Gem Version #{StandaloneRuby::VERSION}"
158
- exit!
159
- end
160
-
161
- opts.on("--help") do
162
- display_help
163
- exit!
164
- end
165
- end.parse!
166
-
167
- normalize_paths!
168
-
169
- if @params[:project_path].nil? || @params[:ruby_path].nil? || @params[:main_file].nil?
170
- print("Error: ".red); puts("Missing required parameters. Please provide the necessary parameters:\n -p, -r, -m.\nYou can use the -h parameter for the help menu.")
171
- exit!
172
- end
173
-
174
- rescue Exception => e
175
- print("Parser Error: ".red); puts("#{e.message}".red)
176
- exit!
177
- end
178
- end
179
-
180
- def params
181
- @params
182
- end
183
- end
184
-
185
- class String
186
- def red
187
- "\e[31m#{self}\e[0m"
188
- end
189
-
190
- def green
191
- "\e[32m#{self}\e[0m"
192
- end
193
-
194
- def magenta
195
- "\e[35m#{self}\e[0m"
196
- end
197
-
198
- def yellow
199
- "\e[33m#{self}\e[0m"
200
- end
201
- end
1
+ require 'fileutils'
2
+ require 'tmpdir'
3
+ require 'optparse'
4
+ require 'rbconfig'
5
+
6
+ require_relative 'version/version'
7
+
8
+ class ParameterParser
9
+ def initialize
10
+ platform =
11
+ case RUBY_PLATFORM
12
+ when /win32|mingw|cygwin/
13
+ 'windows'
14
+ when /linux/
15
+ puts "Linux support is on the way!"
16
+ exit!
17
+ else
18
+ print("Error: ".red); puts("unsupported platform")
19
+ exit!
20
+ end
21
+
22
+ @params = {
23
+ platform: platform,
24
+ threads: 5,
25
+ resource_file: File.join(File.expand_path("data/resource_files", __dir__), "default.rc"),
26
+ launcher: "launcher.vbs",
27
+ launcher_name: "launcher.vbs",
28
+ launcher_type: "vbs"
29
+ }
30
+
31
+ if platform == 'windows'
32
+ @params[:ruby_path] = RbConfig::CONFIG['prefix']
33
+ end
34
+ end
35
+
36
+
37
+ def normalize_paths!
38
+ @params.each do |key, value|
39
+ @params[key] = value.gsub('\\', '/') if value.is_a?(String)
40
+ end
41
+ end
42
+
43
+ def display_help
44
+ windows_help_text = <<~EOT
45
+ Standalone-Ruby v#{StandaloneRuby::VERSION} - Make Ruby independent!
46
+
47
+ Usage: standalone-ruby [--help] [--project-path PROJECT_PATH] [--ruby-path RUBY_PATH] [--main-file MAIN_FILE] [--launcher LAUNCHER] [--gui]
48
+ [--template TEMPLATE] [--exe-file EXE_FILE] [--threads THREADS] [--resource-file resource_file] [--gcc] [--version]
49
+
50
+ Example: standalone-ruby --main-file MAIN_FILE_PATH --project-path PROJECT_PATH
51
+
52
+ Required Options:
53
+ --project-path PROJECT_PATH
54
+ Target Ruby project path.
55
+
56
+ --main-file MAIN_FILE
57
+ Path to the main Ruby file of the project.
58
+
59
+ Extra Options:
60
+ --ruby RUBY_PATH
61
+ Path to the Ruby interpreter.
62
+
63
+ --threads THREADS
64
+ Number of threads to use (default is 5). Determines the number of threads used during the Ruby interpreter
65
+ copy process and for Robocopy operations. A higher number of threads can speed up the process, but requires more system resources.
66
+
67
+ --resource-file RESOURCE_FILE
68
+ Resource file (.rc) for the exe file to be created. Only possible with MinGW.
69
+
70
+ --help
71
+ Show this help message and exit.
72
+
73
+ --version
74
+ Show program version and exit.
75
+
76
+ --gcc
77
+ Use GCC compiler for exe file.
78
+
79
+ --gui
80
+ This option allows the rubyw.exe file in the bin folder to be used.
81
+ You can choose it for projects that include GUI.
82
+
83
+ Notes:
84
+ - Make sure that the Ruby interpreter you are using includes all the gems required for the target project.
85
+ - The Ruby interpreter uses Robocopy for copying, and the number of threads given affects the speed of this operation.
86
+
87
+ For more details, please visit the documentation at:
88
+ https://github.com/ardatetikbey/Standalone-Ruby
89
+ EOT
90
+
91
+ linux_help_text = <<~EOT
92
+
93
+ EOT
94
+
95
+ if @params[:platform] == 'windows'
96
+ puts windows_help_text
97
+ else
98
+ puts linux_help_text
99
+ end
100
+ end
101
+
102
+ def parse
103
+ begin
104
+ OptionParser.new do |opts|
105
+ note = "Note: https://github.com/ardatetikbey/Standalone-Ruby Don't forget to review my github document to get the best results."
106
+ opts.banner = "Usage: ruby #{$0} [options]\n#{note}"
107
+
108
+ opts.on("--sfx-path SFX_PATH") do |sfx_path|
109
+ @params[:sfx_path] = sfx_path
110
+ end
111
+
112
+ opts.on("--resource-file RESOURCE_FILE") do |resource_file|
113
+ if File.exist?(resource_file)
114
+ @params[:resource_file] = resource_file
115
+ else
116
+ print("Parser Error: ".red); puts("The specified resource file #{resource_file} could not be found!")
117
+ exit!
118
+ end
119
+ end
120
+
121
+ opts.on("--ruby-path RUBY_PATH") do |ruby_path|
122
+ ruby_path.strip!
123
+ if Dir.exist?("#{ruby_path}")
124
+ if Dir.exist?(File.join(ruby_path, "bin"))
125
+ @params[:ruby_path] = ruby_path
126
+ end
127
+ else
128
+ print("Parser Error: ".red); puts("The specified Ruby path #{ruby_path} could not be found!")
129
+ exit!
130
+ end
131
+ end
132
+
133
+ opts.on("--project-path PROJECT_PATH", String) do |project_path|
134
+ project_path.strip!
135
+ if Dir.exist?("#{project_path}")
136
+ @params[:project_path] = project_path
137
+ else
138
+ print("Parser Error: ".red); puts("The specified project path #{project_path} could not be found!")
139
+ exit!
140
+ end
141
+ end
142
+
143
+ opts.on("--gcc") do
144
+ @params[:use_gcc] = true
145
+ end
146
+
147
+ opts.on("--main-file MAIN_FILE", String) do |main_file|
148
+ main_file.strip!
149
+ if File.exist?(main_file)
150
+ @params[:main_file] = main_file
151
+ else
152
+ print("Parser Error: ".red); puts("The specified file #{main_file} could not be found!")
153
+ exit!
154
+ end
155
+ end
156
+
157
+ opts.on("--threads THREADS", Integer) do |threads|
158
+ if threads.is_a?(Integer)
159
+ @params[:threads] = threads
160
+ else
161
+ print("Parser Error: ".red); puts("Invalid value for threads. Please provide an integer.")
162
+ exit!
163
+ end
164
+ end
165
+
166
+ opts.on("--gui") do
167
+ @params[:gui] = true
168
+ end
169
+
170
+ opts.on("--version") do
171
+ puts "Standalone Ruby Gem Version #{StandaloneRuby::VERSION}"
172
+ exit!
173
+ end
174
+
175
+ opts.on("--help") do
176
+ display_help
177
+ exit!
178
+ end
179
+ end.parse!
180
+
181
+ normalize_paths!
182
+
183
+ if @params[:project_path].nil? || @params[:ruby_path].nil? || @params[:main_file].nil?
184
+ print("Error: ".red); puts("Missing required parameters. Please provide the necessary parameters:\n --project-path, --main-file.\nYou can use the -h parameter for the help menu.")
185
+ exit!
186
+ end
187
+
188
+ rescue Exception => e
189
+ print("Parser Error: ".red); puts("#{e.message}".red)
190
+ exit!
191
+ end
192
+ end
193
+
194
+ def params
195
+ @params
196
+ end
197
+ end
198
+
199
+ class String
200
+ def red
201
+ "\e[31m#{self}\e[0m"
202
+ end
203
+
204
+ def green
205
+ "\e[32m#{self}\e[0m"
206
+ end
207
+
208
+ def magenta
209
+ "\e[35m#{self}\e[0m"
210
+ end
211
+
212
+ def yellow
213
+ "\e[33m#{self}\e[0m"
214
+ end
215
+ end
data/lib/ruby_copy.rb CHANGED
@@ -1,20 +1,48 @@
1
- class RubyCopy
2
- def initialize(params)
3
- @params = params
4
- end
5
-
6
- def robocopy_interpreter
7
- begin
8
- puts("\nThe Ruby interpreter copying process has been started.")
9
- print("WARNING: ".yellow); puts("If you are using a development kit, the copying process may take a long time.")
10
-
11
- copy_output = `robocopy "#{@params[:ruby_path]}" "#{File.join(@params[:project_path].to_s, File.basename(@params[:ruby_path].to_s))}" /E /MT:#{@params[:threads].to_i} /V /ETA /NFL /NDL /R:1000000 /W:30 /NP`
12
- puts "Robocopy Command: robocopy \"#{@params[:ruby_path]}\" \"#{File.join(@params[:project_path], File.basename(@params[:ruby_path]))}\" /E /MT:#{@params[:threads].to_i} /V /ETA /NFL /NDL /R:1000000 /W:30 /NP"
13
-
14
-
15
- puts("The Ruby interpreter copying process has been completed.")
16
- rescue Exception => e
17
- print("Copy Error: ".red); puts("#{e.message}".red)
18
- end
19
- end
20
- end
1
+ class RubyCopy
2
+ def initialize(params)
3
+ @params = params
4
+ end
5
+
6
+ def rsync_interpreter
7
+ begin
8
+ puts("\nRuby interpreter copying process started using rsync.")
9
+
10
+ source = @params[:ruby_path]
11
+ dest = File.join(@params[:project_path].to_s, File.basename(source.to_s))
12
+
13
+ rsync_command = "rsync -avh --progress \"#{source}/\" \"#{dest}/\""
14
+ puts "Rsync Command: #{rsync_command}"
15
+
16
+ `#{rsync_command}`
17
+
18
+ puts("The Ruby interpreter copying process has been completed.")
19
+ rescue Exception => e
20
+ print("Copy Error: ".red)
21
+ puts("#{e.message}".red)
22
+ end
23
+ end
24
+
25
+ def robocopy_interpreter
26
+ begin
27
+ puts("\nThe Ruby interpreter copying process has been started.")
28
+ print("WARNING: ".yellow)
29
+ puts("If you are using a development kit, the copying process may take a long time.")
30
+
31
+ source = @params[:ruby_path]
32
+ dest = File.join(@params[:project_path].to_s, File.basename(source.to_s))
33
+
34
+ robocopy_command = <<~CMD.strip
35
+ robocopy "#{source}" "#{dest}" /E /MT:#{@params[:threads].to_i} /R:2 /W:2 /NP /NFL /NDL
36
+ CMD
37
+
38
+ puts "Robocopy Command: #{robocopy_command}"
39
+
40
+ `#{robocopy_command}`
41
+
42
+ puts("The Ruby interpreter copying process has been completed.")
43
+ rescue Exception => e
44
+ print("Copy Error: ".red)
45
+ puts("#{e.message}".red)
46
+ end
47
+ end
48
+ end
@@ -1,7 +1,7 @@
1
- require_relative 'launcher'
2
-
3
- class Program
4
- def run
5
- Launcher.new.run
6
- end
1
+ require_relative 'launcher'
2
+
3
+ class Program
4
+ def run
5
+ Launcher.new.run
6
+ end
7
7
  end
@@ -1,3 +1,3 @@
1
- module StandaloneRuby
2
- VERSION = "1.5.1"
1
+ module StandaloneRuby
2
+ VERSION = "1.5.2"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standalone-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arda Tetik
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-04-13 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: Convert your Ruby projects to exe files!
13
13
  email:
@@ -99,7 +99,6 @@ files:
99
99
  - lib/launcher_handler.rb
100
100
  - lib/parameter_parser.rb
101
101
  - lib/ruby_copy.rb
102
- - lib/sfx_generator.rb
103
102
  - lib/standalone_ruby.rb
104
103
  - lib/version/version.rb
105
104
  homepage: https://github.com/ardatetikbey/Standalone-Ruby
@@ -123,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
122
  - !ruby/object:Gem::Version
124
123
  version: '0'
125
124
  requirements: []
126
- rubygems_version: 3.6.2
125
+ rubygems_version: 3.6.7
127
126
  specification_version: 4
128
127
  summary: Standalone Ruby application packager
129
128
  test_files: []
data/lib/sfx_generator.rb DELETED
@@ -1,9 +0,0 @@
1
- class SFXGenerator
2
- def initialize(params)
3
- @params = params
4
- end
5
-
6
- def generate_sfx
7
-
8
- end
9
- end