Conflicts:

openscad.pro
	scripts/publish-macosx.sh
	scripts/publish-mingw-x.sh
	scripts/release-common.sh
	tests/CMakeLists.txt
master
Marius Kintel 2015-03-13 17:26:02 -04:00
parent 064cf23887
commit 9ef1717459
10 changed files with 47 additions and 29 deletions

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

@ -418,7 +418,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 +1890,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
{

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

@ -576,13 +576,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
@ -592,7 +594,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) {