standalone-ruby 1.4 → 1.4.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/bin/standalone-ruby +1 -1
- data/lib/data/exe_template/launcher_stub.c +10 -15
- data/lib/standalone_ruby.rb +1 -1
- data/lib/utils/displayer.rb +20 -18
- data/lib/utils/exe_packer.rb +5 -1
- data/lib/utils/launcher.rb +1 -1
- data/lib/utils/parameter_parser.rb +7 -2
- data/lib/utils/ruby_copy.rb +0 -1
- data/lib/version/version.rb +3 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe559b571044132ebcebf950af268390f5009c482bdb015854f72b632e42c3da
|
4
|
+
data.tar.gz: a64e59f677a1748f79e297ac3b6070bde2b061e07dd2c7aabf206f081bb8687a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d8deff562c776976cfec36842691c02c1c2bac027af1cd6a53cc4d6eed966e4679500737e8618b754b0a19d30cdfcd1566654800d7939ec08e93b8cfc80bba7
|
7
|
+
data.tar.gz: 9ed83514709d966dfea42547053c59b1de8cd67df2c3988110cf328fd513e85b4539ce55d69d3aa13743ef3d1fbe9ce7e4b68b3833fa8664ea893992e0295250
|
data/CHANGELOG.md
CHANGED
@@ -24,4 +24,11 @@
|
|
24
24
|
|
25
25
|
## [1.4] - 2025-04-06
|
26
26
|
- Added exe support!
|
27
|
-
- Improvements have been made for non-GUI programs.
|
27
|
+
- Improvements have been made for non-GUI programs.
|
28
|
+
|
29
|
+
## [1.4.1] - 2025-04-06
|
30
|
+
- Displayer outputs changed.
|
31
|
+
|
32
|
+
## [1.4.2] - 2025-04-08
|
33
|
+
- The text output of the Robocopy operation is removed from the screen
|
34
|
+
- Help message edited
|
data/bin/standalone-ruby
CHANGED
@@ -1,30 +1,25 @@
|
|
1
1
|
#include <windows.h>
|
2
2
|
|
3
3
|
int main() {
|
4
|
-
// VBS dosyasının yolu
|
5
4
|
char command[] = "wscript.exe LAUNCHER_FILE";
|
6
5
|
|
7
|
-
// CreateProcess için gerekli yapı
|
8
6
|
STARTUPINFO si = {0};
|
9
7
|
PROCESS_INFORMATION pi = {0};
|
10
8
|
|
11
|
-
// CreateProcess fonksiyonu ile dış programı başlatıyoruz
|
12
9
|
if (CreateProcess(
|
13
|
-
NULL,
|
14
|
-
command,
|
15
|
-
NULL,
|
16
|
-
NULL,
|
17
|
-
FALSE,
|
18
|
-
0,
|
19
|
-
NULL,
|
20
|
-
NULL,
|
21
|
-
&si,
|
22
|
-
&pi
|
10
|
+
NULL,
|
11
|
+
command,
|
12
|
+
NULL,
|
13
|
+
NULL,
|
14
|
+
FALSE,
|
15
|
+
0,
|
16
|
+
NULL,
|
17
|
+
NULL,
|
18
|
+
&si,
|
19
|
+
&pi
|
23
20
|
)) {
|
24
|
-
// Başarılıysa, sürecin tamamlanmasını bekleyelim
|
25
21
|
WaitForSingleObject(pi.hProcess, INFINITE);
|
26
22
|
|
27
|
-
// Sürecin bitişiyle ilgili bilgileri temizleyelim
|
28
23
|
CloseHandle(pi.hProcess);
|
29
24
|
CloseHandle(pi.hThread);
|
30
25
|
} else {
|
data/lib/standalone_ruby.rb
CHANGED
data/lib/utils/displayer.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require_relative 'logger_helper'
|
2
|
+
require_relative '../version/version'
|
2
3
|
|
3
4
|
class Displayer
|
4
5
|
def initialize(params)
|
@@ -8,32 +9,33 @@ class Displayer
|
|
8
9
|
|
9
10
|
def display_params
|
10
11
|
begin
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
display_text
|
12
|
+
display_map = {
|
13
|
+
"Platform" => @params[:platform],
|
14
|
+
"Project Path" => @params[:project_path],
|
15
|
+
"Exe File" => @params[:exe],
|
16
|
+
"Ruby Path" => @params[:ruby_path],
|
17
|
+
"Ruby Folder" => @params[:ruby_path] ? File.basename(@params[:ruby_path]) : nil,
|
18
|
+
"Main File" => @params[:main_file],
|
19
|
+
"Launcher" => @params[:launcher],
|
20
|
+
"Launcher Type" => @params[:launcher_type],
|
21
|
+
"Template" => @params[:template] || "Default Template",
|
22
|
+
"Log Path" => "Users Documents Directory"
|
23
|
+
}
|
24
|
+
|
25
|
+
display_text = display_map.map { |key, value| "#{key}: #{value}" if value }.compact
|
25
26
|
|
26
27
|
puts display_text.join("\n") unless display_text.empty?
|
27
28
|
|
28
|
-
rescue
|
29
|
-
print("Display Error: ".red); puts(
|
29
|
+
rescue => e
|
30
|
+
print("Display Error: ".red); puts(e.message.red)
|
30
31
|
@logger.error("Display Error: #{e.message}")
|
31
32
|
end
|
32
33
|
end
|
33
34
|
|
35
|
+
|
34
36
|
def banner
|
35
|
-
banner = -<<
|
36
|
-
Standalone-Ruby
|
37
|
+
banner = -<<"BANNER"
|
38
|
+
Standalone-Ruby v#{StandaloneRuby::VERSION} - Package your Ruby projects as exe!
|
37
39
|
# Github: https://github.com/ardatetikbey/Standalone-Ruby
|
38
40
|
# RubyGems: https://rubygems.org/gems/standalone-ruby
|
39
41
|
|
data/lib/utils/exe_packer.rb
CHANGED
@@ -48,7 +48,7 @@ class ExePacker
|
|
48
48
|
File.delete(stub_output)
|
49
49
|
@logger.info("Stub file deleted successfully")
|
50
50
|
|
51
|
-
puts("\nExe file has been generated!")
|
51
|
+
puts("\nExe file has been generated!".green_bold_dark)
|
52
52
|
@logger.info("Exe file generated successfully at: #{exe_path}")
|
53
53
|
rescue Exception => err
|
54
54
|
@logger.error("Error occurred: #{err.message}")
|
@@ -65,4 +65,8 @@ class String
|
|
65
65
|
def yellow
|
66
66
|
"\e[33m#{self}\e[0m"
|
67
67
|
end
|
68
|
+
|
69
|
+
def green_bold_dark
|
70
|
+
"\e[1m\e[38;5;28m#{self}\e[0m"
|
71
|
+
end
|
68
72
|
end
|
data/lib/utils/launcher.rb
CHANGED
@@ -55,7 +55,7 @@ class Launcher
|
|
55
55
|
@exe_packer.pack
|
56
56
|
@logger.info("Exe pack finished.")
|
57
57
|
|
58
|
-
puts "
|
58
|
+
puts "Thanks for using Standalone-Ruby! Don't forget to star the project on Github."
|
59
59
|
|
60
60
|
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.")
|
61
61
|
@logger.info("Program finished.")
|
@@ -2,6 +2,7 @@ require 'fileutils'
|
|
2
2
|
require 'optparse'
|
3
3
|
|
4
4
|
require_relative 'logger_helper'
|
5
|
+
require_relative '../version/version'
|
5
6
|
|
6
7
|
class ParameterParser
|
7
8
|
def initialize
|
@@ -20,7 +21,7 @@ class ParameterParser
|
|
20
21
|
|
21
22
|
def display_help
|
22
23
|
help_text = <<~EOT
|
23
|
-
Standalone-Ruby
|
24
|
+
Standalone-Ruby v#{StandaloneRuby::VERSION} - Package your Ruby projects as exe!
|
24
25
|
|
25
26
|
Usage: standalone-ruby [-h] [-p PROJECT_PATH] [-r RUBY_PATH] [-m MAIN_FILE] [-l LAUNCHER] [-t TEMPLATE] [-e EXE_FILE] [-c THREADS] [-g] [-v]
|
26
27
|
|
@@ -52,6 +53,10 @@ class ParameterParser
|
|
52
53
|
-h, --help Show this help message.
|
53
54
|
|
54
55
|
-v, --version Show program version.
|
56
|
+
|
57
|
+
Notes:
|
58
|
+
- Make sure that the Ruby interpreter you are using includes all the gems required for the target project.
|
59
|
+
- The Ruby interpreter uses Robocopy for copying, and the number of threads given affects the speed of this operation.
|
55
60
|
|
56
61
|
For more details, please visit the documentation at:
|
57
62
|
https://github.com/ardatetikbey/Standalone-Ruby
|
@@ -157,7 +162,7 @@ class ParameterParser
|
|
157
162
|
end
|
158
163
|
|
159
164
|
opts.on("-v", "--version") do
|
160
|
-
puts "Standalone Ruby Gem Version
|
165
|
+
puts "Standalone Ruby Gem Version #{StandaloneRuby::VERSION}"
|
161
166
|
exit!
|
162
167
|
end
|
163
168
|
|
data/lib/utils/ruby_copy.rb
CHANGED
@@ -15,7 +15,6 @@ class RubyCopy
|
|
15
15
|
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`
|
16
16
|
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"
|
17
17
|
|
18
|
-
puts copy_output
|
19
18
|
@logger.info("Robocopy output printed to screen.")
|
20
19
|
|
21
20
|
puts("The Ruby interpreter copying process has been completed.")
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: standalone-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arda Tetik
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-04-
|
10
|
+
date: 2025-04-08 00:00:00.000000000 Z
|
11
11
|
dependencies: []
|
12
12
|
description: Make your projects installation independent!
|
13
13
|
email:
|
14
|
-
-
|
14
|
+
- ardatetik1881@gmail.com
|
15
15
|
executables:
|
16
16
|
- standalone-ruby
|
17
17
|
extensions: []
|
@@ -104,6 +104,7 @@ files:
|
|
104
104
|
- lib/utils/logger_helper.rb
|
105
105
|
- lib/utils/parameter_parser.rb
|
106
106
|
- lib/utils/ruby_copy.rb
|
107
|
+
- lib/version/version.rb
|
107
108
|
homepage: https://github.com/ardatetikbey/Standalone-Ruby
|
108
109
|
licenses:
|
109
110
|
- MIT
|