Compare commits

..

80 commits

Author SHA1 Message Date
Marius Kintel
6f68c9fc9b Revert "Bump version to 2015.03-3"
This reverts commit 9d8e9b5679.
2016-02-23 02:01:51 -05:00
Marius Kintel
e243246298 Revert "Updated release date"
This reverts commit fb8b0509b9.
2016-02-23 02:01:22 -05:00
Marius Kintel
fb8b0509b9 Updated release date 2016-02-23 01:57:45 -05:00
Marius Kintel
d73ddc3161 #1588 Set SUFeedURL to fix Sparkle-related crash. add http download exception for now 2016-02-23 01:57:31 -05:00
Marius Kintel
9d8e9b5679 Bump version to 2015.03-3 2016-02-23 01:54:07 -05:00
Marius Kintel
e316bec7dc sync with master 2016-02-17 16:34:22 -05:00
Marius Kintel
7dd4c02e6d Revert "Bump version to 2015.03-3"
This reverts commit dc710c110f.
2016-02-17 16:27:58 -05:00
Marius Kintel
00af9cc12f Updated release notes 2016-02-17 16:16:22 -05:00
Marius Kintel
dc710c110f Bump version to 2015.03-3 2016-02-17 16:12:34 -05:00
Marius Kintel
cfdc3c71c2 Security update: Upgraded Sparkle to 1.13.1 2016-02-17 16:08:38 -05:00
Marius Kintel
57ab1796b2 #1491 Clarified sparkle-related license 2015-11-16 11:44:08 -05:00
Marius Kintel
5edef7ef86 sync with 2015.03-2 2015-11-16 00:32:53 -05:00
Marius Kintel
14cf51b9d1 Revert "Bumped version to 2015.03-2"
This reverts commit 1d56186111.
2015-11-16 00:12:02 -05:00
Marius Kintel
1d56186111 Bumped version to 2015.03-2 2015-11-16 00:11:43 -05:00
Marius Kintel
f22e688424 #1481 Make sure we start animation when Steps are updated 2015-11-16 00:10:22 -05:00
Marius Kintel
614f82f270 Added release notes for 2015.03-2 2015-11-15 20:02:22 -05:00
Marius Kintel
375eba5a1f Added release notes for 2015.03-1 2015-11-15 20:01:49 -05:00
Marius Kintel
b4f765f8a4 #669 Support libc++ in macosx-sanity-check 2015-11-15 02:41:33 -05:00
Marius Kintel
406a4906c5 Added support for @rpath 2015-11-15 02:40:40 -05:00
Marius Kintel
a7ee1f2bcd #1479 Be more robust when passed invalid value 2015-11-15 01:53:39 -05:00
Marius Kintel
9511a12eb4 bugfix: #1481 don't divide by zero 2015-11-15 01:35:21 -05:00
Hans L
e36d59bdbf Fix Z-fighting in Ortho view, Issue #1483 2015-11-13 12:04:57 -05:00
Marius Kintel
461388402f #1472 Another attempt at fixing; fix the iterator 2015-11-09 21:14:12 -05:00
Marius Kintel
3791cb8b6a #1472: Fixed infinite loop when passing NaN to for loops 2015-11-09 19:53:09 -05:00
Marius Kintel
888e81b3b1 #1472: Fixed infinite loop when passing NaN to for loops 2015-11-09 18:16:03 -05:00
Marius Kintel
5fe95c9793 Added echo OK 2015-11-09 18:15:53 -05:00
Marius Kintel
4ced104ef5 #1472 Added test case 2015-11-09 18:15:41 -05:00
Don Bright
71ab915a5f use boost cstdint.hpp, prevent "int32_t does not name a type" error on new gcc 2015-11-01 21:39:26 -05:00
Don
1a534f2589 add some updated notes on MXE cross build 2015-11-01 21:39:10 -05:00
Don
cc92ba5a80 updates to MXE/win cross-build. use mingw64.static build dir.
check for 'zip' command when building package. auto detect mxe in /opt/mxe
2015-11-01 21:38:53 -05:00
Marius Kintel
a3af70309c #452 2015.03 branch still uses separate executable for tests, causing some numbers to be output differently 2015-10-26 17:55:18 -04:00
don bright
e7434abe40 simplify documentation, for deeper knowledge people should follow urls 2015-10-26 15:57:46 -04:00
don bright
b0f42558fc remove extraneous space 2015-10-26 15:57:41 -04:00
don bright
a7aaec1376 improve documentation of number conversion function (again) 2015-10-26 15:57:35 -04:00
don bright
74f4818837 better documentation of number conversion function 2015-10-26 15:57:30 -04:00
don bright
c5f65e9146 add convenience search for openscad binary under openscad/bin/openscad 2015-10-26 15:57:13 -04:00
Don Bright
d69065792f update test results to match output verbiage 2015-10-26 15:55:37 -04:00
don bright
9faf28b6a0 convenience search of openscad gui binary, for test run 2015-10-26 15:55:21 -04:00
Don Bright
c6b49151cb add a few more tests for floating point rands() seeds, and expected results. 2015-10-26 15:50:26 -04:00
Don Bright
f47866ac2e add test results for rands() dealing with floating point seeds & infinite inputs 2015-10-26 15:50:21 -04:00
Don Bright
48177ff27c minor cleanup of unneeded code 2015-10-26 15:50:15 -04:00
Don Bright
7c62ecc49c add new tests for infinite inputs to rands() 2015-10-26 15:50:09 -04:00
Don Bright
9ce966edb8 rm my old hash, use awesome floating point hash from Python, include license 2015-10-26 15:50:04 -04:00
Don Bright
80cf0574e1 create better hash function for 64 double->32 bit unsigned int 2015-10-26 15:49:58 -04:00
Don Bright
829b53fb72 make rands() deal better with float input for seed, and inf input 2015-10-26 15:49:53 -04:00
Andrew Plumb
fba8130303 Manually removing WARNING echos. 2015-10-16 13:09:21 -04:00
Andrew Plumb
34c83f8ffa Manually removing WARNING echos. 2015-10-16 13:09:11 -04:00
Andrew Plumb
6f8bb211ff Found more search PRINTB warnings to remove
Conflicts:
	src/func.cc
2015-10-16 13:08:26 -04:00
Andrew Plumb
38436c36e4 Removing instead of just commenting out line. 2015-10-16 13:07:40 -04:00
Andrew Plumb
d380ba4b85 Comment out search term not found WARNING
Returning empty result should be sufficient for detecting a no-match condition.

See forum discussion http://forum.openscad.org/Suppressing-quot-search-term-not-found-quot-warning-in-search-td12359.html
2015-10-16 13:07:26 -04:00
Don Bright
c8e8f7299c add expected result of recursion-test-vector 2015-10-16 12:59:36 -04:00
Don Bright
686d66f0f9 add test for issue1407, recursion crash when vectors are parameters 2015-10-16 12:59:26 -04:00
Marius Kintel
38d80566b3 #1407 Minor Value vs. ValuePtr value/reference cleanup 2015-10-16 12:55:07 -04:00
Marius Kintel
fafd3e853f Refactored to let VectorValues use ValuePtr instead of Value, to avoid having to copy large vectors. Attempt to fix #1407
Conflicts:
	src/func.cc
