ocra 1.3.9 → 1.3.10

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
  SHA1:
3
- metadata.gz: 9d39cc2c2502c3c19310430c5968e6ec68ce38d3
4
- data.tar.gz: 4996817cb2821e188abc48f0b87ee830e0ce6280
3
+ metadata.gz: 7aea8c543e947bab9fd80bdd43d5d0b9c6d4b3f2
4
+ data.tar.gz: a5934881e20aef9ada0e3c207f8289f32cb216fb
5
5
  SHA512:
6
- metadata.gz: 3ceb5d5590f5961e46d078ff469f8ba9b079dd338c541c8d295da336162963e321dd8ca5cea52d4d321eef3b5ba4d31767dc1cd6fc364df2ecd94af06b7c3e0a
7
- data.tar.gz: b68476c168a28e19966796002498267f2f53ceb750cb78b2e854d6680b874d4a5c4a96942964e5dfbb0b93fdde73cc75f67e5cfee9f875ffa2b27e8569a64ba6
6
+ metadata.gz: c49768dc85800112527d7ad489a41d40c1bd271c35b75448a722d3b1d75b70dd86c1ec9ef0552d4b7d5558e86c27c3cd005db54d906f57211f00b7e7193aa621
7
+ data.tar.gz: 2cab95aaa7178760fd337044c1190f091e09a31beb44d8670543e5c9f515db89f6a92c7d1da793113554f847d453e77211e2e011d8c3deeb3aece42c396aa19e
@@ -1,3 +1,10 @@
1
+ === 1.3.10
2
+
3
+ * Reduce memory usage while building & compressing (avoids out of
4
+ memory issue on really big programs).
5
+
6
+ * Compile stub.exe with 32-bit compiler again
7
+
1
8
  === 1.3.9
2
9
 
3
10
  * Support Ruby 2.4.1p111 (include manifest)
data/bin/ocra CHANGED
@@ -179,7 +179,7 @@ module Ocra
179
179
  a.sort.inject([]) { |r, e| r.last == e ? r : r << e }
180
180
  end
181
181
 
182
- VERSION = "1.3.9"
182
+ VERSION = "1.3.10"
183
183
 
184
184
  IGNORE_MODULES = /\/(enumerator.so|rational.so|complex.so|thread.rb)$/
185
185
 
@@ -1039,8 +1039,10 @@ EOF
1039
1039
  opcode_offset = File.size(path)
1040
1040
 
1041
1041
  File.open(path, "ab") do |ocrafile|
1042
+ tmpinpath = 'tmpin'
1043
+
1042
1044
  if Ocra.lzma_mode
1043
- @of = ""
1045
+ @of = File.open(tmpinpath, 'wb')
1044
1046
  else
1045
1047
  @of = ocrafile
1046
1048
  end
@@ -1054,16 +1056,20 @@ EOF
1054
1056
 
1055
1057
  yield(self)
1056
1058
 
1059
+ @of.close if Ocra.lzma_mode
1060
+
1057
1061
  if Ocra.lzma_mode and not Ocra.inno_script
1062
+ tmpoutpath = 'tmpout'
1058
1063
  begin
1059
- File.open("tmpin", "wb") { |tmp| tmp.write(@of) }
1060
- Ocra.msg "Compressing #{@of.size} bytes"
1061
- system("\"#{Ocra.lzmapath}\" e tmpin tmpout 2>NUL") or fail
1062
- compressed_data = File.open("tmpout", "rb") { |tmp| tmp.read }
1063
- ocrafile.write([OP_DECOMPRESS_LZMA, compressed_data.size, compressed_data].pack("VVA*"))
1064
+ data_size = File.size(tmpinpath)
1065
+ Ocra.msg "Compressing #{data_size} bytes"
1066
+ system(Ocra.lzmapath, 'e', tmpinpath, tmpoutpath) or fail
1067
+ compressed_data_size = File.size?(tmpoutpath)
1068
+ ocrafile.write([OP_DECOMPRESS_LZMA, compressed_data_size].pack("VV"))
1069
+ IO.copy_stream(tmpoutpath, ocrafile)
1064
1070
  ensure
1065
- File.unlink("tmpin") if File.exist?("tmpin")
1066
- File.unlink("tmpout") if File.exist?("tmpout")
1071
+ File.unlink(@of.path) if File.exist?(@of.path)
1072
+ File.unlink(tmpoutpath) if File.exist?(tmpoutpath)
1067
1073
  end
1068
1074
  end
1069
1075
 
@@ -1152,7 +1158,8 @@ EOF
1152
1158
  str = File.open(src, "rb") { |file| file.read }
1153
1159
  Ocra.verbose_msg "a #{showtempdir tgt}"
1154
1160
  unless Ocra.inno_script # InnoSetup will install the file with a [Files] statement
1155
- @of << [OP_CREATE_FILE, tgt.to_native, str.size, str].pack("VZ*VA*")
1161
+ @of << [OP_CREATE_FILE, tgt.to_native, str.size].pack("VZ*V")
1162
+ @of << str
1156
1163
  end
1157
1164
  end
1158
1165
 
@@ -1,3 +1,3 @@
1
1
  class Ocra
2
- VERSION = '1.3.9'
2
+ VERSION = '1.3.10'
3
3
  end
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ocra
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.9
4
+ version: 1.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lars Christensen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-05 00:00:00.000000000 Z
11
+ date: 2017-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  version: '0'
101
101
  requirements: []
102
102
  rubyforge_project:
103
- rubygems_version: 2.6.11
103
+ rubygems_version: 2.6.13
104
104
  signing_key:
105
105
  specification_version: 4
106
106
  summary: OCRA (One-Click Ruby Application) builds Windows executables from Ruby source