Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
6.6 kB · 231 lines
at develop
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232#!/usr/bin/perl## Main authors:# Christian Schulte <schulte@gecode.org>## Copyright:# Christian Schulte, 2010## This file is part of Gecode, the generic constraint# development environment:# http://www.gecode.org## Permission is hereby granted, free of charge, to any person obtaining# a copy of this software and associated documentation files (the# "Software"), to deal in the Software without restriction, including# without limitation the rights to use, copy, modify, merge, publish,# distribute, sublicense, and/or sell copies of the Software, and to# permit persons to whom the Software is furnished to do so, subject to# the following conditions:## The above copyright notice and this permission notice shall be# included in all copies or substantial portions of the Software.## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.##$dlldescription{"Kernel"} = "kernel";$dlldescription{"Search"} = "search engines";$dlldescription{"Int"} = "finite domain integers";$dlldescription{"Set"} = "finite integer sets";$dlldescription{"Float"} = "floats";$dlldescription{"Minimodel"} = "minimal modeling support";$dlldescription{"Driver"} = "script commandline driver";$dlldescription{"FlatZinc"} = "FlatZinc interpreter library";$dlldescription{"Gist"} = "Gist";$dlldescription{"Support"} = "support algorithms and datastructures";$i = 0;# Includes Gecode version and more$dllsuffix = $ARGV[$i++];if ($dllsuffix =~ /-([0-9]+)-([0-9]+)-([0-9]+)-([rd])-x[0-9]+\.dll/) { $revx = $1; $revy = $2; $revz = $3; $mode = $4;}# Directory where source files reside$dir = $ARGV[$i++];# File for which a resource template is to be generated$file = $ARGV[$i++];# Source files follows from folloeing argument positions$n_srcfiles = 0;while ($arg = $ARGV[$i]) { $srcfile[$n_srcfiles] = "$dir/$arg"; $n_srcfiles++; $i++;}print <<EOF/* * CAUTION: * This file has been automatically generated. Do not edit, * edit the following files instead: * - $dir/misc/genrc.perlEOF;for ($f=0; $f<$n_srcfiles; $f++) { print " * - $srcfile[$f]\n";}print <<EOF * * This file contains generated code fragments which are * copyrighted as follows: * * Main author: * Christian Schulte <schulte\@gecode.org> * * Copyright: * Christian Schulte, 2010 * * The generated code fragments are part of Gecode, the generic * constraint development environment: * http://www.gecode.org * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */EOF;# Find authors for copyright from srcfilesfor ($f=0; $f<$n_srcfiles; $f++) { open SRCFILE, $srcfile[$f]; $incopyright = 0; while ($l = <SRCFILE>) { if ($incopyright) { if ($l =~ /\*.*part of Gecode, the/) { $incopyright = 0; } elsif ($l =~ /\*\s*([^,]*)(, [0-9]+)+/) { $authors{$1} = 1; } } elsif ($l =~ /\*.*Copyright:/) { $incopyright = 1; } } close SRCFILE;}$copyright = "";foreach $a (sort(keys(%authors))) { $copyright = $copyright . ", " . $a;}$copyright =~ s|^, ||o;if ($file =~ /Gecode(.*)-([0-9]+-[0-9]+-[0-9]+-[rd]-.+)\.dll$/) { $filename = $file; $filetype = "VFT_DLL"; $icon = 0; $basename = "Gecode$1-$2"; $description = "Gecode " . $dlldescription{$1};} else { $filetype = "VFT_APP"; $icon = 1; if ($file =~ /fzn-gecode\.exe/) { $filename = "fzn-gecode.exe"; $basename = "fzn-gecode"; $description = "Gecode FlatZinc interpreter"; } elsif ($file =~ /test\.exe/) { $filename = "test.exe"; $basename = "test"; $description = "Gecode systematic tests"; } elsif ($file =~ /examples\/(.+)\.exe/) { $filename = "$1.exe"; $basename = "$1"; open SRCFILE, $srcfile[0]; $example = ""; while ($l = <SRCFILE>) { if ($l =~ /\\brief.*Example: (.*)/) { $example = $1; } } $example =~ s|\%||og; close SRCFILE; $description = "Gecode example: $example"; } else { die "Illegal file"; }}if ($mode =~ /r/) { $debug = 0;} else { $debug = "VS_FF_DEBUG";}print <<EOF#include <windows.h>EOF;if ($icon) { print "0 ICON \"misc/gecode-logo.ico\"\n";}print <<EOFVS_VERSION_INFO VERSIONINFOFILEVERSION $revx,$revy,$revz,0PRODUCTVERSION $revx,$revy,$revz,0FILEFLAGSMASK VS_FFI_FILEFLAGSMASKFILEFLAGS $debugFILEOS VOS_UNKNOWNFILETYPE $filetypeFILESUBTYPE VFT2_UNKNOWNBEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904E4" BEGIN VALUE "CompanyName", "Gecode team" VALUE "FileDescription", "$description" VALUE "FileVersion", "$revx.$revy.$revz" VALUE "InternalName", "$basename" VALUE "LegalCopyright", "$copyright (license information available from www.gecode.org)" VALUE "OriginalFilename", "$filename" VALUE "ProductName", "Gecode" VALUE "ProductVersion", "$revx.$revy.$revz" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1252 ENDENDEOF;