move ruby share files under share/svi/lib
This commit is contained in:
parent
ea585d0f5b
commit
c84fbddaca
@ -1,5 +1,5 @@
|
|||||||
begin
|
begin
|
||||||
load File.join(File.dirname(__FILE__), "svi.rb")
|
load "#{$SHARE_DIR}/lib/svi.rb"
|
||||||
rescue Interrupt => e
|
rescue Interrupt => e
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
$stderr.puts "#{e.class}: #{e}"
|
$stderr.puts "#{e.class}: #{e}"
|
@ -6,8 +6,6 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#define SHARE_BOOTSTRAP "/share/svi/bootstrap.rb"
|
|
||||||
|
|
||||||
VALUE svi_ruby_protect_eval_string_rescue(VALUE exception, VALUE exception_object)
|
VALUE svi_ruby_protect_eval_string_rescue(VALUE exception, VALUE exception_object)
|
||||||
{
|
{
|
||||||
*(bool *)exception = true;
|
*(bool *)exception = true;
|
||||||
@ -85,7 +83,7 @@ const char * read_bootstrap_file()
|
|||||||
if (index != std::string::npos)
|
if (index != std::string::npos)
|
||||||
{
|
{
|
||||||
share_dir = std::string(exe_path, 0u, index) + "/share/svi";
|
share_dir = std::string(exe_path, 0u, index) + "/share/svi";
|
||||||
char * bootstrap = read_file((share_dir + "/bootstrap.rb").c_str());
|
char * bootstrap = read_file((share_dir + "/lib/bootstrap.rb").c_str());
|
||||||
if (bootstrap != nullptr)
|
if (bootstrap != nullptr)
|
||||||
{
|
{
|
||||||
return bootstrap;
|
return bootstrap;
|
||||||
@ -93,7 +91,7 @@ const char * read_bootstrap_file()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
share_dir = SHARE_DIR;
|
share_dir = SHARE_DIR;
|
||||||
return read_file(SHARE_DIR "/bootstrap.rb");
|
return read_file(SHARE_DIR "/lib/bootstrap.rb");
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char * argv[])
|
int main(int argc, char * argv[])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user