Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed stub emebedding in ocrasa.rb #110

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,20 @@ file 'bin/ocrasa.rb' => [ 'bin/ocra', 'share/ocra/stub.exe', 'share/ocra/stubw.e
f.puts "__END__"

stub = File.open("share/ocra/stub.exe", "rb") {|g| g.read}
stub64 = [stub].pack("m")
f.puts stub64.size
stub64 = [stub].pack("m0")
f.puts stub64

stub = File.open("share/ocra/stubw.exe", "rb") {|g| g.read}
stub64 = [stub].pack("m")
f.puts stub64.size
f.puts stub64
stubw = File.open("share/ocra/stubw.exe", "rb") {|g| g.read}
stubw64 = [stubw].pack("m0")
f.puts stubw64

lzma = File.open("share/ocra/lzma.exe", "rb") {|g| g.read}
lzma64 = [lzma].pack("m")
f.puts lzma64.size
lzma64 = [lzma].pack("m0")
f.puts lzma64

lzma = File.open("share/ocra/edicon.exe", "rb") {|g| g.read}
lzma64 = [lzma].pack("m")
f.puts lzma64.size
f.puts lzma64
edicon = File.open("share/ocra/edicon.exe", "rb") {|g| g.read}
edicon64 = [edicon].pack("m0")
f.puts edicon64
end
end

Expand Down
2 changes: 1 addition & 1 deletion bin/ocra
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ module Ocra

# Returns a binary blob store embedded in the current Ruby script.
def Ocra.get_next_embedded_image
DATA.read(DATA.readline.to_i).unpack("m")[0]
DATA.readline.chomp.unpack("m0")[0]
end

def Ocra.save_environment
Expand Down