diff options
-rw-r--r-- | RELEASE_NOTES | 2 | ||||
-rwxr-xr-x | scripts/release-common.sh | 32 | ||||
-rwxr-xr-x | scripts/update-web.sh | 22 | ||||
-rw-r--r-- | src/CGAL_Nef_polyhedron.h | 4 | ||||
-rw-r--r-- | src/openscad.cc | 12 | ||||
-rw-r--r-- | src/polyset.cc | 4 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 9 | ||||
-rw-r--r-- | tests/OffscreenContext.mm | 12 | ||||
-rw-r--r-- | tests/OffscreenView.cc | 14 |
9 files changed, 90 insertions, 21 deletions
diff --git a/RELEASE_NOTES b/RELEASE_NOTES index cc6d99e..d67766c 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -30,7 +30,7 @@ o dxf_linear_extrude() and dxf_rotate_extrude() are now deprecated. o The file, layer, origin and scale parameters to linear_extrude() and rotate_extrude() are now deprecated. Use an import() child instead. o import_dxf(), import_stl() and import_off() are now deprecated. Use import() instead. -o When exporting geometry from the cmd-line, use the universal -o option. It will export to the correct file format based on the given suffix (dxf, stl, off). +o When exporting geometry from the cmd-line, use the universal -o option. It will export to the correct file format based on the given suffix (dxf, stl, off). The -x and -s parameters are still working but deprecated. o F2 and F3 for Save and Reload is now deprecated OpenSCAD 2011.06 diff --git a/scripts/release-common.sh b/scripts/release-common.sh index 9261d7a..9f03ee5 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -1,7 +1,9 @@ #!/bin/sh # # This script creates a binary release of OpenSCAD. -# This should work under Mac OS X and Windows (msys). Linux support pending. +# This should work under Mac OS X, Windows (msys), and Linux cross-compiling +# for windows using mingw-cross-env (use like: OS=LINXWIN release-common.sh). +# Linux support pending. # The script will create a file called openscad-<versionstring>.zip # in the current directory. # @@ -54,9 +56,23 @@ case $OS in ZIPARGS="a -tzip" TARGET=release ;; + LINXWIN) + unset CONFIG + TARGET=release + ZIP="zip" + ZIPARGS="-r" + ;; +esac + +case $OS in + LINXWIN) + i686-pc-mingw32-qmake VERSION=$VERSION CONFIG+=$CONFIG CONFIG+=mingw-cross-env CONFIG-=debug openscad.pro + ;; + *) + qmake VERSION=$VERSION CONFIG+=$CONFIG CONFIG-=debug openscad.pro + ;; esac -qmake VERSION=$VERSION CONFIG+=$CONFIG CONFIG-=debug openscad.pro make -s clean case $OS in MACOSX) @@ -122,4 +138,16 @@ case $OS in rm -rf openscad-$VERSION echo "Binary created: openscad-$VERSION.zip" ;; + LINXWIN) + #package + cp $TARGET/openscad.exe openscad-$VERSION + rm -f OpenSCAD-$VERSION.zip + "$ZIP" $ZIPARGS OpenSCAD-$VERSION.zip openscad-$VERSION + cp scripts/installer.nsi openscad-$VERSION/ + cd openscad-$VERSION && makensis installer.nsi && cd .. + cp openscad-$VERSION/openscad_setup.exe OpenSCAD-$VERSION-Installer.exe + rm -rf openscad-$VERSION + echo "Binary created: OpenSCAD-$VERSION.zip" + echo "Installer created: OpenSCAD-$VERSION-Installer.exe" + ;; esac diff --git a/scripts/update-web.sh b/scripts/update-web.sh index 4180d01..9036d9b 100755 --- a/scripts/update-web.sh +++ b/scripts/update-web.sh @@ -1,13 +1,27 @@ #!/bin/bash -dmgfile=$1 -if [ -z "$dmgfile" ]; then - echo "Usage: $0 <dmgfile>" +# Works with Mac OS X and Linux cross-compiling for windows using +# mingw-cross-env (use like: OS=LINXWIN update-web.sh file1.zip file2.exe). + +file1=$1 +if [ -z "$file1" ]; then + echo "Usage: $0 <file1> [<file2>]" exit 1 fi + +if [[ $OSTYPE =~ "darwin" ]]; then + OS=MACOSX +fi + indexfile=../openscad.github.com/index.html if [ -f $indexfile ]; then - sed -i .backup -e "s/^\(.*mac-snapshot.*\)\(OpenSCAD-.*\.dmg\)\(.*\)\(OpenSCAD-.*dmg\)\(.*$\)/\\1$dmgfile\\3$dmgfile\\5/" $indexfile + if [ $OS == MACOSX ]; then + sed -i .backup -e "s/^\(.*mac-snapshot.*\)\(OpenSCAD-.*\.dmg\)\(.*\)\(OpenSCAD-.*dmg\)\(.*$\)/\\1$file1\\3$file1\\5/" $indexfile + elif [ $OS == LINXWIN ]; then + file2=$2 + sed -i .backup -e "s/^\(.*win-snapshot-zip.*\)\(OpenSCAD-.*\.zip\)\(.*\)\(OpenSCAD-.*zip\)\(.*$\)/\\1$file1\\3$file1\\5/" $indexfile + sed -i .backup -e "s/^\(.*win-snapshot-exe.*\)\(OpenSCAD-.*-Installer\.exe\)\(.*\)\(OpenSCAD-.*-Installer.exe\)\(.*$\)/\\1$file2\\3$file2\\5/" $indexfile + fi echo "Web page updated. Remember to commit and push openscad.github.com" else echo "Web page not found at $indexfile" diff --git a/src/CGAL_Nef_polyhedron.h b/src/CGAL_Nef_polyhedron.h index 79d36b7..fda4bc5 100644 --- a/src/CGAL_Nef_polyhedron.h +++ b/src/CGAL_Nef_polyhedron.h @@ -1,8 +1,6 @@ #ifndef CGAL_NEF_POLYHEDRON_H_ #define CGAL_NEF_POLYHEDRON_H_ -#ifdef ENABLE_CGAL - #include "cgalfwd.h" #include "memory.h" @@ -29,6 +27,4 @@ public: shared_ptr<CGAL_Nef_polyhedron3> p3; }; -#endif /* ENABLE_CGAL */ - #endif diff --git a/src/openscad.cc b/src/openscad.cc index 678d87a..d708a8e 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -134,6 +134,8 @@ int main(int argc, char **argv) ("help,h", "help message") ("version,v", "print the version") ("o,o", po::value<string>(), "out-file") + ("s,s", po::value<string>(), "stl-file") + ("x,x", po::value<string>(), "dxf-file") ("d,d", po::value<string>(), "deps-file") ("m,m", po::value<string>(), "makefile") ("D,D", po::value<vector<string> >(), "var=val"); @@ -160,6 +162,16 @@ int main(int argc, char **argv) if (output_file) help(argv[0]); output_file = vm["o"].as<string>().c_str(); } + if (vm.count("s")) { + fprintf(stderr, "DEPRECATED: The -s option is deprecated. Use -o instead.\n"); + if (output_file) help(argv[0]); + output_file = vm["s"].as<string>().c_str(); + } + if (vm.count("x")) { + fprintf(stderr, "DEPRECATED: The -x option is deprecated. Use -o instead.\n"); + if (output_file) help(argv[0]); + output_file = vm["x"].as<string>().c_str(); + } if (vm.count("d")) { if (deps_output_file) help(argv[0]); diff --git a/src/polyset.cc b/src/polyset.cc index 1d31005..742e425 100644 --- a/src/polyset.cc +++ b/src/polyset.cc @@ -27,10 +27,6 @@ #include "polyset.h" // FIXME: Reenable/rewrite - don't be dependant on GUI // #include "Preferences.h" -#ifdef ENABLE_CGAL -#include <CGAL/assertions_behaviour.h> -#include <CGAL/exceptions.h> -#endif #include "linalg.h" #include <Eigen/LU> #include <QColor> diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index fb007cc..2b60a09 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -327,6 +327,15 @@ file(GLOB SCAD_DXF_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/dxf/*.scad) file(GLOB EXAMPLE_FILES ${CMAKE_SOURCE_DIR}/../examples/*.scad) list(APPEND DUMPTEST_FILES ${MINIMAL_FILES} ${FEATURES_FILES} ${EXAMPLE_FILES}) +# Disable tests which are known to cause floating point comparison issues +# Once we're capable of comparing these across platforms, we can put these back in +list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/features/transform-tests.scad) +list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/features/render-tests.scad) +list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example001.scad) +list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example005.scad) +list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example006.scad) +list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example020.scad) +list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example021.scad) list(APPEND ECHO_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/minimal/echo.scad diff --git a/tests/OffscreenContext.mm b/tests/OffscreenContext.mm index eb2f777..2bbaffa 100644 --- a/tests/OffscreenContext.mm +++ b/tests/OffscreenContext.mm @@ -48,20 +48,20 @@ OffscreenContext *create_offscreen_context(int w, int h) glewInit(); #ifdef DEBUG - cout << "GLEW version " << glewGetString(GLEW_VERSION) << "\n"; - cout << (const char *)glGetString(GL_RENDERER) << "(" << (const char *)glGetString(GL_VENDOR) << ")\n" + std::cout << "GLEW version " << glewGetString(GLEW_VERSION) << "\n"; + std::cout << (const char *)glGetString(GL_RENDERER) << "(" << (const char *)glGetString(GL_VENDOR) << ")\n" << "OpenGL version " << (const char *)glGetString(GL_VERSION) << "\n"; - cout << "Extensions: " << (const char *)glGetString(GL_EXTENSIONS) << "\n"; + std::cout << "Extensions: " << (const char *)glGetString(GL_EXTENSIONS) << "\n"; if (GLEW_ARB_framebuffer_object) { - cout << "ARB_FBO supported\n"; + std::cout << "ARB_FBO supported\n"; } if (GLEW_EXT_framebuffer_object) { - cout << "EXT_FBO supported\n"; + std::cout << "EXT_FBO supported\n"; } if (GLEW_EXT_packed_depth_stencil) { - cout << "EXT_packed_depth_stencil\n"; + std::cout << "EXT_packed_depth_stencil\n"; } #endif diff --git a/tests/OffscreenView.cc b/tests/OffscreenView.cc index e34fbce..46951c1 100644 --- a/tests/OffscreenView.cc +++ b/tests/OffscreenView.cc @@ -16,6 +16,20 @@ OffscreenView::OffscreenView(size_t width, size_t height) for (int i = 0; i < 10; i++) this->shaderinfo[i] = 0; this->ctx = create_offscreen_context(width, height); if ( this->ctx == NULL ) throw -1; + +#ifdef DEBUG + GLint rbits, gbits, bbits, abits, dbits, sbits; + glGetIntegerv(GL_RED_BITS, &rbits); + glGetIntegerv(GL_GREEN_BITS, &gbits); + glGetIntegerv(GL_BLUE_BITS, &bbits); + glGetIntegerv(GL_ALPHA_BITS, &abits); + glGetIntegerv(GL_DEPTH_BITS, &dbits); + glGetIntegerv(GL_STENCIL_BITS, &sbits); + + fprintf(stderr, "FBO: RGBA(%d%d%d%d), depth(%d), stencil(%d)\n", + rbits, gbits, bbits, abits, dbits, sbits); +#endif + initializeGL(); resizeGL(width, height); } |