Merge remote-tracking branch 'upstream/master' into scalemarkers

merging the upstream/master branch into my working branch prior to syncing with my fork
12/26/2014 22:07 CST tim deagan
master
Tim Deagan 2014-12-26 22:07:03 -06:00
commit b6dcea12d0
14 changed files with 55 additions and 40 deletions

1
.gitignore vendored
View File

@ -16,6 +16,7 @@ parser_yacc.h
/locale/*/*/*.mo /locale/*/*/*.mo
/locale/POTFILES /locale/POTFILES
/nbproject /nbproject
/openscad.pro.user
/openscad /openscad
/tests/openscad_nogui /tests/openscad_nogui
testdata/scad/features/import_dxf-tests.scad testdata/scad/features/import_dxf-tests.scad

View File

@ -212,15 +212,16 @@ complete, build OpenSCAD and package it to an installer:
If you wish you can only build the openscad.exe binary: If you wish you can only build the openscad.exe binary:
cd mingw32 cd mingw32
qmake .. CONFIG+=mingw-cross-env qmake ../openscad.pro CONFIG+=mingw-cross-env
make make
For a 64-bit Windows cross-build, replace 32 with 64 in the above instructions. For a 64-bit Windows cross-build, replace 32 with 64 in the above instructions.
### Compilation ### Compilation
First, run 'qmake' from Qt4 to generate a Makefile. On some systems you need to First, run 'qmake openscad.pro' from Qt4 to generate a Makefile. On some systems
run 'qmake4', 'qmake-qt4' or something alike to run the qt4 version of the tool. you need to run 'qmake4', 'qmake-qt4' or something alike to run the qt4 version
of the tool.
Then run make. Finally you might run 'make install' as root or simply copy the Then run make. Finally you might run 'make install' as root or simply copy the
'openscad' binary (OpenSCAD.app on Mac OS X) to the bin directory of your choice. 'openscad' binary (OpenSCAD.app on Mac OS X) to the bin directory of your choice.

View File

