Merge remote-tracking branch 'origin/master' into gsoc2016-refactored
This commit is contained in:
commit
abdfdf7e9a
15 changed files with 85 additions and 34 deletions
|
|
@ -26,8 +26,8 @@ notifications:
|
|||
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 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 lib3mf-dev ; fi
|
||||
- if [[ "$DIST" == "precise" ]]; then 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 ; fi
|
||||
- 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 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 ; 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
|
||||
|
||||
branches:
|
||||
|
|
|
|||
40
README.md
40
README.md
|
|
@ -136,14 +136,16 @@ After building dependencies, follow the instructions in the *Compilation* sectio
|
|||
1. **From source**
|
||||
|
||||
Run the script that sets up the environment variables:
|
||||
```source setenv_mac.sh```
|
||||
|
||||
source setenv_mac.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)
|
||||
|
||||
```./scripts/macosx-build-homebrew.sh```
|
||||
./scripts/macosx-build-homebrew.sh
|
||||
|
||||
1. **MacPorts** (assumes [MacPorts](http://macports.org) is already installed)
|
||||
|
||||
|
|
@ -151,10 +153,10 @@ Then run the script to compile all the dependencies:
|
|||
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
|
@ -204,30 +206,34 @@ 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 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.
|
||||
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
|
||||
|
||||
source ./scripts/setenv-mingw-xbuild.sh 32
|
||||
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
|
||||
|
||||
Then run the script to download & compile all the prerequisite libraries above:
|
||||
|
||||
./scripts/mingw-x-build-dependencies.sh 32
|
||||
./scripts/mingw-x-build-dependencies.sh 64
|
||||
|
||||
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:
|
||||
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:
|
||||
|
||||
./scripts/release-common.sh mingw32
|
||||
./scripts/release-common.sh mingw64
|
||||
|
||||
If you wish you can only build the openscad.exe binary:
|
||||
|
||||
cd mingw32
|
||||
cd mingw64
|
||||
qmake ../openscad.pro CONFIG+=mingw-cross-env
|
||||
make
|
||||
|
||||
For a 64-bit Windows cross-build, replace 32 with 64 in the above instructions.
|
||||
For a 32-bit Windows cross-build, replace 64 with 32 in the above instructions.
|
||||
|
||||
### Compilation
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,12 @@ isEmpty(LIBXML2_LIBPATH) {
|
|||
LIBXML2_LIBS = -L$$LIBXML2_LIBPATH -lxml2
|
||||
}
|
||||
|
||||
CONFIG(mingw-cross-env): {
|
||||
!CONFIG(mingw-cross-env-shared) {
|
||||
DEFINES += LIBXML_STATIC
|
||||
}
|
||||
}
|
||||
|
||||
QMAKE_CXXFLAGS += $$LIBXML2_CFLAGS
|
||||
LIBS += $$LIBXML2_LIBS
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ msgstr ""
|
|||
|
||||
#: objects/ui_AboutDialog.h:103 src/AboutDialog.h:13
|
||||
msgid "About OpenSCAD"
|
||||
msgstr "O OpenSCADu"
|
||||
msgstr "O aplikaci OpenSCAD"
|
||||
|
||||
#: objects/ui_AboutDialog.h:105 objects/ui_launchingscreen.h:305
|
||||
msgid ""
|
||||
|
|
|
|||
|
|
@ -76,10 +76,11 @@ get_debian_deps()
|
|||
apt-get -y install \
|
||||
build-essential curl libffi-dev \
|
||||
libxmu-dev cmake bison flex git-core libboost-all-dev \
|
||||
libXi-dev libmpfr-dev libboost-dev libglew-dev \
|
||||
libmpfr-dev libboost-dev libglew-dev \
|
||||
libeigen3-dev libcgal-dev libopencsg-dev libgmp3-dev libgmp-dev \
|
||||
imagemagick libfontconfig-dev libfreetype6-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()
|
||||
|
|
@ -148,6 +149,14 @@ 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
|
||||
}
|
||||
|
||||
unknown()
|
||||
{
|
||||
echo "Unknown system type. Please install the dependency packages listed"
|
||||
|
|
@ -155,8 +164,10 @@ unknown()
|
|||
}
|
||||
|
||||
if [ -e /etc/issue ]; then
|
||||
if [ "`grep -i ubuntu.1[4-9] /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 ubuntu /etc/issue`" ]; then
|
||||
get_debian_deps
|
||||
elif [ "`grep -i debian.GNU.Linux.7 /etc/issue`" ]; then
|
||||
|
|
|
|||
|
|
@ -92,7 +92,8 @@ private slots:
|
|||
void setColorScheme(const QString &cs);
|
||||
void showProgress();
|
||||
void openCSGSettingsChanged();
|
||||
void consoleOutput(const QString &msg);
|
||||
void consoleOutput(const QString &msg);
|
||||
void updateActionUndoState();
|
||||
|
||||
private:
|
||||
void initActionIcon(QAction *action, const char *darkResource, const char *lightResource);
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1118</width>
|
||||
<height>22</height>
|
||||
<height>19</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menu_File">
|
||||
|
|
@ -690,6 +690,9 @@
|
|||
</property>
|
||||
</action>
|
||||
<action name="editActionUndo">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../openscad.qrc">
|
||||
<normaloff>:/images/Command-Undo-32.png</normaloff>:/images/Command-Undo-32.png</iconset>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ public:
|
|||
virtual void replaceSelectedText(const QString &newText) = 0;
|
||||
virtual void replaceAll(const QString &findText, const QString &replaceText) = 0;
|
||||
virtual QStringList colorSchemes() = 0;
|
||||
virtual bool canUndo() = 0;
|
||||
|
||||
signals:
|
||||
void contentsChanged();
|
||||
|
|
|
|||
|
|
@ -185,6 +185,11 @@ void LegacyEditor::setText(const QString &text)
|
|||
this->textedit->insertPlainText(text);
|
||||
}
|
||||
|
||||
bool LegacyEditor::canUndo()
|
||||
{
|
||||
return (this->textedit->document()->availableUndoSteps() != 0);
|
||||
}
|
||||
|
||||
void LegacyEditor::undo()
|
||||
{
|
||||
this->textedit->undo();
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ public:
|
|||
void replaceAll(const QString &findText, const QString &replaceText);
|
||||
bool findString(const QString & exp, bool findBackwards) const;
|
||||
QStringList colorSchemes();
|
||||
bool canUndo();
|
||||
|
||||
public slots:
|
||||
void zoomIn();
|
||||
|
|
|
|||
|
|
@ -318,6 +318,7 @@ MainWindow::MainWindow(const QString &filename)
|
|||
|
||||
// Edit menu
|
||||
connect(this->editActionUndo, SIGNAL(triggered()), editor, SLOT(undo()));
|
||||
connect(editor, SIGNAL(contentsChanged()), this, SLOT(updateActionUndoState()));
|
||||
connect(this->editActionRedo, SIGNAL(triggered()), editor, SLOT(redo()));
|
||||
connect(this->editActionRedo_2, SIGNAL(triggered()), editor, SLOT(redo()));
|
||||
connect(this->editActionCut, SIGNAL(triggered()), editor, SLOT(cut()));
|
||||
|
|
@ -600,6 +601,11 @@ void MainWindow::addKeyboardShortCut(const QList<QAction *> &actions)
|
|||
}
|
||||
}
|
||||
|
||||
void MainWindow::updateActionUndoState()
|
||||
{
|
||||
editActionUndo->setEnabled(editor->canUndo());
|
||||
}
|
||||
|
||||
void MainWindow::loadViewSettings(){
|
||||
QSettings settings;
|
||||
if (settings.value("view/showEdges").toBool()) {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ ScadLexer::ScadLexer(QObject *parent) : QsciLexerCPP(parent)
|
|||
"multmatrix color offset ";
|
||||
|
||||
setFoldComments(true);
|
||||
setFoldAtElse(true);
|
||||
}
|
||||
|
||||
ScadLexer::~ScadLexer()
|
||||
|
|
|
|||
|
|
@ -421,6 +421,11 @@ QStringList ScintillaEditor::colorSchemes()
|
|||
return colorSchemes;
|
||||
}
|
||||
|
||||
bool ScintillaEditor::canUndo()
|
||||
{
|
||||
return qsci->isUndoAvailable();
|
||||
}
|
||||
|
||||
void ScintillaEditor::setHighlightScheme(const QString &name)
|
||||
{
|
||||
const colorscheme_set_t colorscheme_set = enumerateColorSchemes();
|
||||
|
|
@ -532,7 +537,7 @@ bool ScintillaEditor::find(const QString &expr, bool findNext, bool findBackward
|
|||
|
||||
void ScintillaEditor::replaceSelectedText(const QString &newText)
|
||||
{
|
||||
if (qsci->selectedText() != newText) qsci->replaceSelectedText(newText);
|
||||
if ((qsci->selectedText() != newText)&&(qsci->hasSelectedText())) qsci->replaceSelectedText(newText);
|
||||
}
|
||||
|
||||
void ScintillaEditor::replaceAll(const QString &findText, const QString &replaceText)
|
||||
|
|
|
|||
|
|
@ -54,7 +54,8 @@ public:
|
|||
void replaceSelectedText(const QString&);
|
||||
void replaceAll(const QString &findText, const QString &replaceText);
|
||||
QStringList colorSchemes();
|
||||
|
||||
bool canUndo();
|
||||
|
||||
private:
|
||||
void getRange(int *lineFrom, int *lineTo);
|
||||
void setColormap(const EditorColorScheme *colorScheme);
|
||||
|
|
|
|||
|
|
@ -9,17 +9,19 @@ start()
|
|||
{
|
||||
VFB_BINARY=
|
||||
|
||||
if [ "`command -v Xvfb`" ]; then
|
||||
VFB_BINARY=Xvfb
|
||||
fi
|
||||
|
||||
if [ "`command -v Xvnc`" ]; then
|
||||
VFB_BINARY=Xvnc
|
||||
VFB_OPTIONS='-geometry 800x600 -depth 24'
|
||||
fi
|
||||
|
||||
if [ "`command -v Xvfb`" ]; then
|
||||
VFB_BINARY=Xvfb
|
||||
VFB_OPTIONS='-screen 0 800x600x24'
|
||||
fi
|
||||
|
||||
if [ ! $VFB_BINARY ]; then
|
||||
echo "$0 Failed, cannot find Xvfb or Xvnc"
|
||||
echo "$0 Failed, cannot find Xvfb or Xvnc" > ./virtualfb.log
|
||||
echo "$0 Failed, cannot find Xvnc or Xvfb"
|
||||
echo "$0 Failed, cannot find Xvnc or Xvfb" > ./virtualfb.log
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
@ -28,7 +30,7 @@ start()
|
|||
echo debug VFB_DISPLAY $VFB_DISPLAY
|
||||
echo debug VFB_BINARY $VFB_BINARY
|
||||
fi
|
||||
$VFB_BINARY $VFB_DISPLAY -screen 0 800x600x24 > ./virtualfb1.log 2> ./virtualfb2.log &
|
||||
$VFB_BINARY $VFB_DISPLAY $VFB_OPTIONS > ./virtualfb1.log 2> ./virtualfb2.log &
|
||||
# on some systems $! gives us VFB_BINARY's PID, on others we have to subtract 1
|
||||
VFB_PID_MINUS0=$!
|
||||
VFB_PID_MINUS1=$(($VFB_PID_MINUS0 - 1))
|
||||
|
|
@ -71,7 +73,9 @@ stop()
|
|||
fi
|
||||
cat virtualfb1.log
|
||||
cat virtualfb2.log
|
||||
echo 'dump ~/.xession-errors:'
|
||||
cat ~/.xsession-errors
|
||||
echo 'end ~/.xession-errors'
|
||||
rm ./virtualfb.PID
|
||||
rm ./virtualfb.DISPLAY
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue