standalone-ruby 1.5.1 → 1.5.3

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 +57 -48
  3. data/bin/standalone-ruby +5 -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 +60 -63
  77. data/lib/exe_packer.rb +72 -68
  78. data/lib/launcher.rb +57 -71
  79. data/lib/launcher_handler.rb +40 -40
  80. data/lib/parameter_parser.rb +218 -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 +4 -5
  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][:prefix].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, "launcher.vbs")
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,218 @@
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
+ ruby: {
25
+ version: RUBY_VERSION,
26
+ host_os: RbConfig::CONFIG['host_os'],
27
+ arch: RbConfig::CONFIG['arch'],
28
+ bindir: RbConfig::CONFIG['bindir'],
29
+ exe_path: File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name']),
30
+ install_name: RbConfig::CONFIG['ruby_install_name'],
31
+ libdir: RbConfig::CONFIG['libdir'],
32
+ rubylibdir: RbConfig::CONFIG['rubylibdir'],
33
+ sitelibdir: RbConfig::CONFIG['sitelibdir'],
34
+ vendordir: RbConfig::CONFIG['vendordir'],
35
+ prefix: RbConfig::CONFIG['prefix'],
36
+ },
37
+
38
+ threads: 5,
39
+ resource_file: File.join(File.expand_path("data/resource_files", __dir__), "default.rc"),
40
+ }
41
+ end
42
+
43
+
44
+ def normalize_paths!
45
+ @params.each do |key, value|
46
+ @params[key] = value.gsub('\\', '/') if value.is_a?(String)
47
+ end
48
+ end
49
+
50
+ def display_help
51
+ windows_help_text = <<~EOT
52
+ Standalone-Ruby v#{StandaloneRuby::VERSION} - Make Ruby independent!
53
+
54
+ Usage: standalone-ruby [--help] [--project-path PROJECT_PATH] [--ruby-path RUBY_PATH] [--main-file MAIN_FILE] [--launcher LAUNCHER] [--gui]
55
+ [--template TEMPLATE] [--exe-file EXE_FILE] [--threads THREADS] [--resource-file resource_file] [--gcc] [--version]
56
+
57
+ Example: standalone-ruby --main-file MAIN_FILE_PATH --project-path PROJECT_PATH
58
+
59
+ Required Options:
60
+ --project-path PROJECT_PATH
61
+ Target Ruby project path.
62
+
63
+ --main-file MAIN_FILE
64
+ Path to the main Ruby file of the project.
65
+
66
+ Extra Options:
67
+ --ruby RUBY_PATH
68
+ Path to the Ruby interpreter.
69
+
70
+ --threads THREADS
71
+ Number of threads to use (default is 5). Determines the number of threads used during the Ruby interpreter
72
+ copy process and for Robocopy operations. A higher number of threads can speed up the process, but requires more system resources.
73
+
74
+ --resource-file RESOURCE_FILE
75
+ Resource file (.rc) for the exe file to be created. Only possible with MinGW.
76
+
77
+ --help
78
+ Show this help message and exit.
79
+
80
+ --version
81
+ Show program version and exit.
82
+
83
+ --gcc
84
+ Use GCC compiler for exe file.
85
+
86
+ --gui
87
+ This option allows the rubyw.exe file in the bin folder to be used.
88
+ You can choose it for projects that include GUI.
89
+
90
+ Notes:
91
+ - Make sure that the Ruby interpreter you are using includes all the gems required for the target project.
92
+ - The Ruby interpreter uses Robocopy for copying, and the number of threads given affects the speed of this operation.
93
+
94
+ For more details, please visit the documentation at:
95
+ https://github.com/ardatetikbey/Standalone-Ruby
96
+ EOT
97
+
98
+ linux_help_text = <<~EOT
99
+ Version 2.0.0
100
+ EOT
101
+
102
+ if @params[:platform] == 'windows'
103
+ puts windows_help_text
104
+ else
105
+ puts linux_help_text
106
+ end
107
+ end
108
+
109
+ def parse
110
+ begin
111
+ OptionParser.new do |opts|
112
+ note = "Note: https://github.com/ardatetikbey/Standalone-Ruby Don't forget to review my github document to get the best results."
113
+ opts.banner = "Usage: ruby #{$0} [options]\n#{note}"
114
+
115
+ opts.on("--resource-file RESOURCE_FILE") do |resource_file|
116
+ if File.exist?(resource_file)
117
+ @params[:resource_file] = resource_file
118
+ else
119
+ print("Parser Error: ".red); puts("The specified resource file #{resource_file} could not be found!")
120
+ exit!
121
+ end
122
+ end
123
+
124
+ opts.on("--ruby-path RUBY_PATH") do |ruby_path|
125
+ ruby_path.strip!
126
+ if Dir.exist?("#{ruby_path}")
127
+ if Dir.exist?(File.join(ruby_path, "bin"))
128
+ @params[:ruby_path] = ruby_path
129
+ end
130
+ else
131
+ print("Parser Error: ".red); puts("The specified Ruby path #{ruby_path} could not be found!")
132
+ exit!
133
+ end
134
+ end
135
+
136
+ opts.on("--project-path PROJECT_PATH", String) do |project_path|
137
+ project_path.strip!
138
+ if Dir.exist?("#{project_path}")
139
+ @params[:project_path] = project_path
140
+ else
141
+ print("Parser Error: ".red); puts("The specified project path #{project_path} could not be found!")
142
+ exit!
143
+ end
144
+ end
145
+
146
+ opts.on("--gcc") do
147
+ @params[:use_gcc] = true
148
+ end
149
+
150
+ opts.on("--main-file MAIN_FILE", String) do |main_file|
151
+ main_file.strip!
152
+ if File.exist?(main_file)
153
+ @params[:main_file] = main_file
154
+ else
155
+ print("Parser Error: ".red); puts("The specified file #{main_file} could not be found!")
156
+ exit!
157
+ end
158
+ end
159
+
160
+ opts.on("--threads THREADS", Integer) do |threads|
161
+ if threads.is_a?(Integer)
162
+ @params[:threads] = threads
163
+ else
164
+ print("Parser Error: ".red); puts("Invalid value for threads. Please provide an integer.")
165
+ exit!
166
+ end
167
+ end
168
+
169
+ opts.on("--gui") do
170
+ @params[:gui] = true
171
+ end
172
+
173
+ opts.on("--version") do
174
+ puts "Standalone Ruby Gem Version #{StandaloneRuby::VERSION}"
175
+ exit!
176
+ end
177
+
178
+ opts.on("--help") do
179
+ display_help
180
+ exit!
181
+ end
182
+ end.parse!
183
+
184
+ normalize_paths!
185
+
186
+ if @params[:project_path].nil? || @params[:ruby][:prefix].nil? || @params[:main_file].nil?
187
+ 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.")
188
+ exit!
189
+ end
190
+
191
+ rescue Exception => e
192
+ print("Parser Error: ".red); puts("#{e.message}".red)
193
+ exit!
194
+ end
195
+ end
196
+
197
+ def params
198
+ @params
199
+ end
200
+ end
201
+
202
+ class String
203
+ def red
204
+ "\e[31m#{self}\e[0m"
205
+ end
206
+
207
+ def green
208
+ "\e[32m#{self}\e[0m"
209
+ end
210
+
211
+ def magenta
212
+ "\e[35m#{self}\e[0m"
213
+ end
214
+
215
+ def yellow
216
+ "\e[33m#{self}\e[0m"
217
+ end
218
+ 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][:prefix]
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][:prefix]
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.3"
3
3
  end
metadata CHANGED
@@ -1,15 +1,15 @@
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.3
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
- description: Convert your Ruby projects to exe files!
12
+ description: Make Ruby independent!
13
13
  email:
14
14
  - ardatetik1881@gmail.com
15
15
  executables:
@@ -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