Merge remote-tracking branch 'origin/master' into c++11

master
Marius Kintel 2015-03-20 17:00:41 -04:00
commit c5e1e2b9af
14 changed files with 83 additions and 30 deletions

View File

@ -7,7 +7,7 @@
<item>
<title>OpenSCAD @VERSION@</title>
<pubDate>@VERSIONDATE@</pubDate>
<sparkle:releaseNotesLink>https://raw.githubusercontent.com/openscad/openscad/openscad-@VERSION@/releases/@VERSION@.md</sparkle:releaseNotesLink>
<sparkle:releaseNotesLink>https://raw.githubusercontent.com/openscad/openscad/openscad-@VERSION@/releases/@SHORTVERSION@.md</sparkle:releaseNotesLink>
<sparkle:minimumSystemVersion>10.7.0</sparkle:minimumSystemVersion>
<enclosure url="http://files.openscad.org/OpenSCAD-@VERSION@.dmg"
sparkle:version="@VERSIONDATE@"

View File

@ -0,0 +1,27 @@
Given:
VERSION (e.g. 2015.03-1)
o Make sure we have a $VERSION branch. If not, create one
o Update VERSION and VERSIONDATE in
openscad.pro
scripts/publish-macosx.sh
scripts/release-common.sh
scripts/publish-mingw-x.sh
tests/CMakeLists.txt
o git tag "openscad-$VERSION"
o ./scripts/git-archive-all.py --prefix=openscad-$VERSION/ openscad-$VERSION.src.tar.gz
o git push --tags $VERSION
o Upload Source package
$ scp openscad-$VERSION.src.tar.gz openscad@files.openscad.org:www
o Write short release email to mailing list
o Tweet as OpenSCAD
o Notify package managers
- Debian/Ubuntu: https://launchpad.net/~chrysn
- Ubuntu PPA: https://github.com/hyperair
- Fedora: Miro Hrončok <miro@hroncok.cz> or <mhroncok@redhat.com>
- OpenSUSE: Pavol Rusnak <prusnak@opensuse.org>
- Arch Linux: Kyle Keen <keenerd@gmail.com>
- MacPorts: https://svn.macports.org/repository/macports/trunk/dports/science/openscad/Portfile
- Homebrew: https://github.com/caskroom/homebrew-cask/blob/master/Casks/openscad.rb

View File

