Fix compilation of test cases.

translation1
Torsten Paul 2014-01-08 22:23:25 +01:00
parent 7829414ea6
commit e02867a00b
5 changed files with 6 additions and 5 deletions

View File

@ -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
{

View File

@ -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());

View File

@ -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();

View File

@ -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();

View File

@ -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();