mirror of https://github.com/CGAL/cgal
initial versions
This commit is contained in:
parent
aff6659f3f
commit
12db2ba9e4
|
|
@ -0,0 +1,339 @@
|
|||
|
||||
----------------------------- Release 2.3 ------------------------------------
|
||||
|
||||
Version 2.3 differs from version 2.3 in the platforms that are supported and
|
||||
in functionality.
|
||||
|
||||
Additional supported platforms:
|
||||
|
||||
Gnu g++ 3.0 on Solaris, Linux
|
||||
|
||||
The following functionality has been added:
|
||||
|
||||
Kernels:
|
||||
|
||||
- The 2D and 3D kernels now serve as models of the new kernel concept
|
||||
described in the recent paper, "An Adaptable and Extensible Geometry
|
||||
Kernel" by Susan Hert, Micheal Hoffmann, Lutz Kettner, Sylvain Pion,
|
||||
and Michael Seel to be presented at WAE 2001 (and soon available as
|
||||
a technical report). This new kernel is completely compatible with
|
||||
the previous design but is more flexible in that it allows geometric
|
||||
predicates as well as objects to be easily exchanged and adapted
|
||||
individually to users' needs.
|
||||
|
||||
- A new kernel called Simple_homogeneous<> is available. It is equivalent
|
||||
to Homogeneous<> but without reference-counted objects.
|
||||
|
||||
- A new kernel called Filtered_kernel<> is available that allows one to
|
||||
build kernel traits classes that use exact and efficient predicates.
|
||||
|
||||
- There are two classes, Cartesian_converter<> and Homogeneous_converter
|
||||
that allows one to convert objects between different Cartesian and
|
||||
homogeneous kernels, respectively.
|
||||
|
||||
- A new d-dimensional kernel, Kernel_d is available. It provides diverse
|
||||
kernel objects, predicates and constructions in d dimensions with two
|
||||
representations based on the kernel families Cartesean_d and Homogeneous_d
|
||||
|
||||
Basic Library:
|
||||
|
||||
Almost all packages in the basic library have been adapted to the
|
||||
new kernel design to realize the flexibility this design makes possible.
|
||||
In several packages, this means that the traits class requirements have
|
||||
changed to conform to the function objects offered in the kernels so the
|
||||
kernels themselves can be used as traits classes in many instances.
|
||||
|
||||
2D Convex Hull
|
||||
- The traits requirements have changed slightly.
|
||||
|
||||
3D Convex Hull
|
||||
- The convex_hull_3 function now uses a new implementation of the
|
||||
quickhull algorithm that no longer requires LEDA.
|
||||
- A new convex_hull_incremental_3 function based on the new d-dimensional
|
||||
convex hull class is available for comparison purposes
|
||||
|
||||
Convex_hull_d, Delaunay_d
|
||||
Two new application classes offering the calculation of d-dimensional
|
||||
convex hulls and delaunay triangulations
|
||||
|
||||
Polygon
|
||||
|
||||
- The traits class requirements have been changed.
|
||||
- The simplicity test has a completely new implementation.
|
||||
- Properties like convexity, simplicity and area can now be cached by
|
||||
polygons. You need to set a flag to select this behaviour.
|
||||
|
||||
Planar Nef Polyhedra
|
||||
A new class (Nef_polyhedron_2) representing planar Nef polyhedra =
|
||||
rectilinearly bounded points sets that are the result of binary and
|
||||
topological operations starting from halfplanes.
|
||||
|
||||
Planar Polygon Partitioning
|
||||
New package offering functions to partition planar polygons into
|
||||
convex and y-monotone pieces.
|
||||
|
||||
Planar Maps and Arrangements
|
||||
|
||||
- A new class Planar_map_with_intersections_2<Planar_map> for planar maps
|
||||
of possibly intersecting, possibly non-x-monotone, possibly overlapping
|
||||
curves (like Arrangement_2 but without the hierarchy tree).
|
||||
|
||||
- I/O utilities for planar maps and arrangements for textual and
|
||||
graphical streams. (It is possible to save and later reload built
|
||||
planar maps or arrangements.)
|
||||
|
||||
- New arrangement traits class for line segments and circular arcs
|
||||
(Arr_segment_circle_traits<NT>).
|
||||
|
||||
- New faster traits for polylines specialized for using the LEDA
|
||||
rational kernel (Arr_leda_polylines_traits). The LEDA traits for
|
||||
segments was also made faster.
|
||||
|
||||
- A new point location strategy (Pm_simple_point_location<Planar_map>).
|
||||
|
||||
Halfedge Data Structure
|
||||
The halfedge data structure has been completely revised. The new design
|
||||
is more in line with the STL naming scheme and it provides a safe and
|
||||
coherent type system throughout the whole design (no void* pointers
|
||||
anymore), which allows for better extendibility. A user can add new
|
||||
incidences in the mesh easily. The new design also uses standard
|
||||
allocators with a new template parameter that has a suitable default.
|
||||
|
||||
The old design is still available, but its use is deprecated, see the
|
||||
manual of deprecated packages for its documentation. Reported bugs in
|
||||
copying the halfedge data structure (and therefore also polyhedral
|
||||
surfaces) have been fixed in both designs. Copying a list based
|
||||
representation is now based on hash maps instead of std::map and
|
||||
therefore considerably faster.
|
||||
|
||||
Polyhedral Surface
|
||||
The polyhedral surface has been rewritten to work with the new
|
||||
halfedge data structure design. The user level interface of the
|
||||
CGAL::Polyhedron_3 class is almost backwards compatible with the
|
||||
previous class. The exceptions are the template parameter list,
|
||||
everything that relies on the flexibility of the underlying
|
||||
halfedge data structure, such as a self written facet class, and
|
||||
that the distinction between supported normals and supported planes
|
||||
has been removed. Only planes are supported. See the manuals for
|
||||
suggestions how to handle normals instead of planes.
|
||||
|
||||
More example programs are provided with polyhedral surfaces,
|
||||
for example, one about Euler operator and one computing a subdivision
|
||||
surface given a control mesh as input.
|
||||
|
||||
The old design is still available for backwards compatibility and to
|
||||
support older compiler, such as MSVC++6.0. For the polyhedral surface,
|
||||
old and new design cannot be used simultaneously (they have identical
|
||||
include file names and class names). The include files select
|
||||
automatically the old design for MSVC++6.0 and the new design
|
||||
otherwise. This automatism can be overwritten by defining appropriate
|
||||
macros before the include files. The old design is selected with the
|
||||
CGAL_USE_POLYHEDRON_DESIGN_ONE macro. The new design is selected with
|
||||
the CGAL_USE_POLYHEDRON_DESIGN_TWO macro.
|
||||
|
||||
|
||||
2D Triangulation
|
||||
|
||||
The geometric traits class requirements have been changed to conform
|
||||
to the new CGAL kernels. CGAL kernel classes can be used as traits
|
||||
classes for all 2D triangulations except for regular triangulations.
|
||||
|
||||
Additionnal functionality:
|
||||
- dual method for regular triangulations (to build a power diagram)
|
||||
- unified names and signatures for various "find_conflicts()"
|
||||
member functions in Delaunay and constrained Delaunay triangulation.
|
||||
- As an alternative to the simple insert() member function,
|
||||
insertion of points in those triangulation can be performed using the
|
||||
combination of find_conflicts() and star_hole() which eventually
|
||||
allows the user to keep track of deleted faces.
|
||||
|
||||
More demos and examples
|
||||
|
||||
3D Triangulation
|
||||
|
||||
Major improvements
|
||||
- A new class Triangulation_hierarchy_3 that allows a faster point
|
||||
location, and thus construction of the Delaunay triangulation
|
||||
- A new method for removing a vertex from a Delaunay triangulation
|
||||
that solves all degenerate cases
|
||||
- Running time of the usual location and insertion methods improved
|
||||
|
||||
A bit more functionality, such as
|
||||
- New geomview output
|
||||
- dual methods in Delaunay triangulations to draw the Voronoi diagram
|
||||
|
||||
More demos and examples
|
||||
|
||||
Changes in interface
|
||||
- Traits classes requirements have been modified
|
||||
- The kernel can be used directly as a traits class (except for
|
||||
regular triangulation)
|
||||
- insert methods in Triangulation_data_structure have a new interface
|
||||
|
||||
3D Alpha shapes
|
||||
A new class (Alpha_shapes_3) that computes Alpha shapes of point sets
|
||||
in 3D is available.
|
||||
|
||||
Geometric Optimisation
|
||||
|
||||
The traits requirements for Matrix_search and Min_quadrilateral_2
|
||||
have been changed to bring them in line with the CGAL kernels.
|
||||
|
||||
Point_set_2
|
||||
|
||||
- now independent of LEDA, based on the CGAL Delaunay triangulation and
|
||||
converted to kernel traits
|
||||
- function template versions of the provided query operations
|
||||
|
||||
|
||||
Support Library:
|
||||
----------------
|
||||
In_place_list has a new third template parameter
|
||||
(with a suitable default) for an STL-compliant allocator.
|
||||
|
||||
Unique_hash_map is a new support class.
|
||||
|
||||
Geomview_stream :
|
||||
- Geomview version 1.8.1 is now required.
|
||||
- no need to have a ~/.geomview file anymore.
|
||||
- new output operators for triangulations.
|
||||
- new output operators for Ray_2, Line_2, Ray_3, Line_3, Sphere_3.
|
||||
- various new manipulators.
|
||||
|
||||
Number types :
|
||||
- Lazy_exact_nt<NT> is a new number type wrapper to speed up exact
|
||||
number types.
|
||||
- MP_Float is a new multiprecision floating point number type. It can
|
||||
do exact additions, subtractions and multiplications over
|
||||
floating point values.
|
||||
|
||||
Window stream
|
||||
In cooperation with Algorithmic Solutions, GmBH (distributors of
|
||||
the LEDA library), we can now offer a visualization package
|
||||
downloadable in binary form that support visualization on a ported
|
||||
version of the LEDA window lib.
|
||||
|
||||
|
||||
----------------------------- Release 2.2 ------------------------------------
|
||||
|
||||
Version 2.2 differs from version 2.2 in the platforms that are supported and
|
||||
in functionality.
|
||||
|
||||
Additional supported platforms:
|
||||
|
||||
- the KAI compiler (4.0) on Solaris 5.8
|
||||
- Borland C++ (5.5)
|
||||
|
||||
The following functionality has been added:
|
||||
|
||||
- There is a new, non-reference-counted kernel, Simple_cartesian. Because
|
||||
reference counting is not used, and thus coordinates are stored within a
|
||||
class, debugging is easier using this kernel. This kernel can also be
|
||||
faster in some cases than the reference-counted Cartesian kernel.
|
||||
|
||||
- New optimisation algorithms:
|
||||
|
||||
-- Min_annulus_d - Algorithm for computing the smallest enclosing
|
||||
annulus of points in arbitrary dimension
|
||||
-- Polytope_distance_d - Algorithm for computing the (squared)
|
||||
distance between two convex polytopes in arbitrary dimension
|
||||
-- Width_3 - Algorithm for computing the (squared) width of points
|
||||
sets in three dimensions
|
||||
|
||||
- 2D Triangulations
|
||||
|
||||
-- There are now two triangulation data structures available in CGAL.
|
||||
The new one uses a list to store the faces and allows one to
|
||||
represent two-dimensional triangulations embedded in three spaces
|
||||
as well as planar triangulations.
|
||||
-- The triangulation hierarchy which allows fast location query
|
||||
is now available.
|
||||
|
||||
- Inifinite objects can now be included in planar maps.
|
||||
|
||||
- Removal as well as insertions of vertices for 3D Delaunay triangulations
|
||||
is now possible.
|
||||
|
||||
- A generator for ``random'' simple polygons is now available.
|
||||
|
||||
- In directory demo/Robustness, programs that demonstrate typical robustness
|
||||
problems in geometric computing are presented along with the solutions to
|
||||
these problems that CGAL provides.
|
||||
|
||||
The following functionality has been removed:
|
||||
|
||||
-- The binary operations on polygons (union, intersection ...) have been
|
||||
removed since the code could not be adapted to all supported
|
||||
platforms. Arrangements can often be used as a substitute.
|
||||
|
||||
--------------------------------- Release 2.1 --------------------------------
|
||||
|
||||
Version 2.1 differs from version 2.0 in the platforms that are supported and
|
||||
in functionality.
|
||||
|
||||
Supported platforms:
|
||||
|
||||
- the newest gnu compiler (2.95.2) on Sun, SGI, Linux and Windows.
|
||||
- the Microsoft Visual C++ compiler, version 6.
|
||||
- the mips CC compiler version 7.3 under Irix.
|
||||
|
||||
Support for the old g++ compiler (2.8) and for mips CC 7.2 has been dropped.
|
||||
|
||||
The following functionality has been added:
|
||||
|
||||
- Alpha shapes and weighted alpha shapes in 2D. Alpha shapes are a
|
||||
generalization of the convex hull of a point set.
|
||||
- Arrangements in 2D. Arrangements are related to and based on planar maps.
|
||||
The major difference between the two is that curves are allowed to
|
||||
intersect in the case of arrangements.
|
||||
- Extensions to triangulations in 2D. Constrained triangulations are now
|
||||
dynamic: they support insertions of new constraint as well as removal of
|
||||
existing constraints. There are also constrained Delaunay triangulations.
|
||||
- Triangulations in 3D were added, both Delaunay triangulations and regular
|
||||
triangulations.
|
||||
- Min_quadrilateral optimisations have been added. These are algorithms to
|
||||
compute the minimum enclosing rectangle/parallelogram (arbitrary
|
||||
orientation) and the minimum enclosing strip of a convex point set.
|
||||
- 2d Point_set is a package for 2d range search operations, Delaunay
|
||||
triangulation, nearest neighbor queries. This package works only if
|
||||
LEDA is installed.
|
||||
- Support for GeoWin visualization library. This also depends on LEDA.
|
||||
- Support for using the CLN number type together with CGAL.
|
||||
|
||||
----------------------------- Release 2.0 ------------------------------------
|
||||
|
||||
The main difference from release 1.2 is the introduction of namespaces --
|
||||
namespace std for code from the standard library and namespace CGAL for
|
||||
the CGAL library.
|
||||
|
||||
----------------------------- Release 1.2 ------------------------------------
|
||||
|
||||
Additions to release 1.1 include:
|
||||
- topological map
|
||||
- planar map overlay
|
||||
- regular and constrained triangulations
|
||||
|
||||
----------------------------- Release 1.1 ------------------------------------
|
||||
|
||||
Additions to release 1.0 include:
|
||||
|
||||
- 3D intersections
|
||||
- kD points
|
||||
- 3D convex hull
|
||||
- kD smallest enclosing sphere
|
||||
|
||||
|
||||
----------------------------- Release 1.0 ------------------------------------
|
||||
|
||||
Additions to release 0.9 include:
|
||||
|
||||
- Polyhedral surfaces
|
||||
- Halfedge Data Structure
|
||||
- Planar maps
|
||||
|
||||
----------------------------- Release 0.9 ------------------------------------
|
||||
|
||||
Initial (beta) release of the CGAL library.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
EOF
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
|
||||
This is what you need to do to create a release:
|
||||
|
||||
|
||||
For the library:
|
||||
|
||||
Let <release_dir> be the directory in which you plan to build the release.
|
||||
|
||||
1. update the CHANGES file in this package to correspond to this
|
||||
release
|
||||
2. copy the latest internal release to <release_dir>
|
||||
3. unpack it and rename the directory CGAL-M.m
|
||||
4. edit the script release_scripts/make_public_release as instructed
|
||||
in the script
|
||||
5. cd CGAL-M.m
|
||||
6. run the script release_scripts/make_public_release to
|
||||
Remove the test directory.
|
||||
Remove developer_scripts dir
|
||||
Remove doc_tex dir
|
||||
Remove src/CGALwin dir
|
||||
Remove examples/*/cgal_test, demos/*/cgal_test,
|
||||
examples/*/version demos/*/version
|
||||
Find all .C and .h files and collect them in a file
|
||||
Run the script 'make_public_header' to update the headers of
|
||||
all files.
|
||||
Edit include/CGAL/config.h
|
||||
#define CGAL_VERSION ...
|
||||
#define CGAL_VERSION_NR ...
|
||||
7. Edit install_cgal script: remove the "y" in INTERNAL_RELEASE='y'.
|
||||
|
||||
For the manuals:
|
||||
|
||||
1. Check out the package Manual from the CVS server and follow the
|
||||
instructions in the INSTALL file
|
||||
2. cd Manual
|
||||
3. install_manual_files ?.?-I-?? (number of latest internal release)
|
||||
4. follow the directions in Manual/README to create the
|
||||
manuals (but don't install them yet)
|
||||
5. in the CGAL-M.m directory, create doc_ps, doc_pdf and
|
||||
doc_html/installation directories to hold the installation
|
||||
doc. Copy the appropriate files from directory
|
||||
Manual/CGAL-M.m_doc_tex/installation to these directories.
|
||||
|
||||
6. For the HTML version in CGAL-M.m/doc_html (NOT in the Manual
|
||||
directory), do the following bit of editing:
|
||||
remove the navigation links to bibliography, index and title;
|
||||
remove the files title.html and manual_index.html.
|
||||
|
||||
Package the code:
|
||||
1. In directory CGAL-M.m do
|
||||
find CGAL-M.m -exec touch 01221530 {} \;
|
||||
in order to touch all files (Here the date/time Jan 22, 15:30 was
|
||||
used as an example)
|
||||
2. Make CGAL-M.m.tar.gz with tar and gzip and CGAL-M.m.zip with zip.
|
||||
gtar zcf CGAL-M.m.tar.gz CGAL-M.m
|
||||
tar cf CGAL-M.m.tar CGAL-M.m
|
||||
gzip CGAL-M.m.tar
|
||||
zip -r CGAL-M.m.zip CGAL-M.m
|
||||
|
||||
For the web pages:
|
||||
1. edit the following web pages (at least)
|
||||
news.html
|
||||
in_progress.html
|
||||
download.html
|
||||
home.html
|
||||
releases.html
|
||||
platforms.html
|
||||
Manual/doc_html/frameset/panel*.html (change release number)
|
||||
Manual/doc_html/html_tar.html
|
||||
Manual/doc_ps/index.html
|
||||
Manual/doc_pdf/index.html
|
||||
2. update the cgal_download.pl script to add the new release
|
||||
3. Perhaps update the download/CGALWin directory with new versions
|
||||
of the library for new platforms.
|
||||
|
||||
Install everything:
|
||||
1. install the manual (and include files) in
|
||||
/www/pub/www.cgal.org/Manual using "make install"
|
||||
2. copy the .tar.gz and .zip files for the library and
|
||||
the documentation to /ftp/pub/outgoing/CGAL/
|
||||
(can be done with "make pack" for the documentation)
|
||||
3. zip the individual .ps files for the documentation using
|
||||
make dest_zip_ps
|
||||
4. install the new web pages
|
||||
|
||||
Then finally ...
|
||||
4. announce the release (see announcement directory)
|
||||
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
Subject: CGAL 2.2, Computational Geometry Algorithms Library
|
||||
Body:
|
||||
We are pleased to announce release 2.2 of CGAL, the Computational
|
||||
Geometry Algorithms Library.
|
||||
|
||||
Major additions in this release are:
|
||||
o Support for the Borlnd compiler (5.5) on windows and the KAI compiler
|
||||
on Solaris.
|
||||
o Several optimisation algorithms (smallest enclosing annulus,
|
||||
polytope_distance, width of point sets in 3D)
|
||||
o Additions to 2d and 3d triangulations and 2d arrangements.
|
||||
o Demos showing robustnees problems and their solutions.
|
||||
o and more
|
||||
|
||||
The CGAL project is a collaborative effort to develop a robust,
|
||||
easy-to-use, and efficient C++ software library of geometric data
|
||||
structures and algorithms. The CGAL library contains:
|
||||
o Basic geometric primitives such as points, vectors, lines, predicates
|
||||
for testing things such as relative positions of points, and operations
|
||||
such as intersections and distance calculation.
|
||||
o A collection of standard data structures and geometric algorithms,
|
||||
such as convex hull, (Delaunay) triangulation, planar map, polyhedron,
|
||||
smallest enclosing sphere, and multidimensional query structures.
|
||||
o Interfaces to other packages, e.g. for visualisation, and I/O, and
|
||||
other support facilities.
|
||||
|
||||
For further information and for downloading the library and its
|
||||
documentation, please visit the CGAL web page:
|
||||
|
||||
http://www.cgal.org/
|
||||
|
||||
Should you have any questions or comments, please send a message to
|
||||
contact@cgal.org
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
Subject: CGAL 2.3, Computational Geometry Algorithms Library
|
||||
Body:
|
||||
We are pleased to announce release 2.3 of CGAL, the Computational
|
||||
Geometry Algorithms Library.
|
||||
|
||||
Major additions in this release include:
|
||||
|
||||
o Realization of a new kernel concept that provides more flexibility
|
||||
while being completely compatable with the previous design
|
||||
o d-dimensional kernel, convex hull and Delaunay triangulations
|
||||
o Redesign of the halfedge data structure to provide better
|
||||
extensibility
|
||||
o Improvements and additions in 2d and 3d triangulations and 2d
|
||||
planar maps and arrangements.
|
||||
o Boolean operations on polygons are provided via 2D Nef polyhedra
|
||||
o Dependencies on the LEDA library have been removed, except in the
|
||||
case of the PostScript stream.
|
||||
|
||||
See http://www.cgal.org/releases_frame.html for a complete list of
|
||||
changes.
|
||||
|
||||
The CGAL project is a collaborative effort to develop a robust,
|
||||
easy-to-use, and efficient C++ software library of geometric data
|
||||
structures and algorithms. The CGAL library contains:
|
||||
o Basic geometric primitives such as points, vectors, lines, predicates
|
||||
for testing things such as relative positions of points, and operations
|
||||
such as intersections and distance calculation.
|
||||
o A collection of standard data structures and geometric algorithms,
|
||||
such as convex hull, (Delaunay) triangulation, planar map, polyhedron,
|
||||
smallest enclosing sphere, and multidimensional query structures.
|
||||
o Interfaces to other packages, e.g. for visualisation, and I/O, and
|
||||
other support facilities.
|
||||
|
||||
For further information and for downloading the library and its
|
||||
documentation, please visit the CGAL web page:
|
||||
|
||||
http://www.cgal.org/
|
||||
|
||||
For information about services supporting and complementing CGAL,
|
||||
please visit:
|
||||
|
||||
http://www.geometryfactory.com
|
||||
|
||||
Should you have any questions or comments, please send a message to
|
||||
contact@cgal.org
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
Mailing lists:
|
||||
|
||||
cgal-develop@cs.uu.nl
|
||||
cgal-discuss-l@potino.mpi-sb.mpg.de
|
||||
cgal-announce@cs.uu.nl (Ask someone at Utrecht to restore list list before
|
||||
sending; it is emptied after every use)
|
||||
compgeom-announce@research.bell-labs.com
|
||||
|
||||
newsgroups:
|
||||
|
||||
comp.graphics.algorithms,
|
||||
comp.graphics.visualization,
|
||||
comp.graphics.animation,
|
||||
comp.programming,
|
||||
comp.robotics.misc,
|
||||
comp.simulation,
|
||||
sci.engr,
|
||||
sci.image.processing,
|
||||
sci.math
|
||||
|
||||
Moderated newsgroups:
|
||||
|
||||
comp.robotics.research
|
||||
|
|
@ -0,0 +1,233 @@
|
|||
#!/usr/bin/perl -w
|
||||
|
||||
#----------------------------------------------------------------#
|
||||
# This script updates a file with a valid internal header to
|
||||
# a file with a public header.
|
||||
# It does the following things:
|
||||
# it adds a release number and date
|
||||
# it removes email addresses from authors
|
||||
# it adds the public license
|
||||
#----------------------------------------------------------------#
|
||||
|
||||
use strict;
|
||||
#use Cwd;
|
||||
use File::Copy;
|
||||
#use File::Basename;
|
||||
#use File::Find;
|
||||
use Getopt::Std;
|
||||
|
||||
sub usage()
|
||||
{
|
||||
print STDERR<<"EOF";
|
||||
usage:
|
||||
$0 -h
|
||||
show this message and quit
|
||||
|
||||
$0 -v version [-d date] file1 ...
|
||||
$0 -v version [-d date] -f filenames_file
|
||||
|
||||
-v version of the release (compulsory)
|
||||
-d date of the release (default: today)
|
||||
The filenames may either be given on the command line
|
||||
or may be listed in a file, one name per line.
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
sub gjmove($$)
|
||||
{
|
||||
return 1 if rename($_[0], $_[1] );
|
||||
return (system('mv', "$_[0]", "$_[1]") == 0);
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------#
|
||||
# initialization #
|
||||
#----------------------------------------------------------------#
|
||||
|
||||
my $TEMPFILE;
|
||||
|
||||
|
||||
|
||||
sub print_license()
|
||||
{
|
||||
print TEMPFILE <<'END_OF_LICENSE';
|
||||
|
||||
// This software and related documentation are part of the Computational
|
||||
// Geometry Algorithms Library (CGAL).
|
||||
// This software and documentation are provided "as-is" and without warranty
|
||||
// of any kind. In no event shall the CGAL Consortium be liable for any
|
||||
// damage of any kind.
|
||||
//
|
||||
// Every use of CGAL requires a license.
|
||||
//
|
||||
// Academic research and teaching license
|
||||
// - For academic research and teaching purposes, permission to use and copy
|
||||
// the software and its documentation is hereby granted free of charge,
|
||||
// provided that it is not a component of a commercial product, and this
|
||||
// notice appears in all copies of the software and related documentation.
|
||||
//
|
||||
// Commercial licenses
|
||||
// - A commercial license is available through Algorithmic Solutions
|
||||
// (http://www.algorithmic-solutions.com).
|
||||
// - Commercial users may apply for an evaluation license by writing to
|
||||
// (Andreas.Fabri@geometryfactory.com).
|
||||
//
|
||||
// The CGAL Consortium consists of Utrecht University (The Netherlands),
|
||||
// ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany),
|
||||
// INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg
|
||||
// (Germany), Max-Planck-Institute Saarbrucken (Germany), RISC Linz (Austria),
|
||||
// and Tel-Aviv University (Israel).
|
||||
//
|
||||
END_OF_LICENSE
|
||||
}
|
||||
|
||||
|
||||
#----------------------------------------------------------------#
|
||||
# check_and_update_2 #
|
||||
#----------------------------------------------------------------#
|
||||
|
||||
sub check_and_update_2($$$)
|
||||
{
|
||||
my ($version, $date, $filename) = @_;
|
||||
my $warnings = 0;
|
||||
my $header_position = 1;
|
||||
# 1:before header; 2: in first part; 3: in second part 4: after header.
|
||||
|
||||
while ( <SOURCE_FILE> ) {
|
||||
print TEMPFILE $_;
|
||||
if ( m|^\s*//\s*={10,}\s*$| ) {
|
||||
$header_position = 2;
|
||||
last;
|
||||
}
|
||||
}
|
||||
if ($header_position != 2) {
|
||||
print FILE_CHECKS "$filename has no header.\n";
|
||||
return 0;
|
||||
}
|
||||
print TEMPFILE "//\n";
|
||||
$_ = <SOURCE_FILE>;
|
||||
$_ = <SOURCE_FILE> while (m|^\s*//\s*$|);
|
||||
if ($_ !~ m<^\s*//\s*Copyright\s*\(c\)\s*\d{4}((,\s?\d{4})*|(\s*-\s*\d{4}))\s+(t|T)he CGAL Consortium\s*$> ) {
|
||||
print FILE_CHECKS "$filename has no valid copyright notice.\n";
|
||||
return 0;
|
||||
}
|
||||
print TEMPFILE $_;
|
||||
print_license;
|
||||
while ( <SOURCE_FILE> ) {
|
||||
if (m|^\s*//\s*-{10,}\s*$|) {
|
||||
$header_position = 3;
|
||||
last;
|
||||
}
|
||||
}
|
||||
if ($header_position != 3) {
|
||||
print FILE_CHECKS "$filename has an incorrect header.\n";
|
||||
print FILE_CHECKS "The line with dashes (----) is missing.\n";
|
||||
return 0;
|
||||
}
|
||||
print TEMPFILE "// ", '-' x 70,"\n";
|
||||
|
||||
while ( <SOURCE_FILE> ) {
|
||||
if ( m|^\s*//\s*={10,}\s*$| ) {
|
||||
$header_position = 4;
|
||||
last;
|
||||
}
|
||||
if ( m<^\s*//\s*maintainer\s*:> ) {
|
||||
next;
|
||||
}
|
||||
if ( m<^\s*//\s*email\s*:> ) {
|
||||
next;
|
||||
}
|
||||
next if ($_ !~ m|^\s*//| );
|
||||
if ( m<^\s*//\s*release\s*:> ) {
|
||||
print TEMPFILE "// release : $version\n";
|
||||
next;
|
||||
}
|
||||
if ( m<^\s*//\s*release_date\s*:> ) {
|
||||
print TEMPFILE "// release_date : $date\n";
|
||||
next;
|
||||
}
|
||||
s/([\w]+)\s*<[-\w\.\s]+\@{1,2}[-\w\.\s]+>/$1/g;
|
||||
s/([\w]+)\s*\([-\w\.\s]+\@{1,2}[-\w\.\s]+\)/$1/g;
|
||||
s/([\w]+)\@{1,2}[-\w\.]+/$1/g;
|
||||
if ( m/\@/) {
|
||||
print FILE_CHECKS "In $filename remains a @ sign.\n ";
|
||||
print FILE_CHECKS $_;
|
||||
}
|
||||
print TEMPFILE $_;
|
||||
}
|
||||
if ($header_position != 4) {
|
||||
print FILE_CHECKS "Header of $filename does not end.\n";
|
||||
return 0;
|
||||
}
|
||||
print TEMPFILE '// email : contact@cgal.org',"\n";
|
||||
print TEMPFILE '// www : http://www.cgal.org',"\n//\n";
|
||||
print TEMPFILE "// ", '=' x 70,"\n";
|
||||
|
||||
|
||||
my ($lines_exceeding_length, $has_line_directives) = (0, 0);
|
||||
while ( <SOURCE_FILE> ) {
|
||||
print TEMPFILE $_;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
|
||||
sub check_and_update_file($$$)
|
||||
{
|
||||
my ($filename, $version, $date) = @_;
|
||||
my $check_status;
|
||||
if (! -r $filename) {
|
||||
print FILE_CHECKS "$filename is not a readable file.\n";
|
||||
return;
|
||||
}
|
||||
open SOURCE_FILE, "<$filename" || die "Error opening $filename: $!\n";
|
||||
open TEMPFILE, ">$TEMPFILE" || die;
|
||||
$check_status =check_and_update_2($version, $date, $filename);
|
||||
close SOURCE_FILE || die "Error closing $filename: $!";
|
||||
close TEMPFILE || die "Error closing temporary file: $!\n";
|
||||
if ($check_status == 0) {
|
||||
print FILE_CHECKS "Header check failed for $filename.\n";
|
||||
} else {
|
||||
gjmove($TEMPFILE, $filename )
|
||||
|| warn "Could not update file $filename\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sub main()
|
||||
{
|
||||
umask(002);
|
||||
|
||||
getopts('hv:d:f:');
|
||||
if ($::opt_h ) {
|
||||
usage;
|
||||
return;
|
||||
}
|
||||
$::opt_h = 0;
|
||||
if (!$::opt_v) {
|
||||
usage;
|
||||
die "Error: no -v option present.\n";
|
||||
}
|
||||
$TEMPFILE="tmp.$$";
|
||||
if ( ! $::opt_d ) {
|
||||
$::opt_d = `date '+%Y, %B %d'`;
|
||||
chomp $::opt_d;
|
||||
}
|
||||
open FILE_CHECKS, ">-";
|
||||
my $filename;
|
||||
if ( $::opt_f ) {
|
||||
open FILENAMES, "$::opt_f";
|
||||
while (defined($filename=<FILENAMES>)) {
|
||||
chomp $filename;
|
||||
check_and_update_file($filename, $::opt_v, $::opt_d);
|
||||
}
|
||||
close FILENAMES;
|
||||
} else {
|
||||
foreach $filename (@ARGV) {
|
||||
check_and_update_file($filename, $::opt_v, $::opt_d);
|
||||
}
|
||||
}
|
||||
close FILE_CHECKS;
|
||||
}
|
||||
|
||||
main;
|
||||
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
#!/usr/bin/perl -w
|
||||
my ($major,$minor) = (0,0);
|
||||
#my $release_date_option = "-d '2000, January 11'";
|
||||
my $release_date_option = "";
|
||||
|
||||
my $explanation=<<'EOF';
|
||||
What to do to make a public release
|
||||
|
||||
Take the latest internal release. Unpack it and go to its main directory.
|
||||
Make sure that the script 'make_public_header' is executable from here.
|
||||
Alter the second line above, such that the major and minor release
|
||||
number are ok.
|
||||
Run this script. This does the following:
|
||||
Remove the test directory.
|
||||
Remove developer_scripts dir
|
||||
Remove doc_tex dir
|
||||
Remove src/CGALwin dir
|
||||
Remove examples/*/cgal_test, demos/*/cgal_test,
|
||||
examples/*/version demos/*/version
|
||||
Find all .C and .h files and collect them in a file
|
||||
Run the script 'make_public_header' to update the headers of all files.
|
||||
Edit include/CGAL/config.h
|
||||
#define CGAL_VERSION ...
|
||||
#define CGAL_VERSION_NR ...
|
||||
|
||||
The rest is done manually still.
|
||||
Edit install_cgal script: remove the "y" in INTERNAL_RELEASE='y'.
|
||||
Rename the current directory to CGAL-x.y.
|
||||
Do
|
||||
find CGAL-x.y -exec touch 01221530 {} \;
|
||||
in order to touch all files (Here the date/time Jan 22, 15:30 was used
|
||||
as an example)
|
||||
Make CGAL-x.y.tar.gz with tar and gzip and CGAL-x.y.zip with zip.
|
||||
|
||||
The documentation goes separately from the rest, except for the installation
|
||||
manual.
|
||||
|
||||
EOF
|
||||
|
||||
|
||||
die if $major >= 1000;
|
||||
die if $major < 1;
|
||||
die if $minor >= 1000;
|
||||
die if $minor < 0;
|
||||
die "Quitting: No include/CGAL directory under current directory\n"
|
||||
if (! -d 'include/CGAL' );
|
||||
system ("rm -rf test");
|
||||
system ("rm -rf developer_scripts");
|
||||
system ("rm -rf doc_tex");
|
||||
system ("rm -rf src/CGALWin");
|
||||
system ("rm -f examples/*/cgal_test");
|
||||
system ("rm -f demos/*/cgal_test");
|
||||
system ("rm -f examples/*/version");
|
||||
system ("rm -f demos/*/version");
|
||||
system("find . -name '*.[hC]' -print > filenames");
|
||||
system("make_public_header -v CGAL-$major.$minor -f filenames $release_date_option");
|
||||
unlink 'filenames';
|
||||
my $version_nr = sprintf "1%03d%03d100",$major,$minor;
|
||||
my $config_file = 'include/CGAL/config.h';
|
||||
die if ! -r $config_file;
|
||||
open TMPFILE, ">tmp_config$$";
|
||||
open CONFIGFILE, "$config_file";
|
||||
while (<CONFIGFILE>) {
|
||||
if (/\s*#define\s+CGAL_VERSION\s/) {
|
||||
print TMPFILE "#define CGAL_VERSION ${major}.${minor}\n";
|
||||
} elsif (/\s*#define\s+CGAL_VERSION_NR\s/) {
|
||||
print TMPFILE "#define CGAL_VERSION_NR $version_nr\n";
|
||||
} else {
|
||||
print TMPFILE $_;
|
||||
}
|
||||
}
|
||||
close CONFIGFILE;
|
||||
close TMPFILE;
|
||||
rename "tmp_config$$", "$config_file";
|
||||
|
||||
#print $explanation;
|
||||
Loading…
Reference in New Issue