larsch / ocra

One-Click Ruby Application Builder
http://ocra.rubyforge.org/
835 stars 83 forks source link

YAML files not included #158

Closed fabiopavan closed 4 years ago

fabiopavan commented 4 years ago

Hi, larsh. I'm trying to compile a program, but YAML files are not included. They reside in setup folder. I wrote this command:

ocra kernel.rb lib/* setup/* --add-all-core --gem-full

The executable cannot find the YAML files, showing that they weren't included.

larsch commented 4 years ago

Unable to reproduce.

This works fine:

require "yaml"
p YAML.load_file(File.dirname($0) + "/setup/test.yaml")
C:\Users\larsch> D:\src\ocra\samples\yaml_test.exe
{"a"=>"b", "c"=>"d"}
fabiopavan commented 4 years ago

image

Doing what you did, it works. But doing it like my source code, no way. I tried to use the following command:

ocra kernel.rb --add-all-core --gem-full

Then this:

ocra kernel.rb setup/* lib/* --add-all-core --gem-full

No way.

imbrish commented 4 years ago

You're trying to read relative to called executable $0 instead of relative to unpacked script __FILE__.

fabiopavan commented 4 years ago

Oops, that's right, imbrish. I want to have the YAML files inside the executable.