2015-10-16 12:53:46 -04:00
Liam Marshall
fae761e9d2 Easier fix for 93925 (control.cc) 2015-10-16 12:51:38 -04:00
Liam Marshall
5d12761c68 Fix memory leak 93925 2015-10-16 12:51:20 -04:00
Marius Kintel
0edd05760e #1425 For backwards compatibility, revert calculation so that never reaches 1.0 2015-10-16 12:47:43 -04:00
Marius Kintel
53492199b0 #1425 Let the last animation frame correspond with =1.0, to allow people to design for a valid last frame. 2015-10-16 12:47:29 -04:00
Marius Kintel
c2ebb73f4d #1425 Correctly reset picture dump if anim steps were changed 2015-10-16 12:47:22 -04:00
Marius Kintel
2c42445a7e #1425 Implemented some improvements suggested by @DBramley 2015-09-04 12:40:40 -04:00
Marius Kintel
62984ec5dd Use integers for underlying frame counter. Fixes rounding issue #1425 2015-09-02 23:28:59 -04:00
Torsten Paul
8cd5fecfa1 Validate colors against CSS4 draft - add "RebeccaPurple". 2015-08-31 17:25:01 -04:00
Torsten Paul
2e34c8bdd1 Use QSaveFile (if available) to write designs to disk.
Always check the status of the QTextStream to catch problems like disk
full.
In addition QSaveFile can ensure the old file is not destroyed as it's
using a temporary file which is committed at the end by just renaming it
to the output file name.
2015-08-31 17:14:19 -04:00
Torsten Paul
9768a0adc9 Remove flattr icon and use styled link instead.
This change is mainly driven by Debian declaring the button non-free so
it must be removed when distributing OpenSCAD in Debian.
2015-08-31 17:06:32 -04:00
Torsten Paul
85aa71bb4b Ignore Inf/NaN parameters to linear_extrude() (fixes #1378). 2015-08-31 17:06:17 -04:00
chrysn
553fd90bd4 Change "Allow to open multiple documents" to "Allow opening"
This is for grammatical reasons. It is being discussed in
https://bugs.debian.org/795158, and "allowing" seems to be a correct
(not necessarily ideal, but not intrusive) solution.

Forwarded: no
2015-08-31 17:05:44 -04:00
chrysn
4abb4706c4 man page: Rephase colorscheme option to avoid problems with wrapping
The old version threw errors when formatted:

$ LC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80 man --warnings -E UTF-8 -l -Tutf8 -Z ./doc/openscad.1 >/dev/null
<standard input>:85: warning [p 2, 4.7i, div `an-div', 0.0i]: cannot adjust line

This was discovered by lintian and reported as
'manpage-has-errors-from-man'.

Forwarded: no

Gbp-Pq: Name man-page-Rephase-colorscheme-option-to-avoid-problem.patch
2015-08-31 17:05:35 -04:00
chrysn
f2e67e985b Add keywords to the desktop file
Forwarded: no

Gbp-Pq: Name Add-keywords-to-the-desktop-file.patch
2015-08-31 17:05:25 -04:00
Chow Loong Jin
660c0ac736 Add hashbang to test_cmdline_tool.py
Forwarded: no

Gbp-Pq: Name Add-hashbang-to-test_cmdline_tool.py.patch
2015-08-31 17:05:19 -04:00
Torsten Paul
5ba29f07b7 Check for infinite double values when using values as index (fixes #1420).
On arm64 the integer constructor returns 0 for an input value of NaN. To
prevent this, index values are now checked against Inf/NaN and protected
against overflow using boost::numeric_cast.
2015-08-31 17:04:48 -04:00
Torsten Paul
9a6c229fc2 Use Debian7 dependencies for Linux Mint (fixes #1422). 2015-08-31 17:04:23 -04:00
Marius Kintel
e2b0b81be6 Catch RangeTest exception from clipper. Fixes #1410 2015-08-31 17:02:37 -04:00
Marius Kintel
95be0ebfe7 Handle dimensional errors in matrix multiplication, including undef values. Fixes #1356 2015-06-07 13:12:06 -04:00
Torsten Paul
3421ca117e Add more detailed installer information including version number. 2015-06-07 11:17:45 -04:00
Marius Kintel
3b4ec9173a Fix resource path search; the 'libraries' folder isn't always installed. Fixes #1342 2015-05-14 22:31:40 -04:00
Torsten Paul
a69b31a5d9 Simple detection of script and direction based on given text.
This adds a simple detection logic based on the hb_unicode_script()
function provided by harfbuzz. Automatic script selection will only
happen if no valid parameter was given (basically only in case of
a missing script parameter in text()).
If different scripts are found in a single text, the resulting value
is HB_SCRIPT_UNKNOWN.
2015-05-14 22:24:29 -04:00
Torsten Paul
41f6b85c4a Workaround for Fedora 21 builds (fixes #1254).
Fedora installs qscintilla2.prf in the wrong location and has a different
naming scheme than the one used in Ubuntu so the existing workaround fails.
This adds yet another workaround to detect the different naming for the
Qt5 version of the QScintilla2 library.
2015-05-14 22:09:48 -04:00
Miro Hrončok
a1b5d3ec0b Czech translation: Add missing space 2015-05-04 15:03:50 -04:00
Marius Kintel
be7acf4ab2 Version splitting used wrong variable, causing version() to return [0,0,0]. Fixes #1329 2015-04-28 10:20:32 -04:00
Marius Kintel
2b9949fefd #1254 Backport some code to boost filesystem V2, for old RedHat version 2015-04-26 16:12:15 -04:00
719 changed files with 18802 additions and 35986 deletions

10
.gitignore vendored
View file

@ -1,5 +1,3 @@
/*.scad
**/out*.*
*.dmg
*~
*.tar*
@ -11,13 +9,13 @@ objects
.qmake.stash
parser_yacc.h
**/#*#
/.dir-locals.el
testdata/scad/2D/features/import_dxf-tests.scad
testdata/scad/3D/features/import_stl-tests.scad
testdata/scad/features/import_dxf-tests.scad
testdata/scad/features/import_stl-tests.scad
testdata/scad/misc/include-tests.scad
testdata/scad/misc/use-tests.scad
**/project.xcworkspace
**/xcuserdata
/*.scad
/*.stl
/*.dxf
/*.off
@ -39,7 +37,6 @@ testdata/scad/misc/use-tests.scad
/lexer_lex.cpp
/parser_yacc.cpp
/OpenSCAD.app
/openscad.appdata.xml
/openscad.pro.user
/openscad
/locale/*/*/*.mo
@ -52,4 +49,3 @@ testdata/scad/misc/use-tests.scad
src/*.org
src/*.old
src/*.debug
/Testing

View file

@ -1,34 +1,26 @@
language: cpp
matrix:
include:
- os: linux
compiler: gcc
dist: trusty
env: DIST="trusty"
sudo: required
cache: apt
- os: linux
compiler: gcc
dist: precise
env: DIST="precise"
cache: apt
- os: osx
compiler: clang
env: DIST="osx"
cache: apt
compiler: gcc
notifications:
irc:
channels:
- "chat.freenode.net#openscad"
on_success: change
use_notice: false
use_notice: true
skip_join: true
before_install:
- if [[ "$DIST" == "trusty" ]]; then wget -qO - http://files.openscad.org/OBS-Repository-Key.pub | sudo apt-key add - ; echo 'yes' | sudo add-apt-repository 'deb http://download.opensuse.org/repositories/home:/t-paul:/lib3mf/xUbuntu_14.04/ ./' ; sudo apt-get update -qq ; sudo apt-get purge -qq fglrx ; sudo apt-get install -qq build-essential libqt4-dev libqt4-opengl-dev libxmu-dev cmake bison flex git-core libboost-all-dev libXi-dev libmpfr-dev libboost-dev libglew-dev libeigen3-dev libcgal-dev libgmp3-dev libgmp-dev curl imagemagick libfontconfig-dev libopencsg-dev libharfbuzz-dev libzip-dev lib3mf-dev ; fi
- if [[ "$DIST" == "precise" ]]; then echo 'yes' | sudo add-apt-repository ppa:chrysn/openscad ; sudo apt-get update -qq ; sudo apt-get purge -qq fglrx ; sudo apt-get install -qq build-essential libqt4-dev libqt4-opengl-dev libxmu-dev cmake bison flex git-core libboost-all-dev libXi-dev libmpfr-dev libboost-dev libglew-dev libeigen3-dev libcgal-dev libgmp3-dev libgmp-dev curl imagemagick libfontconfig-dev ; sudo apt-get install -qq libopencsg-dev ; echo 'yes' | sudo add-apt-repository ppa:mapnik/nightly-trunk ; sudo apt-get update -qq ; sudo apt-get install -qq libharfbuzz-dev libzip-dev ; echo 'yes' | sudo add-apt-repository ppa:oibaf/graphics-drivers ; sudo apt-get update -qq ; sudo apt-get install --install-recommends libgl1-mesa-dev-lts-quantal ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; ./scripts/macosx-build-homebrew.sh ; fi
- echo 'yes' | sudo add-apt-repository ppa:chrysn/openscad
- sudo apt-get update -qq
- sudo apt-get install -qq build-essential libqt4-dev libqt4-opengl-dev libxmu-dev cmake bison flex git-core libboost-all-dev libXi-dev libmpfr-dev libboost-dev libglew-dev libeigen3-dev libcgal-dev libgmp3-dev libgmp-dev curl imagemagick libfontconfig-dev
- sudo apt-get install -qq libopencsg-dev
- echo 'yes' | sudo add-apt-repository ppa:mapnik/nightly-trunk
- sudo apt-get update -qq
- sudo apt-get install -qq libharfbuzz-dev
- echo 'yes' | sudo add-apt-repository ppa:oibaf/graphics-drivers
- sudo apt-get update -qq
- sudo apt-get install --install-recommends libgl1-mesa-dev-lts-quantal
branches:
only:
@ -36,8 +28,8 @@ branches:
before_script:
- echo -e "Host files.openscad.org\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- for i in {0..40}; do eval $(printf "echo \$openscad_rsa_%02d\n" $i) >> ~/.ssh/openscad_rsa_base64; done
- base64 --decode ~/.ssh/openscad_rsa_base64 > ~/.ssh/id_rsa
- echo -n $openscad_rsa_{00..40} >> ~/.ssh/openscad_rsa_base64
- base64 --decode --ignore-garbage ~/.ssh/openscad_rsa_base64 > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
script: if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then ./scripts/travis-ci.sh ; fi
@ -92,6 +84,6 @@ addons:
name: "openscad/openscad"
description: "The Programmers Solid 3D CAD Modeller"
notification_email: dev@openscad.org
build_command_prepend: qmake CONFIG+=experimental CONFIG+=nogui
build_command_prepend: qmake
build_command: make
branch_pattern: coverity_scan

View file

@ -73,26 +73,6 @@
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>svg</string>
</array>
<key>CFBundleTypeName</key>
<string>SVG file</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>amf</string>
</array>
<key>CFBundleTypeName</key>
<string>AMF file</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
</array>
<key>NSAppleScriptEnabled</key>
<true/>

View file

@ -1,7 +1,6 @@
[![Travis CI](https://api.travis-ci.org/openscad/openscad.png)](https://travis-ci.org/openscad/openscad)
[![Coverity Status](https://scan.coverity.com/projects/2510/badge.svg)](https://scan.coverity.com/projects/2510)
[![Visit our IRC channel](https://kiwiirc.com/buttons/irc.freenode.net/openscad.png)](https://kiwiirc.com/client/irc.freenode.net/#openscad)
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/openscad/openscad/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
# What is OpenSCAD?
[![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=openscad&url=http://openscad.org&title=OpenSCAD&language=&tags=github&category=software)
@ -89,14 +88,13 @@ libraries from aptitude. If you're using Mac, or an older Linux/BSD, there
are build scripts that download and compile the libraries from source.
Follow the instructions for the platform you're compiling on below.
* A C++ compiler supporting C++11
* [Qt (4.4 -> 5.x)](http://qt.io/)
* [QScintilla2 (2.7 ->)](http://www.riverbankcomputing.co.uk/software/qscintilla/)
* [CGAL (3.6 ->)](http://www.cgal.org/)
* [Qt4 (4.4 - 5.4)](http://www.qt.nokia.com/)
* [QScintilla2 (2.7 - 2.8)](http://www.riverbankcomputing.co.uk/software/qscintilla/)
* [CGAL (3.6 - 4.5)](http://www.cgal.org/)
* [GMP (5.x)](http://www.gmplib.org/)
* [MPFR (3.x)](http://www.mpfr.org/)
* [cmake (2.8 ->, required by CGAL and the test framework)](http://www.cmake.org/)
* [boost (1.35 ->)](http://www.boost.org/)
* [cmake (2.8 - 3.0, required by CGAL and the test framework)](http://www.cmake.org/)
* [boost (1.35 - 1.57)](http://www.boost.org/)
* [OpenCSG (1.3.2 ->)](http://www.opencsg.org/)
* [GLEW (1.5.4 ->)](http://glew.sourceforge.net/)
* [Eigen (3.x)](http://eigen.tuxfamily.org/)
@ -125,39 +123,39 @@ To pull the MCAD library (http://reprap.org/wiki/MCAD), do the following:
Prerequisites:
* Xcode
* cmake
* pkg-config
* XCode, including XCode command-line tools.
Install Dependencies:
After building dependencies, follow the instructions in the *Compilation* section.
1. **From source**
Run the script that sets up the environment variables:
source setenv_mac.sh
```source setenv_mac-qt5.sh```
Then run the script to compile all the dependencies:
```./scripts/macosx-build-dependencies.sh```
./scripts/macosx-build-dependencies.sh
1. **Homebrew** (assumes [Homebrew](http://brew.sh) is already installed)
After building dependencies, follow the instructions in the *Compilation* section.
./scripts/macosx-build-homebrew.sh
For the adventurous, it might be possible to build OpenSCAD using _MacPorts_ or _Homebrew_. The main challenge is that both these systems have partially broken libraries, but that tends to change from time to time.
1. **MacPorts** (assumes [MacPorts](http://macports.org) is already installed)
For the adventurous, it might be possible to build OpenSCAD using _MacPorts_. The main challenge is that MacPorts have partially broken libraries, but that tends to change from time to time.
NB! MacPorts currently doesn't support Qt5 very well, so using Qt4
is the only working option at the moment. However, MacPorts' Qt4
has a broken `moc` command, causing OpenSCAD compilation to
has a broken ```moc``` command, causing OpenSCAD compilation to
break. This may be fixed in MacPorts by the time you read this.
sudo port install opencsg qscintilla boost cgal pkgconfig eigen3 harfbuzz fontconfig
```sudo port install opencsg qscintilla boost cgal pkgconfig eigen3 harfbuzz fontconfig```
1. **Homebrew** (assumes [Homebrew](http://brew.sh)) is already installed)
NB! Homebrew's ```qscintilla2``` component doesn't support Qt5, so using Qt4 is currently necessary.
However, Homebrew's Qt4 has a broken ```moc``` command, causing OpenSCAD compilation to
break. This may be fixed in Homebrew by the time you read this.
NB! Homebrew's ```harfbuzz``` package requires X11, so you may have to install an X11 server.
NB! Homebrew doesnt have an OpenCSG package
```brew install cgal qscintilla2 eigen harfbuzz```
### Building for Linux/BSD
@ -206,40 +204,36 @@ OpenSCAD for Windows is usually cross-compiled from Linux. If you wish to
attempt an MSVC build on Windows, please see this site:
http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_on_Windows
To cross-build, first make sure that you have all necessary dependencies
of the MXE project ( listed at http://mxe.cc/#requirements ). Don't install
MXE itself, the scripts below will do that for you under $HOME/openscad_deps/mxe
To cross-build, first make sure that you have development tools
installed to get GCC. Then after you've cloned this git repository,
start a new clean bash shell and run the script that sets up the environment
variables.
Then get your development tools installed to get GCC. Then after you've
cloned this git repository, start a new clean bash shell and run the
script that sets up the environment variables.
source ./scripts/setenv-mingw-xbuild.sh 64
source ./scripts/setenv-mingw-xbuild.sh 32
Then run the script to download & compile all the prerequisite libraries above:
./scripts/mingw-x-build-dependencies.sh 64
./scripts/mingw-x-build-dependencies.sh 32
Note that this process can take several hours, and tens of gigabytes of
disk space, as it uses the http://mxe.cc system to cross-build many
libraries. After it is complete, build OpenSCAD and package it to an
installer:
Note that this process can take several hours, as it uses the
http://mxe.cc system to cross-build many libraries. After it is
complete, build OpenSCAD and package it to an installer:
./scripts/release-common.sh mingw64
./scripts/release-common.sh mingw32
If you wish you can only build the openscad.exe binary:
cd mingw64
cd mingw32
qmake ../openscad.pro CONFIG+=mingw-cross-env
make
For a 32-bit Windows cross-build, replace 64 with 32 in the above instructions.
For a 64-bit Windows cross-build, replace 32 with 64 in the above instructions.
### Compilation
First, run 'qmake openscad.pro' from Qt to generate a Makefile.
First, run 'qmake openscad.pro' from Qt4 to generate a Makefile.
On some systems, depending on which version(s) of Qt you have installed, you may need to specify which version you want to use, e.g. by running 'qmake4', 'qmake-qt4', 'qmake -qt=qt5', or something alike.
On some systems, depending on which version(s) of Qt you have installed, you may need to specify which version you want to use, e.g. by running 'qmake4', 'qmake-qt4' or something alike.
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.

View file

@ -1,6 +1,10 @@
# OpenSCAD 2015.03
## 2015.03-3
**OS X only: Auto-update vulnerability fix**
## 2015.03-2
**Bugfixes**

View file

@ -13,12 +13,10 @@ boost {
macx: DEFINES += __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=0
# MXE cross build
CONFIG(mingw-cross-env)|CONFIG(mingw-cross-env-shared) {
CONFIG(mingw-cross-env) {
DEFINES += BOOST_STATIC
DEFINES += BOOST_THREAD_USE_LIB
!CONFIG(mingw-cross-env-shared) {
DEFINES += BOOST_STATIC
DEFINES += Boost_USE_STATIC_LIBS
}
DEFINES += Boost_USE_STATIC_LIBS
BOOST_LINK_FLAGS = -lboost_thread_win32-mt -lboost_program_options-mt -lboost_filesystem-mt -lboost_system-mt -lboost_regex-mt -lboost_chrono-mt
}

View file

@ -1,50 +0,0 @@
macx {
# Mac needs special care to link against the correct C++ library
# We attempt to auto-detect it by inspecting Boost
dirs = $${BOOSTDIR} $${QMAKE_LIBDIR}
for(dir, dirs) {
system(grep -q __112basic_string $${dir}/libboost_thread* >& /dev/null) {
message("Using libc++11")
CONFIG += libc++
}
else {
message("Using libstdc++")
CONFIG += libstdc++
c++11 {
# libc++ is a requirement for using C++11
warning("Disabling C++11 since libstdc++ dependencies were found")
CONFIG -= c++11
}
}
}
libc++ {
QMAKE_CXXFLAGS += -stdlib=libc++
QMAKE_LFLAGS += -stdlib=libc++
QMAKE_OBJECTIVE_CFLAGS += -stdlib=libc++
}
}
c++11 {
# -std=c++11 is only available in gcc>=4.7
*g++*: QMAKE_CXXFLAGS += -std=c++0x
else: QMAKE_CXXFLAGS += -std=c++11
message("Using C++11")
*clang*: {
# 3rd party libraries will probably violate this for a long time
CXX11_SUPPRESS_WARNINGS += -Wno-inconsistent-missing-override
# boost/algorithm/string.hpp does this
CXX11_SUPPRESS_WARNINGS += -Wno-unused-local-typedef
# CGAL
CXX11_SUPPRESS_WARNINGS += -Wno-deprecated-register
QMAKE_CXXFLAGS_WARN_ON += $$CXX11_SUPPRESS_WARNINGS
QMAKE_OBJECTIVE_CFLAGS_WARN_ON += $$CXX11_SUPPRESS_WARNINGS
}
}
else {
*clang* {
QMAKE_CXXFLAGS_WARN_ON += -Wno-c++11-extensions
}
}

View file

@ -10,7 +10,7 @@ cgal {
message("CGAL location: $$CGAL_DIR")
}
CONFIG(mingw-cross-env)|CONFIG(mingw-cross-env-shared) {
CONFIG(mingw-cross-env) {
LIBS += -lgmp -lmpfr -lCGAL
QMAKE_CXXFLAGS += -frounding-math
} else {

View file

@ -1,203 +0,0 @@
Selective Nef Complex
standard
vertices 15
halfedges 42
facets 18
volumes 2
shalfedges 84
shalfloops 2
sfaces 30
0 { 0 2, 0 5, 0 1, -2 | 0 0 5 1 } 1
1 { 3 5, 6 11, 2 3, -2 | 5 0 5 1 } 1
2 { 6 8, 12 17, 4 5, -2 | 5 5 5 1 } 1
3 { 9 11, 18 23, 6 7, -2 | 0 5 0 1 } 1
4 { 12 14, 24 29, 8 9, -2 | 5 0 0 1 } 1
5 { 15 17, 30 35, 10 11, -2 | 5 5 0 1 } 1
6 { 18 20, 36 41, 12 13, -2 | 0 5 5 1 } 1
7 { 21 23, 42 47, 14 15, -2 | 0 0 3 1 } 0
8 { 24 26, 48 53, 16 17, -2 | 3 0 3 1 } 0
9 { 27 29, 54 59, 18 19, -2 | 3 3 3 1 } 0
10 { 30 32, 60 65, 20 21, -2 | 0 3 0 1 } 0
11 { 33 35, 66 71, 22 23, -2 | 3 0 0 1 } 0
12 { 36 38, 72 77, 24 25, -2 | 3 3 0 1 } 0
13 { 39 41, 78 83, 26 27, -2 | 0 3 3 1 } 0
14 { -2 -2, -2 -2, 28 29, 0 | 2 2 3 1 } 1
0 { 3, 0, 0 0 | 1 0 0 1 } 1
1 { 18, 0, 0 5 | 0 1 0 1 } 1
2 { 21, 0, 0 4 | 0 0 -1 1 } 1
3 { 0, 1, 0 6 | -1 0 0 1 } 1
4 { 6, 1, 0 7 | 0 1 0 1 } 1
5 { 13, 1, 0 10 | 0 0 -1 1 } 1
6 { 4, 2, 0 14 | 0 -1 0 1 } 1
7 { 19, 2, 0 13 | -1 0 0 1 } 1
8 { 17, 2, 0 16 | 0 0 -1 1 } 1
9 { 32, 3, 0 20 | 0 -1 0 1 } 1
10 { 20, 3, 0 22 | 0 0 1 1 } 1
11 { 16, 3, 0 21 | 1 0 0 1 } 1
12 { 34, 4, 0 26 | -1 0 0 1 } 1
13 { 5, 4, 0 28 | 0 0 1 1 } 1
14 { 15, 4, 0 25 | 0 1 0 1 } 1
15 { 14, 5, 0 30 | 0 -1 0 1 } 1
16 { 11, 5, 0 34 | -1 0 0 1 } 1
17 { 8, 5, 0 35 | 0 0 1 1 } 1
18 { 1, 6, 0 36 | 0 -1 0 1 } 1
19 { 7, 6, 0 40 | 1 0 0 1 } 1
20 { 10, 6, 0 41 | 0 0 -1 1 } 1
21 { 2, 7, 0 44 | 0 0 1 1 } 1
22 { 24, 7, 0 46 | 1 0 0 1 } 0
23 { 39, 7, 0 47 | 0 1 0 1 } 0
24 { 22, 8, 0 50 | -1 0 0 1 } 0
25 { 27, 8, 0 49 | 0 1 0 1 } 0
26 { 33, 8, 0 52 | 0 0 -1 1 } 0
27 { 25, 9, 0 56 | 0 -1 0 1 } 0
28 { 40, 9, 0 55 | -1 0 0 1 } 0
29 { 38, 9, 0 58 | 0 0 -1 1 } 0
30 { 41, 10, 0 62 | 0 0 1 1 } 0
31 { 37, 10, 0 64 | 1 0 0 1 } 0
32 { 9, 10, 0 65 | 0 1 0 1 } 1
33 { 26, 11, 0 68 | 0 0 1 1 } 0
34 { 12, 11, 0 70 | 1 0 0 1 } 1
35 { 36, 11, 0 71 | 0 1 0 1 } 0
36 { 35, 12, 0 74 | 0 -1 0 1 } 0
37 { 31, 12, 0 76 | -1 0 0 1 } 0
38 { 29, 12, 0 77 | 0 0 1 1 } 0
39 { 23, 13, 0 80 | 0 -1 0 1 } 0
40 { 28, 13, 0 82 | 1 0 0 1 } 0
41 { 30, 13, 0 79 | 0 0 -1 1 } 0
0 { 1, 79 , , 0 | -1 0 0 0 } 1
1 { 0, 78 , , 1 | 1 0 0 0 } 1
2 { 3, 37 , , 0 | 0 0 1 -5 } 1
3 { 2, 36 , , 1 | 0 0 -1 5 } 1
4 { 5, 9 , , 0 | 1 0 0 -5 } 1
5 { 4, 8 , , 1 | -1 0 0 5 } 1
6 { 7, 35 , , 0 | 0 1 0 -5 } 1
7 { 6, 34 , , 1 | 0 -1 0 5 } 1
8 { 9, 74 , , 0 | 0 0 -1 0 } 1
9 { 8, 75 , , 1 | 0 0 1 0 } 1
10 { 11, 2 , , 0 | 0 -1 0 0 } 1
11 { 10, 3 , , 1 | 0 1 0 0 } 1
12 { 13, 81 , 1 , 1 | 0 0 1 -3 } 0
13 { 12, 80 , 0 , 0 | 0 0 -1 3 } 0
14 { 15, 53 , , 1 | 1 0 0 -3 } 0
15 { 14, 52 , , 0 | -1 0 0 3 } 0
16 { 17, 77 , , 1 | 0 1 0 -3 } 0
17 { 16, 76 , , 0 | 0 -1 0 3 } 0
0 { 0 } 0
1 { 15 } 1
0 { 1, 3, 5, 0, 0, 7, 36, 3 | 0 0 1 0 } 1
1 { 0, 4, 2, 1, 1, 37, 6, 2 | 0 0 -1 0 } 1
2 { 3, 1, 4, 0, 1, 10, 44, 10 | 0 1 0 0 } 1
3 { 2, 5, 0, 2, 0, 45, 11, 11 | 0 -1 0 0 } 1
4 { 5, 2, 1, 2, 1, 43, 38, 0 | 1 0 0 0 } 1
5 { 4, 0, 3, 1, 0, 39, 42, 1 | -1 0 0 0 } 1
6 { 7, 10, 9, 3, 3, 1, 12, 2 | 0 0 -1 0 } 1
7 { 6, 8, 11, 4, 2, 13, 0, 3 | 0 0 1 0 } 1
8 { 9, 11, 7, 5, 2, 29, 14, 5 | 1 0 0 0 } 1
9 { 8, 6, 10, 4, 3, 15, 28, 4 | -1 0 0 0 } 1
10 { 11, 9, 6, 5, 3, 26, 2, 10 | 0 1 0 0 } 1
11 { 10, 7, 8, 3, 2, 3, 27, 11 | 0 -1 0 0 } 1
12 { 13, 15, 17, 6, 5, 6, 37, 2 | 0 0 -1 0 } 1
13 { 12, 16, 14, 7, 4, 36, 7, 3 | 0 0 1 0 } 1
14 { 15, 13, 16, 6, 4, 8, 33, 5 | 1 0 0 0 } 1
15 { 14, 17, 12, 8, 5, 32, 9, 4 | -1 0 0 0 } 1
16 { 17, 14, 13, 8, 4, 34, 40, 7 | 0 1 0 0 } 1
17 { 16, 12, 15, 7, 5, 41, 35, 6 | 0 -1 0 0 } 1
18 { 19, 21, 22, 9, 6, 60, 39, 1 | -1 0 0 0 } 1
19 { 18, 23, 20, 10, 7, 38, 61, 0 | 1 0 0 0 } 1
20 { 21, 19, 23, 9, 7, 64, 31, 8 | 0 0 1 0 } 1
21 { 20, 22, 18, 11, 6, 30, 65, 9 | 0 0 -1 0 } 1
22 { 23, 18, 21, 10, 6, 40, 34, 7 | 0 1 0 0 } 1
23 { 22, 20, 19, 11, 7, 35, 41, 6 | 0 -1 0 0 } 1
24 { 25, 27, 29, 12, 8, 71, 30, 9 | 0 0 -1 0 } 1
25 { 24, 28, 26, 14, 9, 31, 70, 8 | 0 0 1 0 } 1
26 { 27, 25, 28, 12, 9, 68, 10, 10 | 0 1 0 0 } 1
27 { 26, 29, 24, 13, 8, 11, 69, 11 | 0 -1 0 0 } 1
28 { 29, 26, 25, 13, 9, 9, 32, 4 | -1 0 0 0 } 1
29 { 28, 24, 27, 14, 8, 33, 8, 5 | 1 0 0 0 } 1
30 { 31, 33, 34, 15, 11, 24, 21, 9 | 0 0 -1 0 } 1
31 { 30, 35, 32, 16, 10, 20, 25, 8 | 0 0 1 0 } 1
32 { 33, 31, 35, 15, 10, 28, 15, 4 | -1 0 0 0 } 1
33 { 32, 34, 30, 17, 11, 14, 29, 5 | 1 0 0 0 } 1
34 { 35, 30, 33, 16, 11, 22, 16, 7 | 0 1 0 0 } 1
35 { 34, 32, 31, 17, 10, 17, 23, 6 | 0 -1 0 0 } 1
36 { 37, 39, 40, 18, 12, 0, 13, 3 | 0 0 1 0 } 1
37 { 36, 41, 38, 19, 13, 12, 1, 2 | 0 0 -1 0 } 1
38 { 39, 37, 41, 18, 13, 4, 19, 0 | 1 0 0 0 } 1
39 { 38, 40, 36, 20, 12, 18, 5, 1 | -1 0 0 0 } 1
40 { 41, 36, 39, 19, 12, 16, 22, 7 | 0 1 0 0 } 1
41 { 40, 38, 37, 20, 13, 23, 17, 6 | 0 -1 0 0 } 1
42 { 43, 45, 47, 21, 14, 5, 78, 1 | -1 0 0 0 } 1
43 { 42, 46, 44, 23, 15, 79, 4, 0 | 1 0 0 0 } 1
44 { 45, 43, 46, 21, 15, 2, 50, 10 | 0 1 0 0 } 1
45 { 44, 47, 42, 22, 14, 51, 3, 11 | 0 -1 0 0 } 1
46 { 47, 44, 43, 22, 15, 49, 80, 13 | 0 0 1 0 } 0
47 { 46, 42, 45, 23, 14, 81, 48, 12 | 0 0 -1 0 } 0
48 { 49, 51, 53, 24, 16, 47, 54, 12 | 0 0 -1 0 } 0
49 { 48, 52, 50, 25, 17, 55, 46, 13 | 0 0 1 0 } 0
50 { 51, 49, 52, 24, 17, 44, 68, 10 | 0 1 0 0 } 1
51 { 50, 53, 48, 26, 16, 69, 45, 11 | 0 -1 0 0 } 1
52 { 53, 50, 49, 26, 17, 67, 56, 15 | 1 0 0 0 } 0
53 { 52, 48, 51, 25, 16, 57, 66, 14 | -1 0 0 0 } 0
54 { 55, 57, 59, 27, 19, 48, 81, 12 | 0 0 -1 0 } 0
55 { 54, 58, 56, 28, 18, 80, 49, 13 | 0 0 1 0 } 0
56 { 57, 55, 58, 27, 18, 52, 73, 15 | 1 0 0 0 } 0
57 { 56, 59, 54, 29, 19, 72, 53, 14 | -1 0 0 0 } 0
58 { 59, 56, 55, 29, 18, 76, 82, 17 | 0 1 0 0 } 0
59 { 58, 54, 57, 28, 19, 83, 77, 16 | 0 -1 0 0 } 0
60 { 61, 63, 65, 30, 20, 78, 18, 1 | -1 0 0 0 } 1
61 { 60, 64, 62, 32, 21, 19, 79, 0 | 1 0 0 0 } 1
62 { 63, 61, 64, 30, 21, 82, 76, 17 | 0 1 0 0 } 0
63 { 62, 65, 60, 31, 20, 77, 83, 16 | 0 -1 0 0 } 0
64 { 65, 62, 61, 31, 21, 74, 20, 8 | 0 0 1 0 } 1
65 { 64, 60, 63, 32, 20, 21, 75, 9 | 0 0 -1 0 } 1
66 { 67, 69, 71, 33, 22, 53, 72, 14 | -1 0 0 0 } 0
67 { 66, 70, 68, 35, 23, 73, 52, 15 | 1 0 0 0 } 0
68 { 69, 67, 70, 33, 23, 50, 26, 10 | 0 1 0 0 } 1
69 { 68, 71, 66, 34, 22, 27, 51, 11 | 0 -1 0 0 } 1
70 { 71, 68, 67, 34, 23, 25, 74, 8 | 0 0 1 0 } 1
71 { 70, 66, 69, 35, 22, 75, 24, 9 | 0 0 -1 0 } 1
72 { 73, 75, 77, 36, 24, 66, 57, 14 | -1 0 0 0 } 0
73 { 72, 76, 74, 38, 25, 56, 67, 15 | 1 0 0 0 } 0
74 { 75, 73, 76, 36, 25, 70, 64, 8 | 0 0 1 0 } 1
75 { 74, 77, 72, 37, 24, 65, 71, 9 | 0 0 -1 0 } 1
76 { 77, 74, 73, 37, 25, 62, 58, 17 | 0 1 0 0 } 0
77 { 76, 72, 75, 38, 24, 59, 63, 16 | 0 -1 0 0 } 0
78 { 79, 81, 83, 39, 26, 42, 60, 1 | -1 0 0 0 } 1
79 { 78, 82, 80, 41, 27, 61, 43, 0 | 1 0 0 0 } 1
80 { 81, 79, 82, 39, 27, 46, 55, 13 | 0 0 1 0 } 0
81 { 80, 83, 78, 40, 26, 54, 47, 12 | 0 0 -1 0 } 0
82 { 83, 80, 79, 40, 27, 58, 62, 17 | 0 1 0 0 } 0
83 { 82, 78, 81, 41, 26, 63, 59, 16 | 0 -1 0 0 } 0
0 { 1, 28, 13 | 0 0 1 0 } 0
1 { 0, 29, 12 | 0 0 -1 0 } 0
0 { 0, 0 , , , 0 } 0
1 { 0, 1 , , , 1 } 1
2 { 1, 7 , , , 0 } 0
3 { 1, 6 , , , 1 } 1
4 { 2, 13 , , , 0 } 0
5 { 2, 12 , , , 1 } 1
6 { 3, 18 , , , 0 } 0
7 { 3, 19 , , , 1 } 1
8 { 4, 24 , , , 0 } 0
9 { 4, 25 , , , 1 } 1
10 { 5, 31 , , , 1 } 1
11 { 5, 30 , , , 0 } 0
12 { 6, 36 , , , 0 } 0
13 { 6, 37 , , , 1 } 1
14 { 7, 42 , , , 0 } 0
15 { 7, 43 , , , 1 } 1
16 { 8, 48 , , , 0 } 0
17 { 8, 49 , , , 1 } 1
18 { 9, 55 , , , 1 } 1
19 { 9, 54 , , , 0 } 0
20 { 10, 60 , , , 0 } 0
21 { 10, 61 , , , 1 } 1
22 { 11, 66 , , , 0 } 0
23 { 11, 67 , , , 1 } 1
24 { 12, 72 , , , 0 } 0
25 { 12, 73 , , , 1 } 1
26 { 13, 78 , , , 0 } 0
27 { 13, 79 , , , 1 } 1
28 { 14, , , 0, 1 } 1
29 { 14, , , 1, 0 } 0
/* end Selective Nef complex */

View file

@ -1,5 +1,4 @@
#include <boost/foreach.hpp>
#include <boost/filesystem.hpp>
#include <boost/regex.hpp>
#include <sstream>
#include <iostream>
@ -9,17 +8,14 @@
#include "export.h"
#include "polyset.h"
#include "CGAL_Nef_polyhedron.h"
#include <CGAL/IO/Nef_polyhedron_iostream_3.h>
using namespace CGALUtils;
namespace fs = boost::filesystem;
// Nef polyhedron are using CGAL_Kernel3 (Cartesian<Gmpq>)
// Triangulation will use Epick
typedef CGAL::Epick K;
typedef CGAL::Polyhedron_3<K> PolyhedronK;
#include <boost/algorithm/string.hpp>
#include <boost/assign/std/vector.hpp>
#include <boost/assign/list_of.hpp>
using namespace boost::assign; // bring 'operator+=()' into scope
@ -633,30 +629,21 @@ int main(int argc, char *argv[])
OpenSCAD::debug = "decompose";
PolySet *ps = NULL;
CGAL_Nef_polyhedron *N = NULL;
if (argc == 2) {
std::string filename(argv[1]);
std::string suffix = filename.extension().generic_string();
if (suffix == ".stl") {
if (!(ps = import_stl(filename))) {
std::cerr << "Error importing STL " << filename << std::endl;
exit(1);
}
std::cerr << "Imported " << ps->numPolygons() << " polygons" << std::endl;
}
else if (suffix == ".nef3") {
N = new CGAL_Nef_polyhedron(new CGAL_Nef_polyhedron3);
std::ifstream stream(filename.c_str());
stream >> *N->p3;
std::cerr << "Imported Nef polyhedron" << std::endl;
if (!(ps = import_stl(argv[1]))) {
std::cerr << "Error importing STL " << argv[1] << std::endl;
exit(1);
}
std::cerr << "Imported " << ps->numPolygons() << " polygons" << std::endl;
}
else {
std::cerr << "Usage: " << argv[0] << " <file.stl> <file.stl>" << std::endl;
exit(1);
}
if (ps && !N) N = createNefPolyhedronFromGeometry(*ps);
Geometry::ChildList children;
CGAL_Nef_polyhedron *N = createNefPolyhedronFromGeometry(*ps);
std::vector<PolyhedronK> result;
decompose(N->p3.get(), std::back_inserter(result));

View file

@ -4,7 +4,7 @@ debug: DEFINES += DEBUG
TEMPLATE = app
INCLUDEPATH += ../src ../src/libtess2/Include
INCLUDEPATH += ../src
DEPENDPATH += ../src
# Handle custom library location.
@ -54,12 +54,10 @@ macx {
}
}
# See Dec 2011 OpenSCAD mailing list, re: CGAL/GCC bugs.
*g++* {
# See Dec 2011 OpenSCAD mailing list, re: CGAL/GCC bugs.
QMAKE_CXXFLAGS *= -fno-strict-aliasing
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-local-typedefs # ignored before 4.8
# use of 'auto'
QMAKE_CXXFLAGS += -std=c++11
}
*clang* {
@ -82,52 +80,29 @@ CONFIG += gettext
mac: {
LIBS += -framework OpenGL
} else {
LIBS += -lGL
}
include(../common.pri)
HEADERS += ../src/cgal.h \
../src/cgalutils.h \
../src/linalg.h \
../src/grid.h \
../src/polyset.h \
../src/polyset-utils.h \
../src/printutils.h \
../src/GeometryUtils.h \
../src/libtess2/Include/tesselator.h \
../src/libtess2/Source/bucketalloc.h \
../src/libtess2/Source/dict.h \
../src/libtess2/Source/geom.h \
../src/libtess2/Source/mesh.h \
../src/libtess2/Source/priorityq.h \
../src/libtess2/Source/sweep.h \
../src/libtess2/Source/tess.h
../src/printutils.h
SOURCES += decompose.cpp \
../src/polygon2d.cc \
../src/polygon2d-CGAL.cc \
../src/CGAL_Nef_polyhedron.cc \
../src/CGAL_Nef_polyhedron_DxfData.cc \
../src/cgalutils.cc \
../src/cgalutils-applyops.cc \
../src/cgalutils-tess.cc \
../src/cgalutils-polyhedron.cc \
../src/polyset.cc \
../src/polyset-gl.cc \
../src/GeometryUtils.cc \
../src/svg.cc \
../src/grid.cc \
../src/node.cc \
../src/export.cc \
../src/polyset-utils.cc \
../src/progress.cc \
../src/printutils.cc \
../src/libtess2/Source/bucketalloc.c \
../src/libtess2/Source/dict.c \
../src/libtess2/Source/geom.c \
../src/libtess2/Source/mesh.c \
../src/libtess2/Source/priorityq.c \
../src/libtess2/Source/sweep.c \
../src/libtess2/Source/tess.c
../src/printutils.cc

View file

@ -1,6 +1,5 @@
#include <boost/foreach.hpp>
#include <boost/regex.hpp>
#include <boost/filesystem.hpp>
#include <sstream>
#include <iostream>
#include <fstream>
@ -10,11 +9,11 @@
#include "export.h"
#include "polyset.h"
#include "CGAL_Nef_polyhedron.h"
#include "boosty.h"
#include <CGAL/IO/Nef_polyhedron_iostream_3.h>
using namespace CGALUtils;
namespace fs=boost::fileystem;
#define STL_FACET_NUMBYTES 4*3*4+2
// as there is no 'float32_t' standard, we assume the systems 'float'
@ -153,7 +152,7 @@ int main(int argc, char *argv[])
PolySet *ps = NULL;
if (argc == 2) {
std::string filename(argv[1]);
std::string suffix = filename.extension().generic_string();
std::string suffix = boosty::extension_str(filename);
boost::algorithm::to_lower(suffix);
if (suffix == ".stl") {
if (!(ps = import_stl(filename))) {

View file

@ -4,7 +4,7 @@ debug: DEFINES += DEBUG
TEMPLATE = app
INCLUDEPATH += ../src ../src/libtess2/Include
INCLUDEPATH += ../src
DEPENDPATH += ../src
# Handle custom library location.
@ -87,42 +87,23 @@ include(../common.pri)
HEADERS += ../src/cgal.h \
../src/cgalutils.h \
../src/linalg.h \
../src/grid.h \
../src/polyset.h \
../src/polyset-utils.h \
../src/printutils.h \
../src/GeometryUtils.h \
../src/libtess2/Include/tesselator.h \
../src/libtess2/Source/bucketalloc.h \
../src/libtess2/Source/dict.h \
../src/libtess2/Source/geom.h \
../src/libtess2/Source/mesh.h \
../src/libtess2/Source/priorityq.h \
../src/libtess2/Source/sweep.h \
../src/libtess2/Source/tess.h
../src/printutils.h
SOURCES += export_nef.cpp \
../src/polygon2d.cc \
../src/polygon2d-CGAL.cc \
../src/CGAL_Nef_polyhedron.cc \
../src/CGAL_Nef_polyhedron_DxfData.cc \
../src/cgalutils.cc \
../src/cgalutils-applyops.cc \
../src/cgalutils-tess.cc \
../src/cgalutils-polyhedron.cc \
../src/polyset.cc \
../src/polyset-gl.cc \
../src/GeometryUtils.cc \
../src/svg.cc \
../src/grid.cc \
../src/node.cc \
../src/export.cc \
../src/polyset-utils.cc \
../src/progress.cc \
../src/printutils.cc \
../src/libtess2/Source/bucketalloc.c \
../src/libtess2/Source/dict.c \
../src/libtess2/Source/geom.c \
../src/libtess2/Source/mesh.c \
../src/libtess2/Source/priorityq.c \
../src/libtess2/Source/sweep.c \
../src/libtess2/Source/tess.c
../src/grid.cc

View file

@ -5,7 +5,6 @@
"colors" : {
"background" : "#333333",
"axes-color" : "#c1c1c1",
"opencsg-face-front" : "#cccccc",
"opencsg-face-back" : "#5563dd",
"cgal-face-front" : "#cccccc",

View file

@ -5,7 +5,6 @@
"colors" : {
"background" : "#333333",
"axes-color" : "#c1c1c1",
"opencsg-face-front" : "#eeeeee",
"opencsg-face-back" : "#0babc8",
"cgal-face-front" : "#eeeeee",

View file

@ -5,7 +5,6 @@
"colors" : {
"background" : "#aaaaff",
"axes-color" : "#222233",
"opencsg-face-front" : "#ddddff",
"opencsg-face-back" : "#dd22dd",
"cgal-face-front" : "#ddddff",

View file

@ -6,7 +6,6 @@
"colors" : {
"background" : "#ffffe5",
"axes-color" : "#191916",
"opencsg-face-front" : "#f9d72c",
"opencsg-face-back" : "#f9d72c",
"cgal-face-front" : "#f9d72c",

View file

@ -5,7 +5,6 @@
"colors" : {
"background" : "#fafafa",
"axes-color" : "#323232",
"opencsg-face-front" : "#16a085",
"opencsg-face-back" : "#dbf4da",
"cgal-face-front" : "#16a085",

View file

@ -5,7 +5,6 @@
"colors" : {
"background" : "#fdf6e3",
"axes-color" : "#191816",
"opencsg-face-front" : "#b58800",
"opencsg-face-back" : "#882233",
"cgal-face-front" : "#b58800",

View file

@ -5,7 +5,6 @@
"colors" : {
"background" : "#000000",
"axes-color" : "#e5e5e5",
"opencsg-face-front" : "#ffffe0",
"opencsg-face-back" : "#00ffff",
"cgal-face-front" : "#ffffe0",

View file

@ -5,7 +5,6 @@
"colors" : {
"background" : "#aa4444",
"axes-color" : "#220d0d",
"opencsg-face-front" : "#ffaaaa",
"opencsg-face-back" : "#882233",
"cgal-face-front" : "#ffaaaa",

View file

@ -5,7 +5,6 @@
"colors" : {
"background" : "#1d1f21",
"axes-color" : "#e8e8e8",
"opencsg-face-front" : "#81a2be",
"opencsg-face-back" : "#de935f",
"cgal-face-front" : "#8abeb7",

View file

@ -5,7 +5,6 @@
"colors" : {
"background" : "#f8f8f8",
"axes-color" : "#181818",
"opencsg-face-front" : "#4271ae",
"opencsg-face-back" : "#f5871f",
"cgal-face-front" : "#3e999f",

View file

@ -8,17 +8,13 @@ include(flex.pri)
include(bison.pri)
include(cgal.pri)
include(opencsg.pri)
include(opengl.pri)
include(glew.pri)
include(eigen.pri)
include(boost.pri)
include(glib-2.0.pri)
include(gettext.pri)
include(libxml2.pri)
include(sparkle.pri)
include(harfbuzz.pri)
include(freetype.pri)
include(fontconfig.pri)
include(scintilla.pri)
include(c++11.pri)
include(libzip.pri)

View file

@ -1,9 +0,0 @@
<!-- Copyright 2013 Richard Hughes <richard@hughsie.com> -->
<its:rules
xmlns:its="http://www.w3.org/2005/11/its"
version="1.0">
<its:translateRule translate="no" selector="/component"/>
<its:translateRule translate="yes"
selector="/component/summary |
/component/description"/>
</its:rules>

View file

@ -1,9 +1,9 @@
;;; scad-mode.el --- A major mode for editing OpenSCAD code
;;; scad-mode.el --- Major mode for editing SCAD files
;; Author: Len Trigg, Łukasz Stelmach
;; Author: Len Trigg
;; Maintainer: Len Trigg <lenbok@gmail.com>
;; Created: March 2010
;; Modified: 28 Mar 2015
;; Modified: 24 May 2014
;; Keywords: languages
;; URL: https://raw.github.com/openscad/openscad/master/contrib/scad-mode.el
;; Version: 91.0
@ -26,11 +26,11 @@
;;; Commentary:
;;
;; This is a major-mode to implement the SCAD constructs and
;; font-locking for OpenSCAD
;; font-locking for openscad
;;
;; If installing manually, insert the following into your emacs startup:
;;
;; (autoload 'scad-mode "scad-mode" "A major mode for editing OpenSCAD code." t)
;; (autoload 'scad-mode "scad-mode" "Major mode for editing SCAD code." t)
;; (add-to-list 'auto-mode-alist '("\\.scad$" . scad-mode))
;;
;; or
@ -48,8 +48,6 @@
;;;###autoload
(add-to-list 'auto-mode-alist '("\\.scad$" . scad-mode))
(require 'cc-mode)
(defcustom scad-command
'"openscad"
"Path to openscad executable"
@ -70,41 +68,30 @@
"str"
"lookup" "version" "version_num" "len" "search"
"dxf_dim" "dxf_cross" ;;dxfdim.cc
"norm" "cross" ;;2014.03
"concat" "chr" ;;2015.03
)
"SCAD functions."
:type 'list
:group 'scad-font-lock)
(defcustom scad-modules
'("children" "echo" "for" "intersection_for" "if" "else" ;;control.cc
'("child" "children" "echo" "assign" "for" "intersection_for" "if" "else" ;;control.cc
"cube" "sphere" "cylinder" "polyhedron" "square" "circle" "polygon" ;;primitives.cc
"scale" "rotate" "translate" "mirror" "multmatrix" ;;transform.cc
"union" "difference" "intersection" ;;csgops.cc
"render" ;;render.cc
"color" ;;color.cc
"surface" ;;surface.cc
"linear_extrude" ;;linearextrude.cc
"rotate_extrude" ;;rotateextrude.cc
"import" ;;import.cc
"dxf_linear_extrude" "linear_extrude" ;;linearextrude.cc
"dxf_rotate_extrude" "rotate_extrude" ;;rotateextrude.cc
"import_stl" "import_off" "import_dxf" "import" ;;import.cc
"group" ;;builtin.cc
"projection" ;;projection.cc
"minkowski" "glide" "subdiv" "hull" "resize" ;;cgaladv.cc
"parent_module" ;;2014.03
"let" "offset" "text" ;;2015.03
)
"SCAD modules."
:type 'list
:group 'scad-font-lock)
(defcustom scad-deprecated
'("child" "assign" "dxf_linear_extrude" "dxf_rotate_extrude"
"import_stl" "import_off" "import_dxf")
"SCAD deprecated modules and functions."
:type 'list
:group 'scad-font-lock)
(defcustom scad-operators
'("+" "-" "*" "/" "%"
"&&" "||" "!"
@ -116,9 +103,9 @@
(defvar scad-mode-map
(let ((map (make-sparse-keymap)))
(define-key map "\t" 'scad-indent-line)
(define-key map [(control c) (control o)] 'scad-open-current-buffer)
(define-key map [return] 'newline-and-indent)
;;(define-key map [(control c) (control s)] 'c-show-syntactic-information) ;; Debugging info
(define-key map [return] 'newline-and-indent)
map)
"Keymap for `scad-mode'.")
@ -151,7 +138,6 @@
(defvar scad-keywords-regexp (regexp-opt scad-keywords 'words))
(defvar scad-modules-regexp (regexp-opt scad-modules 'words))
(defvar scad-functions-regexp (regexp-opt scad-functions 'words))
(defvar scad-deprecated-regexp (regexp-opt scad-deprecated 'words))
(defvar scad-operators-regexp (regexp-opt scad-operators))
(defvar scad-font-lock-keywords
@ -163,41 +149,30 @@
(,scad-keywords-regexp . font-lock-keyword-face)
(,scad-modules-regexp . font-lock-builtin-face)
(,scad-functions-regexp . font-lock-function-name-face)
(,scad-deprecated-regexp . font-lock-warning-face)
;(,scad-operators-regexp . font-lock-operator-face) ;; This actually looks pretty ugly
;("\\(\\<\\S +\\>\\)\\s *(" 1 font-lock-function-name-face t) ;; Seems to override other stuff (e.g. in comments and builtins)
)
"Keyword highlighting specification for `scad-mode'.")
(defconst scad-font-lock-keywords-1 scad-font-lock-keywords)
(defconst scad-font-lock-keywords-2 scad-font-lock-keywords)
(defconst scad-font-lock-keywords-3 scad-font-lock-keywords)
(defvar scad-indent-style nil
"The style of indentation for scad-mode. Defaults to \"k&r\" if
nil. If you want to set the style with file local variables use
the `c-file-style' variable")
;(defvar scad-imenu-generic-expression ...)
;(defvar scad-outline-regexp ...)
(put 'scad-mode 'c-mode-prefix "scad-")
;;;###autoload
(define-derived-mode scad-mode prog-mode "SCAD"
"Major mode for editing OpenSCAD code.
(define-derived-mode scad-mode fundamental-mode "SCAD"
"A major mode for editing SCAD files."
:syntax-table scad-mode-syntax-table
(set (make-local-variable 'font-lock-defaults) '(scad-font-lock-keywords))
(set (make-local-variable 'indent-line-function) 'scad-indent-line)
;(set (make-local-variable 'imenu-generic-expression) scad-imenu-generic-expression)
;(set (make-local-variable 'outline-regexp) scad-outline-regexp)
;; set comment styles for scad mode
(set (make-local-variable 'comment-start) "//")
(set (make-local-variable 'comment-end) "")
(set (make-local-variable 'block-comment-start) "/*")
(set (make-local-variable 'block-comment-end) "*/")
)
To see what version of CC Mode you are running, enter `\\[c-version]'.
The hook `c-mode-common-hook' is run with no args at mode
initialization, then `scad-mode-hook'.
Key bindings:
\\{scad-mode-map}"
(c-initialize-cc-mode)
;; (setq local-abbrev-table scad-mode-abbrev-table
;; abbrev-mode t)
(use-local-map scad-mode-map)
(c-set-offset (quote cpp-macro) 0 nil)
(c-basic-common-init 'scad-mode (or scad-indent-style "k&r"))
(c-font-lock-init)
(c-run-mode-hooks 'c-mode-common-hook 'scad-mode-hook)
(c-update-modeline))
;; From: http://stackoverflow.com/questions/14520073/add-words-for-dynamic-expansion-to-emacs-mode
(defun scad-prime-dabbrev ()
@ -206,12 +181,69 @@ Key bindings:
(with-current-buffer (get-buffer-create " *scad words*")
(scad-mode)
(insert "module function use include") ; Explicitly add these -- they're not in the below vars
(insert (mapconcat 'identity (append scad-keywords scad-functions scad-modules scad-deprecated) " ")))))
(insert (mapconcat 'identity (append scad-keywords scad-functions scad-modules) " ")))))
(add-hook 'scad-mode-hook 'scad-prime-dabbrev)
;;; Indentation, based on http://www.emacswiki.org/emacs/download/actionscript-mode-haas-7.0.el
(defun scad-indent-line ()
"Indent current line of SCAD code."
(interactive)
(let ((savep (> (current-column) (current-indentation)))
(indent (max (scad-calculate-indentation) 0)))
(if savep
(save-excursion (indent-line-to indent))
(indent-line-to indent))))
(defun scad-calculate-indentation ()
"Return the column to which the current line should be indented."
(save-excursion
(scad-maybe-skip-leading-close-delim)
(let ((pos (point)))
(beginning-of-line)
(if (not (search-backward-regexp "[^\n\t\r ]" 1 0))
0
(progn
(scad-maybe-skip-leading-close-delim)
(+ (current-indentation) (* standard-indent (scad-count-scope-depth (point) pos))))))))
(defun scad-maybe-skip-leading-close-delim ()
(beginning-of-line)
(forward-to-indentation 0)
(if (looking-at "\\s)")
(forward-char)
(beginning-of-line)))
(defun scad-face-at-point (pos)
"Return face descriptor for char at point."
(plist-get (text-properties-at pos) 'face))
(defun scad-count-scope-depth (rstart rend)
"Return difference between open and close scope delimeters."
(save-excursion
(goto-char rstart)
(let ((open-count 0)
(close-count 0)
opoint)
(while (and (< (point) rend)
(progn (setq opoint (point))
(re-search-forward "\\s)\\|\\s(" rend t)))
(if (= opoint (point))
(forward-char 1)
(cond
;; Don't count if in string or comment.
((scad-face-at-point (- (point) 1)))
((looking-back "\\s)")
(setq close-count (+ close-count 1)))
((looking-back "\\s(")
(setq open-count (+ open-count 1)))
)))
(- open-count close-count))))
(defun scad-open-current-buffer ()
(interactive)
(call-process scad-command nil 0 nil (buffer-file-name)))
(provide 'scad-mode)
(provide 'scad)
;;; scad-mode.el ends here

View file

@ -1,17 +0,0 @@
#pragma once
#include "node.h"
#include "visitor.h"
#include "enums.h"
class CsgNode : public AbstractNode
{
public:
OpenSCADOperator type;
CsgNode(const ModuleInstantiation *mi, OpenSCADOperator type) : AbstractNode(mi), type(type) { }
virtual Response accept(class State &state, Visitor &visitor) const {
return visitor.visit(state, *this);
}
virtual std::string toString() const;
virtual std::string name() const;
};

Binary file not shown.

Binary file not shown.

View file

@ -108,7 +108,7 @@ distance 500, with orthographic projection:
Set the 'mode' variable in example017 so that it will render only the
parts of the shape. Export to a .dxf file.
.PP
.B openscad -o example017.dxf -D'mode="parts"' examples/example017.scad
.B openscad -x example017.dxf -D'mode="parts"' examples/example017.scad
.SH AUTHOR
OpenSCAD was written by Clifford Wolf, Marius Kintel, and others.

View file

@ -26,13 +26,14 @@ o scripts/makereleasenotes.sh
o Update version number in doc/openscad.1
o Update copyright year in AboutDialog.html and mainwin.cc
o Add VERSION and VERSIONDATE in openscad.pro, scripts/publish-macosx.sh, scripts/release-common.sh tests/CMakeLists.txt
o Add VERSION and VERSIONDATE in openscad.pro, scripts/publish-macosx.sh, scripts/release-common.sh
o Add VERSION in tests/CMakeLists.txt, scripts/publish-mingw-x.sh
o Tag release
git tag "openscad-$VERSION"
o Revert VERSION and VERSIONDATE in openscad.pro scripts/publish-macosx.sh scripts/release-common.sh scripts/publish-mingw-x.sh tests/CMakeLists.txt
o Revert VERSION and VERSIONDATE in
openscad.pro, scripts/publish-macosx.sh, scripts/release-common.sh, scripts/publish-mingw-x.sh
o build source package
scripts/git-archive-all.py --prefix=openscad-$VERSION/ openscad-$VERSION.src.tar.gz

View file

@ -50,7 +50,6 @@ files.
$ make clean && qmake && make
Then run the script to scan the source files, and regenerate .pot & .po files.
You'll need itstool (http://itstool.org/) installed.
$ ./scripts/translation-update.sh

View file

@ -1,8 +1,8 @@
echo(version=version());
// rotate_extrude() rotates a 2D shape around the Z axis.
// Note that the 2D shape must be either completely on the
// positive or negative side of the X axis.
// rotate_extrude() always rotates the 2D shape 360 degrees
// around the Z axis. Note that the 2D shape must be either
// completely on the positive or negative side of the X axis.
color("red")
rotate_extrude()
translate([10, 0])
@ -23,26 +23,6 @@ color("green")
polygon( points=[[0,0],[8,4],[4,8],[4,12],[12,16],[0,20]] );
// By default rotate_extrude forms a full 360 degree circle,
// but a partial rotation can be performed by using the angle parameter.
// Positive angles create an arc starting from the X axis, going counter-clockwise.
// Negative angles generate an arc in the clockwise direction.
color("magenta")
translate([40,40]){
rotate_extrude(angle=180)
translate([12.5,0])
square(5);
translate([7.5,0])
rotate_extrude(angle=180)
translate([5,0])
square(5);
translate([-7.5,0])
rotate_extrude(angle=-180)
translate([5,0])
square(5);
}
// Written in 2015 by Torsten Paul <Torsten.Paul@gmx.de>
//
// To the extent possible under law, the author(s) have dedicated all

View file

@ -11,13 +11,11 @@ y_shift=thisFont[0][1];
hours=["one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve"];
module clock_hour_words(word_offset=20.0,word_height=2.0) {
for(i=[0:(len(hours)-1)]) {
hourHandAngle=(i+1)*360/len(hours);
theseIndicies=search(hours[i],thisFont[2],1,1);
for(i=[0:(len(hours)-1)]) assign( hourHandAngle=(i+1)*360/len(hours), theseIndicies=search(hours[i],thisFont[2],1,1) ) {
rotate(90-hourHandAngle) translate([word_offset,0])
for( j=[0:(len(theseIndicies)-1)] ) translate([j*x_shift,-y_shift/2]) {
linear_extrude(height=word_height) polygon(points=thisFont[2][theseIndicies[j]][6][0],paths=thisFont[2][theseIndicies[j]][6][1]);
}
for( j=[0:(len(theseIndicies)-1)] ) translate([j*x_shift,-y_shift/2]) {
linear_extrude(height=word_height) polygon(points=thisFont[2][theseIndicies[j]][6][0],paths=thisFont[2][theseIndicies[j]][6][1]);
}
}
}

View file

@ -1,61 +0,0 @@
{
"parameterSets": {
"Medium Size": {
"CenterCandleWidth": "6",
"candleSize": "9",
"centerCandle": "true",
"count": "7",
"heightOfRing": "4",
"heightOfSupport": "3",
"holeSize": "3",
"length": "50",
"radius": "25",
"width": "5",
"widthOfRing": "23",
"widthOfSupport": "3"
},
"small": {
"CenterCandleWidth": "4",
"candleSize": "6",
"centerCandle": "true",
"count": "7",
"heightOfRing": "2",
"heightOfSupport": "2",
"holeSize": "2",
"length": "30",
"radius": "16",
"width": "4",
"widthOfRing": "13",
"widthOfSupport": "2"
},
"With Ball": {
"CenterCandleWidth": "7",
"candleSize": "6",
"centerCandle": "false",
"count": "5",
"heightOfRing": "2",
"heightOfSupport": "2",
"holeSize": "2",
"length": "30",
"radius": "16",
"width": "4",
"widthOfRing": "13",
"widthOfSupport": "2"
},
"Large": {
"CenterCandleWidth": "10",
"candleSize": "9",
"centerCandle": "false",
"count": "7",
"heightOfRing": "4",
"heightOfSupport": "3",
"holeSize": "3",
"length": "70",
"radius": "25",
"width": "5",
"widthOfRing": "23",
"widthOfSupport": "3"
}
},
"fileFormatVersion": "1"
}

View file

@ -1,125 +0,0 @@
/*[ Candle Stand ]*/
//Lenght of candle stand
length=50; // [70:large,50:medium,30:small]
// Center stand
cylinder(length,width-2);
//Radius of ring of stand
radius=25;
/* [ Number of candle holders ]*/
// Number of candle holders
count=7; //[3:14]
//Do you want center Candle
centerCandle=true;
/* [ Candle Holder ]*/
//Lenght of candle holder
candleSize=7;
//Width of candle holder
width=4;
//Size of hole for candle holder
holeSize=3;
CenterCandleWidth=4;
/*[Properties of support]*/
heightOfSupport=3;
widthOfSupport=3;
/*[Properties of Ring]*/
heightOfRing=4;
widthOfRing=23;
//Create center candle
translate([0,0,length-candleSize/2])
if(centerCandle){
difference(){
$fn=360;
cylinder(candleSize,r=CenterCandleWidth);
cylinder(candleSize+1,r=CenterCandleWidth-2);
}
}else{
sphere(CenterCandleWidth);
}
//make ring
translate([0,0,length-candleSize/2]){
make(radius, count,candleSize,length);
//make bottom cover for candle holders
make_ring_of(radius, count){
cylinder(1,r=width);
}
}
//Base of candle stand
for (a = [0 : count - 1]) {
rotate(a*360/count) {
translate([0, -width/2, 0])
cube([radius, widthOfSupport, heightOfSupport]);
}
}
//make ring with candle holders
module make(radius, count,candleSize,length){
$fa = 0.5;
$fs = 0.5;
difference(){
union(){
//making holders
make_ring_of(radius, count){
cylinder(candleSize,r=width);
}
//Attaching holders to stand
for (a = [0 : count - 1]) {
rotate(a*360/count) {
translate([0, -width/2, 0])
cube([radius, widthOfSupport, heightOfSupport]);
}
}
//make ring
linear_extrude(heightOfRing)
difference(){
circle(radius);
circle(widthOfRing);
}
}
//Making holes in candle holder
make_ring_of(radius, count){
cylinder(candleSize+1,r=holeSize);
}
}
}
module make_ring_of(radius, count){
for (a = [0 : count - 1]) {
angle = a * 360 / count;
translate(radius * [cos(angle), -sin(angle), 0])
children();
}
}
// Written by Amarjeet Singh Kapoor <amarjeet.kapoor1@gmail.com>
//
// To the extent possible under law, the author(s) have dedicated all
// copyright and related and neighboring rights to this software to the
// public domain worldwide. This software is distributed without any
// warranty.
//
// You should have received a copy of the CC0 Public Domain
// Dedication along with this software.
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

View file

@ -1,26 +0,0 @@
{
"parameterSets": {
"Welcome sign": {
"Message": "Welcome to...",
"To": "Parametric Designs",
"height": "2",
"radius": "80",
"resolution": "30"
},
"Congo Sign": {
"Message": "Congratulations",
"To": "openSCAD",
"height": "2",
"radius": "67",
"resolution": "20"
},
"Happy birthday sign": {
"Message": "Happy Birthday!",
"To": "To Me",
"height": "2",
"radius": "67",
"resolution": "10"
}
},
"fileFormatVersion": "1"
}

View file

@ -1,55 +0,0 @@
// First example of parameteric model
//
// syntax:
// //Description
// variable=value; //Parameter
//
// This type of comment tells the name of group to which parameters below
// this comment will belong
//
// /*[ group name ]*/
//
//Below comment tells the group to which a varaible will belong
/*[ properties of Sign]*/
//The resolution of the curves. Higher values give smoother curves but may increase the model render time.
resolution = 10; //[10, 20, 30, 50, 100]
//The horizontal radius of the outer ellipse of the sign.
radius = 80;//[60 : 200]
//Total height of the sign
height = 2;//[1 : 10]
/*[ Content To be written ] */
//Message to be write
Message = "Welcome to..."; //["Welcome to...", "Happy Birthday!", "Happy Anniversary", "Congratulations", "Thank You"]
//Name of Person, company etc.
To = "Parametric Designs";
$fn = resolution;
scale([1, 0.5]) difference() {
cylinder(r = radius, h = 2 * height, center = true);
translate([0, 0, height])
cylinder(r = radius - 10, h = height + 1, center = true);
}
linear_extrude(height = height) {
translate([0, --4]) text(Message, halign = "center");
translate([0, -16]) text(To, halign = "center");
}
// Written by Amarjeet Singh Kapoor <amarjeet.kapoor1@gmail.com>
//
// To the extent possible under law, the author(s) have dedicated all
// copyright and related and neighboring rights to this software to the
// public domain worldwide. This software is distributed without any
// warranty.
//
// You should have received a copy of the CC0 Public Domain
// Dedication along with this software.
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

View file

@ -25,10 +25,6 @@
"animation.scad",
"module_recursion.scad"
],
"Parametric": [
"sign.scad",
"candleStand.scad"
],
"Old": [
"example001.scad",
"example002.scad",

View file

@ -14,10 +14,8 @@ FONTCONFIG_DIR = $$(FONTCONFIGDIR)
!isEmpty(OPENSCAD_LIBRARIES_DIR) {
isEmpty(FONTCONFIG_INCLUDEPATH) {
exists($$OPENSCAD_LIBRARIES_DIR/include/fontconfig) {
FONTCONFIG_INCLUDEPATH = $$OPENSCAD_LIBRARIES_DIR/include/fontconfig
FONTCONFIG_LIBPATH = $$OPENSCAD_LIBRARIES_DIR/lib
}
FONTCONFIG_INCLUDEPATH = $$OPENSCAD_LIBRARIES_DIR/include/fontconfig
FONTCONFIG_LIBPATH = $$OPENSCAD_LIBRARIES_DIR/lib
}
}

View file

@ -10,9 +10,7 @@ glew {
unix:LIBS += -lGLEW
CONFIG(mingw-cross-env): {
!CONFIG(mingw-cross-env-shared) {
DEFINES += GLEW_STATIC
}
DEFINES += GLEW_STATIC
} else {
win32:LIBS += -lglew32
}

View file

@ -40,7 +40,7 @@ isEmpty(GLIB2_LIBPATH) {
GLIB2_LIBS = -L$$GLIB2_LIBPATH -lglib-2.0
}
CONFIG(mingw-cross-env)|CONFIG(mingw-cross-env-shared) {
CONFIG(mingw-cross-env) {
#message("mingw")
isEmpty(GLIB2_INCLUDEPATH) {
MXE_TARGET_DIR=$$(MXETARGETDIR)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 979 B

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 991 B

After

Width:  |  Height:  |  Size: 518 B

View file

@ -1,44 +0,0 @@
# Detect libxml2, then use this priority list to determine
# which library to use:
#
# Priority
# 1. LIBXML2_INCLUDEPATH / LIBXML2_LIBPATH (qmake parameter, not checked it given on commandline)
# 2. OPENSCAD_LIBRARIES (environment variable)
# 3. system's standard include paths from pkg-config
libxml2 {
# read environment variables
OPENSCAD_LIBRARIES_DIR = $$(OPENSCAD_LIBRARIES)
LIBXML2_DIR = $$(LIBXML2DIR)
!isEmpty(OPENSCAD_LIBRARIES_DIR) {
isEmpty(LIBXML2_INCLUDEPATH) {
exists($$OPENSCAD_LIBRARIES_DIR/include/libxml2) {
LIBXML2_INCLUDEPATH = $$OPENSCAD_LIBRARIES_DIR/include/libxml2
LIBXML2_LIBPATH = $$OPENSCAD_LIBRARIES_DIR/lib
}
}
}
isEmpty(LIBXML2_INCLUDEPATH) {
LIBXML2_CFLAGS = $$system("pkg-config --cflags libxml-2.0")
} else {
LIBXML2_CFLAGS = -I$$LIBXML2_INCLUDEPATH
}
isEmpty(LIBXML2_LIBPATH) {
LIBXML2_LIBS = $$system("pkg-config --libs libxml-2.0")
} else {
LIBXML2_LIBS = -L$$LIBXML2_LIBPATH -lxml2
}
CONFIG(mingw-cross-env): {
LIBXML2_LIBS += -llzma
!CONFIG(mingw-cross-env-shared) {
DEFINES += LIBXML_STATIC
}
}
QMAKE_CXXFLAGS += $$LIBXML2_CFLAGS
LIBS += $$LIBXML2_LIBS
}

View file

@ -1,38 +0,0 @@
# Detect libzip, then use this priority list to determine
# which library to use:
#
# Priority
# 1. LIBZIP_INCLUDEPATH / LIBZIP_LIBPATH (qmake parameter, not checked it given on commandline)
# 3. system's standard include paths from pkg-config
libzip {
exists($$LIBZIP_INCLUDEPATH/zip.h) {
ENABLE_LIBZIP=yes
} else {
LIBZIP_INCLUDEPATH =
LIBZIP_LIBPATH =
}
isEmpty(LIBZIP_INCLUDEPATH) {
LIBZIP_CFLAGS = $$system("pkg-config --cflags libzip")
!isEmpty(LIBZIP_CFLAGS) {
ENABLE_LIBZIP=yes
}
} else {
LIBZIP_CFLAGS = -I$$LIBZIP_INCLUDEPATH
}
isEmpty(LIBZIP_LIBPATH) {
LIBZIP_LIBS = $$system("pkg-config --libs libzip")
} else {
LIBZIP_LIBS = -L$$LIBZIP_LIBPATH -lzip
}
!isEmpty(ENABLE_LIBZIP) {
DEFINES += ENABLE_LIBZIP
QMAKE_CXXFLAGS += $$LIBZIP_CFLAGS
LIBS += $$LIBZIP_LIBS
}
}

View file

@ -1,2 +1,2 @@
# available languages
fr ru de cs es pl
fr ru de cs es

View file

@ -21,7 +21,7 @@ msgstr ""
#: objects/ui_AboutDialog.h:103 src/AboutDialog.h:13
msgid "About OpenSCAD"
msgstr "O aplikaci OpenSCAD"
msgstr "O OpenSCADu"
#: objects/ui_AboutDialog.h:105 objects/ui_launchingscreen.h:305
msgid ""

View file

@ -1,20 +1,20 @@
# Spanish translations for OpenSCAD package.
# This file is distributed under the same license as the OpenSCAD package.
# <javialamo+github@gmail.com>, 2016.
# bazza <bazza@riseup.net>, 2015.
#
msgid ""
msgstr ""
"Project-Id-Version: OpenSCAD 2015.03\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-03-10 10:38-0400\n"
"PO-Revision-Date: 2016-04-13 01:56-0300\n"
"Last-Translator: Javier del Álamo <javialamo+github@gmail.com>\n"
"PO-Revision-Date: 2015-03-10 05:21-0300\n"
"Last-Translator: Ernesto Bazzano <bazza@riseup.net>\n"
"Language-Team: Español\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.5.4\n"
#: objects/ui_AboutDialog.h:103 src/AboutDialog.h:13
msgid "About OpenSCAD"
@ -39,7 +39,7 @@ msgstr ""
"style=\"color: green;\">Open</span>SCAD</p>\n"
"<p style=\"font-family: 'Open Sans', 'Droid Sans', 'sans-serif'; font-"
"weight: normal; font-size: 14pt; padding-top: 0; margin-top: 0; margin-left: "
"2em;\">El programa de modelado 3D CAD de los programadores</p>\n"
"2em;\">Los programadores de modelado 3D CAD</p>\n"
"</body></html>\n"
"\n"
"\n"
@ -88,11 +88,11 @@ msgstr ""
#: objects/ui_LibraryInfoDialog.h:75
msgid "Lib & Build Info"
msgstr "Información de las librerias y compilación"
msgstr "Informacion de las librerias y compilación"
#: objects/ui_LibraryInfoDialog.h:76
msgid "OpenSCAD Detailed Library and Build Information"
msgstr "Información detallada de las librerias y compilación"
msgstr "Informations detalles de las librerias y compilación"
#: objects/ui_MainWindow.h:837
msgid "&New"
@ -112,7 +112,7 @@ msgstr "Ctrl+O"
#: objects/ui_MainWindow.h:841
msgid "&Save"
msgstr "&Guardar"
msgstr "&Salvar"
#: objects/ui_MainWindow.h:842
msgid "Ctrl+S"
@ -120,7 +120,7 @@ msgstr "Ctrl+S"
#: objects/ui_MainWindow.h:843
msgid "Save &As..."
msgstr "Guardar &como..."
msgstr "S&alvar como..."
#: objects/ui_MainWindow.h:844
msgid "Ctrl+Shift+S"
@ -136,7 +136,7 @@ msgstr "Ctrl+R"
#: objects/ui_MainWindow.h:847
msgid "&Quit"
msgstr "&Salir"
msgstr "Salir"
#: objects/ui_MainWindow.h:848
msgid "Ctrl+Q"
@ -144,7 +144,7 @@ msgstr "Ctrl+Q"
#: objects/ui_MainWindow.h:849
msgid "&Undo"
msgstr "&Deshacer"
msgstr "An&ular"
#: objects/ui_MainWindow.h:850
msgid "Ctrl+Z"
@ -184,7 +184,7 @@ msgstr "Ctrl+V"
#: objects/ui_MainWindow.h:859
msgid "&Indent"
msgstr "&Indentar"
msgstr "&Indenter"
#: objects/ui_MainWindow.h:860
msgid "Ctrl+I"
@ -209,7 +209,7 @@ msgstr "Ctrl+Shift+D"
#: objects/ui_MainWindow.h:865
#, fuzzy
msgid "P&aste viewport translation"
msgstr "Pegar traslación de la ventana"
msgstr "Pegar posición de la marco"
#: objects/ui_MainWindow.h:866
msgid "Ctrl+T"
@ -222,7 +222,7 @@ msgstr "Pegar rotación de la ventana"
#: objects/ui_MainWindow.h:868
msgid "Increase Font &Size"
msgstr "Aumentar el tamaño de la &fuente"
msgstr ""
#: objects/ui_MainWindow.h:869
msgid "Ctrl++"
@ -230,7 +230,7 @@ msgstr "Ctrl++"
#: objects/ui_MainWindow.h:870
msgid "Decrease Font Si&ze"
msgstr "Disminuir el tamaño de la &fuente"
msgstr ""
#: objects/ui_MainWindow.h:871
msgid "Ctrl+-"
@ -269,7 +269,7 @@ msgstr "F6"
#: objects/ui_MainWindow.h:879
#, fuzzy
msgid "&Check Validity"
msgstr "&Comprobar validez"
msgstr "Chequear validez"
#: objects/ui_MainWindow.h:880
#, fuzzy
@ -278,12 +278,12 @@ msgstr "Mostrar &AST..."
#: objects/ui_MainWindow.h:881
msgid "Display CSG &Tree..."
msgstr "Mostrar &Arbol CSG"
msgstr "Mostrar CSG &Arbre"
#: objects/ui_MainWindow.h:882
#, fuzzy
msgid "Display CSG Pr&oducts..."
msgstr "Mostar Pr&oductos CSG"
msgstr "Mostar CSG &Produits"
#: objects/ui_MainWindow.h:883
msgid "Export as &STL..."
@ -303,7 +303,7 @@ msgstr "F9"
#: objects/ui_MainWindow.h:887
msgid "Surfaces"
msgstr "Superficies"
msgstr "Superficie"
#: objects/ui_MainWindow.h:888
msgid "F10"
@ -327,7 +327,7 @@ msgstr "F12"
#: objects/ui_MainWindow.h:893
msgid "Show Edges"
msgstr "Mostrar bordes"
msgstr "Mostrar puntos"
#: objects/ui_MainWindow.h:894
msgid "Ctrl+1"
@ -351,7 +351,7 @@ msgstr "Ctrl+3"
#: objects/ui_MainWindow.h:899
msgid "Show Scale Markers"
msgstr "Mostar indicadores de escala"
msgstr "Mostar escala"
#: objects/ui_MainWindow.h:900
msgid "Animate"
@ -359,7 +359,7 @@ msgstr "Animar"
#: objects/ui_MainWindow.h:901
msgid "&Top"
msgstr "&Arriba"
msgstr ""
#: objects/ui_MainWindow.h:902
msgid "Ctrl+4"
@ -368,7 +368,7 @@ msgstr "Ctrl+4"
#: objects/ui_MainWindow.h:903
#, fuzzy
msgid "&Bottom"
msgstr "&Abajo"
msgstr "Abajo"
#: objects/ui_MainWindow.h:904
msgid "Ctrl+5"
@ -377,7 +377,7 @@ msgstr "Ctrl+5"
#: objects/ui_MainWindow.h:905
#, fuzzy
msgid "&Left"
msgstr "&Izquierda"
msgstr "Izquierda"
#: objects/ui_MainWindow.h:906
msgid "Ctrl+6"
@ -386,7 +386,7 @@ msgstr "Ctrl+6"
#: objects/ui_MainWindow.h:907
#, fuzzy
msgid "&Right"
msgstr "&Derecha"
msgstr "Derecha"
#: objects/ui_MainWindow.h:908
msgid "Ctrl+7"
@ -395,7 +395,7 @@ msgstr "Ctrl+7"
#: objects/ui_MainWindow.h:909
#, fuzzy
msgid "&Front"
msgstr "&Delante"
msgstr "Frente"
#: objects/ui_MainWindow.h:910
msgid "Ctrl+8"
@ -403,7 +403,7 @@ msgstr "Ctrl+8"
#: objects/ui_MainWindow.h:911
msgid "Bac&k"
msgstr "&Detrás"
msgstr ""
#: objects/ui_MainWindow.h:912
msgid "Ctrl+9"
@ -412,7 +412,7 @@ msgstr "Ctrl+9"
#: objects/ui_MainWindow.h:913
#, fuzzy
msgid "&Diagonal"
msgstr "&Diagonal"
msgstr "Diagonal"
#: objects/ui_MainWindow.h:914
msgid "Ctrl+0"
@ -426,12 +426,12 @@ msgstr "Centro"
#: objects/ui_MainWindow.h:916
#, fuzzy
msgid "&Perspective"
msgstr "&Perspectiva"
msgstr "Perspectiva"
#: objects/ui_MainWindow.h:917
#, fuzzy
msgid "&Orthogonal"
msgstr "Ortogonal"
msgstr "Orthogonal"
#: objects/ui_MainWindow.h:918
#, fuzzy
@ -492,7 +492,7 @@ msgstr "Ctrl+Alt+F"
#: objects/ui_MainWindow.h:930
#, fuzzy
msgid "Find Ne&xt"
msgstr "Buscar siguiente"
msgstr "Buscar próximo"
#: objects/ui_MainWindow.h:931
msgid "Ctrl+G"
@ -501,7 +501,7 @@ msgstr "Ctrl+G"
#: objects/ui_MainWindow.h:932
#, fuzzy
msgid "Find Pre&vious"
msgstr "Buscar anterior"
msgstr "Buscar previo"
#: objects/ui_MainWindow.h:933
msgid "Ctrl+Shift+G"
@ -534,7 +534,7 @@ msgstr "Recargar y previsualizar automáticamente"
#: objects/ui_MainWindow.h:939
#, fuzzy
msgid "Export as &Image..."
msgstr "Exportar como imagen..."
msgstr "Exportar imagen..."
#: objects/ui_MainWindow.h:940
#, fuzzy
@ -601,7 +601,7 @@ msgstr "Ocultar barra de herramientas"
#: objects/ui_MainWindow.h:954
msgid "U&nindent"
msgstr "Desindentar"
msgstr "Dési&ndenter"
#: objects/ui_MainWindow.h:955
msgid "Ctrl+Shift+I"
@ -609,7 +609,7 @@ msgstr "Ctrl+Shift+I"
#: objects/ui_MainWindow.h:956
msgid "&Cheat Sheet"
msgstr "Hoja de referencia"
msgstr ""
#: objects/ui_MainWindow.h:957
msgid "Message"
@ -748,7 +748,7 @@ msgstr "Vista 3D"
#: objects/ui_Preferences.h:1064 examples/examples.json:19
msgid "Advanced"
msgstr "Avanzado"
msgstr "Advertencia"
#: objects/ui_Preferences.h:1065 src/mainwin.cc:2422
msgid "Editor"
@ -760,11 +760,11 @@ msgstr "Actualizar"
#: objects/ui_Preferences.h:1067 objects/ui_Preferences.h:1148
msgid "Features"
msgstr "Características"
msgstr "Mejoras"
#: objects/ui_Preferences.h:1069
msgid "Enable/Disable experimental features"
msgstr "Activar/Desactivar características experimentales"
msgstr "Activar/Desactivar mejoras experimentales"
#: objects/ui_Preferences.h:1071
msgid "Color scheme:"
@ -772,7 +772,7 @@ msgstr "Paleta de colores:"
#: objects/ui_Preferences.h:1072
msgid "Show Warnings and Errors in 3D View"
msgstr "Mostrar errores y advertencias en la vista 3D"
msgstr ""
#: objects/ui_Preferences.h:1073
msgid "Editor Type"
@ -800,19 +800,19 @@ msgstr "Colorear sintaxis"
#: objects/ui_Preferences.h:1082
msgid "Ctrl/Cmd-Mouse-wheel zooms text"
msgstr "Ctrl/Cmd + la rueda del mouse para hacer zoom al texto"
msgstr "ctrl/cmd + la rueda del mouse para hacer zoom al texto"
#: objects/ui_Preferences.h:1083
msgid "Indentation"
msgstr "Indentación"
msgstr "Identificación"
#: objects/ui_Preferences.h:1084
msgid "Auto Indent"
msgstr "Sangría automática"
msgstr "sangría automática"
#: objects/ui_Preferences.h:1085
msgid "Indent using"
msgstr "Indentar usando"
msgstr "usar sangría"
#: objects/ui_Preferences.h:1088 src/settings.cc:135
msgid "Spaces"
@ -824,7 +824,7 @@ msgstr "Pestañas"
#: objects/ui_Preferences.h:1091
msgid "Indentation width"
msgstr "Ancho de indentado"
msgstr "Ancho de sangría"
#: objects/ui_Preferences.h:1092
msgid "Tab width"
@ -837,7 +837,7 @@ msgstr "Atajo de pestaña"
#: objects/ui_Preferences.h:1096 objects/ui_Preferences.h:1126
#: src/settings.cc:136
msgid "Indent"
msgstr "Indentar"
msgstr "Sangría"
#: objects/ui_Preferences.h:1097 src/settings.cc:136
msgid "Insert Tab"
@ -857,7 +857,7 @@ msgstr "Siempre"
#: objects/ui_Preferences.h:1104
msgid "Only after indentation"
msgstr "Sólo después de la indentación"
msgstr "Sólo después de la sandría"
#: objects/ui_Preferences.h:1106
msgid "Size"
@ -877,7 +877,7 @@ msgstr "Marcar linea actual"
#: objects/ui_Preferences.h:1110 objects/ui_Preferences.h:1143
msgid "Line wrap"
msgstr "Ajuste de linea"
msgstr "Quiebre de linea"
#: objects/ui_Preferences.h:1113 objects/ui_Preferences.h:1130
#: objects/ui_Preferences.h:1138 src/settings.cc:127 src/settings.cc:130
@ -895,11 +895,11 @@ msgstr "Salta en límites de las palabras"
#: objects/ui_Preferences.h:1117
msgid "Line wrap indentation"
msgstr "Ajuste de línea en el sangrado"
msgstr "Salto de línea en el sangrado"
#: objects/ui_Preferences.h:1118
msgid "Line wrap visualization"
msgstr "Visualización del ajuste de línea"
msgstr "Salto de línea visible"
#: objects/ui_Preferences.h:1119
msgid "Style"
@ -942,7 +942,7 @@ msgstr "Final"
#: objects/ui_Preferences.h:1144
msgid "Automatically check for updates"
msgstr "Comprobar actualizaciones automáticamente"
msgstr "Comprobar actualización automáticamente"
#: objects/ui_Preferences.h:1145
msgid "Include development snapshots"
@ -950,11 +950,11 @@ msgstr "Incluir las versiones en desarrollo"
#: objects/ui_Preferences.h:1146
msgid "Check Now"
msgstr "Comprobar ahora"
msgstr "Chequear ahora"
#: objects/ui_Preferences.h:1147
msgid "Last checked: "
msgstr "Último Comprobado:"
msgstr "Último chequeo:"
#: objects/ui_Preferences.h:1149
msgid "OpenCSG"
@ -962,7 +962,7 @@ msgstr "OpenCSG"
#: objects/ui_Preferences.h:1150
msgid "Show capability warning"
msgstr "Mostrar advertencias de capacidad"
msgstr "Advertir incapacidad"
#: objects/ui_Preferences.h:1151
msgid "Enable for OpenGL 1.x"
@ -994,7 +994,7 @@ msgstr "Tamaño de cache de PolySet"
#: objects/ui_Preferences.h:1159
msgid "Allow opening multiple documents"
msgstr "Permitir abrir varios documentos"
msgstr "Permitir a abrir varios documentos"
#: objects/ui_Preferences.h:1160
msgid "Enable docking of Editor and Console in different places"
@ -1002,15 +1002,17 @@ msgstr "Habilitar soporte de editor y consola en diferentes lugares"
#: objects/ui_Preferences.h:1161
msgid "Enable undocking of Editor and Console to separate windows"
msgstr "Habilitar el desacoplamiento de editor y consola para separar las ventanas"
msgstr ""
"Habilitar el desacoplamiento de editor y consola para separar las ventanas"
#: objects/ui_Preferences.h:1162
msgid "Show Welcome Screen"
msgstr "Mostrar pantalla de bienvenida"
msgstr "Pantalla de bienvenida"
#: objects/ui_Preferences.h:1163
msgid "Enable user interface localization (requires restart of OpenSCAD)"
msgstr "Habilitar localización de la interfaz de usuario (requiere reiniciar OpenSCAD)"
msgstr ""
"Habilitar interfaz de usuario localización (requiere reiniciar OpenSCAD)"
#: objects/ui_ProgressWidget.h:72
msgid "%v / %m"
@ -1062,7 +1064,7 @@ msgid ""
"Viewport: translate = [ %.2f %.2f %.2f ], rotate = [ %.2f %.2f %.2f ], "
"distance = %.2f"
msgstr ""
"Ventana: traslación = [ %.2f %.2f %.2f ], rotación = [ %.2f %.2f %.2f ], "
"Marco: translado = [ %.2f %.2f %.2f ], rotación = [ %.2f %.2f %.2f ], "
"distancia = %.2f"
#: src/QGLView.cc:129
@ -1070,7 +1072,7 @@ msgid ""
"Warning: You may experience OpenCSG rendering errors.\n"
"\n"
msgstr ""
"Advertencia: Usted puede experimentar errores de renderizado de OpenCSG.\n"
"Advertencia: Usted puede experimentar OpenCSG errores de renderizado.\n"
"\n"
#: src/QGLView.cc:132
@ -1079,8 +1081,8 @@ msgid ""
"disabled.\n"
"\n"
msgstr ""
"Advertencia:Perdidas las capacidades OpenGL para OpenCSG - OpenCSG ha sido "
"desactivado. .\n"
"Advertencia: Manquantes capacités OpenGL vierten OpenCSG - OpenCSG ha sido "
"desactivada. .\n"
"\n"
#: src/QGLView.cc:135
@ -1091,7 +1093,7 @@ msgid ""
msgstr ""
"Es muy recomendable utilizar OpenSCAD en un sistema con OpenGL 2.0 o "
"posterior.\n"
"La información de su renderizador es la siguiente:\n"
"Su información renderer es como sigue:\n"
#: src/QGLView.cc:139
#, c-format
@ -1114,14 +1116,14 @@ msgstr "Error de compilación"
#: src/mainwin.cc:976
msgid "Error while compiling '%1'."
msgstr "Error durante la compilación '%1'."
msgstr "Error de compilación '%1'."
#: src/mainwin.cc:980
#, fuzzy
msgid "Compilation generated %1 warning."
msgid_plural "Compilation generated %1 warnings."
msgstr[0] "La compilación generó %1 advertencia"
msgstr[1] "La compilación generó %1 advertencias"
msgstr[0] "Advertencias %1"
msgstr[1] "Advertencias %1"
#: src/mainwin.cc:990
msgid " For details see <a href=\"#console\">console window</a>."
@ -1129,18 +1131,18 @@ msgstr " Para más detalles <a href=\"#console\">ventana de consola</a>."
#: src/mainwin.cc:1355
msgid "Save File"
msgstr "Guardar archivo"
msgstr "Salvar archivo"
#: src/mainwin.cc:1357
msgid "OpenSCAD Designs (*.scad)"
msgstr "Diseños OpenSCAD (*.scad)"
msgstr "Diseño OpenSCAD (*.scad)"
#: src/mainwin.cc:1367
msgid ""
"%1 already exists.\n"
"Do you want to replace it?"
msgstr ""
"%1 ya existe.\n"
"%1 existe.\n"
"Deseas reemplazarlo?"
#: src/mainwin.cc:1686
@ -1161,7 +1163,7 @@ msgstr "Exportar %1 Archivo"
#: src/mainwin.cc:2041 src/mainwin.cc:2100
msgid "%1 Files (*%2)"
msgstr "%1 Archivos (*%2)"
msgstr "%1 Archivo (*%2)"
#: src/mainwin.cc:2042
msgid "Untitled"
@ -1181,7 +1183,7 @@ msgstr "Sintitulo.csg"
#: src/mainwin.cc:2151
msgid "CSG Files (*.csg)"
msgstr "Archivos CSG (*.csg)"
msgstr "Archivo CSG (*.csg)"
#: src/mainwin.cc:2177
msgid "Export Image"
@ -1189,7 +1191,7 @@ msgstr "Exportar una imagen"
#: src/mainwin.cc:2177
msgid "PNG Files (*.png)"
msgstr "Archivos PNG (*.png)"
msgstr "Archivo PNG (*.png)"
#: src/mainwin.cc:2427
msgid "Console"
@ -1208,24 +1210,26 @@ msgid ""
"Fontconfig needs to update its font cache.\n"
"This can take up to a couple of minutes."
msgstr ""
"Fontconfig necesita actualizar su caché de fuentes.\n"
"Fontconfig necesita actualizar su caché de la fuente.\n"
"Esto puede tardar hasta un par de minutos."
#: src/settings.cc:132
msgid "After indentation"
msgstr "Antes del indentado"
msgstr ""
"Marco: posición = [ %.2f %.2f %.2f ], rotación = [ %.2f %.2f %.2f ], "
"distancia = %.2f"
#: examples/examples.json:2
msgid "Basics"
msgstr "Básicos"
msgstr "Básico"
#: examples/examples.json:13
msgid "Functions"
msgstr "Funciones"
msgstr ""
#: examples/examples.json:28
msgid "Old"
msgstr "Viejo"
msgstr ""
#~ msgid "Top"
#~ msgstr "Arriba"
@ -1254,7 +1258,7 @@ msgstr "Viejo"
#~ "\n"
#~ msgstr ""
#~ "\n"
#~ "Usando QGLWidget\n"
#~ "Utilizar QGLWidget\n"
#~ "\n"
#~ msgid "Shapes"

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -967,7 +967,7 @@ msgstr "Включить перетаскивание Редактора и Ко
#: objects/ui_Preferences.h:1161
msgid "Show Welcome Screen"
msgstr "Показать экран приветствия"
msgstr "Показать экран преветствия"
#: objects/ui_Preferences.h:1162
msgid "Enable user interface localization (requires restart of OpenSCAD)"
@ -1031,7 +1031,7 @@ msgid ""
"Warning: You may experience OpenCSG rendering errors.\n"
"\n"
msgstr ""
"Предупреждение: Возможны ошибки рендеринга OpenCSG.\n"
"Предупреждение: Возможны ошибки рендринга OpenCSG.\n"
"\n"
#: src/QGLView.cc:132

View file

@ -1,6 +1,4 @@
# cross compilation unix->win32
# To use static linking, pass CONFIG+=mingw-cross-env to qmake
# To use shared linking, pass CONFIG+=mingw-cross-env-shared to qmake
CONFIG(mingw-cross-env) {
LIBS += mingw-cross-env/lib/libglew32s.a
LIBS += mingw-cross-env/lib/libglut.a
@ -21,17 +19,6 @@ CONFIG(mingw-cross-env) {
LIBS += mingw-cross-env/lib/libexpat.a
LIBS += mingw-cross-env/lib/libintl.a
LIBS += mingw-cross-env/lib/libiconv.a
}
CONFIG(mingw-cross-env-shared) {
# on MXE, the shared library .dll files are under 'bin' not 'lib'.
QMAKE_LFLAGS += -L./mingw-cross-env/bin
LIBS += -lglew32 -lglut -lopengl32 -lGLEW -lglu32
LIBS += -lopencsg -lmpfr -lgmp -lCGAL
LIBS += -lfontconfig -lfreetype -lharfbuzz -lbz2 -lexpat -lintl -liconv
}
CONFIG(mingw-cross-env)|CONFIG(mingw-cross-env-shared) {
QMAKE_CXXFLAGS += -fpermissive
WINSTACKSIZE = 8388608 # 8MB # github issue 116
QMAKE_CXXFLAGS += -Wl,--stack,$$WINSTACKSIZE

View file

@ -1,5 +1,6 @@
opencsg {
DEFINES += ENABLE_OPENCSG
CONFIG += glew
# Optionally specify location of OpenCSG using the
# OPENCSGDIR env. variable

View file

@ -1,22 +0,0 @@
# Prefer QOpenGLWidget for non-Windows platforms
# To explicitly enable QOpenGLWidget: qmake CONFIG += qopenglwidget
# To explicitly enable QGLWidget: qmake CONFIG += qglwidget
!win*: CONFIG += qopenglwidget
qopenglwidget:!qglwidget:!lessThan(QT_VERSION, 5.4): CONFIG += using_qopenglwidget
using_qopenglwidget {
message("Using QOpenGLWidget")
DEFINES += USE_QOPENGLWIDGET
}
else {
message("Using QGLWidget")
QT += opengl
}
# see http://fedoraproject.org/wiki/UnderstandingDSOLinkChange
# and https://github.com/openscad/openscad/pull/119
# ( QT += opengl does not automatically link glu on some DSO systems. )
unix:!macx {
QMAKE_LIBS_OPENGL *= -lGLU
QMAKE_LIBS_OPENGL *= -lX11
}

View file

@ -1,9 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>openscad.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0+ and CC0-1.0</project_license>
<name>OpenSCAD</name>
<application>
<id type="desktop">openscad.desktop</id>
<licence>CC0</licence>
<summary>The Programmers Solid 3D CAD Modeller</summary>
<description>
<p>OpenSCAD is a software for creating solid 3D CAD models. Unlike most free software for creating 3D models (such as Blender) it does not focus on the artistic aspects of 3D modelling but instead on the CAD aspects. Thus it might be the application you are looking for when you are planning to create 3D models of machine parts but pretty sure is not what you are looking for when you are more interested in creating computer-animated movies.</p>
@ -11,12 +9,8 @@
<p>OpenSCAD provides two main modelling techniques: First there is constructive solid geometry (aka CSG) and second there is extrusion of 2D outlines. As data exchange format format for this 2D outlines Autocad DXF files are used. In addition to 2D paths for extrusion it is also possible to read design parameters from DXF files. Besides DXF files OpenSCAD can read and create 3D models in the STL and OFF file formats.</p>
</description>
<screenshots>
<screenshot type="default">
<image>http://www.openscad.org/images/appdata-screenshot-1.png</image>
</screenshot>
<screenshot>
<image>http://www.openscad.org/images/appdata-screenshot-2.png</image>
</screenshot>
<screenshot type="default" width="800" height="437">http://www.openscad.org/images/appdata-screenshot-1.png</screenshot>
<screenshot width="800" height="465">http://www.openscad.org/images/appdata-screenshot-2.png</screenshot>
</screenshots>
<url type="homepage">http://www.openscad.org/</url>
</component>
</application>

View file

@ -75,10 +75,7 @@ macx:isEmpty(OPENSCAD_LIBDIR) {
deploy {
message("Building deployment version")
DEFINES += OPENSCAD_DEPLOY
macx: {
CONFIG += sparkle
QMAKE_RPATHDIR = @executable_path/../Frameworks
}
macx: CONFIG += sparkle
}
snapshot: DEFINES += OPENSCAD_SNAPSHOT
@ -103,9 +100,25 @@ macx {
APP_RESOURCES.files = OpenSCAD.sdef dsa_pub.pem icons/SCAD.icns
QMAKE_BUNDLE_DATA += APP_RESOURCES
LIBS += -framework Cocoa -framework ApplicationServices
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.8
}
# Mac needs special care to link against the correct C++ library
# We attempt to auto-detect it by inspecting Boost
dirs = $${BOOSTDIR} $${QMAKE_LIBDIR}
for(dir, dirs) {
system(grep -q __112basic_string $${dir}/libboost_thread* >& /dev/null) {
message("Detected libc++-linked boost in $${dir}")
CONFIG += libc++
}
}
libc++ {
QMAKE_CXXFLAGS += -stdlib=libc++
QMAKE_LFLAGS += -stdlib=libc++
QMAKE_OBJECTIVE_CFLAGS += -stdlib=libc++
# libc++ on requires Mac OS X 10.7+
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
}
}
win* {
RC_FILE = openscad_win32.rc
@ -120,12 +133,21 @@ mingw* {
}
CONFIG += qt
QT += widgets concurrent
QT += opengl concurrent
# see http://fedoraproject.org/wiki/UnderstandingDSOLinkChange
# and https://github.com/openscad/openscad/pull/119
# ( QT += opengl does not automatically link glu on some DSO systems. )
unix:!macx {
QMAKE_LIBS_OPENGL *= -lGLU
QMAKE_LIBS_OPENGL *= -lX11
}
netbsd* {
QMAKE_LFLAGS += -L/usr/X11R7/lib
QMAKE_LFLAGS += -Wl,-R/usr/X11R7/lib
QMAKE_LFLAGS += -Wl,-R/usr/pkg/lib
!clang: { QMAKE_CXXFLAGS += -std=c++0x }
# FIXME: Can the lines below be removed in favour of the OPENSCAD_LIBDIR handling above?
!isEmpty(OPENSCAD_LIBDIR) {
QMAKE_CFLAGS = -I$$OPENSCAD_LIBDIR/include $$QMAKE_CFLAGS
@ -159,6 +181,7 @@ netbsd* {
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-variable
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-function
QMAKE_CXXFLAGS_WARN_ON += -Wno-c++11-extensions
# gettext
QMAKE_CXXFLAGS_WARN_ON += -Wno-format-security
# might want to actually turn this on once in a while
@ -172,10 +195,8 @@ CONFIG(skip-version-check) {
# Application configuration
macx:CONFIG += mdi
CONFIG += c++11
CONFIG += cgal
CONFIG += opencsg
CONFIG += glew
CONFIG += boost
CONFIG += eigen
CONFIG += glib-2.0
@ -183,23 +204,15 @@ CONFIG += harfbuzz
CONFIG += freetype
CONFIG += fontconfig
CONFIG += gettext
CONFIG += libxml2
CONFIG += libzip
#Uncomment the following line to enable the QScintilla editor
!nogui {
CONFIG += scintilla
}
CONFIG += scintilla
# Make experimental features available
experimental {
DEFINES += ENABLE_EXPERIMENTAL
}
nogui {
DEFINES += OPENSCAD_NOGUI
}
mdi {
DEFINES += ENABLE_MDI
}
@ -207,10 +220,18 @@ mdi {
include(common.pri)
# mingw has to come after other items so OBJECT_DIRS will work properly
CONFIG(mingw-cross-env)|CONFIG(mingw-cross-env-shared) {
CONFIG(mingw-cross-env) {
include(mingw-cross-env.pri)
}
win* {
FLEXSOURCES = src/lexer.l
BISONSOURCES = src/parser.y
} else {
LEXSOURCES += src/lexer.l
YACCSOURCES += src/parser.y
}
RESOURCES = openscad.qrc
# Qt5 removed access to the QMAKE_UIC variable, the following
@ -225,69 +246,10 @@ FORMS += src/MainWindow.ui \
src/FontListDialog.ui \
src/ProgressWidget.ui \
src/launchingscreen.ui \
src/LibraryInfoDialog.ui \
src/parameter/ParameterWidget.ui \
src/parameter/ParameterEntryWidget.ui
src/LibraryInfoDialog.ui
# AST nodes
win* {
FLEXSOURCES = src/lexer.l
BISONSOURCES = src/parser.y
} else {
LEXSOURCES += src/lexer.l
YACCSOURCES += src/parser.y
}
HEADERS += src/AST.h \
src/ModuleInstantiation.h \
src/Package.h \
src/Assignment.h \
src/expression.h \
src/function.h \
src/module.h \
src/UserModule.h \
SOURCES += src/AST.cc \
src/ModuleInstantiation.cc \
src/expr.cc \
src/function.cc \
src/module.cc \
src/UserModule.cc \
src/annotation.cc \
src/assignment.cc
# Comment parser
FLEX = src/comment_lexer.l
BISON = src/comment_parser.y
flexs.name = Flex ${QMAKE_FILE_IN}
flexs.input = FLEX
flexs.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}.cpp
flexs.commands = flex -o${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}.cpp ${QMAKE_FILE_IN}
flexs.CONFIG += target_predeps
flexs.variable_out = GENERATED_SOURCES
silent:flexs.commands = @echo Lex ${QMAKE_FILE_IN} && $$flexs.commands
QMAKE_EXTRA_COMPILERS += flexs
bison.name = Bison ${QMAKE_FILE_IN}
biso.input = BISON
biso.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}.cpp
biso.commands = bison -d -o ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}.cpp ${QMAKE_FILE_IN}
biso.commands += && if [[ -e ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}_yacc.hpp ]] ; then mv ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.hpp ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.h ; fi
biso.CONFIG += target_predeps
biso.variable_out = GENERATED_SOURCES
silent:biso.commands = @echo Bison ${QMAKE_FILE_IN} && $$biso.commands
QMAKE_EXTRA_COMPILERS += biso
biso_header.input = BISON
biso_header.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}.h
biso_header.commands = bison -d -o ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}.cpp ${QMAKE_FILE_IN}
biso_header.commands += && if [ -e ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}.hpp ]; then mv ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}.hpp ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}.h ; fi
biso_header.CONFIG += target_predeps no_link
silent:biso_header.commands = @echo Bison ${QMAKE_FILE_IN} && $$biso.commands
QMAKE_EXTRA_COMPILERS += biso_header
HEADERS += src/version_check.h \
HEADERS += src/typedefs.h \
src/version_check.h \
src/ProgressWidget.h \
src/parsersettings.h \
src/renderer.h \
@ -300,32 +262,29 @@ HEADERS += src/version_check.h \
src/QGLView.h \
src/GLView.h \
src/MainWindow.h \
src/OpenSCADApp.h \
src/WindowManager.h \
src/Preferences.h \
src/OpenCSGWarningDialog.h \
src/AboutDialog.h \
src/FontListDialog.h \
src/FontListTableView.h \
src/GroupModule.h \
src/FileModule.h \
src/builtin.h \
src/calc.h \
src/context.h \
src/modcontext.h \
src/evalcontext.h \
src/csgops.h \
src/CSGTreeNormalizer.h \
src/CSGTreeEvaluator.h \
src/csgterm.h \
src/csgtermnormalizer.h \
src/dxfdata.h \
src/dxfdim.h \
src/export.h \
src/expression.h \
src/stackcheck.h \
src/function.h \
src/exceptions.h \
src/grid.h \
src/hash.h \
src/highlighter.h \
src/localscope.h \
src/module.h \
src/feature.h \
src/node.h \
src/csgnode.h \
@ -335,7 +294,6 @@ HEADERS += src/version_check.h \
src/projectionnode.h \
src/cgaladvnode.h \
src/importnode.h \
src/import.h \
src/transformnode.h \
src/colornode.h \
src/rendernode.h \
@ -353,17 +311,20 @@ HEADERS += src/version_check.h \
src/value.h \
src/progress.h \
src/editor.h \
src/NodeVisitor.h \
src/visitor.h \
src/state.h \
src/traverser.h \
src/nodecache.h \
src/nodedumper.h \
src/ModuleCache.h \
src/GeometryCache.h \
src/GeometryEvaluator.h \
src/CSGTermEvaluator.h \
src/Tree.h \
src/DrawingCallback.h \
src/FreetypeRenderer.h \
src/FontCache.h \
src/DrawingCallback.h \
src/FreetypeRenderer.h \
src/FontCache.h \
src/mathc99.h \
src/memory.h \
src/linalg.h \
src/Camera.h \
@ -386,62 +347,33 @@ HEADERS += src/version_check.h \
src/AutoUpdater.h \
src/launchingscreen.h \
src/legacyeditor.h \
src/LibraryInfoDialog.h \
\
src/comment.h\
\
src/parameter/ParameterWidget.h \
src/parameter/parameterobject.h \
src/parameter/parameterextractor.h \
src/parameter/parametervirtualwidget.h \
src/parameter/parameterspinbox.h \
src/parameter/parametercombobox.h \
src/parameter/parameterslider.h \
src/parameter/parametercheckbox.h \
src/parameter/parametertext.h \
src/parameter/parametervector.h \
src/parameter/groupwidget.h \
src/parameter/parameterset.h
src/LibraryInfoDialog.h
SOURCES += \
src/libsvg/libsvg.cc \
src/libsvg/circle.cc \
src/libsvg/ellipse.cc \
src/libsvg/line.cc \
src/libsvg/polygon.cc \
src/libsvg/polyline.cc \
src/libsvg/rect.cc \
src/libsvg/group.cc \
src/libsvg/svgpage.cc \
src/libsvg/path.cc \
src/libsvg/shape.cc \
src/libsvg/transformation.cc \
src/libsvg/util.cc \
\
src/version_check.cc \
SOURCES += src/version_check.cc \
src/ProgressWidget.cc \
src/mathc99.cc \
src/linalg.cc \
src/Camera.cc \
src/handle_dep.cc \
src/value.cc \
src/expr.cc \
src/stackcheck.cc \
src/func.cc \
src/localscope.cc \
src/module.cc \
src/feature.cc \
src/node.cc \
src/context.cc \
src/modcontext.cc \
src/evalcontext.cc \
src/csgnode.cc \
src/CSGTreeNormalizer.cc \
src/CSGTreeEvaluator.cc \
src/csgterm.cc \
src/csgtermnormalizer.cc \
src/Geometry.cc \
src/Polygon2d.cc \
src/clipper-utils.cc \
src/polyset-utils.cc \
src/GeometryUtils.cc \
src/polyset.cc \
src/polyset-gl.cc \
src/csgops.cc \
src/transform.cc \
src/color.cc \
@ -467,7 +399,7 @@ SOURCES += \
src/LibraryInfo.cc \
\
src/nodedumper.cc \
src/NodeVisitor.cc \
src/traverser.cc \
src/GeometryEvaluator.cc \
src/ModuleCache.cc \
src/GeometryCache.cc \
@ -487,27 +419,15 @@ SOURCES += \
src/AutoUpdater.cc \
\
src/grid.cc \
src/hash.cc \
src/GroupModule.cc \
src/FileModule.cc \
src/builtin.cc \
src/calc.cc \
src/export.cc \
src/export_stl.cc \
src/export_amf.cc \
src/export_off.cc \
src/export_dxf.cc \
src/export_svg.cc \
src/export_nef.cc \
src/export_png.cc \
src/import.cc \
src/import_stl.cc \
src/import_off.cc \
src/import_svg.cc \
src/import_amf.cc \
src/renderer.cc \
src/colormap.cc \
src/ThrownTogetherRenderer.cc \
src/CSGTermEvaluator.cc \
src/svg.cc \
src/OffscreenView.cc \
src/fbo.cc \
@ -517,31 +437,13 @@ SOURCES += \
\
src/openscad.cc \
src/mainwin.cc \
src/OpenSCADApp.cc \
src/WindowManager.cc \
src/UIUtils.cc \
src/Dock.cc \
src/FontListDialog.cc \
src/FontListTableView.cc \
src/launchingscreen.cc \
src/legacyeditor.cc \
src/LibraryInfoDialog.cc\
\
src/comment.cpp \
\
src/parameter/ParameterWidget.cc\
src/parameter/parameterobject.cpp \
src/parameter/parameterextractor.cpp \
src/parameter/parameterspinbox.cpp \
src/parameter/parametercombobox.cpp \
src/parameter/parameterslider.cpp \
src/parameter/parametercheckbox.cpp \
src/parameter/parametertext.cpp \
src/parameter/parametervector.cpp \
src/parameter/groupwidget.cpp \
src/parameter/parameterset.cpp \
src/parameter/parametervirtualwidget.cpp
src/LibraryInfoDialog.cc
# ClipperLib
SOURCES += src/polyclipping/clipper.cpp
@ -597,8 +499,6 @@ HEADERS += src/cgal.h \
src/Polygon2d-CGAL.h
SOURCES += src/cgalutils.cc \
src/cgalutils-applyops.cc \
src/cgalutils-project.cc \
src/cgalutils-tess.cc \
src/cgalutils-polyhedron.cc \
src/CGALCache.cc \

View file

@ -4,9 +4,6 @@
# include <winver.h>
# endif
#include "winuser.h"
1 RT_MANIFEST "scripts/winmanifest.xml"
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,0,0,0
PRODUCTVERSION 0,0,0,0

View file

@ -32,11 +32,3 @@
gluTessCallback(tess_, GLenum(GLU_TESS_BEGIN),
(GLvoid (CGAL_GLU_TESS_CALLBACK *)(CGAL_GLU_TESS_DOTS)) &beginCallback);
gluTessCallback(tess_, GLenum(GLU_TESS_END),
@@ -410,6 +429,7 @@
gluTessEndPolygon(tess_);
// CGAL_NEF_TRACEN("End Polygon");
gluDeleteTess(tess_);
+ combineCallback(NULL, NULL, NULL, NULL);
}
void construct_axes() const

View file

@ -1,21 +0,0 @@
diff --git a/opencsg.pro b/opencsg.pro
index b56e622..5cf2d6d 100644
--- a/opencsg.pro
+++ b/opencsg.pro
@@ -1,2 +1,2 @@
TEMPLATE = subdirs
-SUBDIRS = src example
+SUBDIRS = src
diff --git a/src/src.pro b/src/src.pro
index 9091251..598112a 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -7,6 +7,8 @@ TARGET = opencsg
}
CONFIG += opengl warn_on release
+CONFIG += absolute_library_soname
+QMAKE_STRIP = echo
INCLUDEPATH += ../include ../ $$INSTALLDIR/include
CONFIG -= qt
LIBS += -L$$INSTALLDIR/lib -lGLEW

View file

@ -1,21 +0,0 @@
diff --git a/opencsg.pro b/opencsg.pro
index b56e622..5cf2d6d 100644
--- a/opencsg.pro
+++ b/opencsg.pro
@@ -1,2 +1,2 @@
TEMPLATE = subdirs
-SUBDIRS = src example
+SUBDIRS = src
diff --git a/src/src.pro b/src/src.pro
index 9091251..598112a 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -7,6 +7,8 @@ TARGET = opencsg
}
CONFIG += opengl warn_on release
+CONFIG += absolute_library_soname
+QMAKE_STRIP = echo
INCLUDEPATH += ../include ../ $$INSTALLDIR/include
CONFIG -= qt
LIBS += -L$$INSTALLDIR/lib -lGLEW

View file

@ -1,81 +0,0 @@
diff --git a/Qt4Qt5/Qsci/qsciscintilla.h b/Qt4Qt5/Qsci/qsciscintilla.h
index c8a7d5a..563884b 100644
--- a/Qt4Qt5/Qsci/qsciscintilla.h
+++ b/Qt4Qt5/Qsci/qsciscintilla.h
@@ -22,9 +22,11 @@
#ifndef QSCISCINTILLA_H
#define QSCISCINTILLA_H
+/*---OPENCOR---
#ifdef __APPLE__
extern "C++" {
#endif
+*/
#include <QByteArray>
#include <QList>
@@ -2135,7 +2137,13 @@ private slots:
int ct_cursor;
QList<int> ct_shifts;
AutoCompletionUseSingle use_single;
+/*---OPENCOR---
QPointer<QsciLexer> lex;
+*/
+//---OPENCOR--- BEGIN
+ struct Lexer;
+ Lexer *lexerStruct;
+//---OPENCOR--- END
QsciCommandSet *stdCmds;
QsciDocument doc;
QColor nl_text_colour;
@@ -2157,8 +2165,10 @@ private slots:
QsciScintilla &operator=(const QsciScintilla &);
};
+/*---OPENCOR---
#ifdef __APPLE__
}
#endif
+*/
#endif
diff --git a/Qt4Qt5/qsciscintilla.cpp b/Qt4Qt5/qsciscintilla.cpp
index 4ddad7c..4f0bf85 100644
--- a/Qt4Qt5/qsciscintilla.cpp
+++ b/Qt4Qt5/qsciscintilla.cpp
@@ -41,6 +41,14 @@
#include "Qsci/qscistyle.h"
#include "Qsci/qscistyledtext.h"
+//---OPENCOR--- BEGIN
+struct QsciScintilla::Lexer
+{
+ QPointer<QsciLexer> object;
+};
+
+#define lex (lexerStruct->object)
+//---OPENCOR--- END
// Make sure these match the values in Scintilla.h. We don't #include that
// file because it just causes more clashes.
@@ -67,6 +75,9 @@ QsciScintilla::QsciScintilla(QWidget *parent)
wchars(defaultWordChars), call_tips_position(CallTipsBelowText),
call_tips_style(CallTipsNoContext), maxCallTips(-1),
use_single(AcusNever), explicit_fillups(""), fillups_enabled(false)
+//---OPENCOR--- BEGIN
+ , lexerStruct(new Lexer())
+//---OPENCOR--- END
{
connect(this,SIGNAL(SCN_MODIFYATTEMPTRO()),
SIGNAL(modificationAttempted()));
@@ -146,6 +157,9 @@ QsciScintilla::~QsciScintilla()
doc.undisplay(this);
delete stdCmds;
+//---OPENCOR--- BEGIN
+ delete lexerStruct;
+//---OPENCOR--- END
}

View file

@ -1,23 +0,0 @@
diff --git a/src/widgets/widgets/qlabel.cpp b/src/widgets/widgets/qlabel.cpp
index 83e94c4..80957e6 100644
--- a/src/widgets/widgets/qlabel.cpp
+++ b/src/widgets/widgets/qlabel.cpp
@@ -1076,14 +1076,16 @@ void QLabel::paintEvent(QPaintEvent *)
if (d->pixmap && !d->pixmap->isNull()) {
QPixmap pix;
if (d->scaledcontents) {
- if (!d->scaledpixmap || d->scaledpixmap->size() != cr.size()) {
+ QSize scaledSize = cr.size() * devicePixelRatio();
+ if (!d->scaledpixmap || d->scaledpixmap->size() != scaledSize) {
if (!d->cachedimage)
d->cachedimage = new QImage(d->pixmap->toImage());
delete d->scaledpixmap;
QImage scaledImage =
- d->cachedimage->scaled(cr.size() * devicePixelRatio(),
+ d->cachedimage->scaled(scaledSize,
Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
d->scaledpixmap = new QPixmap(QPixmap::fromImage(scaledImage));
+ d->scaledpixmap->setDevicePixelRatio(devicePixelRatio());
}
pix = *d->scaledpixmap;
} else

View file

@ -1,11 +0,0 @@
index 0cc8cd6..5df99d1 100644
--- a/mkspecs/features/mac/default_pre.prf
+++ b/mkspecs/features/mac/default_pre.prf
@@ -12,7 +12,7 @@ isEmpty(QMAKE_XCODE_DEVELOPER_PATH) {
error("Xcode is not installed in $${QMAKE_XCODE_DEVELOPER_PATH}. Please use xcode-select to choose Xcode installation path.")
# Make sure Xcode is set up properly
- isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null"))): \
+ isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null"))): \
error("Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.")
}

View file

@ -1,11 +0,0 @@
--- a/configure 2016-10-29 19:29:27.000000000 -0600
+++ b/configure 2016-10-29 19:29:20.000000000 -0600
@@ -548,7 +548,7 @@
exit 2
fi
- if ! /usr/bin/xcrun -find xcrun >/dev/null 2>&1; then
+ if ! /usr/bin/xcrun -find xcodebuild >/dev/null 2>&1; then
echo >&2
echo " Xcode not set up properly. You may need to confirm the license" >&2
echo " agreement by running /usr/bin/xcodebuild without arguments." >&2

View file

@ -1,8 +0,0 @@
**Language Features:**
* Added angle parameter to rotate_extrude()
**Program Features:**
**Bugfixes/improvements:**
**Deprecations:**

View file

@ -4,46 +4,23 @@ scintilla {
DEFINES += USE_SCINTILLA_EDITOR
QSCILOADED =
OPENSCAD_LIBDIR = $$(OPENSCAD_LIBRARIES)
!isEmpty(OPENSCAD_LIBDIR) {
exists($$OPENSCAD_LIBDIR) {
exists($$OPENSCAD_LIBDIR/lib/x86_64-linux-gnu/qt5/mkspecs/features/qscintilla2.prf) {
include($$OPENSCAD_LIBDIR/lib/x86_64-linux-gnu/qt5/mkspecs/features/qscintilla2.prf)
INCLUDEPATH = $$OPENSCAD_LIBDIR/include/qt5 $$INCLUDEPATH
LIBS = -L$$OPENSCAD_LIBDIR/lib/x86_64-linux-gnu $$LIBS
QSCILOADED=yes
}
}
}
# The qscintilla2.prf which ships with QScintilla is broken for Mac/Windows
# debug builds, so we supply our own
isEmpty(QSCILOADED) {
win32|macx: {
include(qscintilla2.prf)
QSCILOADED=yes
}
}
isEmpty(QSCILOADED) {
load(qscintilla2) {
QSCILOADED=yes
# All good, found installed *.prf file.
}
}
isEmpty(QSCILOADED) {
# Older scintilla libs (e.g. 2.7.2 on fedora20) do not provide the
# prf file.
#
# In addition Ubuntu (and maybe other distributions) have the Qt5
# prf file in the wrong location so it's not picked up by qmake
#
message("Using local copy of qscintilla2.prf instead.")
win32|macx: {
include(qscintilla2.prf)
QSCILOADED=yes
}
else: {
load(qscintilla2) {
# All good, found installed *.prf file.
} else {
# Older scintilla libs (e.g. 2.7.2 on fedora20) do not provide the
# prf file.
#
# In addition Ubuntu (and maybe other distributions) have the Qt5
# prf file in the wrong location so it's not picked up by qmake
#
message("Using local copy of qscintilla2.prf instead.")
include(qscintilla2.prf)
}
}
}

View file

@ -165,46 +165,41 @@ qt_sysver()
if [ "`command -v qtchooser`" ]; then
if qtchooser -run-tool=qmake -qt=5 -v >/dev/null 2>&1 ; then
export QT_SELECT=5
qtpath="`qtchooser -run-tool=qmake -qt=5 -query QT_INSTALL_HEADERS`"/QtCore
qtpath="`qtchooser -run-tool=qmake -qt=5 -query QT_INSTALL_HEADERS`"/QtCore/qglobal.h
fi
if [ ! -e "$qtpath" ]; then
if qtchooser -run-tool=qmake -qt=4 -v >/dev/null 2>&1 ; then
export QT_SELECT=4
qtpath="`qtchooser -run-tool=qmake -qt=4 -query QT_INSTALL_HEADERS`"/QtCore
qtpath="`qtchooser -run-tool=qmake -qt=4 -query QT_INSTALL_HEADERS`"/QtCore/qglobal.h
fi
fi
else
export QT_SELECT=5
qtpath=$1/include/qt5/QtCore
qtpath=$1/include/qt5/QtCore/qglobal.h
if [ ! -e $qtpath ]; then
qtpath=$1/include/i686-linux-gnu/qt5/QtCore
qtpath=$1/include/i686-linux-gnu/qt5/QtCore/qglobal.h
fi
if [ ! -e $qtpath ]; then
qtpath=$1/include/x86_64-linux-gnu/qt5/QtCore
qtpath=$1/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h
fi
if [ ! -e $qtpath ]; then
export QT_SELECT=4
qtpath=$1/include/qt4/QtCore/
qtpath=$1/include/qt4/QtCore/qglobal.h
fi
if [ ! -e $qtpath ]; then
qtpath=$1/include/QtCore
qtpath=$1/include/QtCore/qglobal.h
fi
if [ ! -e $qtpath ]; then
# netbsd
qtpath=$1/qt4/include/QtCore
qtpath=$1/qt4/include/QtCore/qglobal.h
fi
fi
if [ ! -e "$qtpath" ]; then
unset QT_SELECT
return
fi
qtver=`grep 'define *QT_VERSION_STR *' "$qtpath"/qglobal.h`
# fix for Qt 5.7
if [ -z "$qtver" ]; then
qtver=`grep 'define *QT_VERSION_STR *' "$qtpath"/qconfig.h`
fi
qtver=`echo $qtver | awk '{print $3}' | sed s/'"'//g`
qtver=`grep 'define *QT_VERSION_STR *' $qtpath | awk '{print $3}'`
qtver=`echo $qtver | sed s/'"'//g`
qt_sysver_result=$qtver
}

View file

@ -189,12 +189,10 @@ build_harfbuzz()
fi
tar xzf "harfbuzz-$version.tar.gz"
cd "harfbuzz-$version"
# we do not need gtkdocize
sed -e "s/gtkdocize/echo/g" autogen.sh > autogen.sh.bak && mv autogen.sh.bak autogen.sh
# disable doc directories as they make problems on Mac OS Build
sed -e "s/SUBDIRS = src util test docs/SUBDIRS = src util test/g" Makefile.am > Makefile.am.bak && mv Makefile.am.bak Makefile.am
sed -e "s/^docs.*$//" configure.ac > configure.ac.bak && mv configure.ac.bak configure.ac
sh ./autogen.sh --prefix="$DEPLOYDIR" --with-freetype=yes --with-gobject=no --with-cairo=no --with-icu=no $extra_config_flags
./autogen.sh --prefix="$DEPLOYDIR" --with-freetype=yes --with-gobject=no --with-cairo=no --with-icu=no $extra_config_flags
make -j$NUMCPU
make install
}

View file

@ -1,21 +1,17 @@
EXAMPLES := ../../examples
LOG := out.log
SRC=$(wildcard $(EXAMPLES)/*/*.scad)
PNG=$(patsubst $(EXAMPLES)/%.scad,html/%.png,$(SRC))
HTML=$(patsubst $(EXAMPLES)/%.scad,html/%.html,$(SRC))
OPENSCAD := $(shell ls ../../openscad ../../OpenSCAD.app/Contents/MacOS/OpenSCAD 2>/dev/null | head -n 1)
OPENSCAD := ../../OpenSCAD.app/Contents/MacOS/OpenSCAD
#OPENSCAD := openscad
ARGS := --imgsize=1200,900 --camera=0,0,0,55,0,25,180 --viewall --autocenter
all : info $(PNG) $(HTML) example-data.js assets
.PHONY: info
info:
@echo Using $(OPENSCAD)
all : $(PNG) $(HTML) example-data.js assets
.PHONY: clean
clean :
rm -rf html $(LOG)
rm -rf html
.PHONY: assets
assets :
@ -25,7 +21,7 @@ assets :
example-data.js :
( \
echo "openscad_examples = ["; \
for a in `grep '\[' ../../examples/examples.json | tr -d ' \t":[]'`; \
for a in Basics Functions Shapes Extrusion Advanced; \
do \
echo " {"; \
echo " name : \"$$a\","; \
@ -42,7 +38,7 @@ example-data.js :
html/%.png : $(EXAMPLES)/%.scad
mkdir -p `dirname $@`
$(OPENSCAD) $(ARGS) -o $@ $< > $(LOG) 2>&1
$(OPENSCAD) $(ARGS) -o $@ $< > out.log 2>&1
html/%.html : $(EXAMPLES)/%.scad template-pre.html template-post.html
#echo $(notdir $(patsubst %.scad,%.png,$<))

View file

@ -1,20 +0,0 @@
.rainbow {
border-spacing: 0;
border-collapse: collapse;
}
.rainbow .line:hover {
background-color: #eee8d5;
}
.rainbow .line .line-number {
text-align: right;
background-color: #eee8d5;
padding-left: 0.8em;
padding-right: 0.8em;
}
.rainbow .line .line-number:before {
content: attr(data-line-number);
}
.rainbow .line .line-code {
padding-left: 1em;
width: 100%;
}

View file

@ -1,14 +0,0 @@
JavaScript Libraries:
Rainbow by Craig Campbell
* https://github.com/ccampbell/rainbow
* Apache License, Version 2.0
Rainbow.linenumbers.js by Blender3D
* https://github.com/Blender3D/rainbow.linenumbers.js
* Apache License, Version 2.0
Dropdown Menu by Oliver Gast
* http://www.olivergast.de/blog/2012/04/18/css3-dropdown-menu/
* (update in http://www.olivergast.de/blog/2015/05/12/css-ein-horizontales-dropdown-menue-reloaded/)
* No specific license, download states "download for free usage"

View file

@ -2,7 +2,7 @@
* Generic language patterns
*
* @author Craig Campbell
* @version 1.0.13
* @version 1.0.11
*/
Rainbow.extend([
{
@ -25,7 +25,7 @@ Rainbow.extend([
}
}
},
'pattern': /(\(|\s|\[|\=|:|\+|\.|\{)(('|")([^\\\1]|\\.)*?(\3))/gm
'pattern': /(\(|\s|\[|\=|:|\+|\.)(('|")([^\\\1]|\\.)*?(\3))/gm
},
{
'name': 'comment',

View file

@ -1,798 +0,0 @@
/**
* Copyright 2013 Craig Campbell
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Rainbow is a simple code syntax highlighter
*
* @preserve @version 1.2
* @url rainbowco.de
*/
window['Rainbow'] = (function() {
/**
* array of replacements to process at the end
*
* @type {Object}
*/
var replacements = {},
/**
* an array of start and end positions of blocks to be replaced
*
* @type {Object}
*/
replacement_positions = {},
/**
* an array of the language patterns specified for each language
*
* @type {Object}
*/
language_patterns = {},
/**
* an array of languages and whether they should bypass the default patterns
*
* @type {Object}
*/
bypass_defaults = {},
/**
* processing level
*
* replacements are stored at this level so if there is a sub block of code
* (for example php inside of html) it runs at a different level
*
* @type {number}
*/
CURRENT_LEVEL = 0,
/**
* constant used to refer to the default language
*
* @type {number}
*/
DEFAULT_LANGUAGE = 0,
/**
* used as counters so we can selectively call setTimeout
* after processing a certain number of matches/replacements
*
* @type {number}
*/
match_counter = 0,
/**
* @type {number}
*/
replacement_counter = 0,
/**
* @type {null|string}
*/
global_class,
/**
* @type {null|Function}
*/
onHighlight;
/**
* cross browser get attribute for an element
*
* @see http://stackoverflow.com/questions/3755227/cross-browser-javascript-getattribute-method
*
* @param {Node} el
* @param {string} attr attribute you are trying to get
* @returns {string|number}
*/
function _attr(el, attr, attrs, i) {
var result = (el.getAttribute && el.getAttribute(attr)) || 0;
if (!result) {
attrs = el.attributes;
for (i = 0; i < attrs.length; ++i) {
if (attrs[i].nodeName === attr) {
return attrs[i].nodeValue;
}
}
}
return result;
}
/**
* adds a class to a given code block
*
* @param {Element} el
* @param {string} class_name class name to add
* @returns void
*/
function _addClass(el, class_name) {
el.className += el.className ? ' ' + class_name : class_name;
}
/**
* checks if a block has a given class
*
* @param {Element} el
* @param {string} class_name class name to check for
* @returns {boolean}
*/
function _hasClass(el, class_name) {
return (' ' + el.className + ' ').indexOf(' ' + class_name + ' ') > -1;
}
/**
* gets the language for this block of code
*
* @param {Element} block
* @returns {string|null}
*/
function _getLanguageForBlock(block) {
// if this doesn't have a language but the parent does then use that
// this means if for example you have: <pre data-language="php">
// with a bunch of <code> blocks inside then you do not have
// to specify the language for each block
var language = _attr(block, 'data-language') || _attr(block.parentNode, 'data-language');
// this adds support for specifying language via a css class
// you can use the Google Code Prettify style: <pre class="lang-php">
// or the HTML5 style: <pre><code class="language-php">
if (!language) {
var pattern = /\blang(?:uage)?-(\w+)/,
match = block.className.match(pattern) || block.parentNode.className.match(pattern);
if (match) {
language = match[1];
}
}
return language;
}
/**
* makes sure html entities are always used for tags
*
* @param {string} code
* @returns {string}
*/
function _htmlEntities(code) {
return code.replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/&(?![\w\#]+;)/g, '&amp;');
}
/**
* determines if a new match intersects with an existing one
*
* @param {number} start1 start position of existing match
* @param {number} end1 end position of existing match
* @param {number} start2 start position of new match
* @param {number} end2 end position of new match
* @returns {boolean}
*/
function _intersects(start1, end1, start2, end2) {
if (start2 >= start1 && start2 < end1) {
return true;
}
return end2 > start1 && end2 < end1;
}
/**
* determines if two different matches have complete overlap with each other
*
* @param {number} start1 start position of existing match
* @param {number} end1 end position of existing match
* @param {number} start2 start position of new match
* @param {number} end2 end position of new match
* @returns {boolean}
*/
function _hasCompleteOverlap(start1, end1, start2, end2) {
// if the starting and end positions are exactly the same
// then the first one should stay and this one should be ignored
if (start2 == start1 && end2 == end1) {
return false;
}
return start2 <= start1 && end2 >= end1;
}
/**
* determines if the match passed in falls inside of an existing match
* this prevents a regex pattern from matching inside of a bigger pattern
*
* @param {number} start - start position of new match
* @param {number} end - end position of new match
* @returns {boolean}
*/
function _matchIsInsideOtherMatch(start, end) {
for (var key in replacement_positions[CURRENT_LEVEL]) {
key = parseInt(key, 10);
// if this block completely overlaps with another block
// then we should remove the other block and return false
if (_hasCompleteOverlap(key, replacement_positions[CURRENT_LEVEL][key], start, end)) {
delete replacement_positions[CURRENT_LEVEL][key];
delete replacements[CURRENT_LEVEL][key];
}
if (_intersects(key, replacement_positions[CURRENT_LEVEL][key], start, end)) {
return true;
}
}
return false;
}
/**
* takes a string of code and wraps it in a span tag based on the name
*
* @param {string} name name of the pattern (ie keyword.regex)
* @param {string} code block of code to wrap
* @returns {string}
*/
function _wrapCodeInSpan(name, code) {
return '<span class="' + name.replace(/\./g, ' ') + (global_class ? ' ' + global_class : '') + '">' + code + '</span>';
}
/**
* finds out the position of group match for a regular expression
*
* @see http://stackoverflow.com/questions/1985594/how-to-find-index-of-groups-in-match
*
* @param {Object} match
* @param {number} group_number
* @returns {number}
*/
function _indexOfGroup(match, group_number) {
var index = 0,
i;
for (i = 1; i < group_number; ++i) {
if (match[i]) {
index += match[i].length;
}
}
return index;
}
/**
* matches a regex pattern against a block of code
* finds all matches that should be processed and stores the positions
* of where they should be replaced within the string
*
* this is where pretty much all the work is done but it should not
* be called directly
*
* @param {RegExp} pattern
* @param {string} code
* @returns void
*/
function _processPattern(regex, pattern, code, callback)
{
if (typeof regex === "undefined" || regex === null) {
//console.warn("undefined regular expression")
return callback();
}
var match = regex.exec(code);
if (!match) {
return callback();
}
++match_counter;
// treat match 0 the same way as name
if (!pattern['name'] && typeof pattern['matches'][0] == 'string') {
pattern['name'] = pattern['matches'][0];
delete pattern['matches'][0];
}
var replacement = match[0],
start_pos = match.index,
end_pos = match[0].length + start_pos,
/**
* callback to process the next match of this pattern
*/
processNext = function() {
var nextCall = function() {
_processPattern(regex, pattern, code, callback);
};
// every 100 items we process let's call set timeout
// to let the ui breathe a little
return match_counter % 100 > 0 ? nextCall() : setTimeout(nextCall, 0);
};
// if this is not a child match and it falls inside of another
// match that already happened we should skip it and continue processing
if (_matchIsInsideOtherMatch(start_pos, end_pos)) {
return processNext();
}
/**
* callback for when a match was successfully processed
*
* @param {string} replacement
* @returns void
*/
var onMatchSuccess = function(replacement) {
// if this match has a name then wrap it in a span tag
if (pattern['name']) {
replacement = _wrapCodeInSpan(pattern['name'], replacement);
}
// console.log('LEVEL', CURRENT_LEVEL, 'replace', match[0], 'with', replacement, 'at position', start_pos, 'to', end_pos);
// store what needs to be replaced with what at this position
if (!replacements[CURRENT_LEVEL]) {
replacements[CURRENT_LEVEL] = {};
replacement_positions[CURRENT_LEVEL] = {};
}
replacements[CURRENT_LEVEL][start_pos] = {
'replace': match[0],
'with': replacement
};
// store the range of this match so we can use it for comparisons
// with other matches later
replacement_positions[CURRENT_LEVEL][start_pos] = end_pos;
// process the next match
processNext();
},
// if this pattern has sub matches for different groups in the regex
// then we should process them one at a time by rerunning them through
// this function to generate the new replacement
//
// we run through them backwards because the match position of earlier
// matches will not change depending on what gets replaced in later
// matches
group_keys = keys(pattern['matches']),
/**
* callback for processing a sub group
*
* @param {number} i
* @param {Array} group_keys
* @param {Function} callback
*/
processGroup = function(i, group_keys, callback) {
if (i >= group_keys.length) {
return callback(replacement);
}
var processNextGroup = function() {
processGroup(++i, group_keys, callback);
},
block = match[group_keys[i]];
// if there is no match here then move on
if (!block) {
return processNextGroup();
}
var group = pattern['matches'][group_keys[i]],
language = group['language'],
/**
* process group is what group we should use to actually process
* this match group
*
* for example if the subgroup pattern looks like this
* 2: {
* 'name': 'keyword',
* 'pattern': /true/g
* }
*
* then we use that as is, but if it looks like this
*
* 2: {
* 'name': 'keyword',
* 'matches': {
* 'name': 'special',
* 'pattern': /whatever/g
* }
* }
*
* we treat the 'matches' part as the pattern and keep
* the name around to wrap it with later
*/
process_group = group['name'] && group['matches'] ? group['matches'] : group,
/**
* takes the code block matched at this group, replaces it
* with the highlighted block, and optionally wraps it with
* a span with a name
*
* @param {string} block
* @param {string} replace_block
* @param {string|null} match_name
*/
_replaceAndContinue = function(block, replace_block, match_name) {
replacement = _replaceAtPosition(_indexOfGroup(match, group_keys[i]), block, match_name ? _wrapCodeInSpan(match_name, replace_block) : replace_block, replacement);
processNextGroup();
};
// if this is a sublanguage go and process the block using that language
if (language) {
return _highlightBlockForLanguage(block, language, function(code) {
_replaceAndContinue(block, code);
});
}
// if this is a string then this match is directly mapped to selector
// so all we have to do is wrap it in a span and continue
if (typeof group === 'string') {
return _replaceAndContinue(block, block, group);
}
// the process group can be a single pattern or an array of patterns
// _processCodeWithPatterns always expects an array so we convert it here
_processCodeWithPatterns(block, process_group.length ? process_group : [process_group], function(code) {
_replaceAndContinue(block, code, group['matches'] ? group['name'] : 0);
});
};
processGroup(0, group_keys, onMatchSuccess);
}
/**
* should a language bypass the default patterns?
*
* if you call Rainbow.extend() and pass true as the third argument
* it will bypass the defaults
*/
function _bypassDefaultPatterns(language)
{
return bypass_defaults[language];
}
/**
* returns a list of regex patterns for this language
*
* @param {string} language
* @returns {Array}
*/
function _getPatternsForLanguage(language) {
var patterns = language_patterns[language] || [],
default_patterns = language_patterns[DEFAULT_LANGUAGE] || [];
return _bypassDefaultPatterns(language) ? patterns : patterns.concat(default_patterns);
}
/**
* substring replace call to replace part of a string at a certain position
*
* @param {number} position the position where the replacement should happen
* @param {string} replace the text we want to replace
* @param {string} replace_with the text we want to replace it with
* @param {string} code the code we are doing the replacing in
* @returns {string}
*/
function _replaceAtPosition(position, replace, replace_with, code) {
var sub_string = code.substr(position);
return code.substr(0, position) + sub_string.replace(replace, replace_with);
}
/**
* sorts an object by index descending
*
* @param {Object} object
* @return {Array}
*/
function keys(object) {
var locations = [],
replacement,
pos;
for(var location in object) {
if (object.hasOwnProperty(location)) {
locations.push(location);
}
}
// numeric descending
return locations.sort(function(a, b) {
return b - a;
});
}
/**
* processes a block of code using specified patterns
*
* @param {string} code
* @param {Array} patterns
* @returns void
*/
function _processCodeWithPatterns(code, patterns, callback)
{
// we have to increase the level here so that the
// replacements will not conflict with each other when
// processing sub blocks of code
++CURRENT_LEVEL;
// patterns are processed one at a time through this function
function _workOnPatterns(patterns, i)
{
// still have patterns to process, keep going
if (i < patterns.length) {
return _processPattern(patterns[i]['pattern'], patterns[i], code, function() {
_workOnPatterns(patterns, ++i);
});
}
// we are done processing the patterns
// process the replacements and update the DOM
_processReplacements(code, function(code) {
// when we are done processing replacements
// we are done at this level so we can go back down
delete replacements[CURRENT_LEVEL];
delete replacement_positions[CURRENT_LEVEL];
--CURRENT_LEVEL;
callback(code);
});
}
_workOnPatterns(patterns, 0);
}
/**
* process replacements in the string of code to actually update the markup
*
* @param {string} code the code to process replacements in
* @param {Function} onComplete what to do when we are done processing
* @returns void
*/
function _processReplacements(code, onComplete) {
/**
* processes a single replacement
*
* @param {string} code
* @param {Array} positions
* @param {number} i
* @param {Function} onComplete
* @returns void
*/
function _processReplacement(code, positions, i, onComplete) {
if (i < positions.length) {
++replacement_counter;
var pos = positions[i],
replacement = replacements[CURRENT_LEVEL][pos];
code = _replaceAtPosition(pos, replacement['replace'], replacement['with'], code);
// process next function
var next = function() {
_processReplacement(code, positions, ++i, onComplete);
};
// use a timeout every 250 to not freeze up the UI
return replacement_counter % 250 > 0 ? next() : setTimeout(next, 0);
}
onComplete(code);
}
var string_positions = keys(replacements[CURRENT_LEVEL]);
_processReplacement(code, string_positions, 0, onComplete);
}
/**
* takes a string of code and highlights it according to the language specified
*
* @param {string} code
* @param {string} language
* @param {Function} onComplete
* @returns void
*/
function _highlightBlockForLanguage(code, language, onComplete) {
var patterns = _getPatternsForLanguage(language);
_processCodeWithPatterns(_htmlEntities(code), patterns, onComplete);
}
/**
* highlight an individual code block
*
* @param {Array} code_blocks
* @param {number} i
* @returns void
*/
function _highlightCodeBlock(code_blocks, i, onComplete) {
if (i < code_blocks.length) {
var block = code_blocks[i],
language = _getLanguageForBlock(block);
if (!_hasClass(block, 'rainbow') && language) {
language = language.toLowerCase();
_addClass(block, 'rainbow');
return _highlightBlockForLanguage(block.innerHTML, language, function(code) {
block.innerHTML = code;
// reset the replacement arrays
replacements = {};
replacement_positions = {};
// if you have a listener attached tell it that this block is now highlighted
if (onHighlight) {
onHighlight(block, language);
}
// process the next block
setTimeout(function() {
_highlightCodeBlock(code_blocks, ++i, onComplete);
}, 0);
});
}
return _highlightCodeBlock(code_blocks, ++i, onComplete);
}
if (onComplete) {
onComplete();
}
}
/**
* start highlighting all the code blocks
*
* @returns void
*/
function _highlight(node, onComplete) {
// the first argument can be an Event or a DOM Element
// I was originally checking instanceof Event but that makes it break
// when using mootools
//
// @see https://github.com/ccampbell/rainbow/issues/32
//
node = node && typeof node.getElementsByTagName == 'function' ? node : document;
var pre_blocks = node.getElementsByTagName('pre'),
code_blocks = node.getElementsByTagName('code'),
i,
final_pre_blocks = [],
final_code_blocks = [];
// first loop through all pre blocks to find which ones to highlight
// also strip whitespace
for (i = 0; i < pre_blocks.length; ++i) {
// strip whitespace around code tags when they are inside of a pre tag
// this makes the themes look better because you can't accidentally
// add extra linebreaks at the start and end
//
// when the pre tag contains a code tag then strip any extra whitespace
// for example
// <pre>
// <code>var foo = true;</code>
// </pre>
//
// will become
// <pre><code>var foo = true;</code></pre>
//
// if you want to preserve whitespace you can use a pre tag on its own
// without a code tag inside of it
if (pre_blocks[i].getElementsByTagName('code').length) {
pre_blocks[i].innerHTML = pre_blocks[i].innerHTML.replace(/^\s+/, '').replace(/\s+$/, '');
continue;
}
// if the pre block has no code blocks then we are going to want to
// process it directly
final_pre_blocks.push(pre_blocks[i]);
}
// @see http://stackoverflow.com/questions/2735067/how-to-convert-a-dom-node-list-to-an-array-in-javascript
// we are going to process all <code> blocks
for (i = 0; i < code_blocks.length; ++i) {
final_code_blocks.push(code_blocks[i]);
}
_highlightCodeBlock(final_code_blocks.concat(final_pre_blocks), 0, onComplete);
}
/**
* public methods
*/
return {
/**
* extends the language pattern matches
*
* @param {*} language name of language
* @param {*} patterns array of patterns to add on
* @param {boolean|null} bypass if true this will bypass the default language patterns
*/
extend: function(language, patterns, bypass) {
// if there is only one argument then we assume that we want to
// extend the default language rules
if (arguments.length == 1) {
patterns = language;
language = DEFAULT_LANGUAGE;
}
bypass_defaults[language] = bypass;
language_patterns[language] = patterns.concat(language_patterns[language] || []);
},
/**
* call back to let you do stuff in your app after a piece of code has been highlighted
*
* @param {Function} callback
*/
onHighlight: function(callback) {
onHighlight = callback;
},
/**
* method to set a global class that will be applied to all spans
*
* @param {string} class_name
*/
addClass: function(class_name) {
global_class = class_name;
},
/**
* starts the magic rainbow
*
* @returns void
*/
color: function() {
// if you want to straight up highlight a string you can pass the string of code,
// the language, and a callback function
if (typeof arguments[0] == 'string') {
return _highlightBlockForLanguage(arguments[0], arguments[1], arguments[2]);
}
// if you pass a callback function then we rerun the color function
// on all the code and call the callback function on complete
if (typeof arguments[0] == 'function') {
return _highlight(0, arguments[0]);
}
// otherwise we use whatever node you passed in with an optional
// callback function as the second parameter
_highlight(arguments[0], arguments[1]);
}
};
}) ();
/**
* adds event listener to start highlighting
*/
(function() {
if (document.addEventListener) {
return document.addEventListener('DOMContentLoaded', Rainbow.color, false);
}
window.attachEvent('onload', Rainbow.color);
}) ();
// When using Google closure compiler in advanced mode some methods
// get renamed. This keeps a public reference to these methods so they can
// still be referenced from outside this library.
Rainbow["onHighlight"] = Rainbow.onHighlight;
Rainbow["addClass"] = Rainbow.addClass;

View file

@ -1,118 +0,0 @@
// Only install the plugin if Rainbow is present and has been loaded
if (window.Rainbow) window.Rainbow.linenumbers = (function(Rainbow) {
/**
* Splits up a single element into individual lines
*
* @param {HTMLElement} elem
* @returns {Array}
*/
function splitElement(elem) {
if (elem.nodeType === 3) {
// Just split up the text node
return elem.nodeValue.split('\n');
}
// Otherwise, we need to split up the HTML
var sourceLines = elem.innerHTML.split('\n');
var lines = [];
// Wraps each chunk in the parent element. For example:
// <b>foo\nbar</b> -> [<b>foo</b>, <b>bar</b>]
for (var i = 0; i < sourceLines.length; i++) {
// Handles <b>\nbar</b> -> [, <b>bar</b>]
if (sourceLines[i] === '') {
lines.push('');
} else {
var wrapper = elem.cloneNode(true);
wrapper.innerHTML = sourceLines[i];
var div = document.createElement('div');
div.appendChild(wrapper.cloneNode(true));
lines.push(div.innerHTML);
}
}
return lines;
};
/**
* Splits up the element containing highlighted source code
* into an array of lines
*
* @param {HTMLElement} block
* @returns {Array}
*/
function splitLines(block) {
var lines = [''];
for (var i = 0; i < block.childNodes.length; i++) {
var elemLines = splitElement(block.childNodes[i]);
// The first element in elemLines is
// a continuation of the previous line
lines[lines.length - 1] += elemLines[0];
// The remaining elements get their own lines
for (var j = 1; j < elemLines.length; j++) {
lines.push(elemLines[j]);
}
}
// Returns the array of lines
return lines;
};
// Callback is called when Rainbow has highlighted a block
Rainbow.onHighlight(function(block) {
// This addresses an issue when Rainbow.color() is called multiple times.
// Since code element is replaced with table element below,
// second pass of Rainbow.color() will result in block.parentNode being null.
if (!block || !block.parentNode) {
return;
}
// Create a table wrapper
var table = document.createElement('table');
table.className = 'rainbow';
table.setAttribute('data-language', block.getAttribute('data-language'));
// Split up the lines of the block
var lines = splitLines(block);
// For each line
for (var i = 0; i < lines.length; i++) {
var line = lines[i];
var index = i + 1;
// Create a row
var row = table.insertRow(-1);
row.className = 'line line-' + index;
// Create a cell which displays the line number with CSS
var lineNumber = row.insertCell(-1);
lineNumber.className = 'line-number';
lineNumber.setAttribute('data-line-number', index);
// Add in the actual line of source code
var code = row.insertCell(-1);
code.className = 'line-code';
// If the line is blank, add a newline to make it copyable.
if (line === '') {
line = '\n';
}
code.innerHTML = line;
}
// If the block is a <pre> element, its parent is not an element
// generated by Rainbow (i.e. it could be <body>). We don't want
// to clear this.
var parent = (block.nodeName.toLowerCase() === 'pre') ? block : block.parentNode;
// Clear the parent element and use the table in place of the <code> block
parent.innerHTML = '';
parent.appendChild(table);
});
})(window.Rainbow);

View file

@ -1,2 +0,0 @@
window.Rainbow&&(window.Rainbow.linenumbers=function(m){m.onHighlight(function(c){if(c&&c.parentNode){var h=document.createElement("table");h.className="rainbow";h.setAttribute("data-language",c.getAttribute("data-language"));for(var e=[""],d=0;d<c.childNodes.length;d++){var a;a=c.childNodes[d];if(3===a.nodeType)a=a.nodeValue.split("\n");else{for(var b=a.innerHTML.split("\n"),f=[],g=0;g<b.length;g++)if(""===b[g])f.push("");else{var k=a.cloneNode(!0);k.innerHTML=b[g];var l=document.createElement("div");
l.appendChild(k.cloneNode(!0));f.push(l.innerHTML)}a=f}e[e.length-1]+=a[0];for(b=1;b<a.length;b++)e.push(a[b])}for(d=0;d<e.length;d++)a=e[d],b=d+1,f=h.insertRow(-1),f.className="line line-"+b,g=f.insertCell(-1),g.className="line-number",g.setAttribute("data-line-number",b),b=f.insertCell(-1),b.className="line-code",""===a&&(a="\n"),b.innerHTML=a;c="pre"===c.nodeName.toLowerCase()?c:c.parentNode;c.innerHTML="";c.appendChild(h)}})}(window.Rainbow));

View file

@ -6,12 +6,10 @@
<link rel="stylesheet" href="../assets/css/main.css" type="text/css"/>
<link rel="stylesheet" href="../assets/css/menu.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../assets/css/solarized-light.css" type="text/css"/>
<link rel="stylesheet" href="../assets/css/solarized-light-linenumbers.css" type="text/css" />
<script src="../example-data.js" type="text/javascript"></script>
<script src="../assets/js/menu.js" type="text/javascript"></script>
<script src="../assets/js/rainbow.min.js" type="text/javascript"></script>
<script src="../assets/js/rainbow.linenumbers.min.js" type="text/javascript"></script>
<script src="../assets/js/language/generic.js" type="text/javascript"></script>
<script src="../assets/js/language/javascript.js" type="text/javascript"></script>
</head>

View file

@ -4,4 +4,4 @@
#
# Requires release.token and releases/<version>.md
curl https://api.github.com/repos/openscad/openscad/releases -H "Authorization: token $(<release.token>)" -d "$(./scripts/makereleasejson.py $1)"
curl https://api.github.com/repos/openscad/openscad/releases -H "Authorization: token $(<release.token)" -d "$(./scripts/makereleasejson.py $1)"

View file

@ -1,12 +1,13 @@
#!/bin/bash
#
# This script builds all library dependencies of OpenSCAD for Mac OS X.
# The libraries will be build in 64-bit mode and backwards compatible with 10.8 "Mountain Lion".
# The libraries will be build in 64-bit (and optionally 32-bit mode) mode
# and backwards compatible with 10.5 "Leopard".
#
# This script must be run from the OpenSCAD source root directory
#
# Usage: macosx-build-dependencies.sh [-16lcdf] [<package>]
# -3 Build using C++03 and libstdc++ (default is C++11 and libc++)
# Usage: macosx-build-dependencies.sh [-6lcd] [<package>]
# -6 Build only 64-bit binaries
# -l Force use of LLVM compiler
# -c Force use of clang compiler
# -d Build for deployment (if not specified, e.g. Sparkle won't be built)
@ -23,34 +24,34 @@ BASEDIR=$PWD/../libraries
OPENSCADDIR=$PWD
SRCDIR=$BASEDIR/src
DEPLOYDIR=$BASEDIR/install
MAC_OSX_VERSION_MIN=10.8
MAC_OSX_VERSION_MIN=10.7
OPTION_32BIT=false
OPTION_LLVM=false
OPTION_CLANG=false
OPTION_GCC=false
OPTION_DEPLOY=false
OPTION_FORCE=0
OPTION_CXX11=true
PACKAGES=(
"eigen 3.2.4"
"gmp 5.1.3"
"mpfr 3.1.2"
"boost 1.57.0"
"qt5 5.4.1"
"qscintilla 2.8.4"
# NB! For eigen, also update the path in the function
"eigen 3.2.8"
"gmp 6.1.1"
"mpfr 3.1.4"
"boost 1.61.0"
"qt5 5.7.0"
"qscintilla 2.9.3"
# NB! For CGAL, also update the actual download URL in the function
"cgal 4.8.1"
"glew 1.13.0"
"gettext 0.19.8"
"cgal 4.5.2"
"glew 1.12.0"
"gettext 0.19.4"
"libffi 3.2.1"
"glib2 2.50.1"
"opencsg 1.4.2"
"freetype 2.6.3"
"glib2 2.42.1"
"opencsg 1.4.0"
"freetype 2.5.5"
"ragel 6.9"
"harfbuzz 1.2.7"
"libzip 1.1.3"
"libxml2 2.9.4"
"fontconfig 2.12.0"
"harfbuzz 0.9.37"
"libxml2 2.9.2"
"fontconfig 2.11.1"
)
DEPLOY_PACKAGES=(
"sparkle 1.13.1"
@ -58,9 +59,9 @@ DEPLOY_PACKAGES=(
printUsage()
{
echo "Usage: $0 [-3lcdf] [<package>]"
echo "Usage: $0 [-6lcd] [<package>]"
echo
echo " -3 Build using C++03 and libstdc++"
echo " -6 Build only 64-bit binaries"
echo " -l Force use of LLVM compiler"
echo " -c Force use of clang compiler"
echo " -d Build for deployment"
@ -108,6 +109,7 @@ build()
build_$package $version
set +e
fi
}
# Usage: is_installed <package> [<version>]
@ -183,6 +185,9 @@ build_qt()
sed -i "" -e "s/::TabletProximityRec/TabletProximityRec/g" src/gui/kernel/qt_cocoa_helpers_mac_p.h
PLATFORM="-platform unsupported/macx-clang"
fi
if $OPTION_32BIT; then
QT_32BIT="-arch x86"
fi
case "$OSX_VERSION" in
9)
# libtiff fails in the linker step with Mavericks / XCode 5.0.1
@ -194,7 +199,7 @@ build_qt()
MACOSX_RELEASE_OPTIONS=
;;
esac
./configure -prefix $DEPLOYDIR -release -arch x86_64 -opensource -confirm-license $PLATFORM -fast -no-qt3support -no-svg -no-phonon -no-audio-backend -no-multimedia -no-javascript-jit -no-script -no-scripttools -no-declarative -no-xmlpatterns -nomake demos -nomake examples -nomake docs -nomake translations -no-webkit $MACOSX_RELEASE_OPTIONS
./configure -prefix $DEPLOYDIR -release $QT_32BIT -arch x86_64 -opensource -confirm-license $PLATFORM -fast -no-qt3support -no-svg -no-phonon -no-audio-backend -no-multimedia -no-javascript-jit -no-script -no-scripttools -no-declarative -no-xmlpatterns -nomake demos -nomake examples -nomake docs -nomake translations -no-webkit $MACOSX_RELEASE_OPTIONS
make -j"$NUMCPU" install
}
@ -216,25 +221,15 @@ build_qt5()
fi
tar xzf qt-everywhere-opensource-src-$version.tar.gz
cd qt-everywhere-opensource-src-$version
patch -d qtbase -p1 < $OPENSCADDIR/patches/qt5/QTBUG-56004.patch
patch -d qtbase -p1 < $OPENSCADDIR/patches/qt5/QTBUG-56004b.patch
if ! $USING_CXX11; then
QT_EXTRA_FLAGS="-no-c++11"
fi
CXXFLAGS="$CXXSTDFLAGS" ./configure -prefix $DEPLOYDIR $QT_EXTRA_FLAGS -release -opensource -confirm-license \
./configure -prefix $DEPLOYDIR -release -opensource -confirm-license \
-nomake examples -nomake tests \
-no-xcb -no-glib -no-harfbuzz -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc \
-no-xcb -no-c++11 -no-glib -no-harfbuzz -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc \
-no-sql-psql -no-sql-sqlite2 -no-sql-tds -no-cups -no-qml-debug \
-skip qtx11extras -skip qtandroidextras -skip qtserialport -skip qtserialbus \
-skip qtactiveqt -skip qtxmlpatterns -skip qtdeclarative -skip qtscxml \
-skip qtpurchasing -skip qtcanvas3d -skip qtgamepad -skip qtwayland \
-skip qtconnectivity -skip qtwebsockets -skip qtwebchannel -skip qtsensors \
-skip qtmultimedia -skip qtdatavis3d -skip qtcharts -skip qtwinextras \
-skip qtgraphicaleffects -skip qtquickcontrols2 -skip qtquickcontrols \
-skip qtvirtualkeyboard -skip qtlocation -skip qtwebengine -skip qtwebview \
-skip qtscript -skip qttranslations -skip qtdoc
make -j"$NUMCPU"
make install
-skip activeqt -skip connectivity -skip declarative -skip doc \
-skip enginio -skip graphicaleffects -skip location -skip multimedia \
-skip quick1 -skip quickcontrols -skip script -skip sensors -skip serialport \
-skip svg -skip webkit -skip webkit-examples -skip websockets -skip xmlpatterns
make -j"$NUMCPU" install
}
check_qscintilla()
@ -247,16 +242,15 @@ build_qscintilla()
version=$1
echo "Building QScintilla" $version "..."
cd $BASEDIR/src
rm -rf QScintilla_gpl-$version
if [ ! -f QScintilla_gpl-$version.tar.gz ]; then
curl -LO http://downloads.sourceforge.net/project/pyqt/QScintilla2/QScintilla-$version/QScintilla_gpl-$version.tar.gz
rm -rf QScintilla-gpl-$version
if [ ! -f QScintilla-gpl-$version.tar.gz ]; then
curl -LO http://downloads.sourceforge.net/project/pyqt/QScintilla2/QScintilla-$version/QScintilla-gpl-$version.tar.gz
fi
tar xzf QScintilla_gpl-$version.tar.gz
cd QScintilla_gpl-$version/Qt4Qt5
patch -p2 < $OPENSCADDIR/patches/QScintilla-2.9.3-xcode8.patch
qmake QMAKE_CXXFLAGS+="$CXXSTDFLAGS" QMAKE_LFLAGS+="$CXXSTDFLAGS" qscintilla.pro
make -j"$NUMCPU" install
install_name_tool -id @rpath/libqscintilla2.dylib $DEPLOYDIR/lib/libqscintilla2.dylib
tar xzf QScintilla-gpl-$version.tar.gz
cd QScintilla-gpl-$version/Qt4Qt5
qmake qscintilla.pro
make -j6 install
install_name_tool -id $DEPLOYDIR/lib/libqscintilla2.dylib $DEPLOYDIR/lib/libqscintilla2.dylib
}
check_gmp()
@ -264,6 +258,9 @@ check_gmp()
check_file lib/libgmp.dylib
}
# Hack warning: gmplib is built separately in 32-bit and 64-bit mode
# and then merged afterwards. gmplib's header files are dependent on
# the CPU architecture on which configure was run and will be patched accordingly.
build_gmp()
{
version=$1
@ -276,13 +273,87 @@ build_gmp()
fi
tar xjf gmp-$version.tar.bz2
cd gmp-$version
# Note: We're building against the core2 CPU profile as that's the minimum required hardware for running OS X 10.8
./configure --prefix=$DEPLOYDIR CXXFLAGS="$CXXSTDFLAGS" CFLAGS="-mmacosx-version-min=$MAC_OSX_VERSION_MIN" LDFLAGS="$LDSTDFLAGS -mmacosx-version-min=$MAC_OSX_VERSION_MIN" --enable-cxx --host=core2-apple-darwin12.0.0
make -j"$NUMCPU" install
patch -p0 gmp-h.in << EOF
--- gmp-5.1.3/gmp-h.in.old 2013-12-02 20:16:26.000000000 -0800
+++ gmp-5.1.3/gmp-h.in 2013-12-02 20:21:22.000000000 -0800
@@ -27,13 +27,38 @@
#endif
-/* Instantiated by configure. */
#if ! defined (__GMP_WITHIN_CONFIGURE)
+/* For benefit of fat builds on MacOSX, generate a .h file that can
+ * be used with a universal fat library
+ */
+#if defined(__x86_64__)
+#define __GMP_HAVE_HOST_CPU_FAMILY_power 0
+#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0
+#define GMP_LIMB_BITS 64
+#define GMP_NAIL_BITS 0
+#elif defined(__i386__)
+#define __GMP_HAVE_HOST_CPU_FAMILY_power 0
+#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0
+#define GMP_LIMB_BITS 32
+#define GMP_NAIL_BITS 0
+#elif defined(__powerpc64__)
+#define __GMP_HAVE_HOST_CPU_FAMILY_power 0
+#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 1
+#define GMP_LIMB_BITS 64
+#define GMP_NAIL_BITS 0
+#elif defined(__ppc__)
+#define __GMP_HAVE_HOST_CPU_FAMILY_power 0
+#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 1
+#define GMP_LIMB_BITS 32
+#define GMP_NAIL_BITS 0
+#else
+/* For other architectures, fall back on values computed by configure */
#define __GMP_HAVE_HOST_CPU_FAMILY_power @HAVE_HOST_CPU_FAMILY_power@
#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc @HAVE_HOST_CPU_FAMILY_powerpc@
#define GMP_LIMB_BITS @GMP_LIMB_BITS@
#define GMP_NAIL_BITS @GMP_NAIL_BITS@
#endif
+#endif
#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS)
#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS)
#define GMP_NUMB_MAX GMP_NUMB_MASK
EOF
install_name_tool -id @rpath/libgmp.dylib $DEPLOYDIR/lib/libgmp.dylib
install_name_tool -id @rpath/libgmpxx.dylib $DEPLOYDIR/lib/libgmpxx.dylib
install_name_tool -change $DEPLOYDIR/lib/libgmp.10.dylib @rpath/libgmp.dylib $DEPLOYDIR/lib/libgmpxx.dylib
if $OPTION_32BIT; then
mkdir build-i386
cd build-i386
../configure --prefix=$DEPLOYDIR/i386 "CFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch i386" LDFLAGS="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch i386" ABI=32 --enable-cxx
make install
cd ..
fi
# 64-bit version
mkdir build-x86_64
cd build-x86_64
../configure --prefix=$DEPLOYDIR/x86_64 "CFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64" LDFLAGS="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64" ABI=64 --enable-cxx
make install
# merge
cd $DEPLOYDIR
mkdir -p lib
if $OPTION_32BIT; then
lipo -create i386/lib/libgmp.dylib x86_64/lib/libgmp.dylib -output lib/libgmp.dylib
lipo -create i386/lib/libgmpxx.dylib x86_64/lib/libgmpxx.dylib -output lib/libgmpxx.dylib
else
cp x86_64/lib/libgmp.dylib lib/libgmp.dylib
cp x86_64/lib/libgmpxx.dylib lib/libgmpxx.dylib
fi
install_name_tool -id $DEPLOYDIR/lib/libgmp.dylib lib/libgmp.dylib
install_name_tool -id $DEPLOYDIR/lib/libgmpxx.dylib lib/libgmpxx.dylib
install_name_tool -change $DEPLOYDIR/x86_64/lib/libgmp.10.dylib $DEPLOYDIR/lib/libgmp.dylib lib/libgmpxx.dylib
if $OPTION_32BIT; then
cp lib/libgmp.dylib i386/lib/
cp lib/libgmp.dylib x86_64/lib/
cp lib/libgmpxx.dylib i386/lib/
cp lib/libgmpxx.dylib x86_64/lib/
fi
mkdir -p include
cp x86_64/include/gmp.h include/
cp x86_64/include/gmpxx.h include/
}
check_mpfr()
@ -292,11 +363,6 @@ check_mpfr()
# As with gmplib, mpfr is built separately in 32-bit and 64-bit mode and then merged
# afterwards.
check_mpfr()
{
check_file include/mpfr.h
}
build_mpfr()
{
version=$1
@ -309,11 +375,33 @@ build_mpfr()
fi
tar xjf mpfr-$version.tar.bz2
cd mpfr-$version
# curl -O http://www.mpfr.org/mpfr-$version/allpatches
# patch -N -Z -p1 < allpatches
if $OPTION_32BIT; then
mkdir build-i386
cd build-i386
../configure --prefix=$DEPLOYDIR/i386 --with-gmp=$DEPLOYDIR/i386 CFLAGS="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch i386" LDFLAGS="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch i386"
make install
cd ..
fi
./configure --prefix=$DEPLOYDIR --with-gmp=$DEPLOYDIR CFLAGS="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64" LDFLAGS="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64"
make -j"$NUMCPU" install
# 64-bit version
mkdir build-x86_64
cd build-x86_64
../configure --prefix=$DEPLOYDIR/x86_64 --with-gmp=$DEPLOYDIR/x86_64 CFLAGS="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64" LDFLAGS="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64"
make install
install_name_tool -id @rpath/libmpfr.dylib $DEPLOYDIR/lib/libmpfr.dylib
# merge
cd $DEPLOYDIR
if $OPTION_32BIT; then
lipo -create i386/lib/libmpfr.dylib x86_64/lib/libmpfr.dylib -output lib/libmpfr.dylib
else
cp x86_64/lib/libmpfr.dylib lib/libmpfr.dylib
fi
install_name_tool -id $DEPLOYDIR/lib/libmpfr.dylib lib/libmpfr.dylib
mkdir -p include
cp x86_64/include/mpfr.h include/
cp x86_64/include/mpf2mpfr.h include/
}
check_boost()
@ -336,6 +424,9 @@ build_boost()
cd boost_$bversion
# We only need the thread and program_options libraries
./bootstrap.sh --prefix=$DEPLOYDIR --with-libraries=thread,program_options,filesystem,chrono,system,regex
if $OPTION_32BIT; then
BOOST_EXTRA_FLAGS="-arch i386"
fi
if $USING_LLVM; then
BOOST_TOOLSET="toolset=darwin-llvm"
echo "using darwin : llvm : llvm-g++ ;" >> tools/build/user-config.jam
@ -343,7 +434,17 @@ build_boost()
BOOST_TOOLSET="toolset=clang"
echo "using clang ;" >> tools/build/user-config.jam
fi
./b2 -j"$NUMCPU" -d+2 $BOOST_TOOLSET cflags="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64 $CXXSTDFLAGS" linkflags="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64 $LDSTDFLAGS -headerpad_max_install_names" install
./b2 -j"$NUMCPU" -d+2 $BOOST_TOOLSET cflags="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64 $BOOST_EXTRA_FLAGS" linkflags="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64 $BOOST_EXTRA_FLAGS -headerpad_max_install_names" install
install_name_tool -id $DEPLOYDIR/lib/libboost_thread.dylib $DEPLOYDIR/lib/libboost_thread.dylib
install_name_tool -change libboost_system.dylib $DEPLOYDIR/lib/libboost_system.dylib $DEPLOYDIR/lib/libboost_thread.dylib
install_name_tool -change libboost_chrono.dylib $DEPLOYDIR/lib/libboost_chrono.dylib $DEPLOYDIR/lib/libboost_thread.dylib
install_name_tool -id $DEPLOYDIR/lib/libboost_program_options.dylib $DEPLOYDIR/lib/libboost_program_options.dylib
install_name_tool -id $DEPLOYDIR/lib/libboost_filesystem.dylib $DEPLOYDIR/lib/libboost_filesystem.dylib
install_name_tool -change libboost_system.dylib $DEPLOYDIR/lib/libboost_system.dylib $DEPLOYDIR/lib/libboost_filesystem.dylib
install_name_tool -id $DEPLOYDIR/lib/libboost_system.dylib $DEPLOYDIR/lib/libboost_system.dylib
install_name_tool -id $DEPLOYDIR/lib/libboost_regex.dylib $DEPLOYDIR/lib/libboost_regex.dylib
}
check_cgal()
@ -358,11 +459,9 @@ build_cgal()
echo "Building CGAL" $version "..."
cd $BASEDIR/src
rm -rf CGAL-$version
if [ ! -f CGAL-$version.tar.xz ]; then
# 4.8
curl -LO https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-$version/CGAL-$version.tar.xz
# 4.6.3 curl -O https://gforge.inria.fr/frs/download.php/file/35138/CGAL-$version.tar.gz
# 4.5.2 curl -O https://gforge.inria.fr/frs/download.php/file/34512/CGAL-$version.tar.gz
if [ ! -f CGAL-$version.tar.gz ]; then
# 4.5.2
curl -O https://gforge.inria.fr/frs/download.php/file/34512/CGAL-$version.tar.gz
# 4.5.1 curl -O https://gforge.inria.fr/frs/download.php/file/34400/CGAL-$version.tar.gz
# 4.5 curl -O https://gforge.inria.fr/frs/download.php/file/34149/CGAL-$version.tar.gz
# 4.4 curl -O https://gforge.inria.fr/frs/download.php/file/33525/CGAL-$version.tar.gz
@ -376,14 +475,17 @@ build_cgal()
# 3.8 curl -O https://gforge.inria.fr/frs/download.php/28500/CGAL-$version.tar.gz
# 3.7 curl -O https://gforge.inria.fr/frs/download.php/27641/CGAL-$version.tar.gz
fi
tar xzf CGAL-$version.tar.xz
tar xzf CGAL-$version.tar.gz
cd CGAL-$version
CXXFLAGS="$CXXSTDFLAGS" cmake -DCMAKE_INSTALL_PREFIX=$DEPLOYDIR -DGMP_INCLUDE_DIR=$DEPLOYDIR/include -DGMP_LIBRARIES=$DEPLOYDIR/lib/libgmp.dylib -DGMPXX_LIBRARIES=$DEPLOYDIR/lib/libgmpxx.dylib -DGMPXX_INCLUDE_DIR=$DEPLOYDIR/include -DMPFR_INCLUDE_DIR=$DEPLOYDIR/include -DMPFR_LIBRARIES=$DEPLOYDIR/lib/libmpfr.dylib -DWITH_CGAL_Qt3=OFF -DWITH_CGAL_Qt4=OFF -DWITH_CGAL_ImageIO=OFF -DBUILD_SHARED_LIBS=TRUE -DCMAKE_OSX_DEPLOYMENT_TARGET="$MAC_OSX_VERSION_MIN" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DBOOST_ROOT=$DEPLOYDIR -DBoost_USE_MULTITHREADED=false
if $OPTION_32BIT; then
CGAL_EXTRA_FLAGS=";i386"
fi
cmake -DCMAKE_INSTALL_PREFIX=$DEPLOYDIR -DGMP_INCLUDE_DIR=$DEPLOYDIR/include -DGMP_LIBRARIES=$DEPLOYDIR/lib/libgmp.dylib -DGMPXX_LIBRARIES=$DEPLOYDIR/lib/libgmpxx.dylib -DGMPXX_INCLUDE_DIR=$DEPLOYDIR/include -DMPFR_INCLUDE_DIR=$DEPLOYDIR/include -DMPFR_LIBRARIES=$DEPLOYDIR/lib/libmpfr.dylib -DWITH_CGAL_Qt3=OFF -DWITH_CGAL_Qt4=OFF -DWITH_CGAL_ImageIO=OFF -DBUILD_SHARED_LIBS=TRUE -DCMAKE_OSX_DEPLOYMENT_TARGET="$MAC_OSX_VERSION_MIN" -DCMAKE_OSX_ARCHITECTURES="x86_64$CGAL_EXTRA_FLAGS" -DBOOST_ROOT=$DEPLOYDIR -DBoost_USE_MULTITHREADED=false
make -j"$NUMCPU" install
make install
install_name_tool -id @rpath/libCGAL.dylib $DEPLOYDIR/lib/libCGAL.dylib
install_name_tool -id @rpath/libCGAL_Core.dylib $DEPLOYDIR/lib/libCGAL_Core.dylib
install_name_tool -change libCGAL.11.dylib @rpath/libCGAL.dylib $DEPLOYDIR/lib/libCGAL_Core.dylib
install_name_tool -id $DEPLOYDIR/lib/libCGAL.dylib $DEPLOYDIR/lib/libCGAL.dylib
install_name_tool -id $DEPLOYDIR/lib/libCGAL_Core.dylib $DEPLOYDIR/lib/libCGAL_Core.dylib
install_name_tool -change $PWD/lib/libCGAL.9.dylib $DEPLOYDIR/lib/libCGAL.dylib $DEPLOYDIR/lib/libCGAL_Core.dylib
}
check_glew()
@ -404,7 +506,10 @@ build_glew()
tar xzf glew-$version.tgz
cd glew-$version
mkdir -p $DEPLOYDIR/lib/pkgconfig
make GLEW_DEST=$DEPLOYDIR CC=$CC CFLAGS.EXTRA="-no-cpp-precomp -dynamic -fno-common -mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64" LDFLAGS.EXTRA="-install_name @rpath/libGLEW.dylib -mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64" POPT="-Os" STRIP= install
if $OPTION_32BIT; then
GLEW_EXTRA_FLAGS="-arch i386"
fi
make GLEW_DEST=$DEPLOYDIR CC=$CC CFLAGS.EXTRA="-no-cpp-precomp -dynamic -fno-common -mmacosx-version-min=$MAC_OSX_VERSION_MIN $GLEW_EXTRA_FLAGS -arch x86_64" LDFLAGS.EXTRA="-mmacosx-version-min=$MAC_OSX_VERSION_MIN $GLEW_EXTRA_FLAGS -arch x86_64" STRIP= install
}
check_opencsg()
@ -425,9 +530,11 @@ build_opencsg()
tar xzf OpenCSG-$version.tar.gz
cd OpenCSG-$version
patch -p1 < $OPENSCADDIR/patches/OpenCSG-$version-MacOSX-port.patch
qmake -r INSTALLDIR=$DEPLOYDIR
if $OPTION_32BIT; then
OPENCSG_EXTRA_FLAGS="x86"
fi
qmake -r QMAKE_CXXFLAGS+="-I$DEPLOYDIR/include" QMAKE_LFLAGS+="-L$DEPLOYDIR/lib" CONFIG+="x86_64 $OPENCSG_EXTRA_FLAGS" DESTDIR=$DEPLOYDIR
make install
install_name_tool -id @rpath/libopencsg.dylib $DEPLOYDIR/lib/libopencsg.dylib
}
# Usage: func [<version>]
@ -460,10 +567,8 @@ build_eigen()
elif [ $version = "3.2.2" ]; then EIGENDIR=eigen-eigen-1306d75b4a21;
elif [ $version = "3.2.3" ]; then EIGENDIR=eigen-eigen-36fd1ba04c12;
elif [ $version = "3.2.4" ]; then EIGENDIR=eigen-eigen-10219c95fe65;
elif [ $version = "3.2.6" ]; then EIGENDIR=eigen-eigen-c58038c56923;
elif [ $version = "3.2.8" ]; then EIGENDIR=eigen-eigen-07105f7124f9;
fi
fi
if [ $EIGENDIR = "none" ]; then
echo Unknown eigen version. Please edit script.
exit 1
@ -479,7 +584,10 @@ build_eigen()
cd eigen-$version
mkdir build
cd build
CXXFLAGS="$CXXSTDFLAGS" cmake -DCMAKE_INSTALL_PREFIX=$DEPLOYDIR -DEIGEN_TEST_NOQT=TRUE -DCMAKE_OSX_DEPLOYMENT_TARGET="$MAC_OSX_VERSION_MIN" -DCMAKE_OSX_ARCHITECTURES="x86_64" ..
if $OPTION_32BIT; then
EIGEN_EXTRA_FLAGS=";i386"
fi
cmake -DCMAKE_INSTALL_PREFIX=$DEPLOYDIR -DEIGEN_TEST_NOQT=TRUE -DCMAKE_OSX_DEPLOYMENT_TARGET="$MAC_OSX_VERSION_MIN" -DCMAKE_OSX_ARCHITECTURES="x86_64$EIGEN_EXTRA_FLAGS" ..
make -j"$NUMCPU" install
}
@ -491,7 +599,6 @@ check_sparkle()
# Usage:
# build_sparkle <githubuser>:<commitID>
# build_sparkle <version>
build_sparkle()
{
# Binary install:
@ -556,32 +663,8 @@ build_freetype()
PKG_CONFIG_LIBDIR="$DEPLOYDOR/lib/pkgconfig" ./configure --prefix="$DEPLOYDIR" CFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN LDFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN $extra_config_flags
make -j"$NUMCPU"
make install
install_name_tool -id $DEPLOYDIR/lib/libfreetype.dylib $DEPLOYDIR/lib/libfreetype.dylib
}
check_libzip()
{
check_file lib/libzip.dylib
}
build_libzip()
{
version="$1"
echo "Building libzip $version..."
cd "$BASEDIR"/src
rm -rf "libzip-$version"
if [ ! -f "libxml2-$version.tar.gz" ]; then
curl --insecure -LO "https://nih.at/libzip/libzip-1.1.3.tar.gz"
fi
tar xzf "libzip-$version.tar.gz"
cd "libzip-$version"
./configure --prefix="$DEPLOYDIR" CFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN LDFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN
make -j$NUMCPU
make install
install_name_tool -id @rpath/libzip.dylib $DEPLOYDIR/lib/libzip.dylib
}
check_libxml2()
{
check_file lib/libxml2.dylib
@ -599,10 +682,9 @@ build_libxml2()
fi
tar xzf "libxml2-$version.tar.gz"
cd "libxml2-$version"
./configure --prefix="$DEPLOYDIR" --with-zlib=/usr --without-lzma --without-ftp --without-http --without-python CFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN LDFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN
./configure --prefix="$DEPLOYDIR" --with-zlib=/usr -without-lzma --without-ftp --without-http --without-python CFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN LDFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN
make -j$NUMCPU
make install
install_name_tool -id $DEPLOYDIR/lib/libxml2.dylib $DEPLOYDIR/lib/libxml2.dylib
}
check_fontconfig()
@ -627,7 +709,6 @@ build_fontconfig()
unset PKG_CONFIG_PATH
make -j$NUMCPU
make install
install_name_tool -id @rpath/libfontconfig.dylib $DEPLOYDIR/lib/libfontconfig.dylib
}
check_libffi()
@ -650,7 +731,6 @@ build_libffi()
./configure --prefix="$DEPLOYDIR"
make -j$NUMCPU
make install
install_name_tool -id @rpath/libffi.dylib $DEPLOYDIR/lib/libffi.dylib
}
check_gettext()
@ -671,10 +751,9 @@ build_gettext()
tar xzf "gettext-$version.tar.gz"
cd "gettext-$version"
./configure --with-included-glib --prefix="$DEPLOYDIR" CFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN LDFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN
./configure --prefix="$DEPLOYDIR" CFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN LDFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN
make -j$NUMCPU
make install
install_name_tool -id $DEPLOYDIR/lib/libintl.dylib $DEPLOYDIR/lib/libintl.dylib
}
check_glib2()
@ -698,11 +777,10 @@ build_glib2()
cd "glib-$version"
export PKG_CONFIG_PATH="$DEPLOYDIR/lib/pkgconfig"
./configure --disable-gtk-doc --disable-man --without-pcre --prefix="$DEPLOYDIR" CFLAGS="-I$DEPLOYDIR/include -mmacosx-version-min=$MAC_OSX_VERSION_MIN" LDFLAGS="-L$DEPLOYDIR/lib -mmacosx-version-min=$MAC_OSX_VERSION_MIN"
./configure --disable-gtk-doc --disable-man --prefix="$DEPLOYDIR" CFLAGS="-I$DEPLOYDIR/include -mmacosx-version-min=$MAC_OSX_VERSION_MIN" LDFLAGS="-L$DEPLOYDIR/lib -mmacosx-version-min=$MAC_OSX_VERSION_MIN"
unset PKG_CONFIG_PATH
make -j$NUMCPU
make install
install_name_tool -id @rpath/libglib-2.0.dylib $DEPLOYDIR/lib/libglib-2.0.dylib
}
check_ragel()
@ -749,10 +827,9 @@ build_harfbuzz()
# disable doc directories as they make problems on Mac OS Build
sed -e "s/SUBDIRS = src util test docs/SUBDIRS = src util test/g" Makefile.am > Makefile.am.bak && mv Makefile.am.bak Makefile.am
sed -e "s/^docs.*$//" configure.ac > configure.ac.bak && mv configure.ac.bak configure.ac
PKG_CONFIG_LIBDIR="$DEPLOYDIR/lib/pkgconfig" ./autogen.sh --prefix="$DEPLOYDIR" --with-freetype=yes --with-gobject=no --with-cairo=no --with-icu=no CFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN CXXFLAGS="$CXXFLAGS -mmacosx-version-min=$MAC_OSX_VERSION_MIN" LDFLAGS="$CXXFLAGS -mmacosx-version-min=$MAC_OSX_VERSION_MIN" $extra_config_flags
PKG_CONFIG_LIBDIR="$DEPLOYDIR/lib/pkgconfig" ./autogen.sh --prefix="$DEPLOYDIR" --with-freetype=yes --with-gobject=no --with-cairo=no --with-icu=no CFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN CXXFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN LDFLAGS=-mmacosx-version-min=$MAC_OSX_VERSION_MIN $extra_config_flags
make -j$NUMCPU
make install
install_name_tool -id @rpath/libharfbuzz.dylib $DEPLOYDIR/lib/libharfbuzz.dylib
}
if [ ! -f $OPENSCADDIR/openscad.pro ]; then
@ -761,10 +838,10 @@ if [ ! -f $OPENSCADDIR/openscad.pro ]; then
fi
OPENSCAD_SCRIPTDIR=$PWD/scripts
while getopts '3lcdf' c
while getopts '6lcdf' c
do
case $c in
3) USING_CXX11=false;;
6) OPTION_32BIT=false;;
l) OPTION_LLVM=true;;
c) OPTION_CLANG=true;;
d) OPTION_DEPLOY=true;;
@ -776,22 +853,25 @@ done
OPTION_PACKAGES="${@:$OPTIND}"
OSX_VERSION=`sw_vers -productVersion | cut -d. -f2`
if (( $OSX_VERSION >= 11 )); then
echo "Detected El Capitan (10.11) or later"
elif (( $OSX_VERSION >= 10 )); then
if (( $OSX_VERSION >= 10 )); then
echo "Detected Yosemite (10.10) or later"
elif (( $OSX_VERSION >= 9 )); then
echo "Detected Mavericks (10.9)"
elif (( $OSX_VERSION >= 8 )); then
echo "Detected Mountain Lion (10.8)"
elif (( $OSX_VERSION >= 7 )); then
echo "Detected Lion (10.7)"
else
echo "Detected Lion (10.7) or earlier"
echo "Detected Snow Leopard (10.6) or earlier"
fi
USING_LLVM=false
USING_GCC=false
USING_CLANG=false
if $OPTION_LLVM; then
USING_LLVM=true
elif $OPTION_GCC; then
USING_GCC=true
elif $OPTION_CLANG; then
USING_CLANG=true
elif (( $OSX_VERSION >= 7 )); then
@ -803,20 +883,20 @@ if $USING_LLVM; then
export CC=llvm-gcc
export CXX=llvm-g++
export QMAKESPEC=macx-llvm
elif $USING_GCC; then
echo "Using gcc compiler"
export CC=gcc
export CXX=g++
export CPP=cpp
# Somehow, qmake in Qt-4.8.2 doesn't detect Lion's gcc and falls back into
# project file mode unless manually given a QMAKESPEC
export QMAKESPEC=macx-llvm
elif $USING_CLANG; then
echo "Using clang compiler"
export CC=clang
export CXX=clang++
fi
if $USING_CXX11; then
export CXXSTDFLAGS="-std=c++11 -stdlib=libc++"
export LDSTDFLAGS="-stdlib=libc++"
else
export CXXSTDFLAGS="-std=c++03 -stdlib=libstdc++"
export LDSTDFLAGS="-stdlib=libstdc++"
fi
echo "Building for $MAC_OSX_VERSION_MIN or later"
if [ ! $NUMCPU ]; then
@ -828,6 +908,12 @@ if $OPTION_DEPLOY; then
echo "Building deployment version of libraries"
fi
if $OPTION_32BIT; then
echo "Building combined 32/64-bit binaries"
else
echo "Building 64-bit binaries"
fi
if (( $OPTION_FORCE )); then
echo "Forcing rebuild"
fi
@ -843,7 +929,6 @@ fi
# Build specified (or all) packages
ALL_PACKAGES=$(all_packages)
echo $ALL_PACKAGES
if [ -z "$OPTION_PACKAGES" ]; then
OPTION_PACKAGES=$ALL_PACKAGES
fi

View file

@ -1,23 +1,33 @@
#!/bin/bash
#!/bin/sh -e
#
# This script builds library dependencies of OpenSCAD for Mac OS X using Homebrew.
# This script builds all library dependencies of OpenSCAD for Mac OS X.
# The libraries will be built in 64-bit mode and backwards compatible with 10.7 "Lion".
#
# This script must be run from the OpenSCAD source root directory
#
# Usage: macosx-build-dependencies.sh [-d]
# -d Build for deployment (if not specified, e.g. Sparkle won't be built)
#
# Prerequisites:
# - Homebrew (http://brew.sh)
# - Xcode
#
# FIXME:
# o Verbose option
# o Force rebuild vs. only rebuild changes
#
OPENSCADDIR=$PWD
BASEDIR=$OPENSCADDIR/../libraries
DEPLOYDIR=$BASEDIR/homebrew
MAC_OSX_VERSION_MIN=10.7
OPTION_DEPLOY=false
printUsage()
{
echo "Usage: $0"
}
log()
{
echo "$(date):" "$@"
echo "Usage: $0 [-d]"
echo
echo " -d Build for deployment"
}
if [ ! -f $OPENSCADDIR/openscad.pro ]; then
@ -25,34 +35,38 @@ if [ ! -f $OPENSCADDIR/openscad.pro ]; then
exit 0
fi
log "Listing homebrew configuration"
brew config
while getopts 'd' c
do
case $c in
d) OPTION_DEPLOY=true;;
esac
done
log "Updating homebrew"
brew update
# Install special packages not yet in upstream homebrew repo.
# Check if there's already an active openscad tap and skip
# tap/untap in that case.
TAP=:
if ! brew tap | grep ^openscad/ >/dev/null 2>/dev/null
then
log "Tapping openscad homebrew repo"
TAP=brew
OSX_VERSION=`sw_vers -productVersion | cut -d. -f2`
if (( $OSX_VERSION >= 9 )); then
echo "Detected Mavericks (10.9) or later"
elif (( $OSX_VERSION >= 8 )); then
echo "Detected Mountain Lion (10.8)"
elif (( $OSX_VERSION >= 7 )); then
echo "Detected Lion (10.7)"
else
echo "Detected Snow Leopard (10.6) or earlier"
fi
$TAP tap openscad/homebrew-tap
# FIXME: We used to require unlinking boost, but doing so also causes us to lose boost.
# Disabling until we can figure out why we unlinked in the first place
# brew unlink boost
for formula in eigen boost cgal glew glib opencsg freetype libzip libxml2 fontconfig harfbuzz qt5 qscintilla2 imagemagick; do
log "Installing formula $formula"
brew ls --versions $formula
time brew install $formula
echo "Building for $MAC_OSX_VERSION_MIN or later"
echo "Using basedir:" $BASEDIR
# Homebrew doesn't support building for other OS X versions than the current,
# but we can do this with environment variables
export MACOSX_DEPLOYMENT_TARGET=$MAC_OSX_VERSION_MIN
# Don't use bottles, as they might be built with the wrong deployment target
export HOMEBREW_BUILD_FROM_SOURCE=1
for formula in qt5 eigen boost cgal glew glib opencsg freetype libxml2 fontconfig harfbuzz; do
brew install openscad/tap/$formula
done
for formula in gettext qt5 qscintilla2; do
log "Linking formula $formula"
brew link --force $formula
done
$TAP untap openscad/homebrew-tap
if $OPTION_DEPLOY; then
brew install --HEAD openscad/tap/sparkle
fi

View file

@ -30,26 +30,29 @@ def usage():
# Returns the full path to the library or None if the library is not found.
def lookup_library(file):
found = None
if re.search("@rpath", file):
file = re.sub("^@rpath", lc_rpath, file)
if os.path.exists(file): found = file
if DEBUG: print "@rpath resolved: " + str(file)
if not found:
if re.search("\.app/", file):
found = file
if DEBUG: print "App found: " + str(found)
elif re.search("@executable_path", file):
abs = re.sub("^@executable_path", executable_path, file)
if os.path.exists(abs): found = abs
if DEBUG: print "Lib in @executable_path found: " + str(found)
elif re.search("\.framework/", file):
found = os.path.join("/Library/Frameworks", file)
if DEBUG: print "Framework found: " + str(found)
else:
for path in os.getenv("DYLD_LIBRARY_PATH").split(':'):
abs = os.path.join(path, file)
if not re.match("/", file):
if re.search("@rpath", file):
file = re.sub("^@rpath", lc_rpath, file)
if os.path.exists(file): found = file
if DEBUG: print "Lib in @rpath found: " + str(file)
if (not found):
if re.search("@executable_path", file):
abs = re.sub("^@executable_path", executable_path, file)
if os.path.exists(abs): found = abs
if DEBUG: print "Library found: " + str(found)
if DEBUG: print "Lib in @executable_path found: " + str(found)
elif re.search("\.app/", file):
found = file
if DEBUG: print "App found: " + str(found)
elif re.search("\.framework/", file):
found = os.path.join("/Library/Frameworks", file)
if DEBUG: print "Framework found: " + str(found)
else:
for path in os.getenv("DYLD_LIBRARY_PATH").split(':'):
abs = os.path.join(path, file)
if os.path.exists(abs): found = abs
if DEBUG: print "Library found: " + str(found)
else:
found = file
return found
# Returns a list of dependent libraries, excluding system libs
@ -91,7 +94,7 @@ def validate_lib(lib):
# Check deployment target
m = re.search("LC_VERSION_MIN_MACOSX.*\n(.*)\n\s+version (.*)", output, re.MULTILINE)
deploymenttarget = float(m.group(2))
if deploymenttarget > 10.8:
if deploymenttarget > 10.7:
print "Error: Unsupported deployment target " + m.group(2) + " found: " + lib
return False
# We don't support Snow Leopard anymore
@ -160,6 +163,7 @@ if __name__ == '__main__':
for dep in processed:
if DEBUG: print "Validating: " + dep
# print " " + str(processed[dep])
if not validate_lib(dep):
print "..required by " + str(processed[dep])
error = True

View file

@ -76,16 +76,16 @@ git checkout openscad-snapshot-build
if [ "`echo $* | grep 64`" ]; then
MXE_TARGETS='x86_64-w64-mingw32.static'
if [ "`echo $* | grep download`" ]; then
PACKAGES='download-mpfr download-eigen download-opencsg download-cgal download-qtbase download-glib download-libxml2 download-freetype download-fontconfig download-harfbuzz'
PACKAGES='download-mpfr download-eigen download-opencsg download-cgal download-qtbase download-glib download-freetype download-fontconfig download-harfbuzz'
else
PACKAGES='qtbase qscintilla2 mpfr eigen opencsg cgal glib libxml2 freetype fontconfig harfbuzz'
PACKAGES='qtbase qscintilla2 mpfr eigen opencsg cgal glib freetype fontconfig harfbuzz'
fi
else
MXE_TARGETS='i686-w64-mingw32.static'
if [ "`echo $* | grep download`" ]; then
PACKAGES='download-mpfr download-eigen download-opencsg download-cgal download-qtbase download-nsis download-glib download-libxml2 download-freetype download-fontconfig download-harfbuzz'
PACKAGES='download-mpfr download-eigen download-opencsg download-cgal download-qtbase download-nsis download-glib download-freetype download-fontconfig download-harfbuzz'
else
PACKAGES='qtbase qscintilla2 mpfr eigen opencsg cgal nsis glib libxml2 freetype fontconfig harfbuzz'
PACKAGES='qtbase qscintilla2 mpfr eigen opencsg cgal nsis glib freetype fontconfig harfbuzz'
fi
fi
echo make $PACKAGES MXE_TARGETS=$MXE_TARGETS -j $NUMCPU JOBS=$NUMJOBS

View file

@ -72,17 +72,16 @@ elif [[ $OSTYPE == "linux-gnu" ]]; then
echo "Detected build-machine ARCH: $ARCH"
fi
if [ "`echo $* | grep mingw`" ]; then
if [ "`echo $* | grep mingw32`" ]; then
OS=UNIX_CROSS_WIN
ARCH=32
MXELIBTYPE=static
if [ "`echo $* | grep mingw64`" ]; then
ARCH=64
fi
if [ "`echo $* | grep shared`" ]; then
MXELIBTYPE=shared
fi
echo Mingw-cross build using ARCH=$ARCH MXELIBTYPE=$MXELIBTYPE
echo Mingw-cross build using ARCH=32
fi
if [ "`echo $* | grep mingw64`" ]; then
OS=UNIX_CROSS_WIN
ARCH=64
echo Mingw-cross build using ARCH=64
fi
if [ "`echo $* | grep snapshot`" ]; then
@ -180,7 +179,7 @@ case $OS in
QT_SELECT=5
export QT_SELECT
;;
WIN)
WIN)
export QTDIR=/c/devmingw/qt2009.03
export QTMAKESPEC=win32-g++
export PATH=$PATH:/c/devmingw/qt2009.03/bin:/c/devmingw/qt2009.03/qt/bin
@ -188,8 +187,8 @@ case $OS in
ZIPARGS="a -tzip"
TARGET=release
;;
UNIX_CROSS_WIN)
. ./scripts/setenv-mingw-xbuild.sh $ARCH $MXELIBTYPE
UNIX_CROSS_WIN)
. ./scripts/setenv-mingw-xbuild.sh $ARCH
TARGET=release
ZIP="zip"
ZIPARGS="-r -q"
@ -199,12 +198,7 @@ esac
case $OS in
UNIX_CROSS_WIN)
cd $DEPLOYDIR
MINGWCONFIG=mingw-cross-env
if [ $MXELIBTYPE = "shared" ]; then
MINGWCONFIG=mingw-cross-env-shared
fi
qmake VERSION=$VERSION OPENSCAD_COMMIT=$OPENSCAD_COMMIT CONFIG+="$CONFIG" CONFIG+=$MINGWCONFIG CONFIG-=debug ../openscad.pro
cd $DEPLOYDIR && qmake VERSION=$VERSION OPENSCAD_COMMIT=$OPENSCAD_COMMIT CONFIG+="$CONFIG" CONFIG+=mingw-cross-env CONFIG-=debug ../openscad.pro
cd $OPENSCADDIR
;;
*)
@ -431,78 +425,9 @@ case $OS in
INSTFILE=$DEPLOYDIR/OpenSCAD-$VERSION-x86-$ARCH-Installer.exe
#package
if [ $MXELIBTYPE = "shared" ]; then
flprefix=$DEPLOYDIR/mingw-cross-env/bin
echo Copying dlls for shared library build
echo from $flprefix
echo to $DEPLOYDIR/$TARGET
flist=
# fl="$fl opengl.dll" # use Windows version?
# fl="$fl libmpfr.dll" # does not exist
fl="$fl libgmp-10.dll"
fl="$fl libgmpxx-4.dll"
fl="$fl libboost_filesystem-mt.dll"
fl="$fl libboost_program_options-mt.dll"
fl="$fl libboost_regex-mt.dll"
fl="$fl libboost_chrono-mt.dll"
fl="$fl libboost_system-mt.dll"
fl="$fl libboost_thread_win32-mt.dll"
fl="$fl libCGAL.dll"
fl="$fl libCGAL_Core.dll"
fl="$fl GLEW.dll"
fl="$fl libglib-2.0-0.dll"
fl="$fl libopencsg-1.dll"
fl="$fl libharfbuzz-0.dll"
# fl="$fl libharfbuzz-gobject-0.dll" # ????
fl="$fl libfontconfig-1.dll"
fl="$fl libexpat-1.dll"
fl="$fl libbz2.dll"
fl="$fl libintl-8.dll"
fl="$fl libiconv-2.dll"
fl="$fl libfreetype-6.dll"
fl="$fl libpcre16-0.dll"
fl="$fl zlib1.dll"
fl="$fl libpng16-16.dll"
fl="$fl icudt54.dll"
fl="$fl icudt.dll"
fl="$fl icuin.dll"
fl="$fl libstdc++-6.dll"
fl="$fl ../qt5/lib/qscintilla2.dll"
fl="$fl ../qt5/bin/Qt5PrintSupport.dll"
fl="$fl ../qt5/bin/Qt5Core.dll"
fl="$fl ../qt5/bin/Qt5Gui.dll"
fl="$fl ../qt5/bin/Qt5OpenGL.dll"
# fl="$fl ../qt5/bin/QtSvg4.dll" # why is this here?
fl="$fl ../qt5/bin/Qt5Widgets.dll"
fl="$fl ../qt5/bin/Qt5PrintSupport.dll"
fl="$fl ../qt5/bin/Qt5PrintSupport.dll"
for dllfile in $fl; do
if [ -e $flprefix/$dllfile ]; then
echo $flprefix/$dllfile
cp $flprefix/$dllfile $DEPLOYDIR/$TARGET/
else
echo cannot find $flprefix/$dllfile
echo stopping build.
exit 1
fi
done
fi
echo "Copying main binary .exe, .com, and dlls"
echo "from $DEPLOYDIR/$TARGET"
echo "to $DEPLOYDIR/openscad-$VERSION"
TMPTAR=$DEPLOYDIR/tmpmingw.$ARCH.$MXELIBTYPE.tar
cd $DEPLOYDIR
cd $TARGET
tar cvf $TMPTAR --exclude=winconsole.o .
cd $DEPLOYDIR
cd ./openscad-$VERSION
tar xvf $TMPTAR
cd $DEPLOYDIR
rm -f $TMPTAR
echo "Creating binary zip package"
cp $TARGET/openscad.exe openscad-$VERSION
cp $TARGET/openscad.com openscad-$VERSION
rm -f OpenSCAD-$VERSION.x86-$ARCH.zip
"$ZIP" $ZIPARGS $BINFILE openscad-$VERSION
cd $OPENSCADDIR

View file

@ -4,12 +4,10 @@
#
# Usage:
#
# source ./scripts/setenv-mingw-xbuild.sh # 32 bit build
# source ./scripts/setenv-mingw-xbuild.sh shared # 32 bit build, shared libs
# source ./scripts/setenv-mingw-xbuild.sh 64 # 64 bit build
# source ./scripts/setenv-mingw-xbuild.sh 64 shared # 64 bit build, shared libs
# source ./scripts/setenv-mingw-xbuild.sh clean # Clean up exported variables
# source ./scripts/setenv-mingw-xbuild.sh qt5 # use qt5 (experimental)
# source ./scripts/setenv-mingw-xbuild.sh # 32 bit build
# source ./scripts/setenv-mingw-xbuild.sh 64 # 64 bit build
# source ./scripts/setenv-mingw-xbuild.sh clean # Clean up exported variables
# source ./scripts/setenv-mingw-xbuild.sh qt5 # use qt5 (experimental)
#
# Prerequisites:
#
@ -24,14 +22,8 @@ if [ ! $BASEDIR ]; then
BASEDIR=$HOME/openscad_deps
fi
MXELIBTYPE=static
if [ "`echo $* | grep shared `" ]; then
MXELIBTYPE=shared
fi
DEPLOYDIR64=$OPENSCADDIR/mingw64.$MXELIBTYPE
DEPLOYDIR32=$OPENSCADDIR/mingw32.$MXELIBTYPE
DEPLOYDIR64=$OPENSCADDIR/mingw64.static
DEPLOYDIR32=$OPENSCADDIR/mingw32.static
if [ ! $DEPLOYDIR ]; then
if [ "`echo $* | grep 64 `" ]; then
@ -43,7 +35,7 @@ fi
if [ ! $MXEDIR ]; then
if [ "`echo $* | grep 64 `" ]; then
MXEDIR=$BASEDIR/mxe
MXEDIR=$BASEDIR/mxe-w64
else
MXEDIR=$BASEDIR/mxe
fi
@ -69,9 +61,9 @@ if [ ! -e $DEPLOYDIR ]; then
fi
if [ "`echo $* | grep 64 `" ]; then
MXETARGETDIR=$MXEDIR/usr/x86_64-w64-mingw32.$MXELIBTYPE
MXETARGETDIR=$MXEDIR/usr/x86_64-w64-mingw32.static
else
MXETARGETDIR=$MXEDIR/usr/i686-w64-mingw32.$MXELIBTYPE
MXETARGETDIR=$MXEDIR/usr/i686-w64-mingw32.static
fi
if [ ! $MINGWX_SAVED_ORIGINAL_PATH ]; then
@ -104,7 +96,6 @@ export OPENSCAD_LIBRARIES
export BASEDIR
export MXEDIR
export MXETARGETDIR
export MXELIBTYPE
export DEPLOYDIR
export PATH
export MINGWX_SAVED_ORIGINAL_PATH
@ -114,7 +105,6 @@ echo OPENSCAD_LIBRARIES: $OPENSCAD_LIBRARIES
echo BASEDIR: $BASEDIR
echo MXEDIR: $MXEDIR
echo MXETARGETDIR: $MXETARGETDIR
echo MXELIBTYPE: $MXELIBTYPE
echo DEPLOYDIR: $DEPLOYDIR
echo MXEQTSUBDIR: $MXEQTSUBDIR
if [ "`echo $* | grep clean`" ]; then

View file

@ -25,9 +25,6 @@ updatepot()
| awk '{ printf "#: examples/examples.json:%d\nmsgid %s\nmsgstr \"\"\n\n", $1, $2 }' \
> ./locale/json-strings.pot
# extract strings from appdata file
itstool -o ./locale/appdata-strings.pot ./openscad.appdata.xml.in --its=./contrib/appdata.its
VER=`date +"%Y.%m.%d"`
OPTS=
OPTS=$OPTS' --package-name=OpenSCAD'
@ -44,7 +41,7 @@ updatepot()
exit 1
fi
cmd="${GETTEXT_PATH}msgcat -o ./locale/openscad.pot ./locale/openscad-tmp.pot ./locale/json-strings.pot ./locale/appdata-strings.pot"
cmd="${GETTEXT_PATH}msgcat -o ./locale/openscad.pot ./locale/openscad-tmp.pot ./locale/json-strings.pot"
echo $cmd
$cmd
if [ ! $? = 0 ]; then
@ -53,7 +50,7 @@ updatepot()
fi
sed -e s/"CHARSET"/"UTF-8"/g ./locale/openscad.pot > ./locale/openscad.pot.new && mv ./locale/openscad.pot.new ./locale/openscad.pot
rm -f ./locale/json-strings.pot ./locale/openscad-tmp.pot ./locale/appdata-strings.pot
rm -f ./locale/json-strings.pot ./locale/openscad-tmp.pot
}
updatepo()
@ -83,26 +80,6 @@ updatemo()
exit 1
fi
done
if which itstool > /dev/null 2>&1; then
# ugly workaround for bug https://bugs.freedesktop.org/show_bug.cgi?id=90937
for LANGCODE in `cat locale/LINGUAS | grep -v "#"`; do
ln -s openscad.mo ./locale/$LANGCODE/LC_MESSAGES/$LANGCODE.mo
done
# generate translated appdata file
itstool -j ./openscad.appdata.xml.in -o ./openscad.appdata.xml ./locale/*/LC_MESSAGES/[a-z][a-z].mo
# clean the mess
for LANGCODE in `cat locale/LINGUAS | grep -v "#"`; do
unlink ./locale/$LANGCODE/LC_MESSAGES/$LANGCODE.mo
done
else
if [ x"$(uname -s)" = x"Linux" ]; then
echo "itstool missing, won't apply translations to openscad.appdata.xml"
fi
cp -f ./openscad.appdata.xml.in ./openscad.appdata.xml
fi
}
GETTEXT_PATH=""

View file

@ -1,10 +1,5 @@
#!/bin/bash
set -x
qmake CONFIG+=experimental CONFIG+=nogui
make
cd tests
cmake .
if [[ $? != 0 ]]; then
@ -16,24 +11,12 @@ if [[ $? != 0 ]]; then
echo "Error building test suite"
exit 1
fi
if [[ "$DIST" == "trusty" ]]; then
PARALLEL=-j1
else
PARALLEL=-j8
fi
# Exclude tests known the cause issues on Travis
# opencsgtest_rotate_extrude-tests - Fails on Ubuntu 12.04 using Gallium 0.4 drivers
# *_text-font-direction-tests - Fails due to old freetype (issue #899)
# opencsgtest_text-font-direction-tests - Fails due to old freetype (issue #899)
# throwntogethertest_issue964 - Fails due to non-planar quad being tessellated slightly different
# opencsgtest_issue1165 - z buffer tearing
# Fails on Apple's software renderer:
# opencsgtest_issue1258
# throwntogethertest_issue1089
# throwntogethertest_issue1215
ctest $PARALLEL -E "\
ctest -j8 -E "\
opencsgtest_rotate_extrude-tests|\
opencsgtest_render-tests|\
opencsgtest_rotate_extrude-hole|\
@ -49,13 +32,9 @@ dxfpngtest_text-font-direction-tests|\
cgalpngtest_text-font-direction-tests|\
opencsgtest_text-font-direction-tests|\
csgpngtest_text-font-direction-tests|\
svgpngtest_text-font-direction-tests|\
throwntogethertest_text-font-direction-tests|\
throwntogethertest_issue964|\
opencsgtest_issue1165|\
opencsgtest_issue1258|\
throwntogethertest_issue1089|\
throwntogethertest_issue1215\
opencsgtest_issue1165\
"
if [[ $? != 0 ]]; then
echo "Test failure"

View file

@ -79,22 +79,10 @@ check_env()
detect_glu()
{
detect_glu_result=
if [ -e $DEPLOYDIR/include/GL/glu.h ]; then
detect_glu_include=$DEPLOYDIR/include
detect_glu_result=1;
fi
if [ -e /usr/include/GL/glu.h ]; then
detect_glu_include=/usr/include
detect_glu_result=1;
fi
if [ -e /usr/local/include/GL/glu.h ]; then
detect_glu_include=/usr/local/include
detect_glu_result=1;
fi
if [ -e /usr/pkg/X11R7/include/GL/glu.h ]; then
detect_glu_include=/usr/pkg/X11R7/include
detect_glu_result=1;
fi
if [ -e $DEPLOYDIR/include/GL/glu.h ]; then detect_glu_result=1; fi
if [ -e /usr/include/GL/glu.h ]; then detect_glu_result=1; fi
if [ -e /usr/local/include/GL/glu.h ]; then detect_glu_result=1; fi
if [ -e /usr/pkg/X11R7/include/GL/glu.h ]; then detect_glu_result=1; fi
return
}
@ -183,37 +171,14 @@ build_qt5scintilla2()
echo "Building Qt5Scintilla2" $version "..."
cd $BASEDIR/src
rm -rf ./QScintilla-gpl-$version.tar.gz
#rm -rf QScintilla-gpl-$version.tar.gz
if [ ! -f QScintilla-gpl-$version.tar.gz ]; then
curl -L -o "QScintilla-gpl-$version.tar.gz" "http://downloads.sourceforge.net/project/pyqt/QScintilla2/QScintilla-$version/QScintilla-gpl-$version.tar.gz?use_mirror=switch"
fi
tar xzf QScintilla-gpl-$version.tar.gz
cd QScintilla-gpl-$version/Qt4Qt5/
qmake CONFIG+=staticlib
tmpinstalldir=$DEPLOYDIR/tmp/qsci$version
INSTALL_ROOT=$tmpinstalldir make -j"$NUMCPU" install
if [ -d $tmpinstalldir/usr/share ]; then
cp -av $tmpinstalldir/usr/share $DEPLOYDIR/
cp -av $tmpinstalldir/usr/include $DEPLOYDIR/
cp -av $tmpinstalldir/usr/lib $DEPLOYDIR/
fi
if [ ! -e $DEPLOYDIR/include/Qsci ]; then
# workaround numerous bugs in qscintilla build system, see
# ../qscintilla2.prf and ../scintilla.pri for more info
qsci_staticlib=`find $tmpinstalldir -name libqscintilla2.a`
qsci_include=`find $tmpinstalldir -name Qsci`
if [ -e $qsci_staticlib ]; then
cp -av $qsci_include $DEPLOYDIR/include/
cp -av $qsci_staticlib $DEPLOYDIR/lib/
else
echo problems finding built qscintilla libraries and include headers
fi
if [ -e $DEPLOYDIR/lib/libqscintilla2.a ]; then
cp $DEPLOYDIR/lib/libqscintilla2.a $DEPLOYDIR/lib/libqt5scintilla2.a
fi
fi
make -j"$NUMCPU" install
}
build_bison()
@ -400,8 +365,6 @@ build_cgal()
echo "Building CGAL" $version "..."
cd $BASEDIR/src
rm -rf CGAL-$version
ver4_8="curl -L --insecure -O https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.8/CGAL-4.8.tar.xz"
ver4_7="curl -L --insecure -O https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.7/CGAL-4.7.tar.gz"
ver4_4="curl --insecure -O https://gforge.inria.fr/frs/download.php/file/33524/CGAL-4.4.tar.bz2"
ver4_2="curl --insecure -O https://gforge.inria.fr/frs/download.php/32360/CGAL-4.2.tar.bz2"
ver4_1="curl --insecure -O https://gforge.inria.fr/frs/download.php/31640/CGAL-4.1.tar.bz2"
@ -419,9 +382,6 @@ build_cgal()
if [ -e CGAL-$version.tar.bz2 ]; then
download_cmd=vernull;
fi
if [ -e CGAL-$version.tar.xz ]; then
download_cmd=vernull;
fi
eval echo "$"$download_cmd
`eval echo "$"$download_cmd`
@ -432,10 +392,6 @@ build_cgal()
zipper=bzip2
suffix=bz2
fi
if [ -e CGAL-$version.tar.xz ]; then
zipper=xz
suffix=xz
fi
$zipper -f -d CGAL-$version.tar.$suffix;
tar xf CGAL-$version.tar
@ -444,10 +400,8 @@ build_cgal()
# older cmakes have buggy FindBoost that can result in
# finding the system libraries but OPENSCAD_LIBRARIES include paths
# NB! This was removed 2015-12-02 - if this problem resurfaces, fix it only for the relevant platforms as this
# messes up more recent installations of cmake and CGAL.
# FINDBOOST_CMAKE=$OPENSCAD_SCRIPTDIR/../tests/FindBoost.cmake
# cp $FINDBOOST_CMAKE ./cmake/modules/
FINDBOOST_CMAKE=$OPENSCAD_SCRIPTDIR/../tests/FindBoost.cmake
cp $FINDBOOST_CMAKE ./cmake/modules/
mkdir bin
cd bin
@ -551,20 +505,10 @@ build_opencsg()
cp opencsg.pro opencsg.pro.bak
cat opencsg.pro.bak | sed s/example// > opencsg.pro
detect_glu
GLU_INCLUDE=$detect_glu_include
if [ ! $detect_glu_result ]; then
build_glu 9.0.0
fi
if [ "`command -v qmake-qt4`" ]; then
OPENCSG_QMAKE=qmake-qt4
elif [ "`command -v qmake4`" ]; then
OPENCSG_QMAKE=qmake4
elif [ "`command -v qmake-qt5`" ]; then
OPENCSG_QMAKE=qmake-qt5
elif [ "`command -v qmake5`" ]; then
OPENCSG_QMAKE=qmake5
elif [ "`command -v qmake`" ]; then
OPENCSG_QMAKE=qmake
else
@ -574,18 +518,15 @@ build_opencsg()
cp src/Makefile src/Makefile.bak
cat Makefile.bak | sed s/example// |sed s/glew// > Makefile
cat src/Makefile.bak | sed s@^INCPATH.*@INCPATH\ =\ -I$BASEDIR/include\ -I../include\ -I..\ -I$GLU_INCLUDE -I.@ > src/Makefile
cat src/Makefile.bak | sed s@^INCPATH.*@INCPATH\ =\ -I$BASEDIR/include\ -I../include\ -I..\ -I.@ > src/Makefile
cp src/Makefile src/Makefile.bak2
cat src/Makefile.bak2 | sed s@^LIBS.*@LIBS\ =\ -L$BASEDIR/lib\ -L/usr/X11R6/lib\ -lGLU\ -lGL@ > src/Makefile
tmp=$version
detect_glu
if [ ! $detect_glu_result ]; then build_glu 9.0.0 ; fi
version=$tmp
fi
if [ ! $OPENCSG_QMAKE = "make" ]; then
OPENCSG_QMAKE=$OPENCSG_QMAKE' "QMAKE_CXXFLAGS+=-I'$GLU_INCLUDE'"'
fi
echo OPENCSG_QMAKE: $OPENCSG_QMAKE
cd $BASEDIR/src/OpenCSG-$version/src
$OPENCSG_QMAKE
@ -785,8 +726,7 @@ mkdir -p $SRCDIR $DEPLOYDIR
# they are installed under $BASEDIR/bin which we have added to our PATH
if [ ! "`command -v curl`" ]; then
# to prevent "end of file" NSS error -5938 (ssl) use a newer version of curl
build_curl 7.49.0
build_curl 7.26.0
fi
if [ ! "`command -v bison`" ]; then
@ -821,10 +761,6 @@ if [ $1 ]; then
build_qt4 4.8.4
exit $?
fi
if [ $1 = "qt5scintilla2" ]; then
build_qt5scintilla2 2.8.3
exit $?
fi
if [ $1 = "qt5" ]; then
build_qt5 5.3.1
build_qt5scintilla2 2.8.3
@ -840,11 +776,6 @@ if [ $1 ]; then
build_gettext 0.18.3.1
exit $?
fi
if [ $1 = "harfbuzz" ]; then
# debian 7 lacks only harfbuzz
build_harfbuzz 0.9.35 --with-glib=yes
exit $?
fi
if [ $1 = "glib2" ]; then
# such a huge build, put here by itself
build_pkgconfig 0.28
@ -868,21 +799,21 @@ fi
# Some of these are defined in scripts/common-build-dependencies.sh
build_eigen 3.2.2
build_gmp 6.0.0
build_gmp 5.0.5
build_mpfr 3.1.1
build_boost 1.56.0
# NB! For CGAL, also update the actual download URL in the function
build_cgal 4.7
build_cgal 4.4
build_glew 1.9.0
build_opencsg 1.3.2
build_gettext 0.18.3.1
build_glib2 2.38.2
# the following are only needed for text()
build_freetype 2.6.1 --without-png
build_freetype 2.5.0.1 --without-png
build_libxml2 2.9.1
build_fontconfig 2.11.0 --with-add-fonts=/usr/X11R6/lib/X11/fonts,/usr/local/share/fonts
build_ragel 6.9
build_harfbuzz 0.9.35 --with-glib=yes
build_harfbuzz 0.9.23 --with-glib=yes
echo "OpenSCAD dependencies built and installed to " $BASEDIR

View file

@ -4,27 +4,13 @@
# this assumes you have sudo installed and running, or are running as root.
#
get_fedora_deps_yum()
get_fedora_deps()
{
yum -y install qt5-qtbase-devel bison flex eigen3-devel harfbuzz-devel \
fontconfig-devel freetype-devel \
boost-devel mpfr-devel gmp-devel glew-devel CGAL-devel gcc gcc-c++ pkgconfig \
opencsg-devel git libXmu-devel curl imagemagick ImageMagick glib2-devel make \
xorg-x11-server-Xvfb gettext qscintilla-devel qscintilla-qt5-devel \
mesa-dri-drivers
}
get_fedora_deps_dnf()
{
dnf -y install qt5-qtbase-devel bison flex eigen3-devel harfbuzz-devel \
fontconfig-devel freetype-devel \
boost-devel mpfr-devel gmp-devel glew-devel CGAL-devel gcc gcc-c++ pkgconfig \
opencsg-devel git libXmu-devel curl ImageMagick glib2-devel make \
xorg-x11-server-Xvfb gettext qscintilla-devel qscintilla-qt5-devel \
mesa-dri-drivers
dnf -y install libxml2-devel
dnf -y install libffi-devel
dnf -y install redhat-rpm-config
xorg-x11-server-Xvfb gettext
}
get_qomo_deps()
@ -57,13 +43,8 @@ get_netbsd_deps()
get_opensuse_deps()
{
zypper install libeigen3-devel mpfr-devel gmp-devel boost-devel \
libqt4-devel glew-devel cmake git bison flex cgal-devel curl \
glib2-devel gettext freetype-devel harfbuzz-devel libqscintilla-devel \
xvfb-run imagemagick opencsg-devel
echo if you are missing opencsg, please add the -graphics- repository
echo find your version from cat /etc/issue, then replace it below, then run
echo " zypper ar -f http://download.opensuse.org/repositories/graphics/openSUSE_13.2 graphics"
echo " zypper install opencsg-devel"
libqt4-devel glew-devel cmake git bison flex cgal-devel opencsg-devel curl \
glib2-devel gettext
}
get_mageia_deps()
@ -77,98 +58,12 @@ get_mageia_deps()
get_debian_deps()
{
apt-get -y install \
build-essential curl libffi-dev \
build-essential curl libffi-dev qtbase5-dev libqt5scintilla2-dev \
libxmu-dev cmake bison flex git-core libboost-all-dev \
libmpfr-dev libboost-dev libglew-dev \
libXi-dev libmpfr-dev libboost-dev libglew-dev \
libeigen3-dev libcgal-dev libopencsg-dev libgmp3-dev libgmp-dev \
imagemagick libfreetype6-dev \
gtk-doc-tools libglib2.0-dev gettext xvfb pkg-config ragel
apt-get -y install libXi-dev libfontconfig-dev
}
get_debian_7_deps()
{
get_debian_deps
apt-get -y install libqt4-dev libqscintilla2-dev
echo "debian 7 detected"
echo "please build harfbuzz & see the README on building dependencies"
echo ". ./scripts/setenv-unibuild.sh"
echo "./scripts/uni-build-dependencies.sh harfbuzz"
}
get_qt4or5_deps_debian()
{
# debian 8 can have both qt4 and qt5 installed... or neither. figure out which
# and cater to it.
useqt=5
if [ "`dpkg --list | grep qt5-default`" ]; then
useqt=5
elif [ "`dpkg --list | grep qt4-default`" ]; then
useqt=4
elif [ "`echo QT_SELECT | grep ^4`" ]; then
useqt=4
elif [ "`echo QT_SELECT | grep qt4`" ]; then
useqt=4
elif [ "`echo QT_SELECT | grep ^5`" ]; then
useqt=5
elif [ "`echo QT_SELECT | grep qt5`" ]; then
useqt=5
elif [ ! "`command -v qtchooser`" ]; then
useqt=5
elif [ "`qtchooser -l | grep qt5`" ]; then
useqt=5
elif [ ! "`qtchooser -l | grep qt4`" ]; then
useqt=5
elif [ ! "`command -v qmake`" ]; then
useqt=5
elif [ "`qmake --version | grep -i qt.version.4`" ]; then
useqt=4
fi
if [ $useqt = 5 ]; then
apt-get -y install qtbase5-dev libqt5scintilla2-dev libqt5opengl5-dev qt5-qmake
else
apt-get -y install libqt4-dev libqscintilla2-dev libqt4-opengl-dev
fi
if [ ! "`command -v qmake`" ]; then
apt-get -y install qt$useqt-default
echo "installed qt$useqt-default to enable qmake"
elif [ ! "`qmake --version | grep qmake.version`" ]; then
apt-get -y install qt$useqt-default
echo "installed qt$useqt-default to enable qmake"
fi
}
get_debian_8_deps()
{
apt-get -y install libharfbuzz-dev libxml2-dev
get_debian_deps
get_qt4or5_deps_debian
}
get_ubuntu_14_deps()
{
get_debian_8_deps
}
get_ubuntu_16_deps()
{
apt-get -y install libxi-dev libxml2-dev libfontconfig1-dev
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804539
apt-get -y install libcgal-qt5-dev
get_debian_8_deps
}
get_neon_deps()
{
get_debian_deps
apt-get -y install libxi-dev libxml2-dev libfontconfig1-dev
apt-get -y install libharfbuzz-dev libxml2-dev
# qt5 scintilla is broken on kde neon. use qt4 # issue 1790
apt-get -y install libcgal-dev
apt-get -y install libqt4-dev libqscintilla2-dev libqt4-opengl-dev
echo on KDE Neon please use qmake-qt4 to build
imagemagick libfontconfig-dev libfreetype6-dev \
libharfbuzz-dev gtk-doc-tools libglib2.0-dev gettext
}
unknown()
@ -178,48 +73,24 @@ unknown()
}
if [ -e /etc/issue ]; then
if [ "`grep -i ubuntu.1[4-5] /etc/issue`" ]; then
get_ubuntu_14_deps
elif [ "`grep -i ubuntu.1[6-9] /etc/issue`" ]; then
get_ubuntu_16_deps
elif [ "`grep -i KDE.neon /etc/issue`" ]; then
get_neon_deps
elif [ "`grep -i ubuntu /etc/issue`" ]; then
if [ "`grep -i ubuntu /etc/issue`" ]; then
get_debian_deps
elif [ "`grep -i elementary.*freya /etc/issue`" ]; then
get_ubuntu_14_deps
elif [ "`grep -i debian.GNU.Linux.7 /etc/issue`" ]; then
get_debian_7_deps
elif [ "`grep -i debian /etc/issue`" ]; then
get_debian_8_deps
get_debian_deps
elif [ "`grep -i raspbian /etc/issue`" ]; then
get_debian_deps
elif [ "`grep -i linux.mint.2 /etc/issue`" ]; then
get_ubuntu_14_deps
elif [ "`grep -i linux.mint.1[789] /etc/issue`" ]; then
get_ubuntu_14_deps
elif [ "`grep -i mint /etc/issue`" ]; then
get_debian_7_deps
elif [ "`grep -i suse /etc/issue`" ]; then
get_opensuse_deps
elif [ "`grep -i fedora.release.2[2-9] /etc/issue`" ]; then
get_fedora_deps_dnf
elif [ "`grep -i fedora.release.[3-9][0-9] /etc/issue`" ]; then
get_fedora_deps_dnf
elif [ "`grep -i fedora.release.2[0-1] /etc/issue`" ]; then
get_fedora_deps_yum
elif [ "`grep -i fedora /etc/issue`" ]; then
get_fedora_deps_yum
get_fedora_deps
elif [ "`grep -i red.hat /etc/issue`" ]; then
get_fedora_deps
elif [ "`grep -i mageia /etc/issue`" ]; then
get_mageia_deps
elif [ "`grep -i qomo /etc/issue`" ]; then
get_qomo_deps
elif [ -e /etc/fedora-release ]; then
if [ "`grep -i fedora.release /etc/fedora-release`" ]; then
get_fedora_deps_dnf
fi
elif [ "`command -v rpm`" ]; then
if [ "`rpm -qa | grep altlinux`" ]; then
get_altlinux_deps

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<description>OpenSCAD</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="asInvoker"
uiAccess="false"
/>
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
</application>
</compatibility>
</assembly>

11
setenv_mac-gcc.sh Normal file
View file

@ -0,0 +1,11 @@
export OPENSCAD_LIBRARIES=$PWD/../libraries/install
export DYLD_LIBRARY_PATH=$OPENSCAD_LIBRARIES/lib
export DYLD_FRAMEWORK_PATH=$OPENSCAD_LIBRARIES/lib
export QMAKESPEC=macx-g++
# Our own Qt
export PATH=$OPENSCAD_LIBRARIES/bin:$PATH
# ccache:
export PATH=/opt/local/libexec/ccache:$PATH
export CCACHE_BASEDIR=$PWD/..

11
setenv_mac-homebrew.sh Executable file
View file

@ -0,0 +1,11 @@
export OPENSCAD_LIBRARIES=$PWD/../libraries/homebrew
export DYLD_LIBRARY_PATH=$OPENSCAD_LIBRARIES/lib
export DYLD_FRAMEWORK_PATH=$OPENSCAD_LIBRARIES/lib
export QMAKESPEC=unsupported/macx-clang
# Our own Qt
export PATH=$OPENSCAD_LIBRARIES/bin:$PATH
# ccache:
export PATH=/opt/local/libexec/ccache:$PATH
export CCACHE_BASEDIR=$PWD/..

11
setenv_mac-qt4.sh Normal file
View file

@ -0,0 +1,11 @@
export OPENSCAD_LIBRARIES=$PWD/../libraries/install-qt4
export DYLD_LIBRARY_PATH=$OPENSCAD_LIBRARIES/lib
export DYLD_FRAMEWORK_PATH=$OPENSCAD_LIBRARIES/lib
export QMAKESPEC=unsupported/macx-clang
# Our own Qt
export PATH=$OPENSCAD_LIBRARIES/bin:$PATH
# ccache:
export PATH=/opt/local/libexec/ccache:$PATH
export CCACHE_BASEDIR=$PWD/..

View file

@ -1,5 +1,4 @@
export OPENSCAD_LIBRARIES=$PWD/../libraries/install
export PKG_CONFIG_PATH=$OPENSCAD_LIBRARIES/lib/pkgconfig
export DYLD_LIBRARY_PATH=$OPENSCAD_LIBRARIES/lib
export DYLD_FRAMEWORK_PATH=$OPENSCAD_LIBRARIES/lib

View file

@ -1,3 +0,0 @@
#include "AST.h"
Location Location::NONE(0, 0, 0, 0);

View file

@ -1,34 +0,0 @@
#pragma once
class Location {
public:
Location(int firstLine, int firstCol, int lastLine, int lastCol)
: first_line(firstLine), first_col(firstCol), last_line(lastLine), last_col(lastCol) {
}
int firstLine() const { return first_line; }
int firstColumn() const { return first_col; }
int lastLine() const { return last_line; }
int lastColumn() const { return last_col; }
static Location NONE;
private:
int first_line;
int first_col;
int last_line;
int last_col;
};
class ASTNode
{
public:
ASTNode(const Location &loc) : loc(loc) {}
virtual ~ASTNode() {}
const Location &location() const { return loc; }
void setLocation(const Location &loc) { this->loc = loc; }
protected:
Location loc;
};

View file

@ -1,6 +1,5 @@
#include "AppleEvents.h"
#include <AppleEvents.h>
#include <MacTypes.h>
#include <AssertMacros.h>
#include <CoreServices/CoreServices.h>
#include <QApplication>
#include "MainWindow.h"
@ -13,7 +12,7 @@ OSErr eventHandler(const AppleEvent *, AppleEvent *, SRefCon )
{
// FIXME: Ugly hack; just using the first MainWindow we can find
MainWindow *mainwin = NULL;
for (auto &w : QApplication::topLevelWidgets()) {
foreach (QWidget *w, QApplication::topLevelWidgets()) {
mainwin = qobject_cast<MainWindow*>(w);
if (mainwin) break;
}

View file

@ -1,34 +0,0 @@
#pragma once
#include <string>
#include <vector>
#include <utility>
#include "value.h"
#include "AST.h"
#include "memory.h"
#include "annotation.h"
class Assignment : public ASTNode
{
public:
Assignment(std::string name, const Location &loc)
: ASTNode(loc), name(name) { }
Assignment(std::string name,
shared_ptr<class Expression> expr = shared_ptr<class Expression>(),
const Location &loc = Location::NONE)
: ASTNode(loc), name(name), expr(expr) { }
std::string name;
shared_ptr<class Expression> expr;
virtual void addAnnotations(AnnotationList *annotations);
virtual bool hasAnnotations() const;
virtual const Annotation *annotation(const std::string &name) const;
protected:
AnnotationMap annotations;
};
typedef std::vector<Assignment> AssignmentList;

View file

@ -1,42 +0,0 @@
#pragma once
#include <iostream>
// FIXME: Default constructor Response()
enum Response {ContinueTraversal, AbortTraversal, PruneTraversal};
class BaseVisitor
{
public:
virtual ~BaseVisitor() {}
};
template <class T>
class Visitor
{
public:
virtual Response visit(class State &state, const T&) = 0;
};
class BaseVisitable
{
public:
virtual ~BaseVisitable() {}
virtual Response accept(class State&, BaseVisitor&) const = 0;
protected:
template <class T>
static Response acceptImpl(class State &state, const T &node, BaseVisitor &visitor) {
if (Visitor<T> *p = dynamic_cast<Visitor<T>*>(&visitor)) {
return p->visit(state, node);
}
// FIXME: If we want to allow for missing nodes in visitors, we need
// to handle it here, e.g. by calling some handler.
// See e.g. page 225 of Alexandrescu's "Modern C++ Design"
return AbortTraversal;
}
};
#define VISITABLE() \
virtual Response accept(class State &state, BaseVisitor &visitor) const { \
return acceptImpl(state, *this, visitor); \
}

View file

@ -109,7 +109,7 @@ void CGALRenderer::draw(bool showfaces, bool showedges) const
glBegin(GL_POLYGON);
for (size_t j=0; j < this->polyset->polygons[i].size(); j++) {
const Vector3d &p = this->polyset->polygons[i][j];
glVertex3d(p[0], p[1], 0);
glVertex3d(p[0], p[1], -0.1);
}
glEnd();
}

View file

@ -93,7 +93,7 @@ PolySet *CGAL_Nef_polyhedron::convertToPolyset() const
}
#endif
void CGAL_Nef_polyhedron::resize(const Vector3d &newsize,
void CGAL_Nef_polyhedron::resize(Vector3d newsize,
const Eigen::Matrix<bool,3,1> &autosize)
{
// Based on resize() in Giles Bathgate's RapCAD (but not exactly)

Some files were not shown because too many files have changed in this diff Show more