ocran 1.3.12 → 1.3.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d3a58068c425f2d336d76700e029910fb63f307f43a3323e72ccf3f6f80cc575
4
- data.tar.gz: 9876cc77dbccd0ce1f0278f326e381d78656fc75417be8693d6218af0073cbd7
3
+ metadata.gz: 449194532d3384d90405c64c563178872353c0174ac273f6d139b5af97b74098
4
+ data.tar.gz: fd72ceea04583f1023000765017a70f12d87b517f847119b722d1af2810028ea
5
5
  SHA512:
6
- metadata.gz: ab3b92cd5d2a1e93a09bcfd99d9992e48c110b38e775d68a1ee5104f0601eb11ba13b428b447831bb771330c300c719b633413d4350d01205bd8700423408fc8
7
- data.tar.gz: 4dc1c362a1f6589c1cf5df5ba10211c00f7e6b792f380c58da3cc987e02758152b5c410671e43f5c099943ced230328e7be6cd0fa65f9f16d0a4e6b0c3584a46
6
+ metadata.gz: e3f49d0fddb65df9b88ce81b21aecd8c27350afc8018c2899629830058e7f6e35fe03431d6448cd4a5343b2967d512d376a712a87939ffa847ce7913836188fb
7
+ data.tar.gz: f83fbb8cf6768d4f32e220a83ecb1f77468c27b4735f7a14f4a3fe3680e50587ad79ac0ba5c9c4912498ea9171bfd5c6aeb041b7f49bf5908d5b522dd1ea0051
data/bin/ocran CHANGED
@@ -121,6 +121,7 @@ module Ocran
121
121
  def basename; Pathname.new(File.basename(@path)); end
122
122
  def expand(dir = nil); Pathname.new(File.expand_path(@path, dir && Ocran.Pathname(dir))); end
123
123
  def size; File.size(@path); end
124
+ def encode(e); to_posix.encode(e); end # called when creating an installer with innosetup
124
125
 
125
126
  alias to_s to_posix
126
127
  alias to_str to_posix
@@ -186,7 +187,7 @@ module Ocran
186
187
  a.sort.inject([]) { |r, e| r.last == e ? r : r << e }
187
188
  end
188
189
 
189
- VERSION = "1.3.12"
190
+ VERSION = "1.3.14"
190
191
 
191
192
  IGNORE_MODULE_NAMES = /\/(enumerator.so|rational.so|complex.so|fiber.so|thread.rb|ruby2_keywords.rb)$/
192
193
 
@@ -229,6 +230,7 @@ module Ocran
229
230
  :force_windows => false,
230
231
  :force_console => false,
231
232
  :icon_filename => nil,
233
+ :rubyopt => nil,
232
234
  :gemfile => nil,
233
235
  :inno_script => nil,
234
236
  :quiet => false,
@@ -361,6 +363,7 @@ Executable options:
361
363
  --console Force console application (ruby.exe)
362
364
  --chdir-first When exe starts, change working directory to app dir.
363
365
  --icon <ico> Replace icon with a custom one.
366
+ --rubyopt <str> Set the RUBYOPT environment variable when running the executable
364
367
  --debug Executable will be verbose.
365
368
  --debug-extract Executable will unpack to local dir and not delete after.
366
369
  EOF
@@ -392,6 +395,8 @@ EOF
392
395
  when /\A--icon\z/
393
396
  @options[:icon_filename] = Pathname(argv.shift)
394
397
  Ocran.fatal_error "Icon file #{icon_filename} not found.\n" unless icon_filename.exist?
398
+ when /\A--rubyopt\z/
399
+ @options[:rubyopt] = argv.shift
395
400
  when /\A--gemfile\z/
396
401
  @options[:gemfile] = Pathname(argv.shift)
397
402
  Ocran.fatal_error "Gemfile #{gemfile} not found.\n" unless gemfile.exist?
@@ -972,8 +977,13 @@ EOF
972
977
  sb.createfile(path, target)
973
978
  end
974
979
 
980
+ # Workaround: RubyInstaller cannot find the msys folder if ../msys64/usr/bin/msys-2.0.dll is not present (since RubyInstaller-2.4.1 rubyinstaller 2 issue 23)
981
+ # Add an empty file to /msys64/usr/bin/msys-2.0.dll if the dll was not required otherwise
982
+ require 'tempfile'
983
+ sb.createfile((Tempfile.new("msys-2.0.dll")).path.to_s, 'msys64/usr/bin/msys-2.0.dll') unless sb.files.keys.any? { |entry| entry.to_s.include?("msys-2.0.dll") }
984
+
975
985
  # Set environment variable
