summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/LogicLib.nsh1
-rwxr-xr-xscripts/builder.sh4
-rwxr-xr-xscripts/googlecode_upload.py306
-rwxr-xr-xscripts/installer-linux.sh3
-rwxr-xr-xscripts/macosx-build-dependencies.sh4
-rwxr-xr-xscripts/release-common.sh2
-rw-r--r--scripts/setenv-unibuild.sh39
-rwxr-xr-xscripts/uni-build-dependencies.sh23
-rw-r--r--scripts/x64.nsh1
9 files changed, 67 insertions, 316 deletions
diff --git a/scripts/LogicLib.nsh b/scripts/LogicLib.nsh
index 2f8968c..618bde4 100644
--- a/scripts/LogicLib.nsh
+++ b/scripts/LogicLib.nsh
@@ -1,4 +1,5 @@
; NSIS LOGIC LIBRARY - LogicLib.nsh
+; see mingw-file-association.nshmingw-file-association.nsh for license info
; Version 2.6 - 08/12/2007
; By dselkirk@hotmail.com
; and eccles@users.sf.net
diff --git a/scripts/builder.sh b/scripts/builder.sh
index 38a235e..552d559 100755
--- a/scripts/builder.sh
+++ b/scripts/builder.sh
@@ -95,13 +95,9 @@ upload_win_generic()
opts="$opts -u $username"
opts="$opts $filename"
if [ $DRYRUN ]; then
- echo dry run, not uploading to googlecode
- echo google-code upload is disabled / deprecated
echo dry run, not uploading to files.openscad.org
echo scp -v $filename openscad@files.openscad.org:www/
else
- echo google-code upload is disabled / deprecated
- # python ./scripts/googlecode_upload.py -s "$summary" $opts
scp -v $filename openscad@files.openscad.org:www/
fi
}
diff --git a/scripts/googlecode_upload.py b/scripts/googlecode_upload.py
deleted file mode 100755
index c0fe4c9..0000000
--- a/scripts/googlecode_upload.py
+++ /dev/null
@@ -1,306 +0,0 @@
-#!/usr/bin/env python
-# Google Code binary package uploader
-# with Insturctions for uploading packages for OpenSCAD
-#
-# OpenSCAD Usage:
-#
-# 1. get a google account, get it added to the Google Code OpenSCAD project
-# 2. go to https://code.google.com/hosting/settings for username & password
-# -----
-#
-# security note -
-#
-# it's not advisable to use a ~/.netrc file to store your password
-# keep your googlecode password secret
-# only upload from a secure machine
-# user's personal data can be at risk if your account
-# is compromised and a fake openscad were to be uploaded.
-# notify the OpenSCAD maintainer if your computer is stolen or
-# your google account is ever compromised.
-# -----
-# 4. if you are making a Stable Release, check 'docs/release_checklist.txt'
-# 5. create an OpenSCAD package (linux dev snapshot: ./scripts/release-common.sh)
-# 6. Run this to do the upload:
-# export SUMMARY="Linux x86-64 Snapshot" # replace as appropriate
-# export PACKAGEFILE=openscad-2013.01.10.x86-64.tar.gz # replace as appropriate
-# python ./scripts/googlecode_upload.py -s '$SUMMARY' -p openscad $PACKAGEFILE
-# 7. It will ask for username. Use user.name@gmail.com (include the @ mail address)
-# 8. It will ask for password. Copy/paste the password from the https google code settings page above
-# Don't use the big bold password, use the 'plain font' password from the 'machine' line
-# 9. Wait.... (there is no progress meter). It should say 'success' eventually.
-#
-# The rest of this file is original from Google with slight modifications by the
-# OpenSCAD team. Modifications licensed under the same license as the
-# original code from google - the Apache Software License 2.0:
-# http://www.apache.org/licenses/LICENSE-2.0
-
-
-#
-# Copyright 2006, 2007 Google Inc. All Rights Reserved.
-# Author: danderson@google.com (David Anderson)
-#
-# Script for uploading files to a Google Code project.
-#
-# This is intended to be both a useful script for people who want to
-# streamline project uploads and a reference implementation for
-# uploading files to Google Code projects.
-#
-# To upload a file to Google Code, you need to provide a path to the
-# file on your local machine, a small summary of what the file is, a
-# project name, and a valid account that is a member or owner of that
-# project. You can optionally provide a list of labels that apply to
-# the file. The file will be uploaded under the same name that it has
-# in your local filesystem (that is, the "basename" or last path
-# component). Run the script with '--help' to get the exact syntax
-# and available options.
-#
-# Note that the upload script requests that you enter your
-# googlecode.com password. This is NOT your Gmail account password!
-# This is the password you use on googlecode.com for committing to
-# Subversion and uploading files. You can find your password by going
-# to http://code.google.com/hosting/settings when logged in with your
-# Gmail account. If you have already committed to your project's
-# Subversion repository, the script will automatically retrieve your
-# credentials from there (unless disabled, see the output of '--help'
-# for details).
-#
-# If you are looking at this script as a reference for implementing
-# your own Google Code file uploader, then you should take a look at
-# the upload() function, which is the meat of the uploader. You
-# basically need to build a multipart/form-data POST request with the
-# right fields and send it to https://PROJECT.googlecode.com/files .
-# Authenticate the request using HTTP Basic authentication, as is
-# shown below.
-#
-# Licensed under the terms of the Apache Software License 2.0:
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Questions, comments, feature requests and patches are most welcome.
-# Please direct all of these to the Google Code users group:
-# http://groups.google.com/group/google-code-hosting
-
-"""Google Code file uploader script.
-"""
-
-__author__ = 'danderson@google.com (David Anderson)'
-
-import httplib
-import os.path
-import optparse
-import getpass
-import base64
-import sys
-
-
-def upload(file, project_name, user_name, password, summary, labels=None):
- """Upload a file to a Google Code project's file server.
-
- Args:
- file: The local path to the file.
- project_name: The name of your project on Google Code.
- user_name: Your Google account name.
- password: The googlecode.com password for your account.
- Note that this is NOT your global Google Account password!
- summary: A small description for the file.
- labels: an optional list of label strings with which to tag the file.
-
- Returns: a tuple:
- http_status: 201 if the upload succeeded, something else if an
- error occured.
- http_reason: The human-readable string associated with http_status
- file_url: If the upload succeeded, the URL of the file on Google
- Code, None otherwise.
- """
- # The login is the user part of user@gmail.com. If the login provided
- # is in the full user@domain form, strip it down.
- if user_name.endswith('@gmail.com'):
- user_name = user_name[:user_name.index('@gmail.com')]
-
- form_fields = [('summary', summary)]
- if labels is not None:
- form_fields.extend([('label', l.strip()) for l in labels])
-
- content_type, body = encode_upload_request(form_fields, file)
-
- upload_host = '%s.googlecode.com' % project_name
- upload_uri = '/files'
- auth_token = base64.b64encode('%s:%s'% (user_name, password))
- headers = {
- 'Authorization': 'Basic %s' % auth_token,
- 'User-Agent': 'Googlecode.com uploader v0.9.4',
- 'Content-Type': content_type,
- }
-
- server = httplib.HTTPSConnection(upload_host)
- server.request('POST', upload_uri, body, headers)
- resp = server.getresponse()
- server.close()
-
- if resp.status == 201:
- location = resp.getheader('Location', None)
- else:
- location = None
- return resp.status, resp.reason, location
-
-
-def encode_upload_request(fields, file_path):
- """Encode the given fields and file into a multipart form body.
-
- fields is a sequence of (name, value) pairs. file is the path of
- the file to upload. The file will be uploaded to Google Code with
- the same file name.
-
- Returns: (content_type, body) ready for httplib.HTTP instance
- """
- BOUNDARY = '----------Googlecode_boundary_reindeer_flotilla'
- CRLF = '\r\n'
-
- body = []
-
- # Add the metadata about the upload first
- for key, value in fields:
- body.extend(
- ['--' + BOUNDARY,
- 'Content-Disposition: form-data; name="%s"' % key,
- '',
- value,
- ])
-
- # Now add the file itself
- file_name = os.path.basename(file_path)
- f = open(file_path, 'rb')
- file_content = f.read()
- f.close()
-
- body.extend(
- ['--' + BOUNDARY,
- 'Content-Disposition: form-data; name="filename"; filename="%s"'
- % file_name,
- # The upload server determines the mime-type, no need to set it.
- 'Content-Type: application/octet-stream',
- '',
- file_content,
- ])
-
- # Finalize the form body
- body.extend(['--' + BOUNDARY + '--', ''])
-
- return 'multipart/form-data; boundary=%s' % BOUNDARY, CRLF.join(body)
-
-
-def upload_find_auth(file_path, project_name, summary, labels=None,
- user_name=None, password=None, tries=1):
- """Find credentials and upload a file to a Google Code project's file server.
-
- file_path, project_name, summary, and labels are passed as-is to upload.
-
- Args:
- file_path: The local path to the file.
- project_name: The name of your project on Google Code.
- summary: A small description for the file.
- labels: an optional list of label strings with which to tag the file.
- config_dir: Path to Subversion configuration directory, 'none', or None.
- user_name: Your Google account name.
- tries: How many attempts to make.
- """
- print 'uploading. username: ', user_name
- print 'password detected:', password!=None
- if user_name is None or password is None:
- from netrc import netrc
- authenticators = None
- try:
- authenticators = netrc().authenticators("code.google.com")
- except:
- print "Error accessing netrc authenticator. Trying alternate method"
- if authenticators:
- if user_name is None:
- user_name = authenticators[0]
- if password is None:
- password = authenticators[2]
-
- while tries > 0:
- if user_name is None:
- # Read username if not specified or loaded from svn config, or on
- # subsequent tries.
- sys.stdout.write('Please enter your googlecode.com username: ')
- sys.stdout.flush()
- user_name = sys.stdin.readline().rstrip()
- if password is None:
- # Read password if not loaded from svn config, or on subsequent tries.
- print 'Please enter your googlecode.com password.'
- print '** Note that this is NOT your Gmail account password! **'
- print 'It is the password you use to access Subversion repositories,'
- print 'and can be found here: http://code.google.com/hosting/settings'
- password = getpass.getpass()
-
- status, reason, url = upload(file_path, project_name, user_name, password,
- summary, labels)
- # Returns 403 Forbidden instead of 401 Unauthorized for bad
- # credentials as of 2007-07-17.
- if status in [httplib.FORBIDDEN, httplib.UNAUTHORIZED]:
- # Rest for another try.
- user_name = password = None
- tries = tries - 1
- else:
- # We're done.
- break
-
- return status, reason, url
-
-
-def main():
- parser = optparse.OptionParser(usage='googlecode-upload.py -s SUMMARY '
- '-p PROJECT [options] FILE')
- parser.add_option('-s', '--summary', dest='summary',
- help='Short description of the file')
- parser.add_option('-p', '--project', dest='project',
- help='Google Code project name')
- parser.add_option('-u', '--user', dest='user',
- help='Your Google Code username')
- #this is a massive security hole. anyone using 'ps' could steal p/w
- #parser.add_option('-w', '--password', dest='password',
- # help='Your Google Code password')
- parser.add_option('-l', '--labels', dest='labels',
- help='An optional list of comma-separated labels to attach '
- 'to the file')
-
- options, args = parser.parse_args()
-
- if os.environ.has_key('OSUPL_PASSWORD'):
- options.password=os.environ['OSUPL_PASSWORD']
- else:
- options.password=None
-
- if not options.summary:
- parser.error('File summary is missing.')
- elif not options.project:
- parser.error('Project name is missing.')
- elif len(args) < 1:
- parser.error('File to upload not provided.')
- elif len(args) > 1:
- parser.error('Only one file may be specified.')
-
- file_path = args[0]
-
- if options.labels:
- labels = options.labels.split(',')
- else:
- labels = None
-
- print 'read arguments'
- status, reason, url = upload_find_auth(file_path, options.project,
- options.summary, labels,
- options.user, options.password)
- if url:
- print 'The file was uploaded successfully.'
- print 'URL: %s' % url
- return 0
- else:
- print 'An error occurred. Your file was not uploaded.'
- print 'Google Code upload server said: %s (%s)' % (reason, status)
- return 1
-
-
-if __name__ == '__main__':
- print sys.argv
- sys.exit(main())
diff --git a/scripts/installer-linux.sh b/scripts/installer-linux.sh
index 8b3fc6d..c3b712b 100755
--- a/scripts/installer-linux.sh
+++ b/scripts/installer-linux.sh
@@ -42,4 +42,7 @@ cp -rv examples/. "$prefix"/share/openscad/examples/
echo "Copying libraries..."
cp -rv libraries/. "$prefix"/share/openscad/libraries/
+echo "Copying support files..."
+cp -rv share/. "$prefix"/share/
+
echo "Installation finished. Have a nice day."
diff --git a/scripts/macosx-build-dependencies.sh b/scripts/macosx-build-dependencies.sh
index de739b8..a257201 100755
--- a/scripts/macosx-build-dependencies.sh
+++ b/scripts/macosx-build-dependencies.sh
@@ -51,7 +51,7 @@ build_qt()
cd $BASEDIR/src
rm -rf qt-everywhere-opensource-src-$version
if [ ! -f qt-everywhere-opensource-src-$version.tar.gz ]; then
- curl -O http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-$version.tar.gz
+ curl -O -L http://download.qt-project.org/official_releases/qt/4.8/4.8.5/qt-everywhere-opensource-src-4.8.5.tar.gz
fi
tar xzf qt-everywhere-opensource-src-$version.tar.gz
cd qt-everywhere-opensource-src-$version
@@ -435,7 +435,7 @@ fi
echo "Using basedir:" $BASEDIR
mkdir -p $SRCDIR $DEPLOYDIR
-build_qt 4.8.4
+build_qt 4.8.5
# NB! For eigen, also update the path in the function
build_eigen 3.1.3
build_gmp 5.1.2
diff --git a/scripts/release-common.sh b/scripts/release-common.sh
index 8a1ed7c..e91c79f 100755
--- a/scripts/release-common.sh
+++ b/scripts/release-common.sh
@@ -332,6 +332,8 @@ case $OS in
-e '/lib(icu.*|stdc.*|audio|CGAL|GLEW|opencsg|png|gmp|gmpxx|mpfr)\.so/ { p; d; };' \
-e 'd;' | xargs cp -vt openscad-$VERSION/lib/openscad/
strip openscad-$VERSION/lib/openscad/*
+ mkdir -p openscad-$VERSION/share/appdata
+ cp openscad.appdata.xml openscad-$VERSION/share/appdata
cp scripts/installer-linux.sh openscad-$VERSION/install.sh
chmod 755 -R openscad-$VERSION/
PACKAGEFILE=openscad-$VERSION.x86-$ARCH.tar.gz
diff --git a/scripts/setenv-unibuild.sh b/scripts/setenv-unibuild.sh
index cb0b0a0..cfcf23d 100644
--- a/scripts/setenv-unibuild.sh
+++ b/scripts/setenv-unibuild.sh
@@ -43,14 +43,23 @@ setenv_common()
setenv_freebsd()
{
+ echo .... freebsd detected.
+ echo .... if you have freebsd >9, it is advisable to install
+ echo .... the clang compiler and re-run this script as
+ echo .... '. ./scripts/setenv-unibuild.sh clang'
setenv_common
QMAKESPEC=freebsd-g++
QTDIR=/usr/local/share/qt4
+ export QMAKESPEC
+ export QTDIR
}
setenv_netbsd()
{
setenv_common
+ echo --- netbsd build situation is complex. it comes with gcc4.5
+ echo --- which is incompatable with updated CGAL.
+ echo --- you may need to hack with newer gcc to make it work
QMAKESPEC=netbsd-g++
QTDIR=/usr/pkg/qt4
PATH=/usr/pkg/qt4/bin:$PATH
@@ -75,6 +84,30 @@ setenv_linux_clang()
echo QMAKESPEC has been modified: $QMAKESPEC
}
+setenv_freebsd_clang()
+{
+ export CC=clang
+ export CXX=clang++
+ export QMAKESPEC=freebsd-clang
+
+ echo CC has been modified: $CC
+ echo CXX has been modified: $CXX
+ echo QMAKESPEC has been modified: $QMAKESPEC
+}
+
+setenv_netbsd_clang()
+{
+ echo --------------------- this is not yet supported. netbsd 6 lacks
+ echo --------------------- certain things needed for clang support
+ export CC=clang
+ export CXX=clang++
+ export QMAKESPEC=./patches/mkspecs/netbsd-clang
+
+ echo CC has been modified: $CC
+ echo CXX has been modified: $CXX
+ echo QMAKESPEC has been modified: $QMAKESPEC
+}
+
clean_note()
{
if [ $QT5_SETUP ]; then
@@ -125,8 +158,14 @@ if [ "`uname | grep -i 'linux\|debian'`" ]; then
fi
elif [ "`uname | grep -i freebsd`" ]; then
setenv_freebsd
+ if [ "`echo $* | grep clang`" ]; then
+ setenv_freebsd_clang
+ fi
elif [ "`uname | grep -i netbsd`" ]; then
setenv_netbsd
+ if [ "`echo $* | grep clang`" ]; then
+ setenv_netbsd_clang
+ fi
else
# guess
setenv_common
diff --git a/scripts/uni-build-dependencies.sh b/scripts/uni-build-dependencies.sh
index 6596c8a..48f162a 100755
--- a/scripts/uni-build-dependencies.sh
+++ b/scripts/uni-build-dependencies.sh
@@ -53,6 +53,16 @@ printUsage()
echo
}
+detect_glu()
+{
+ detect_glu_result=
+ 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
+}
+
build_glu()
{
version=$1
@@ -282,6 +292,7 @@ build_cgal()
echo "Building CGAL" $version "..."
cd $BASEDIR/src
rm -rf CGAL-$version
+ 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"
ver4_0_2="curl --insecure -O https://gforge.inria.fr/frs/download.php/31174/CGAL-4.0.2.tar.bz2"
ver4_0="curl --insecure -O https://gforge.inria.fr/frs/download.php/30387/CGAL-4.0.tar.gz"
@@ -289,7 +300,7 @@ build_cgal()
ver3_8="curl --insecure -O https://gforge.inria.fr/frs/download.php/28500/CGAL-3.8.tar.gz"
ver3_7="curl --insecure -O https://gforge.inria.fr/frs/download.php/27641/CGAL-3.7.tar.gz"
vernull="echo already downloaded..skipping"
- download_cmd=ver`echo $version | sed s/"\."/"_"/`
+ download_cmd=ver`echo $version | sed s/"\."/"_"/ | sed s/"\."/"_"/`
if [ -e CGAL-$version.tar.gz ]; then
download_cmd=vernull;
@@ -298,6 +309,7 @@ build_cgal()
download_cmd=vernull;
fi
+ eval echo "$"$download_cmd
`eval echo "$"$download_cmd`
zipper=gzip
@@ -436,7 +448,8 @@ build_opencsg()
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
- build_glu 9.0.0 # todo - autodetect the need for glu
+ detect_glu
+ if [ ! $detect_glu_result ]; then build_glu 9.0.0 ; fi
version=$tmp
fi
@@ -563,7 +576,7 @@ if [ $1 ]; then
exit $?
fi
if [ $1 = "cgal" ]; then
- build_cgal 4.1 use-sys-libs
+ build_cgal 4.0.2 use-sys-libs
exit $?
fi
if [ $1 = "opencsg" ]; then
@@ -583,6 +596,8 @@ if [ $1 ]; then
fi
+# todo - cgal 4.02 for gcc<4.7, gcc 4.2 for above
+
#
# Main build of libraries
# edit version numbers here as needed.
@@ -592,7 +607,7 @@ build_gmp 5.0.5
build_mpfr 3.1.1
build_boost 1.53.0
# NB! For CGAL, also update the actual download URL in the function
-build_cgal 4.1
+build_cgal 4.0.2
build_glew 1.9.0
build_opencsg 1.3.2
diff --git a/scripts/x64.nsh b/scripts/x64.nsh
index e694c1e..9b69ff0 100644
--- a/scripts/x64.nsh
+++ b/scripts/x64.nsh
@@ -1,6 +1,7 @@
; ---------------------
; x64.nsh
; ---------------------
+; see mingw-file-association.nshmingw-file-association.nsh for license info
;
; A few simple macros to handle installations on x64 machines.
;
contact: Jan Huwald // Impressum