summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README24
-rw-r--r--cgal.pri16
-rw-r--r--opencsg.pri19
-rw-r--r--openscad.pro133
-rw-r--r--openscad.qrc6
-rw-r--r--openscad_win32.rc2
6 files changed, 121 insertions, 79 deletions
diff --git a/README b/README
index 175331f..86669bb 100644
--- a/README
+++ b/README
@@ -3,7 +3,7 @@ WHAT IS IT?
===========
OpenSCAD is a software for creating solid 3D CAD objects. It is free software
-and available for Linux/UNIX, MS Windows and Apples OS X.
+and available for Linux/UNIX, MS Windows and Mac OS X.
Unlike most free software for creating 3D models (such as the famous
application Blender) it does not focus on the artistic aspects of 3D modelling
@@ -16,7 +16,7 @@ OpenSCAD is not an interactive modeller. Instead it is something like a
3D-compiler that reads in a script file that describes the object and renders
the 3D model from this script file (see examples below). This gives you (the
designer) full control over the modelling process and enables you to easily
-change any step in the modelling process or make designes that are defined by
+change any step in the modelling process or make designs that are defined by
configurable parameters.
OpenSCAD provides two main modelling techniques: First there is constructive
@@ -30,14 +30,14 @@ STL and OFF file formats.
PREREQUISITES
=============
-To build OpenSCAD, you need some libraries and tools. The version numbers in
-brakets specify the versions I have used for my tests. Other versions may or
-may not work as well..
+To build OpenSCAD, you need some libraries and tools. The version
+numbers in brackets specify the versions which have been used for
+development. Other versions may or may not work as well..
-* Qt4 (4.5.1):
+* Qt4 (4.4 - 4.6):
http://www.qtsoftware.com/
-* CGAL (3.4):
+* CGAL (3.4, 3.5):
http://www.cgal.org/
* boost (1.35, required by CGAL)
@@ -46,13 +46,13 @@ may not work as well..
* cmake (2.6.2, required by CGAL)
http://www.cmake.org/
-* OpenCSG (1.1.0):
+* OpenCSG (1.1 - 1.2):
http://www.opencsg.org/
* GLEW (bundled with OpenCSG)
http://glew.sourceforge.net/
-* GCC C++ Compiler (4.3.1):
+* GCC C++ Compiler (4.0, 4.2, 4.3.1):
http://gcc.gnu.org/
* Bison (2.4):
@@ -68,12 +68,12 @@ BUILDING OPENSCAD
First, run 'qmake' from Qt4 to generate a Makefile. On some systems you need to
run 'qmake4', 'qmake-qt4' or something alike to run the qt4 version of the tool.
-Then run make. Finnaly you might run 'make install' as root or simply copy the
-'openscad' binary to to bin directory of your choice.
+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.
DOCUMENTATION
=============
-Hava a look at the OpenSCAD Homepage (http://openscad.org/) for documentation.
+Have a look at the OpenSCAD Homepage (http://openscad.org/) for documentation.
diff --git a/cgal.pri b/cgal.pri
new file mode 100644
index 0000000..fd58779
--- /dev/null
+++ b/cgal.pri
@@ -0,0 +1,16 @@
+cgal {
+# Uncomment this to enable experimental CGAL tesselation
+# DEFINES += CGAL_TESSELATE
+ DEFINES += ENABLE_CGAL
+ LIBS += -lCGAL
+ macx {
+ INCLUDEPATH += $(PWD)/../install/include /opt/local/include
+ # The -L/usr/lib is to force the linker to use system libraries over MacPort libraries
+ LIBS += -L/usr/lib -L$(PWD)/../install/lib -L/opt/local/lib /opt/local/lib/libgmp.a /opt/local/lib/libmpfr.a /opt/local/lib/libboost_thread-mt.a
+ }
+ else {
+ LIBS += -lmpfr
+ }
+ win32:LIBS += -lboost_thread -lgmp
+ QMAKE_CXXFLAGS += -frounding-math
+}
diff --git a/opencsg.pri b/opencsg.pri
new file mode 100644
index 0000000..3b54f0f
--- /dev/null
+++ b/opencsg.pri
@@ -0,0 +1,19 @@
+opencsg {
+ DEFINES += ENABLE_OPENCSG
+ LIBS += -lopencsg
+ unix:LIBS += -lGLEW
+ win32:LIBS += -lglew32
+
+ # Optionally specify location of OpenCSG using the
+ # OPENCSGDIR env. variable
+ OPENCSG_DIR = $(OPENCSGDIR)
+ !isEmpty(OPENCSG_DIR) {
+ INCLUDEPATH += $$OPENCSG_DIR/include
+ LIBS += -L$$OPENCSG_DIR/lib
+ }
+ macx {
+ # For glew
+ INCLUDEPATH += /opt/local/include
+ LIBS += -L/opt/local/lib
+ }
+}
diff --git a/openscad.pro b/openscad.pro
index 0e3fccd..2ed0447 100644
--- a/openscad.pro
+++ b/openscad.pro
@@ -3,9 +3,15 @@ DEFINES += OPENSCAD_VERSION=$$VERSION
TEMPLATE = app
RESOURCES = openscad.qrc
+OBJECTS_DIR = objects
+MOC_DIR = objects
+UI_DIR = objects
+RCC_DIR = objects
+INCLUDEPATH += src
+
macx {
TARGET = OpenSCAD
- ICON = OpenSCAD.icns
+ ICON = icons/OpenSCAD.icns
QMAKE_INFO_PLIST = Info.plist
#CONFIG += x86 ppc
}
@@ -30,44 +36,8 @@ mdi {
DEFINES += ENABLE_MDI
}
-cgal {
-# Uncomment this to enable experimental CGAL tesselation
-# DEFINES += CGAL_TESSELATE
- DEFINES += ENABLE_CGAL
- LIBS += -lCGAL
- macx {
- INCLUDEPATH += $(PWD)/../install/include /opt/local/include
- # The -L/usr/lib is to force the linker to use system libraries over MacPort libraries
- LIBS += -L/usr/lib -L$(PWD)/../install/lib -L/opt/local/lib /opt/local/lib/libgmp.a /opt/local/lib/libmpfr.a /opt/local/lib/libboost_thread-mt.a
- }
- else {
- LIBS += -lmpfr
- }
- win32:LIBS += -lboost_thread -lgmp
- QMAKE_CXXFLAGS += -frounding-math
-}
-
-opencsg {
- DEFINES += ENABLE_OPENCSG
- LIBS += -lopencsg
- unix:LIBS += -lGLEW
- win32:LIBS += -lglew32
-
- # Optionally specify location of OpenCSG using the
- # OPENCSGDIR env. variable
- OPENCSG_DIR = $(OPENCSGDIR)
- !isEmpty(OPENCSG_DIR) {
- INCLUDEPATH += $$OPENCSG_DIR/include
- LIBS += -L$$OPENCSG_DIR/lib
- }
- macx {
- # For glew
- INCLUDEPATH += /opt/local/include
- LIBS += -L/opt/local/lib
- }
-}
-
-include(qtcolorbutton/qtcolorbutton.pri)
+include(cgal.pri)
+include(opencsg.pri)
QMAKE_CXXFLAGS_RELEASE = -O3 -march=pentium
QMAKE_CXXFLAGS_DEBUG = -O0 -ggdb
@@ -76,30 +46,67 @@ QMAKE_CXXFLAGS_DEBUG = -O0 -ggdb
# QMAKE_CXXFLAGS += -pg
# QMAKE_LFLAGS += -pg
-LEXSOURCES += lexer.l
-YACCSOURCES += parser.y
-
-FORMS += MainWindow.ui \
- Preferences.ui
-
-HEADERS += openscad.h \
- MainWindow.h \
- Preferences.h \
- GLView.h \
- printutils.h \
- CGAL_renderer.h
-
-macx: HEADERS += EventFilter.h
-
-SOURCES += openscad.cc mainwin.cc glview.cc export.cc \
- value.cc expr.cc func.cc module.cc context.cc \
- csgterm.cc polyset.cc csgops.cc transform.cc \
- primitives.cc surface.cc control.cc render.cc \
- import.cc dxfdata.cc dxftess.cc dxftess-glu.cc \
- dxftess-cgal.cc dxfdim.cc \
- dxflinextrude.cc dxfrotextrude.cc highlighter.cc \
- printutils.cc nef2dxf.cc \
- Preferences.cc
+
+
+LEXSOURCES += src/lexer.l
+YACCSOURCES += src/parser.y
+
+FORMS += src/MainWindow.ui \
+ src/Preferences.ui
+
+HEADERS += src/CGAL_renderer.h \
+ src/GLView.h \
+ src/MainWindow.h \
+ src/Preferences.h \
+ src/builtin.h \
+ src/cgal.h \
+ src/context.h \
+ src/csgterm.h \
+ src/dxfdata.h \
+ src/dxfdim.h \
+ src/dxftess.h \
+ src/export.h \
+ src/expression.h \
+ src/function.h \
+ src/grid.h \
+ src/highlighter.h \
+ src/module.h \
+ src/node.h \
+ src/openscad.h \
+ src/polyset.h \
+ src/printutils.h \
+ src/value.h
+
+SOURCES += src/openscad.cc \
+ src/mainwin.cc \
+ src/glview.cc \
+ src/export.cc \
+ src/value.cc \
+ src/expr.cc \
+ src/func.cc \
+ src/module.cc \
+ src/node.cc \
+ src/context.cc \
+ src/csgterm.cc \
+ src/polyset.cc \
+ src/csgops.cc \
+ src/transform.cc \
+ src/primitives.cc \
+ src/surface.cc \
+ src/control.cc \
+ src/render.cc \
+ src/import.cc \
+ src/dxfdata.cc \
+ src/dxftess.cc \
+ src/dxftess-glu.cc \
+ src/dxftess-cgal.cc \
+ src/dxfdim.cc \
+ src/dxflinextrude.cc \
+ src/dxfrotextrude.cc \
+ src/highlighter.cc \
+ src/printutils.cc \
+ src/nef2dxf.cc \
+ src/Preferences.cc
target.path = /usr/local/bin/
INSTALLS += target
diff --git a/openscad.qrc b/openscad.qrc
index 54f9bf1..80b5934 100644
--- a/openscad.qrc
+++ b/openscad.qrc
@@ -1,7 +1,7 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/">
- <file>prefsAdvanced.png</file>
- <file>prefs3DView.png</file>
- <file>prefsEditor.png</file>
+ <file>icons/prefsAdvanced.png</file>
+ <file>icons/prefs3DView.png</file>
+ <file>icons/prefsEditor.png</file>
</qresource>
</RCC>
diff --git a/openscad_win32.rc b/openscad_win32.rc
index 916fc8a..2f9783a 100644
--- a/openscad_win32.rc
+++ b/openscad_win32.rc
@@ -32,6 +32,6 @@ VS_VERSION_INFO VERSIONINFO
END
/* End of Version info */
-IDI_ICON1 ICON DISCARDABLE "openscad.ico"
+IDI_ICON1 ICON DISCARDABLE "icons/openscad.ico"
contact: Jan Huwald // Impressum