@ -77,6 +77,7 @@ deploy {
DEFINES += OPENSCAD_DEPLOY
macx: CONFIG += sparkle
}
snapshot: DEFINES += OPENSCAD_SNAPSHOT
macx {
TARGET = OpenSCAD

View File

@ -20,6 +20,7 @@
<file>icons/information-icons-question.png</file>
<file>icons/information-icons-warning.png</file>
<file>icons/openscad.png</file>
<file>icons/openscad-nightly.png</file>
<file>icons/button.png</file>
<file>icons/background-welcome-screen.svg</file>
<file>icons/prefsFeatures.png</file>

View File

@ -56,6 +56,7 @@ if test -z "$VERSION"; then
VERSION=$VERSIONDATE
SNAPSHOT=snapshot
fi
SHORTVERSION=${VERSION##-}
# Turn off ccache, just for safety
PATH=${PATH//\/opt\/local\/libexec\/ccache:}
@ -85,10 +86,6 @@ if [[ $? != 0 ]]; then
exit 1
fi
if [ ! $DOUPLOAD ]; then
exit 0
fi
SIGNATURE=$(openssl dgst -sha1 -binary < OpenSCAD-$VERSION.dmg | openssl dgst -dss1 -sign $HOME/.ssh/openscad-appcast.pem | openssl enc -base64)
if [[ $VERSION == $VERSIONDATE ]]; then
@ -98,12 +95,16 @@ else
fi
echo "Creating appcast $APPCASTFILE..."
FILESIZE=$(stat -f "%z" OpenSCAD-$VERSION.dmg)
sed -e "s,@VERSION@,$VERSION,g" -e "s,@VERSIONDATE@,$VERSIONDATE,g" -e "s,@DSASIGNATURE@,$SIGNATURE,g" -e "s,@FILESIZE@,$FILESIZE,g" $APPCASTFILE.in > $APPCASTFILE
sed -e "s,@VERSION@,$VERSION,g" -e "s,@SHORTVERSION@,$SHORTVERSION,g" -e "s,@VERSIONDATE@,$VERSIONDATE,g" -e "s,@DSASIGNATURE@,$SIGNATURE,g" -e "s,@FILESIZE@,$FILESIZE,g" $APPCASTFILE.in > $APPCASTFILE
cp $APPCASTFILE ../openscad.github.com
if [[ $VERSION == $VERSIONDATE ]]; then
cp $APPCASTFILE ../openscad.github.com/appcast-snapshots.xml
fi
if [ ! $DOUPLOAD ]; then
exit 0
fi
echo "Uploading..."
if [[ $VERSION == $VERSIONDATE ]]; then
scp OpenSCAD-$VERSION.dmg openscad@files.openscad.org:www/snapshots

View File

@ -10,11 +10,11 @@ class AboutDialog : public QDialog, public Ui::AboutDialog
public:
AboutDialog(QWidget *) {
setupUi(this);
this->setWindowTitle( QString(_("About OpenSCAD")) + " " + openscad_versionnumber.c_str());
this->setWindowTitle( QString(_("About OpenSCAD")) + " " + openscad_shortversionnumber.c_str());
QUrl flattr_qurl(":icons/flattr.png" );
this->aboutText->loadResource( QTextDocument::ImageResource, flattr_qurl );
QString tmp = this->aboutText->toHtml();
tmp.replace("__VERSION__", openscad_versionnumber.c_str());
tmp.replace("__VERSION__", openscad_detailedversionnumber.c_str());
this->aboutText->setHtml(tmp);
}

View File

@ -7,6 +7,7 @@
#include "version_check.h"
#include "PlatformUtils.h"
#include "openscad.h"
#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)
@ -87,7 +88,7 @@ std::string LibraryInfo::info()
const char *env_path = getenv("OPENSCADPATH");
const char *env_font_path = getenv("OPENSCAD_FONT_PATH");
s << "OpenSCAD Version: " << TOSTRING(OPENSCAD_VERSION)
s << "OpenSCAD Version: " << openscad_detailedversionnumber
<< "\nSystem information: " << PlatformUtils::sysinfo()
<< "\nCompiler, build date: " << compiler_info << ", " << __DATE__
<< "\nBoost version: " << BOOST_LIB_VERSION

View File

@ -138,7 +138,7 @@ void UIUtils::openHomepageURL()
static void openVersionedURL(QString url)
{
QDesktopServices::openUrl(QUrl(url.arg(versionnumber.c_str())));
QDesktopServices::openUrl(QUrl(url.arg(openscad_shortversionnumber.c_str())));
}
void UIUtils::openUserManualURL()

View File

@ -30,7 +30,7 @@ LaunchingScreen::LaunchingScreen(QWidget *parent) : QDialog(parent)
this->setStyleSheet("QDialog {background-image:url(':/icons/background.png')} QPushButton {color:white;}");
this->versionNumberLabel->setText(openscad_version.c_str());
this->versionNumberLabel->setText("OpenSCAD " + QString::fromStdString(openscad_displayversionnumber));
QStringList recentFiles = UIUtils::recentFiles();
for (int a = 0;a < recentFiles.size();a++) {

View File

@ -263,6 +263,7 @@ MainWindow::MainWindow(const QString &filename)
connect(this, SIGNAL(unhighlightLastError()), editor, SLOT(unhighlightLastError()));
this->qglview->statusLabel = new QLabel(this);
this->qglview->statusLabel->setMinimumWidth(100);
statusBar()->addWidget(this->qglview->statusLabel);
animate_timer = new QTimer(this);
@ -418,7 +419,7 @@ MainWindow::MainWindow(const QString &filename)
setCurrentOutput();
std::string helptitle = openscad_version + "\nhttp://www.openscad.org\n\n";
std::string helptitle = "OpenSCAD " + openscad_versionnumber + "\nhttp://www.openscad.org\n\n";
PRINT(helptitle);
PRINT(copyrighttext);
PRINT("");
@ -1890,7 +1891,7 @@ void MainWindow::updateStatusBar(ProgressWidget *progressWidget)
this->progresswidget = NULL;
}
if (versionLabel == NULL) {
versionLabel = new QLabel(openscad_version.c_str());
versionLabel = new QLabel("OpenSCAD " + QString::fromStdString(openscad_displayversionnumber));
sb->addPermanentWidget(this->versionLabel);
}
} else {

View File

@ -93,15 +93,23 @@ static std::string arg_colorscheme;
#define QUOTE(x__) # x__
#define QUOTED(x__) QUOTE(x__)
std::string versionnumber = QUOTED(OPENSCAD_VERSION);
std::string openscad_shortversionnumber = QUOTED(OPENSCAD_SHORTVERSION);
std::string openscad_versionnumber = QUOTED(OPENSCAD_VERSION);
std::string openscad_versionnumber = QUOTED(OPENSCAD_VERSION)
std::string openscad_displayversionnumber =
#ifdef OPENSCAD_COMMIT
" (git " QUOTED(OPENSCAD_COMMIT) ")"
QUOTED(OPENSCAD_VERSION)
" (git " QUOTED(OPENSCAD_COMMIT) ")";
#else
QUOTED(OPENSCAD_SHORTVERSION);
#endif
;
std::string openscad_version = "OpenSCAD " + openscad_versionnumber;
std::string openscad_detailedversionnumber =
#ifdef OPENSCAD_COMMIT
openscad_displayversionnumber;
#else
openscad_versionnumber;
#endif
class Echostream : public std::ofstream
{
@ -646,6 +654,11 @@ int gui(vector<string> &inputFiles, const fs::path &original_path, int argc, cha
#else
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
#endif
#ifdef OPENSCAD_SNAPSHOT
app.setWindowIcon(QIcon(":/icons/openscad-nightly.png"));
#else
app.setWindowIcon(QIcon(":/icons/openscad.png"));
#endif
// Other global settings
qRegisterMetaType<shared_ptr<const Geometry> >();

View File

@ -35,11 +35,12 @@ extern std::string commandline_commands;
// doing this, use currentdir to get the original CWD.
extern std::string currentdir;
// Version number without the git suffix.
extern std::string versionnumber;
// Just the number (might have the git commit as suffix), e.g. 2014.12.23.
// Version number without any patch level indicator
extern std::string openscad_shortversionnumber;
// The full version number, e.g. 2014.03, 2015.03-1, 2014.12.23
extern std::string openscad_versionnumber;
// The string "OpenSCAD " and the version number.
extern std::string openscad_version;
// Version used for display, typically without patchlevel indicator,
// but may include git commit id for snapshot builds
extern std::string openscad_displayversionnumber;
// Version used for detailed display
extern std::string openscad_detailedversionnumber;

View File

@ -592,13 +592,15 @@ if ("$ENV{VERSION}" STREQUAL "")
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.10)
string(TIMESTAMP VERSION "%Y.%m.%d")
else()
set(VERSION "2013.06")
set(VERSION "2015.03")
endif()
else()
set(VERSION $ENV{VERSION})
endif()
message(STATUS "OpenSCAD version: ${VERSION}")
string(REGEX MATCHALL "^[0-9]+|[0-9]+|[0-9]+$" MYLIST "${VERSION}")
string(REPLACE "-" ";" SPLITVERSION ${VERSION})
list(GET SPLITVERSION 0 OPENSCAD_SHORTVERSION)
string(REGEX MATCHALL "^[0-9]+|[0-9]+|[0-9]+$" MYLIST "${OPENSCAD_SHORTVERSION}")
list(GET MYLIST 0 OPENSCAD_YEAR)
list(GET MYLIST 1 OPENSCAD_MONTH)
math(EXPR OPENSCAD_MONTH ${OPENSCAD_MONTH}) # get rid of leading zero
@ -608,7 +610,7 @@ if (${VERSIONLEN} EQUAL 3)
math(EXPR OPENSCAD_DAY ${OPENSCAD_DAY}) # get rid of leading zero
endif()
add_definitions(-DOPENSCAD_VERSION=${VERSION} -DOPENSCAD_YEAR=${OPENSCAD_YEAR} -DOPENSCAD_MONTH=${OPENSCAD_MONTH})
add_definitions(-DOPENSCAD_VERSION=${VERSION} -DOPENSCAD_SHORTVERSION=${OPENSCAD_SHORTVERSION} -DOPENSCAD_YEAR=${OPENSCAD_YEAR} -DOPENSCAD_MONTH=${OPENSCAD_MONTH})
if (DEFINED OPENSCAD_DAY)
add_definitions(-DOPENSCAD_DAY=${OPENSCAD_DAY})
endif()

View File

@ -54,17 +54,22 @@ isEmpty(VERSION) {
}
}
VERSION_SPLIT=$$split(VERSION, ".")
# Split off patch level indicator
SHORTVERSION = $$section(VERSION, "-", 0, 0)
# Split version into Year Month [Day]
VERSION_SPLIT=$$split(DISPLAYVERSION, ".")
VERSION_YEAR=$$member(VERSION_SPLIT, 0)
VERSION_MONTH=$$member(VERSION_SPLIT, 1)
VERSION_DAY=$$member(VERSION_SPLIT, 2)
# Fix for problem with integers with leading zeros
# being interpreted by C++ as octals. Now they're doubles.
VERSION_YEAR=$${VERSION_YEAR}.0
VERSION_MONTH=$${VERSION_MONTH}.0
VERSION_DAY=$${VERSION_DAY}.0
DEFINES += OPENSCAD_VERSION=$$VERSION OPENSCAD_YEAR=$$VERSION_YEAR OPENSCAD_MONTH=$$VERSION_MONTH
DEFINES += OPENSCAD_VERSION=$$VERSION OPENSCAD_SHORTVERSION=$$SHORTVERSION OPENSCAD_YEAR=$$VERSION_YEAR OPENSCAD_MONTH=$$VERSION_MONTH
!isEmpty(VERSION_DAY): DEFINES += OPENSCAD_DAY=$$VERSION_DAY
!isEmpty(OPENSCAD_COMMIT) {