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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2921f77b76ba372b4a81ee484795300bdcfc150fcf6fb93155029009da7a6ff7
4
- data.tar.gz: ffc848d1883465b71bea7c6c08c4f025942271a48e70da0b7b60f3a2ca11572a
3
+ metadata.gz: 191f2c4c200975e72085b4a94cde7747b20f1e16a2aaa5dc7cc383a4d361f3e1
4
+ data.tar.gz: 1f1346f3a1ab1c3cfa9d23bb392a980de9036821e990728178fe994639a457b6
5
5
  SHA512:
6
- metadata.gz: 2eb7c1d84c2d59eff783c5e948fe55c7a51005951f659fd7daff160b085a1c227ddfa5f89b1ae28db3c620cd8666dd3b4489d3f649f59ea3820ee3243e991b4d
7
- data.tar.gz: 7b28220a4cfc180d3961593b514e3209e1e8e37bc8ca2f2be9f1f56a8a691aef87e2ebd02f0d36b7d78c3b1003fa8f9222154b0928523046817f122c72a6ff00
6
+ metadata.gz: 77d4829b24c43bae0a7739a3c33aad71a0ab88ea01e00427e044257fcbcddfa2d755e86cca40b7c2d5d5f4ce439c58b650e04b783fdb7e0e5d2baa874c0649ef
7
+ data.tar.gz: 0b1b89ab0862c0bc620250e3bc5a27282259bc7bdfbc64530e2a5b3b2ff9356d1ac179ab33d4ab76b32805e9f8d6e03eb9a7cc23db192d2c8b4de60387bf8790
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ # [1.5.3] - 2025-06-21
4
+ - Minor changes to the code structure
5
+ - Removed sfx support which in development
6
+
3
7
  ## [1.5.2] - 2025-06-20
4
8
  - Changes have been made to the parser
5
9
  - Added automatic detection for Ruby interpreter path
data/bin/standalone-ruby CHANGED
@@ -1,3 +1,5 @@
1
+ # Standalone-Ruby
2
+
1
3
  require File.expand_path('../lib/standalone_ruby', __dir__)
2
4
 
3
5
  standalone_ruby = Program.new
data/lib/displayer.rb CHANGED
@@ -7,20 +7,17 @@ class Displayer
7
7
 
8
8
  def display_params
9
9
  begin
10
- puts("Parameters:")
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" => @params[:exe],
17
- "Ruby Path" => @params[:ruby_path],
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" => @params[:launcher],
21
- "Launcher Type" => @params[:launcher_type],
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
@@ -4,7 +4,7 @@ class ExePacker
4
4
  end
5
5
 
6
6
  def pack_linux
7
- puts
7
+ # Version 2.0.0
8
8
  end
9
9
 
10
10
  def pack_windows
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
- @ruby_copy.rsync_interpreter
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.")
@@ -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[:ruby_path].to_s), "bin", "#{ruby_file}")}")
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, @params[:launcher_name].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
@@ -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[:ruby_path].nil? || @params[:main_file].nil?
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[:ruby_path]
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[:ruby_path]
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
@@ -1,3 +1,3 @@
1
1
  module StandaloneRuby
2
- VERSION = "1.5.2"
2
+ VERSION = "1.5.3"
3
3
  end
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.2
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: Convert your Ruby projects to exe files!
12
+ description: Make Ruby independent!
13
13
  email:
14
14
  - ardatetik1881@gmail.com
15
15
  executables: