From 7b526bc27ab70f362332640987bc3f8c363b3659 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sat, 23 Nov 2013 20:00:19 -0500 Subject: Added test for polygon with hole diff --git a/testdata/scad/features/polygon-tests.scad b/testdata/scad/features/polygon-tests.scad index b4e92b6..0cd259f 100644 --- a/testdata/scad/features/polygon-tests.scad +++ b/testdata/scad/features/polygon-tests.scad @@ -15,4 +15,10 @@ translate([-2,0,0]) polygon(points); translate([-2,-2,0]) polygon(points=points, paths=[[0,1,2,3], [4,5,6,7]]); translate([2,-4,0]) polygon([[0,0], [1,0], [1,1], [0,0]]); +// With hole +translate([-2,-4,0]) + polygon(points=[[0,0], [1,0], [1,1], [0,1], [0.2,0.2], [0.8,0.2], [0.8,0.8], [0.2,0.8]], + paths=[[0,1,2,3],[4,5,6,7]] +); + // FIXME: convexity diff --git a/tests/regression/cgalpngtest/polygon-tests-expected.png b/tests/regression/cgalpngtest/polygon-tests-expected.png index 5ceabe8..28e4e9f 100644 Binary files a/tests/regression/cgalpngtest/polygon-tests-expected.png and b/tests/regression/cgalpngtest/polygon-tests-expected.png differ diff --git a/tests/regression/dumptest/polygon-tests-expected.csg b/tests/regression/dumptest/polygon-tests-expected.csg index 56995a5..e19bcb0 100644 --- a/tests/regression/dumptest/polygon-tests-expected.csg +++ b/tests/regression/dumptest/polygon-tests-expected.csg @@ -33,4 +33,7 @@ group() { multmatrix([[1, 0, 0, 2], [0, 1, 0, -4], [0, 0, 1, 0], [0, 0, 0, 1]]) { polygon(points = [[0, 0], [1, 0], [1, 1], [0, 0]], paths = undef, convexity = 1); } + multmatrix([[1, 0, 0, -2], [0, 1, 0, -4], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[0, 0], [1, 0], [1, 1], [0, 1], [0.2, 0.2], [0.8, 0.2], [0.8, 0.8], [0.2, 0.8]], paths = [[0, 1, 2, 3], [4, 5, 6, 7]], convexity = 1); + } } diff --git a/tests/regression/opencsgtest/polygon-tests-expected.png b/tests/regression/opencsgtest/polygon-tests-expected.png index fe84a80..94bd131 100644 Binary files a/tests/regression/opencsgtest/polygon-tests-expected.png and b/tests/regression/opencsgtest/polygon-tests-expected.png differ diff --git a/tests/regression/throwntogethertest/polygon-tests-expected.png b/tests/regression/throwntogethertest/polygon-tests-expected.png index 779b878..2ce6b75 100644 Binary files a/tests/regression/throwntogethertest/polygon-tests-expected.png and b/tests/regression/throwntogethertest/polygon-tests-expected.png differ -- cgit v0.10.1 From 91c2b8909ce670e65d341f98fc5f7e456622bba4 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sat, 23 Nov 2013 22:10:05 -0500 Subject: Added test for implicit union of render() children diff --git a/testdata/scad/features/render-2d-tests.scad b/testdata/scad/features/render-2d-tests.scad index 683ffe4..f8df115 100644 --- a/testdata/scad/features/render-2d-tests.scad +++ b/testdata/scad/features/render-2d-tests.scad @@ -1,6 +1,11 @@ render() { difference() { - square(100, center=true); - circle(r=30); + square(10, center=true); + circle(r=3); } } + +translate([12,0,0]) render() { + square(10, center=true); + circle(r=3); +} diff --git a/tests/regression/cgalpngtest/render-2d-tests-expected.png b/tests/regression/cgalpngtest/render-2d-tests-expected.png index 19ea16a..2418968 100644 Binary files a/tests/regression/cgalpngtest/render-2d-tests-expected.png and b/tests/regression/cgalpngtest/render-2d-tests-expected.png differ diff --git a/tests/regression/dumptest/render-2d-tests-expected.csg b/tests/regression/dumptest/render-2d-tests-expected.csg index 75739b3..bcc5e96 100644 --- a/tests/regression/dumptest/render-2d-tests-expected.csg +++ b/tests/regression/dumptest/render-2d-tests-expected.csg @@ -1,8 +1,14 @@ group() { render(convexity = 1) { difference() { - square(size = [100, 100], center = true); - circle($fn = 0, $fa = 12, $fs = 2, r = 30); + square(size = [10, 10], center = true); + circle($fn = 0, $fa = 12, $fs = 2, r = 3); + } + } + multmatrix([[1, 0, 0, 12], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + render(convexity = 1) { + square(size = [10, 10], center = true); + circle($fn = 0, $fa = 12, $fs = 2, r = 3); } } } diff --git a/tests/regression/opencsgtest/render-2d-tests-expected.png b/tests/regression/opencsgtest/render-2d-tests-expected.png index 0bf6288..47e57dd 100644 Binary files a/tests/regression/opencsgtest/render-2d-tests-expected.png and b/tests/regression/opencsgtest/render-2d-tests-expected.png differ diff --git a/tests/regression/throwntogethertest/render-2d-tests-expected.png b/tests/regression/throwntogethertest/render-2d-tests-expected.png index 0bf6288..47e57dd 100644 Binary files a/tests/regression/throwntogethertest/render-2d-tests-expected.png and b/tests/regression/throwntogethertest/render-2d-tests-expected.png differ -- cgit v0.10.1 From 825fbc7b9e7756ef8c2b49a85efd9abe3ebf8d95 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Sun, 24 Nov 2013 19:01:11 -0600 Subject: revert to GMPQ number type kernel due to bugs like issue #481 diff --git a/src/cgal.h b/src/cgal.h index 45228be..efc53d3 100644 --- a/src/cgal.h +++ b/src/cgal.h @@ -48,9 +48,10 @@ typedef CGAL::Exact_predicates_exact_constructions_kernel CGAL_ExactKernel2; typedef CGAL::Polygon_2 CGAL_Poly2; typedef CGAL::Polygon_with_holes_2 CGAL_Poly2h; - //typedef CGAL::Cartesian CGAL_Kernel3; -typedef CGAL::Exact_predicates_exact_constructions_kernel CGAL_Kernel3; -typedef CGAL::Exact_predicates_exact_constructions_kernel::FT NT3; +typedef CGAL::Gmpq NT3; +typedef CGAL::Cartesian CGAL_Kernel3; +//typedef CGAL::Exact_predicates_exact_constructions_kernel::FT NT3; +//typedef CGAL::Exact_predicates_exact_constructions_kernel CGAL_Kernel3; typedef CGAL::Nef_polyhedron_3 CGAL_Nef_polyhedron3; typedef CGAL_Nef_polyhedron3::Aff_transformation_3 CGAL_Aff_transformation; -- cgit v0.10.1 From de2db22b5f82855b9cf42829c4dde3b4bd231273 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Mon, 25 Nov 2013 00:27:15 -0500 Subject: Split projection tests into cut vs. project diff --git a/testdata/scad/features/projection-cut-tests.scad b/testdata/scad/features/projection-cut-tests.scad new file mode 100644 index 0000000..0409a3e --- /dev/null +++ b/testdata/scad/features/projection-cut-tests.scad @@ -0,0 +1,15 @@ +// 2D child +projection(cut=true) { square(); } + +projection(cut=true) translate([20,0,0]) cube(10, center=true); + +// Boundary case: clipping the top of a cube +translate([0,20,0]) projection(cut=true) translate([0,0,-4.999999]) cube(10, center=true); + +// holes +translate([0,-10,0]) projection(cut=true) { + union() { + difference() { cube(5,center=true); cube(4,center=true); } + translate([2.1,2.1]) difference() { cube(5,center=true); cube(4,center=true); } + } +} diff --git a/testdata/scad/features/projection-tests.scad b/testdata/scad/features/projection-tests.scad index bc2111c..27d03fe 100644 --- a/testdata/scad/features/projection-tests.scad +++ b/testdata/scad/features/projection-tests.scad @@ -3,17 +3,25 @@ projection(); // No children projection() { } // 2D child -projection(cut=true) { square(); } +projection() { square(); } +// Simple projection(cut=false) cube(10); -projection(cut=true) translate([20,0,0]) cube(10, center=true); -// Boundary case: clipping the top of a cube -translate([0,20,0]) projection(cut=true) translate([0,0,-4.999999]) cube(10, center=true); -// holes -translate([0,-10,0]) projection(cut=true) { - union() { - difference() { cube(5,center=true); cube(4,center=true); } - translate([2.1,2.1]) difference() { cube(5,center=true); cube(4,center=true); } - } +// Two children +translate([-12,0]) projection(cut=false) { + cube(10); + difference() { + sphere(10); + cylinder(h=30, r=5, center=true); + } +} + +// Holes +translate([6,-12]) projection(cut=false) { + cube(10); + difference() { + sphere(10); + cylinder(h=30, r=5, center=true); + } } diff --git a/tests/regression/cgalpngtest/projection-cut-tests-expected.png b/tests/regression/cgalpngtest/projection-cut-tests-expected.png new file mode 100644 index 0000000..7189447 Binary files /dev/null and b/tests/regression/cgalpngtest/projection-cut-tests-expected.png differ diff --git a/tests/regression/cgalpngtest/projection-tests-expected.png b/tests/regression/cgalpngtest/projection-tests-expected.png index 3be3654..c0d5289 100644 Binary files a/tests/regression/cgalpngtest/projection-tests-expected.png and b/tests/regression/cgalpngtest/projection-tests-expected.png differ diff --git a/tests/regression/dumptest/projection-cut-tests-expected.csg b/tests/regression/dumptest/projection-cut-tests-expected.csg new file mode 100644 index 0000000..4c37fa2 --- /dev/null +++ b/tests/regression/dumptest/projection-cut-tests-expected.csg @@ -0,0 +1,33 @@ +group() { + projection(cut = true, convexity = 0) { + square(size = [1, 1], center = false); + } + projection(cut = true, convexity = 0) { + multmatrix([[1, 0, 0, 20], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + cube(size = [10, 10, 10], center = true); + } + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 20], [0, 0, 1, 0], [0, 0, 0, 1]]) { + projection(cut = true, convexity = 0) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -4.999999], [0, 0, 0, 1]]) { + cube(size = [10, 10, 10], center = true); + } + } + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, -10], [0, 0, 1, 0], [0, 0, 0, 1]]) { + projection(cut = true, convexity = 0) { + union() { + difference() { + cube(size = [5, 5, 5], center = true); + cube(size = [4, 4, 4], center = true); + } + multmatrix([[1, 0, 0, 2.1], [0, 1, 0, 2.1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + difference() { + cube(size = [5, 5, 5], center = true); + cube(size = [4, 4, 4], center = true); + } + } + } + } + } +} diff --git a/tests/regression/dumptest/projection-tests-expected.csg b/tests/regression/dumptest/projection-tests-expected.csg index da3e5ce..04cd404 100644 --- a/tests/regression/dumptest/projection-tests-expected.csg +++ b/tests/regression/dumptest/projection-tests-expected.csg @@ -1,37 +1,27 @@ group() { projection(cut = false, convexity = 0); projection(cut = false, convexity = 0); - projection(cut = true, convexity = 0) { + projection(cut = false, convexity = 0) { square(size = [1, 1], center = false); } projection(cut = false, convexity = 0) { cube(size = [10, 10, 10], center = false); } - projection(cut = true, convexity = 0) { - multmatrix([[1, 0, 0, 20], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cube(size = [10, 10, 10], center = true); - } - } - multmatrix([[1, 0, 0, 0], [0, 1, 0, 20], [0, 0, 1, 0], [0, 0, 0, 1]]) { - projection(cut = true, convexity = 0) { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -4.999999], [0, 0, 0, 1]]) { - cube(size = [10, 10, 10], center = true); + multmatrix([[1, 0, 0, -12], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + projection(cut = false, convexity = 0) { + cube(size = [10, 10, 10], center = false); + difference() { + sphere($fn = 0, $fa = 12, $fs = 2, r = 10); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 30, r1 = 5, r2 = 5, center = true); } } } - multmatrix([[1, 0, 0, 0], [0, 1, 0, -10], [0, 0, 1, 0], [0, 0, 0, 1]]) { - projection(cut = true, convexity = 0) { - union() { - difference() { - cube(size = [5, 5, 5], center = true); - cube(size = [4, 4, 4], center = true); - } - multmatrix([[1, 0, 0, 2.1], [0, 1, 0, 2.1], [0, 0, 1, 0], [0, 0, 0, 1]]) { - difference() { - cube(size = [5, 5, 5], center = true); - cube(size = [4, 4, 4], center = true); - } - } + multmatrix([[1, 0, 0, 6], [0, 1, 0, -12], [0, 0, 1, 0], [0, 0, 0, 1]]) { + projection(cut = false, convexity = 0) { + cube(size = [10, 10, 10], center = false); + difference() { + sphere($fn = 0, $fa = 12, $fs = 2, r = 10); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 30, r1 = 5, r2 = 5, center = true); } } } diff --git a/tests/regression/opencsgtest/projection-cut-tests-expected.png b/tests/regression/opencsgtest/projection-cut-tests-expected.png new file mode 100644 index 0000000..5063301 Binary files /dev/null and b/tests/regression/opencsgtest/projection-cut-tests-expected.png differ diff --git a/tests/regression/opencsgtest/projection-tests-expected.png b/tests/regression/opencsgtest/projection-tests-expected.png index b808ffe..b3af1e1 100644 Binary files a/tests/regression/opencsgtest/projection-tests-expected.png and b/tests/regression/opencsgtest/projection-tests-expected.png differ diff --git a/tests/regression/throwntogethertest/projection-cut-tests-expected.png b/tests/regression/throwntogethertest/projection-cut-tests-expected.png new file mode 100644 index 0000000..5063301 Binary files /dev/null and b/tests/regression/throwntogethertest/projection-cut-tests-expected.png differ diff --git a/tests/regression/throwntogethertest/projection-tests-expected.png b/tests/regression/throwntogethertest/projection-tests-expected.png index b808ffe..b3af1e1 100644 Binary files a/tests/regression/throwntogethertest/projection-tests-expected.png and b/tests/regression/throwntogethertest/projection-tests-expected.png differ -- cgit v0.10.1 From 7b64944738d91eb2eef92f93f526cc29436adf15 Mon Sep 17 00:00:00 2001 From: Ricardo Markiewicz Date: Fri, 29 Nov 2013 00:16:40 -0300 Subject: Try to keep cursor and scroll in place on refresh When the file is saving, the cursor position was resetting to the top and you should keep scrolling by hand every time you save the file. This patch saves the scroll and cursor position and set it again after the file is refreshed so we can continue edition from where we were. diff --git a/src/mainwin.cc b/src/mainwin.cc index 5b986b1..8c21b20 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -75,6 +75,7 @@ #include #include #include +#include #include @@ -605,7 +606,15 @@ void MainWindow::refreshDocument() reader.setCodec("UTF-8"); QString text = reader.readAll(); PRINTB("Loaded design '%s'.", this->fileName.toLocal8Bit().constData()); + int y = editor->verticalScrollBar()->sliderPosition(); + // Save current cursor position + QTextCursor cursor = editor->textCursor(); + int n = cursor.position(); editor->setPlainText(text); + // Restore cursor position + cursor.setPosition(n); + editor->setTextCursor(cursor); + editor->verticalScrollBar()->setSliderPosition(y); } } setCurrentOutput(); -- cgit v0.10.1 From afe1fbcb53ff286b2f6efdb99efb6ed9947304f9 Mon Sep 17 00:00:00 2001 From: Ricardo Markiewicz Date: Fri, 29 Nov 2013 01:40:28 -0300 Subject: Move main code inside Editor class Before open a new file now we cleanup the Editor, so the new file get the cursor on the first character. diff --git a/src/editor.cc b/src/editor.cc index 08bf005..069101f 100644 --- a/src/editor.cc +++ b/src/editor.cc @@ -108,3 +108,17 @@ void Editor::wheelEvent ( QWheelEvent * event ) } } +void Editor::setPlainText(const QString &text) +{ + int y = verticalScrollBar()->sliderPosition(); + // Save current cursor position + QTextCursor cursor = textCursor(); + int n = cursor.position(); + QTextEdit::setPlainText(text); + // Restore cursor position + if (n < text.length()) { + cursor.setPosition(n); + setTextCursor(cursor); + verticalScrollBar()->setSliderPosition(y); + } +} diff --git a/src/editor.h b/src/editor.h index 09484f5..8d092a9 100644 --- a/src/editor.h +++ b/src/editor.h @@ -2,6 +2,7 @@ #include #include #include +#include #include class Editor : public QTextEdit @@ -9,6 +10,7 @@ class Editor : public QTextEdit Q_OBJECT public: Editor(QWidget *parent) : QTextEdit(parent) { setAcceptRichText(false); } + void setPlainText(const QString &text); public slots: void zoomIn(); void zoomOut(); diff --git a/src/mainwin.cc b/src/mainwin.cc index 8c21b20..1ad8bc8 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -75,7 +75,6 @@ #include #include #include -#include #include @@ -505,6 +504,7 @@ MainWindow::openFile(const QString &new_filename) } #endif setFileName(actual_filename); + editor->setPlainText(""); fileChangedOnDisk(); // force cached autoReloadId to update refreshDocument(); @@ -606,15 +606,7 @@ void MainWindow::refreshDocument() reader.setCodec("UTF-8"); QString text = reader.readAll(); PRINTB("Loaded design '%s'.", this->fileName.toLocal8Bit().constData()); - int y = editor->verticalScrollBar()->sliderPosition(); - // Save current cursor position - QTextCursor cursor = editor->textCursor(); - int n = cursor.position(); editor->setPlainText(text); - // Restore cursor position - cursor.setPosition(n); - editor->setTextCursor(cursor); - editor->verticalScrollBar()->setSliderPosition(y); } } setCurrentOutput(); -- cgit v0.10.1 From 6f6a8dff7669322a35ddc33ad195f2cb3de45de8 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Sat, 30 Nov 2013 13:42:09 -0600 Subject: MXE c/o 'stable' instd of 'master' from github b/c master has gcc 4.8.2 which is causing crashes. also allow 'build only' builder.sh script command diff --git a/scripts/builder.sh b/scripts/builder.sh index 552d559..ca7e5b2 100755 --- a/scripts/builder.sh +++ b/scripts/builder.sh @@ -1,11 +1,41 @@ #!/usr/bin/env bash # build&upload script for linux & windows snapshot binaries -# tested under linux +# +# Usage: +# +# Start with a clean directory. For example: +# +# mkdir builder +# cd builder +# +# Then run this script, or optionally the 'build only' or 'upload only' version +# +# /some/path/openscad/builder.sh # standard build & upload +# /some/path/openscad/builder.sh buildonly # only do build, dont upload +# /some/path/openscad/builder.sh uploadonly # only upload, dont build +# Notes: +# +# This script is designed to build a 'clean' version of openscad directly +# from the openscad github master source code. It will then optionally +# upload the build to the OpenSCAD official file repository, and modify +# the OpenSCAD website with links to the most recently built files. +# +# +# For the mingw- cross build for Windows(TM) this script does a massive +# 'from nothing' build, including downloading and building an MXE cross +# environment, and dependencies, into $HOME/openscad_deps. This can take +# many many many hours and use several gigabytes of disk space. +# +# This script itself is designed to call other scripts that do the heavy +# lifting. This script itself should be kept relatively simple. +# + +# # requirements - # see http://mxe.cc for required tools (scons, perl, yasm, etc etc etc) - +# # todo - can we build 32 bit linux from within 64 bit linux? # # todo - make linux work @@ -19,18 +49,24 @@ init_variables() { STARTPATH=$PWD export STARTPATH + DOBUILD=1 + DOUPLOAD=1 + DRYRUN= if [ "`echo $* | grep uploadonly`" ]; then - UPLOADONLY=1 + DOUPLOAD=1 + DOBUILD= + DATECODE=`date +"%Y.%m.%d"` + fi + if [ "`echo $* | grep buildonly`" ]; then + DOUPLOAD= + DOBUILD=1 DATECODE=`date +"%Y.%m.%d"` - else - UPLOADONLY= fi if [ "`echo $* | grep dry`" ]; then DRYRUN=1 - else - DRYRUN= fi - export UPLOADONLY + export DOBUILD + export DOUPLOAD export DRYRUN export DATECODE } @@ -43,9 +79,15 @@ check_starting_path() fi } -get_source_code() +get_openscad_source_code() { git clone http://github.com/openscad/openscad.git + if [ "`echo $? | grep 0`" ]; then + echo clone of source code is ok + else + echo clone of openscad source code failed. exiting + exit 1 + fi cd openscad git submodule update --init # MCAD #git checkout branch ##debugging @@ -80,7 +122,7 @@ build_lin32() export DATECODE } -upload_win_generic() +upload_win_common() { summary="$1" username=$2 @@ -110,8 +152,8 @@ upload_win32() BASEDIR=./mingw32/ WIN32_PACKAGEFILE1=OpenSCAD-$DATECODE-x86-32-Installer.exe WIN32_PACKAGEFILE2=OpenSCAD-$DATECODE-x86-32.zip - upload_win_generic "$SUMMARY1" $USERNAME $BASEDIR/$WIN32_PACKAGEFILE1 - upload_win_generic "$SUMMARY2" $USERNAME $BASEDIR/$WIN32_PACKAGEFILE2 + upload_win_common "$SUMMARY1" $USERNAME $BASEDIR/$WIN32_PACKAGEFILE1 + upload_win_common "$SUMMARY2" $USERNAME $BASEDIR/$WIN32_PACKAGEFILE2 export WIN32_PACKAGEFILE1 export WIN32_PACKAGEFILE2 WIN32_PACKAGEFILE1_SIZE=`ls -sh $BASEDIR/$WIN32_PACKAGEFILE1 | awk ' {print $1} ';` @@ -129,8 +171,8 @@ upload_win64() BASEDIR=./mingw64/ WIN64_PACKAGEFILE1=OpenSCAD-$DATECODE-x86-64-Installer.exe WIN64_PACKAGEFILE2=OpenSCAD-$DATECODE-x86-64.zip - upload_win_generic "$SUMMARY1" $USERNAME $BASEDIR/$WIN64_PACKAGEFILE1 - upload_win_generic "$SUMMARY2" $USERNAME $BASEDIR/$WIN64_PACKAGEFILE2 + upload_win_common "$SUMMARY1" $USERNAME $BASEDIR/$WIN64_PACKAGEFILE1 + upload_win_common "$SUMMARY2" $USERNAME $BASEDIR/$WIN64_PACKAGEFILE2 export WIN64_PACKAGEFILE1 export WIN64_PACKAGEFILE2 WIN64_PACKAGEFILE1_SIZE=`ls -sh $BASEDIR/$WIN64_PACKAGEFILE1 | awk ' {print $1} ';` @@ -188,6 +230,7 @@ update_win_www_download_links() BASEURL='http://files.openscad.org/' DATECODE=`date +"%Y.%m.%d"` + mv win_snapshot_links.js win_snapshot_links.js.backup rm win_snapshot_links.js echo "fileinfo['WIN64_SNAPSHOT1_URL'] = '$BASEURL$WIN64_PACKAGEFILE1'" >> win_snapshot_links.js echo "fileinfo['WIN64_SNAPSHOT2_URL'] = '$BASEURL$WIN64_PACKAGEFILE2'" >> win_snapshot_links.js @@ -229,19 +272,20 @@ check_ssh_agent() } init_variables $* -check_ssh_agent +if [ $DOUPLOAD ]; then + check_ssh_agent +fi check_starting_path read_username_from_user read_password_from_user -get_source_code - -if [ ! $UPLOADONLY ]; then +get_openscad_source_code +if [ $DOBUILD ]; then build_win32 build_win64 fi -upload_win32 -upload_win64 -update_win_www_download_links - - +if [ $DOUPLOAD ]; then + upload_win32 + upload_win64 + update_win_www_download_links +fi diff --git a/scripts/mingw-x-build-dependencies.sh b/scripts/mingw-x-build-dependencies.sh index df8572f..c0f658d 100755 --- a/scripts/mingw-x-build-dependencies.sh +++ b/scripts/mingw-x-build-dependencies.sh @@ -6,8 +6,13 @@ # This script must be run from the OpenSCAD source root directory # # Usage: -# ./scripts/mingw-x-build-dependencies.sh # 32 bit -# ./scripts/mingw-x-build-dependencies.sh 64 # 64 bit +# ./scripts/mingw-x-build-dependencies.sh # 32 bit +# ./scripts/mingw-x-build-dependencies.sh 64 # 64 bit +# +# If you just want to download, and build later: +# +# ./scripts/mingw-x-build-dependencies.sh download # 32 bit download +# ./scripts/mingw-x-build-dependencies.sh 64 download # 64 bit download # # Prerequisites: # @@ -54,11 +59,19 @@ fi echo "entering" $MXEDIR cd $MXEDIR if [ "`echo $* | grep 64`" ]; then - MXE_TARGETS='x86_64-w64-mingw32' + MXE_TARGETS='x86_64-w64-mingw32' + if [ "`echo $* | grep download`" ]; then + PACKAGES='download-mpfr download-eigen download-opencsg download-cgal download-qt' + else PACKAGES='mpfr eigen opencsg cgal qt' + fi else - MXE_TARGETS= + MXE_TARGETS='i686-pc-mingw32' # fixme - does this work? test it. + if [ "`echo $* | grep download`" ]; then + PACKAGES='download-mpfr download-eigen download-opencsg download-cgal download-qt download-nsis' + else PACKAGES='mpfr eigen opencsg cgal qt nsis' + fi fi echo make $PACKAGES MXE_TARGETS=$MXE_TARGETS -j $NUMCPU JOBS=$NUMJOBS make $PACKAGES MXE_TARGETS=$MXE_TARGETS -j $NUMCPU JOBS=$NUMJOBS -- cgit v0.10.1 From f175bae46a8f15823780c5a9c89b11476acb3107 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Sat, 30 Nov 2013 15:13:03 -0600 Subject: disallow gcc 4.8.2 diff --git a/src/version_check.h b/src/version_check.h index 86e769c..fbea077 100644 --- a/src/version_check.h +++ b/src/version_check.h @@ -108,5 +108,13 @@ a time, to avoid confusion. #endif // MPFR #endif // GMP +// see github issue #552 +#define GCC_VERSION (__GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100 \ + + __GNUC_PATCHLEVEL__) +#if GCC_VERSION == 40802 +#error OpenSCAD isn't compatible with gcc 4.8.2. Please try a different version +#endif + #endif // OPENSCAD_SKIP_VERSION_CHECK -- cgit v0.10.1