standalone-ruby 1.5.2 → 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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/bin/standalone-ruby +2 -0
- data/lib/displayer.rb +5 -8
- data/lib/exe_packer.rb +1 -1
- data/lib/launcher.rb +1 -2
- data/lib/launcher_handler.rb +2 -2
- data/lib/parameter_parser.rb +16 -13
- data/lib/ruby_copy.rb +2 -2
- data/lib/version/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 191f2c4c200975e72085b4a94cde7747b20f1e16a2aaa5dc7cc383a4d361f3e1
|
4
|
+
data.tar.gz: 1f1346f3a1ab1c3cfa9d23bb392a980de9036821e990728178fe994639a457b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77d4829b24c43bae0a7739a3c33aad71a0ab88ea01e00427e044257fcbcddfa2d755e86cca40b7c2d5d5f4ce439c58b650e04b783fdb7e0e5d2baa874c0649ef
|
7
|
+
data.tar.gz: 0b1b89ab0862c0bc620250e3bc5a27282259bc7bdfbc64530e2a5b3b2ff9356d1ac179ab33d4ab76b32805e9f8d6e03eb9a7cc23db192d2c8b4de60387bf8790
|
data/CHANGELOG.md
CHANGED
data/bin/standalone-ruby
CHANGED
data/lib/displayer.rb
CHANGED
@@ -7,20 +7,17 @@ class Displayer
|
|
7
7
|
|
8
8
|
def display_params
|
9
9
|
begin
|
10
|
-
puts("
|
10
|
+
puts("Working with:")
|
11
11
|
|
12
12
|
display_map = {
|
13
13
|
"Platform" => @params[:platform],
|
14
14
|
"Project Path" => @params[:project_path],
|
15
15
|
"Resource File" => @params[:resource_file],
|
16
|
-
"Exe File" =>
|
17
|
-
"
|
18
|
-
"Ruby Folder" => @params[:ruby_path] ? File.basename(@params[:ruby_path]) : nil,
|
16
|
+
"Exe File" => "program.exe",
|
17
|
+
"Prefix" => @params[:ruby][:prefix],
|
19
18
|
"Main File" => @params[:main_file],
|
20
|
-
"Launcher" =>
|
21
|
-
"
|
22
|
-
"Template" => @params[:template] || "Default Template",
|
23
|
-
"Log Path" => "Users Documents Directory"
|
19
|
+
"Launcher" => "launcher.vbs",
|
20
|
+
"Template" => "Default Template",
|
24
21
|
}
|
25
22
|
|
26
23
|
display_text = display_map.map { |key, value| " - #{key}: #{value}" if value }.compact
|
data/lib/exe_packer.rb
CHANGED
data/lib/launcher.rb
CHANGED
@@ -33,8 +33,7 @@ class Launcher
|
|
33
33
|
@launcher_handler.handle
|
34
34
|
@exe_packer.pack_windows
|
35
35
|
elsif @params[:platform] == 'linux'
|
36
|
-
|
37
|
-
@exe_packer.pack_linux
|
36
|
+
# Version 2.0.0
|
38
37
|
end
|
39
38
|
|
40
39
|
print("\nWARNING: ".yellow); puts("Instead of changing the path of the created exe file, create a shortcut. The same applies here as in every application.")
|
data/lib/launcher_handler.rb
CHANGED
@@ -22,10 +22,10 @@ class LauncherHandler
|
|
22
22
|
if File.exist?(vbs_template)
|
23
23
|
content = File.read(vbs_template)
|
24
24
|
|
25
|
-
content.gsub!("STANDALONE_RUBY_PATH", "#{File.join(File.basename(@params[:
|
25
|
+
content.gsub!("STANDALONE_RUBY_PATH", "#{File.join(File.basename(@params[:ruby][:prefix].to_s), "bin", "#{ruby_file}")}")
|
26
26
|
content.gsub!("STANDALONE_MAIN_FILE", "#{File.basename(@params[:main_file].to_s)}")
|
27
27
|
|
28
|
-
new_launcher_path = File.join(@params[:project_path].to_s,
|
28
|
+
new_launcher_path = File.join(@params[:project_path].to_s, "launcher.vbs")
|
29
29
|
File.open(new_launcher_path, "w") do |f_man|
|
30
30
|
f_man.puts content
|
31
31
|
end
|
data/lib/parameter_parser.rb
CHANGED
@@ -21,16 +21,23 @@ class ParameterParser
|
|
21
21
|
|
22
22
|
@params = {
|
23
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
|
+
|
24
38
|
threads: 5,
|
25
39
|
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
40
|
}
|
30
|
-
|
31
|
-
if platform == 'windows'
|
32
|
-
@params[:ruby_path] = RbConfig::CONFIG['prefix']
|
33
|
-
end
|
34
41
|
end
|
35
42
|
|
36
43
|
|
@@ -89,7 +96,7 @@ class ParameterParser
|
|
89
96
|
EOT
|
90
97
|
|
91
98
|
linux_help_text = <<~EOT
|
92
|
-
|
99
|
+
Version 2.0.0
|
93
100
|
EOT
|
94
101
|
|
95
102
|
if @params[:platform] == 'windows'
|
@@ -105,10 +112,6 @@ EOT
|
|
105
112
|
note = "Note: https://github.com/ardatetikbey/Standalone-Ruby Don't forget to review my github document to get the best results."
|
106
113
|
opts.banner = "Usage: ruby #{$0} [options]\n#{note}"
|
107
114
|
|
108
|
-
opts.on("--sfx-path SFX_PATH") do |sfx_path|
|
109
|
-
@params[:sfx_path] = sfx_path
|
110
|
-
end
|
111
|
-
|
112
115
|
opts.on("--resource-file RESOURCE_FILE") do |resource_file|
|
113
116
|
if File.exist?(resource_file)
|
114
117
|
@params[:resource_file] = resource_file
|
@@ -180,7 +183,7 @@ EOT
|
|
180
183
|
|
181
184
|
normalize_paths!
|
182
185
|
|
183
|
-
if @params[:project_path].nil? || @params[:
|
186
|
+
if @params[:project_path].nil? || @params[:ruby][:prefix].nil? || @params[:main_file].nil?
|
184
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.")
|
185
188
|
exit!
|
186
189
|
end
|
data/lib/ruby_copy.rb
CHANGED
@@ -7,7 +7,7 @@ class RubyCopy
|
|
7
7
|
begin
|
8
8
|
puts("\nRuby interpreter copying process started using rsync.")
|
9
9
|
|
10
|
-
source = @params[:
|
10
|
+
source = @params[:ruby][:prefix]
|
11
11
|
dest = File.join(@params[:project_path].to_s, File.basename(source.to_s))
|
12
12
|
|
13
13
|
rsync_command = "rsync -avh --progress \"#{source}/\" \"#{dest}/\""
|
@@ -28,7 +28,7 @@ class RubyCopy
|
|
28
28
|
print("WARNING: ".yellow)
|
29
29
|
puts("If you are using a development kit, the copying process may take a long time.")
|
30
30
|
|
31
|
-
source = @params[:
|
31
|
+
source = @params[:ruby][:prefix]
|
32
32
|
dest = File.join(@params[:project_path].to_s, File.basename(source.to_s))
|
33
33
|
|
34
34
|
robocopy_command = <<~CMD.strip
|
data/lib/version/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: standalone-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arda Tetik
|
@@ -9,7 +9,7 @@ bindir: bin
|
|
9
9
|
cert_chain: []
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies: []
|
12
|
-
description:
|
12
|
+
description: Make Ruby independent!
|
13
13
|
email:
|
14
14
|
- ardatetik1881@gmail.com
|
15
15
|
executables:
|