mirror of https://github.com/vitalif/openscad
Fix compilation of test cases.
parent
7829414ea6
commit
e02867a00b
|
@ -27,7 +27,6 @@ Some actions (showCrossHairs) only work properly on Gimbal Camera.
|
|||
#include <iostream>
|
||||
#include "renderer.h"
|
||||
#include "Camera.h"
|
||||
#include "qtgettext.h"
|
||||
|
||||
class GLView
|
||||
{
|
||||
|
|
|
@ -22,6 +22,9 @@ fs::path get_resource_dir(const std::string &resource_folder)
|
|||
}
|
||||
|
||||
fs::path basepath(applicationdir);
|
||||
#ifdef OPENSCAD_TESTING
|
||||
basepath = "..";
|
||||
#endif
|
||||
#ifdef __APPLE__
|
||||
fs::path bundlepath = basepath.parent_path().parent_path();
|
||||
if (bundlepath.filename().string() == "OpenSCAD.app") {
|
||||
|
@ -128,7 +131,9 @@ void parser_init(const std::string &applicationpath)
|
|||
}
|
||||
|
||||
// This is the built-in user-writable library path
|
||||
#ifndef OPENSCAD_TESTING
|
||||
#ifdef OPENSCAD_TESTING
|
||||
add_librarydir(boosty::stringy(fs::path(applicationpath) / "../libraries"));
|
||||
#else
|
||||
// This will resolve to ~/Documents on Mac, "My Documents" on Windows and
|
||||
// ~/.local/share on Linux
|
||||
fs::path docdir(PlatformUtils::documentsPath());
|
||||
|
|
|
@ -117,7 +117,6 @@ int main(int argc, char **argv)
|
|||
currentdir = boosty::stringy(fs::current_path());
|
||||
|
||||
parser_init(boosty::stringy(fs::path(argv[0]).branch_path()));
|
||||
add_librarydir(boosty::stringy(fs::path(argv[0]).branch_path() / "../libraries"));
|
||||
|
||||
ModuleContext top_ctx;
|
||||
top_ctx.registerBuiltin();
|
||||
|
|
|
@ -78,7 +78,6 @@ int main(int argc, char **argv)
|
|||
currentdir = boosty::stringy( fs::current_path() );
|
||||
|
||||
parser_init(boosty::stringy(fs::path(argv[0]).branch_path()));
|
||||
add_librarydir(boosty::stringy(fs::path(argv[0]).branch_path() / "../libraries"));
|
||||
|
||||
ModuleContext top_ctx;
|
||||
top_ctx.registerBuiltin();
|
||||
|
|
|
@ -74,7 +74,6 @@ int main(int argc, char **argv)
|
|||
currentdir = boosty::stringy( fs::current_path() );
|
||||
|
||||
parser_init(boosty::stringy(fs::path(argv[0]).branch_path()));
|
||||
add_librarydir(boosty::stringy(fs::path(argv[0]).branch_path() / "../libraries"));
|
||||
|
||||
ModuleContext top_ctx;
|
||||
top_ctx.registerBuiltin();
|
||||
|
|
Loading…
Reference in New Issue