@ -11,6 +11,8 @@ boost {
# See https://svn.boost.org/trac/boost/ticket/6219 # See https://svn.boost.org/trac/boost/ticket/6219
macx: DEFINES += __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=0 macx: DEFINES += __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=0
# MXE cross build
CONFIG(mingw-cross-env) { CONFIG(mingw-cross-env) {
DEFINES += BOOST_STATIC DEFINES += BOOST_STATIC
DEFINES += BOOST_THREAD_USE_LIB DEFINES += BOOST_THREAD_USE_LIB
@ -18,7 +20,11 @@ boost {
BOOST_LINK_FLAGS = -lboost_thread_win32-mt -lboost_program_options-mt -lboost_filesystem-mt -lboost_system-mt -lboost_regex-mt -lboost_chrono-mt BOOST_LINK_FLAGS = -lboost_thread_win32-mt -lboost_program_options-mt -lboost_filesystem-mt -lboost_system-mt -lboost_regex-mt -lboost_chrono-mt
} }
isEmpty(BOOST_LINK_FLAGS):win* { # MSYS2
isEmpty(BOOST_LINK_FLAGS):win32-g++ {
DEFINES += BOOST_STATIC
DEFINES += BOOST_THREAD_USE_LIB
DEFINES += Boost_USE_STATIC_LIBS
BOOST_LINK_FLAGS = -lboost_thread-mt -lboost_program_options-mt -lboost_filesystem-mt -lboost_system-mt -lboost_regex-mt BOOST_LINK_FLAGS = -lboost_thread-mt -lboost_program_options-mt -lboost_filesystem-mt -lboost_system-mt -lboost_regex-mt
} }

View File

@ -6,7 +6,7 @@
"caret" : { "caret" : {
"width" : 2, "width" : 2,
"foreground" : "#000000", "foreground" : "#000000",
"line-background" : "#f0f0f0" "line-background" : "#f8f8f8"
}, },
"colors" : { "colors" : {
"keyword1" : "Green", "keyword1" : "Green",
@ -23,12 +23,12 @@
"whitespace-foreground" : "#272822", "whitespace-foreground" : "#272822",
"selection-foreground" : "#ffffff", "selection-foreground" : "#ffffff",
"selection-background" : "#4a90d9", "selection-background" : "#4a90d9",
"margin-background" : "#ccc", "margin-background" : "#f8f8f8",
"margin-foreground" : "#111", "margin-foreground" : "#000000",
"matched-brace-background" : "#333", "matched-brace-background" : "#c7f6cb",
"matched-brace-foreground" : "#fff", "matched-brace-foreground" : "Blue",
"unmatched-brace-background" : "#333", "unmatched-brace-background" : "#ffcdcc",
"unmatched-brace-foreground" : "#fff", "unmatched-brace-foreground" : "Blue",
"error-marker" : "#ff0000", "error-marker" : "#ff0000",
"error-indicator" : "#60ff0000", "error-indicator" : "#60ff0000",
"error-indicator-outline" : "#ff000000", "error-indicator-outline" : "#ff000000",

View File

@ -5,7 +5,7 @@
"text" : "#f8f8f2", "text" : "#f8f8f2",
"caret" : { "caret" : {
"width" : 2, "width" : 2,
"foreground" : "#f8f8f0", "foreground" : "#f8f8f2",
"line-background" : "#49483e" "line-background" : "#49483e"
}, },
"colors" : { "colors" : {
@ -26,9 +26,9 @@
"margin-background" : "#3e3d32", "margin-background" : "#3e3d32",
"margin-foreground" : "#f8f8f2", "margin-foreground" : "#f8f8f2",
"matched-brace-background" : "#606060", "matched-brace-background" : "#606060",
"matched-brace-foreground" : "#f8f8f2", "matched-brace-foreground" : "#ffff00",
"unmatched-brace-background" : "#dc322f", "unmatched-brace-background" : "#b06060",
"unmatched-brace-foreground" : "#f8f8f2", "unmatched-brace-foreground" : "#ffff00",
"error-marker" : "#ff0000", "error-marker" : "#ff0000",
"error-indicator" : "#80ffe0e0", "error-indicator" : "#80ffe0e0",
"error-indicator-outline" : "#ff000000", "error-indicator-outline" : "#ff000000",

View File

@ -25,10 +25,10 @@
"selection-background" : "#657b83", "selection-background" : "#657b83",
"margin-background" : "#002b36", "margin-background" : "#002b36",
"margin-foreground" : "#839496", "margin-foreground" : "#839496",
"matched-brace-background" : "#93a1a1", "matched-brace-background" : "#0c4e22",
"matched-brace-foreground" : "#586e75", "matched-brace-foreground" : "#fff070",
"unmatched-brace-background" : "#dc322f", "unmatched-brace-background" : "#92211f",
"unmatched-brace-foreground" : "#fdf6e3", "unmatched-brace-foreground" : "#fff070",
"error-marker" : "#ff0000", "error-marker" : "#ff0000",
"error-indicator" : "#90ff8080", "error-indicator" : "#90ff8080",
"error-indicator-outline" : "#ff000000", "error-indicator-outline" : "#ff000000",

View File

@ -25,10 +25,10 @@
"selection-background" : "#657b83", "selection-background" : "#657b83",
"margin-background" : "#eee8d5", "margin-background" : "#eee8d5",
"margin-foreground" : "#657b83", "margin-foreground" : "#657b83",
"matched-brace-background" : "#93a1a1", "matched-brace-background" : "#c7f6cb",
"matched-brace-foreground" : "#586e75", "matched-brace-foreground" : "#cb4b16",
"unmatched-brace-background" : "#ed8987", "unmatched-brace-background" : "#ffcdcc",
"unmatched-brace-foreground" : "#fdf6e3", "unmatched-brace-foreground" : "#cb4b16",
"error-marker" : "#ff0000", "error-marker" : "#ff0000",
"error-indicator" : "#80ff0000", "error-indicator" : "#80ff0000",
"error-indicator-outline" : "#ff000000", "error-indicator-outline" : "#ff000000",

View File

@ -1,7 +1,7 @@
{ {
"name" : "Tomorrow", "name" : "Tomorrow",
"index" : 1500, "index" : 1500,
"paper" : "#f0f0f0", "paper" : "#f8f8f8",
"text" : "#4d4d4c", "text" : "#4d4d4c",
"caret" : { "caret" : {
"width" : 2, "width" : 2,
@ -19,13 +19,13 @@
"number" : "#c82829", "number" : "#c82829",
"string" : "#718c00", "string" : "#718c00",
"operator" : "#3e999f", "operator" : "#3e999f",
"whitespace-background" : "#f0f0f0", "whitespace-background" : "#f8f8f8",
"whitespace-foreground" : "#4d4d4c", "whitespace-foreground" : "#4d4d4c",
"selection-foreground" : "#4d4d4c", "selection-foreground" : "#4d4d4c",
"selection-background" : "#d6d6d6", "selection-background" : "#d6d6d6",
"margin-background" : "#f0f0f0", "margin-background" : "#f8f8f8",
"margin-foreground" : "#4d4d4c", "margin-foreground" : "#4d4d4c",
"matched-brace-background" : "#d4d4d4", "matched-brace-background" : "#c7f6cb",
"matched-brace-foreground" : "#4d4d4c", "matched-brace-foreground" : "#4d4d4c",
"unmatched-brace-background" : "#ffcdcc", "unmatched-brace-background" : "#ffcdcc",
"unmatched-brace-foreground" : "#4d4d4c", "unmatched-brace-foreground" : "#4d4d4c",

View File

@ -4,7 +4,7 @@
"show-in-gui" : true, "show-in-gui" : true,
"colors" : { "colors" : {
"background" : "#f0f0f0", "background" : "#f8f8f8",
"opencsg-face-front" : "#4271ae", "opencsg-face-front" : "#4271ae",
"opencsg-face-back" : "#f5871f", "opencsg-face-back" : "#f5871f",
"cgal-face-front" : "#3e999f", "cgal-face-front" : "#3e999f",

View File

@ -280,11 +280,6 @@ if [[ $? != 0 ]]; then
exit 1 exit 1
fi fi
echo "Updating language files..."
cd $OPENSCADDIR
./scripts/translation-update.sh
echo "Building test suite..." echo "Building test suite..."
if [ $BUILD_TESTS ]; then if [ $BUILD_TESTS ]; then

View File

@ -25,7 +25,6 @@ static std::string lookupResourcesPath()
fs::path resourcedir(applicationpath); fs::path resourcedir(applicationpath);
PRINTDB("Looking up resource folder with application path '%s'", resourcedir.c_str()); PRINTDB("Looking up resource folder with application path '%s'", resourcedir.c_str());
#ifndef WIN32
#ifdef __APPLE__ #ifdef __APPLE__
const char *searchpath[] = { const char *searchpath[] = {
"../Resources", // Resources can be bundled on Mac. "../Resources", // Resources can be bundled on Mac.
@ -34,7 +33,15 @@ static std::string lookupResourcesPath()
NULL NULL
}; };
#else #else
const char *searchpath[] = { #ifdef WIN32
const char *searchpath[] = {
".", // Release location
RESOURCE_FOLDER("../share/openscad"), // MSYS2 location
"..", // Dev location
NULL
};
#else
const char *searchpath[] = {
RESOURCE_FOLDER("../share/openscad"), RESOURCE_FOLDER("../share/openscad"),
RESOURCE_FOLDER("../../share/openscad"), RESOURCE_FOLDER("../../share/openscad"),
".", ".",
@ -42,6 +49,7 @@ static std::string lookupResourcesPath()
"../..", "../..",
NULL NULL
}; };
#endif
#endif #endif
fs::path tmpdir; fs::path tmpdir;
@ -57,7 +65,6 @@ static std::string lookupResourcesPath()
break; break;
} }
} }
#endif // !WIN32
// resourcedir defaults to applicationPath // resourcedir defaults to applicationPath
std::string result = boosty::stringy(boosty::canonical(resourcedir)); std::string result = boosty::stringy(boosty::canonical(resourcedir));

View File

@ -38,6 +38,7 @@
#include "highlighter.h" #include "highlighter.h"
#include "export.h" #include "export.h"
#include "builtin.h" #include "builtin.h"
#include "memory.h"
#include "expression.h" #include "expression.h"
#include "progress.h" #include "progress.h"
#include "dxfdim.h" #include "dxfdim.h"
@ -1921,9 +1922,13 @@ void MainWindow::actionCheckValidity() {
} }
bool valid = false; bool valid = false;
if (const CGAL_Nef_polyhedron *N = dynamic_cast<const CGAL_Nef_polyhedron *>(this->root_geom.get())) shared_ptr<const CGAL_Nef_polyhedron> N;
if (const PolySet *ps = dynamic_cast<const PolySet *>(this->root_geom.get())) {
N.reset(CGALUtils::createNefPolyhedronFromGeometry(*ps));
}
if (N || (N = dynamic_pointer_cast<const CGAL_Nef_polyhedron>(this->root_geom))) {
valid = N->p3->is_valid(); valid = N->p3->is_valid();
}
PRINTB(" Valid: %6s", (valid ? "yes" : "no")); PRINTB(" Valid: %6s", (valid ? "yes" : "no"));
clearCurrentOutput(); clearCurrentOutput();
#endif /* ENABLE_CGAL */ #endif /* ENABLE_CGAL */

View File

@ -631,7 +631,7 @@ int gui(vector<string> &inputFiles, const fs::path &original_path, int argc, cha
#endif #endif
QApplication app(argc, argv, true); //useGUI); QApplication app(argc, argv, true); //useGUI);
// remove ugly frames in the QStatusBar when using additional widgets // remove ugly frames in the QStatusBar when using additional widgets
app.setStyleSheet("QStatusBar::item { border: 0px solid black }; "); app.setStyleSheet("QStatusBar::item { border: 0px solid black; }");
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
app.installEventFilter(new EventFilter(&app)); app.installEventFilter(new EventFilter(&app));