976
- sb.setenv("RUBYOPT", ENV["RUBYOPT"] || "")
986
+ sb.setenv("RUBYOPT", Ocran.rubyopt || ENV["RUBYOPT"] || "")
977
987
  sb.setenv("RUBYLIB", load_path.map { |path| path.to_native }.uniq.join(";"))
978
988
 
979
989
  sb.setenv("GEM_PATH", (TEMPDIR_ROOT / GEMHOMEDIR).to_native)
@@ -1082,6 +1092,8 @@ EOF
1082
1092
  OP_ENABLE_DEBUG_MODE = 7
1083
1093
  OP_CREATE_INST_DIRECTORY = 8
1084
1094
 
1095
+ attr_reader :files
1096
+
1085
1097
  def initialize(path, windowed)
1086
1098
  @paths = {}
1087
1099
  @files = {}
@@ -1230,6 +1242,9 @@ EOF
1230
1242
  end
1231
1243
  end
1232
1244
 
1245
+ def hasFile?(src)
1246
+ end
1247
+
1233
1248
  def createprocess(image, cmdline)
1234
1249
  Ocran.verbose_msg "l #{showtempdir image} #{showtempdir cmdline}"
1235
1250
  @of << [OP_CREATE_PROCESS, image.to_native, cmdline].pack("VZ*Z*")
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ocran
4
+ VERSION = "1.3.14"
5
+ end
data/lib/ocran.rb CHANGED
@@ -1,3 +1,6 @@
1
- class Ocran
2
- VERSION = '1.3.12
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "ocran/version"
4
+
5
+ module Ocran
3
6
  end
Binary file
data/share/ocran/stub.exe CHANGED
Binary file
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ocran
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.12
4
+ version: 1.3.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andi Idogawa
@@ -9,12 +9,17 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-05-16 00:00:00.000000000 Z
12
+ date: 2023-09-08 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: OCRAN (One-Click Ruby Application Next) builds Windows executables from
15
- Ruby source code. The executable is a self-extracting, self-running executable that
16
- contains the Ruby interpreter, your source code and any additionally needed ruby
17
- libraries or DLL.
14
+ description: "OCRAN (One-Click Ruby Application Next) builds Windows executables from
15
+ Ruby source code. \n The executable is a self-extracting, self-running executable
16
+ that contains the Ruby interpreter, your source code and any additionally needed
17
+ ruby libraries or DLL.\n \n This is a fork of OCRA that is compatible with ruby
18
+ version after 2.6. \n Migration guide: make sure to write ocran instead of ocra
19
+ in your code. For instance: OCRAN_EXECUTABLE\n\n usage: \n ocra helloworld.rb\n
20
+ \ helloworld.exe\n\n See readme at https://github.com/largo/ocran\n Report problems
21
+ in the github issues. Contributions welcome.\n This gem contains executables. We
22
+ plan to build them on github actions for security.\n "
18
23
  email:
19
24
  - andi@idogawa.com
20
25
  executables:
@@ -24,6 +29,7 @@ extra_rdoc_files: []
24
29
  files:
25
30
  - bin/ocran
26
31
  - lib/ocran.rb
32
+ - lib/ocran/version.rb
27
33
  - share/ocran/edicon.exe
28
34
  - share/ocran/lzma.exe
29
35
  - share/ocran/stub.exe
@@ -34,7 +40,7 @@ licenses:
34
40
  metadata:
35
41
  homepage_uri: https://github.com/largo/ocran
36
42
  source_code_uri: https://github.com/largo/ocran
37
- changelog_uri: https://github.com/largo/ocran/History.txt
43
+ changelog_uri: https://github.com/largo/ocran/CHANGELOG.txt
38
44
  post_install_message:
39
45
  rdoc_options: []
40
46
  require_paths:
@@ -50,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
50
56
  - !ruby/object:Gem::Version
51
57
  version: '0'
52
58
  requirements: []
53
- rubygems_version: 3.4.13
59
+ rubygems_version: 3.4.10
54
60
  signing_key:
55
61
  specification_version: 4
56
62
  summary: OCRAN (One-Click Ruby Application Next) builds Windows executables from Ruby