rb2exe 0.1.44 → 0.1.45
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/rb2exe +53 -2
- data/bin/rb2exe.rb +0 -51
- data/lib/rb2exe/version.rb +1 -1
- data/rb2exe.gemspec +1 -1
- metadata +3 -4
- data/bin/traveling-ruby-2.2.2/test-rake +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d27f80389d17d0b108a691aa1eb0d036cb0dd78
|
4
|
+
data.tar.gz: 8f287f8f3ca9a9945f64b2f679a1c96e5e4981a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95d4f0c639d215604e52363665dae891deea3ae15074c6fa50148c579cd19db40e510549d96899e4f22135a328c9c58ceb15e79c3b3dd575ac38bb7f7633258b
|
7
|
+
data.tar.gz: 611cfeeebccfe5e4b5f9ab25a83d75c88f1a71eb79068fca83a9a908aaf88ac4a7b20b057e5942625f41465c9a465fc00f9db76a8e6fe2f9177f32a792a4cae2
|
data/bin/rb2exe
CHANGED
@@ -1,3 +1,54 @@
|
|
1
|
-
#!/bin/
|
1
|
+
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
3
|
+
# Usage:
|
4
|
+
# rb2exe <app directory> <app main file> <output>
|
5
|
+
# Eg: rb2exe . test.rb test.sh
|
6
|
+
#
|
7
|
+
# WARNING: the entire <app directory> will be packed
|
8
|
+
require "tmpdir"
|
9
|
+
|
10
|
+
def blank?(arg)
|
11
|
+
"#{arg}".strip == ""
|
12
|
+
end
|
13
|
+
|
14
|
+
# Gem path
|
15
|
+
gem_dir = File.expand_path(File.dirname(__FILE__) + "/..")
|
16
|
+
|
17
|
+
# App directory
|
18
|
+
pwd = Dir.pwd
|
19
|
+
app_dir = blank?(ARGV[0]) ? pwd : "#{pwd}/#{ARGV[0]}"
|
20
|
+
app_dir = File.expand_path(app_dir)
|
21
|
+
if ! Dir.exists?(app_dir)
|
22
|
+
abort "Directory #{app_dir} doesn't exist."
|
23
|
+
else
|
24
|
+
puts "Converting: #{app_dir}"
|
25
|
+
end
|
26
|
+
|
27
|
+
# Main ruby app (filename)
|
28
|
+
main_app_path = ARGV[1]
|
29
|
+
if blank?(main_app_path)
|
30
|
+
abort("You need to specify a ruby file.")
|
31
|
+
end
|
32
|
+
|
33
|
+
# Executable filename
|
34
|
+
exe_fn = blank?(ARGV[2]) ? "output" : ARGV[2]
|
35
|
+
|
36
|
+
# Ruby version should be 2.2.2, 64 bits:
|
37
|
+
version = `echo $RUBY_VERSION`.strip
|
38
|
+
if version != "ruby-2.2.2"
|
39
|
+
abort "Your ruby version should be EXACTLY 2.2.2, not higher, not lower (your is #{version})."
|
40
|
+
end
|
41
|
+
|
42
|
+
# Temporary directory
|
43
|
+
result = "Error"
|
44
|
+
Dir.mktmpdir do |tmp_dir|
|
45
|
+
FileUtils.mkdir_p("#{tmp_dir}/payload/lib")
|
46
|
+
FileUtils.cp_r("#{gem_dir}/bin/traveling-ruby-2.2.2", "#{tmp_dir}/payload/lib/ruby") # Copy ruby traveler 2.2.2 on "payload/lib/ruby"
|
47
|
+
FileUtils.cp_r(app_dir, "#{tmp_dir}/payload/lib/app") # Move the "app" folder to "payload/lib"
|
48
|
+
FileUtils.cp_r("#{gem_dir}/bin/installer", "#{tmp_dir}/payload/") # Create a wrapper script (name it as "installer")
|
49
|
+
FileUtils.cp_r("#{gem_dir}/bin/build", "#{tmp_dir}/") # Package builder
|
50
|
+
FileUtils.cp_r("#{gem_dir}/bin/decompress", "#{tmp_dir}/")
|
51
|
+
result = `#{tmp_dir}/build #{tmp_dir} #{main_app_path} #{exe_fn}`
|
52
|
+
FileUtils.mv("#{tmp_dir}/output", app_dir) # Output
|
53
|
+
end
|
54
|
+
print result
|
data/bin/rb2exe.rb
CHANGED
@@ -1,51 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
# Usage:
|
4
|
-
# rb2exe <app directory> <app main file> <output>
|
5
|
-
# Eg: rb2exe . test.rb test.sh
|
6
|
-
#
|
7
|
-
# WARNING: the entire <app directory> will be packed
|
8
|
-
require "tmpdir"
|
9
|
-
|
10
|
-
def blank?(arg)
|
11
|
-
"#{arg}".strip == ""
|
12
|
-
end
|
13
|
-
|
14
|
-
# Gem path
|
15
|
-
gem_dir = File.expand_path(File.dirname(__FILE__) + "/..")
|
16
|
-
|
17
|
-
# App directory
|
18
|
-
pwd = Dir.pwd
|
19
|
-
app_dir = blank?(ARGV[0]) ? pwd : "#{pwd}/#{ARGV[0]}"
|
20
|
-
app_dir = File.expand_path(app_dir)
|
21
|
-
if ! Dir.exists?(app_dir)
|
22
|
-
abort "Directory #{app_dir} doesn't exist."
|
23
|
-
else
|
24
|
-
puts "Converting: #{app_dir}"
|
25
|
-
end
|
26
|
-
|
27
|
-
# Main ruby app (filename)
|
28
|
-
main_app_path = ARGV[1]
|
29
|
-
|
30
|
-
# Executable filename
|
31
|
-
exe_fn = blank?(ARGV[2]) ? "output" : ARGV[2]
|
32
|
-
|
33
|
-
# Ruby version should be 2.2.2, 64 bits:
|
34
|
-
version = `echo $RUBY_VERSION`.strip
|
35
|
-
if version != "ruby-2.2.2"
|
36
|
-
abort "Your ruby version should be EXACTLY 2.2.2, not higher, not lower (your is #{version})."
|
37
|
-
end
|
38
|
-
|
39
|
-
# Temporary directory
|
40
|
-
result = "Error"
|
41
|
-
Dir.mktmpdir do |tmp_dir|
|
42
|
-
FileUtils.mkdir_p("#{tmp_dir}/payload/lib")
|
43
|
-
FileUtils.cp_r("#{gem_dir}/bin/traveling-ruby-2.2.2", "#{tmp_dir}/payload/lib/ruby") # Copy ruby traveler 2.2.2 on "payload/lib/ruby"
|
44
|
-
FileUtils.cp_r(app_dir, "#{tmp_dir}/payload/lib/app") # Move the "app" folder to "payload/lib"
|
45
|
-
FileUtils.cp_r("#{gem_dir}/bin/installer", "#{tmp_dir}/payload/") # Create a wrapper script (name it as "installer")
|
46
|
-
FileUtils.cp_r("#{gem_dir}/bin/build", "#{tmp_dir}/") # Package builder
|
47
|
-
FileUtils.cp_r("#{gem_dir}/bin/decompress", "#{tmp_dir}/")
|
48
|
-
result = `#{tmp_dir}/build #{tmp_dir} #{main_app_path} #{exe_fn}`
|
49
|
-
FileUtils.mv("#{tmp_dir}/output", app_dir) # Output
|
50
|
-
end
|
51
|
-
print result
|
data/lib/rb2exe/version.rb
CHANGED
data/rb2exe.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.bindir = "bin"
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ["lib"]
|
20
|
-
spec.executables << 'rb2exe
|
20
|
+
spec.executables << 'rb2exe'
|
21
21
|
|
22
22
|
spec.add_development_dependency "bundler", "~> 1.12"
|
23
23
|
spec.add_development_dependency "rake", "~> 10.0"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rb2exe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.45
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Loureiro
|
@@ -42,7 +42,7 @@ description: Ruby to EXE - Turn ruby scripts into portable executable apps.
|
|
42
42
|
email:
|
43
43
|
- loureirorg@gmail.com
|
44
44
|
executables:
|
45
|
-
- rb2exe
|
45
|
+
- rb2exe
|
46
46
|
extensions: []
|
47
47
|
extra_rdoc_files: []
|
48
48
|
files:
|
@@ -1051,7 +1051,6 @@ files:
|
|
1051
1051
|
- bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/default/psych-2.0.8.gemspec
|
1052
1052
|
- bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/default/rake-10.4.2.gemspec
|
1053
1053
|
- bin/traveling-ruby-2.2.2/lib/ruby/gems/2.2.0/specifications/default/rdoc-4.2.0.gemspec
|
1054
|
-
- bin/traveling-ruby-2.2.2/test-rake
|
1055
1054
|
- lib/rb2exe.rb
|
1056
1055
|
- lib/rb2exe/version.rb
|
1057
1056
|
- rb2exe.gemspec
|
@@ -1074,7 +1073,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1074
1073
|
version: '0'
|
1075
1074
|
requirements: []
|
1076
1075
|
rubyforge_project:
|
1077
|
-
rubygems_version: 2.
|
1076
|
+
rubygems_version: 2.4.8
|
1078
1077
|
signing_key:
|
1079
1078
|
specification_version: 4
|
1080
1079
|
summary: Ruby to Executable
|
@@ -1 +0,0 @@
|
|
1
|
-
/home/daniel/projects/test-rake
|