]>
git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/third_party/prometheus-cpp/3rdparty/civetweb/VisualStudio/buildRelease.pl
3 # Copyright (c) 2013 No Face Press, LLC
4 # License http://opensource.org/licenses/mit-license.php MIT License
7 # This script builds and packages a Windows release.
8 # It requires ActiveState Perl to use and is intended
9 # to be run from the its directory under the
10 # VS Developer Command Prompt.
13 use Archive
::Zip
qw( :ERROR_CODES :CONSTANTS );
14 my $zip = Archive
::Zip-
>new();
18 sub getCivetwebVersion
{
19 print "Fetching CivetWeb version...\n";
20 open HEADER
, "${src}/include/civetweb.h";
22 if (m/define\s+CIVETWEB_VERSION\s+"(.+)"/) {
28 return "UNKNOWN_VERSION";
31 my $CIVETWEB_VERSION = getCivetwebVersion
();
32 my $basename = "civetweb-$CIVETWEB_VERSION";
33 my $dir = "${basename}";
36 print "\nBuilding Win32 Release version...\n";
37 system("msbuild /p:Configuration=Release /p:Platform=Win32 civetweb.sln");
41 print "\nBuilding x64 Release version...\n";
42 system("msbuild /p:Configuration=Release /p:Platform=x64 civetweb.sln");
46 my $archive = "${basename}-win.zip";
47 print "Creating archive $archive ...\n";
49 $zip->addDirectory("${dir}/");
51 $zip->addFile( "${src}/LICENSE.md", "${dir}/LICENSE.md" );
52 $zip->addFile( "${src}/README.md", "${dir}/README.md" );
53 $zip->addFile( "${src}/resources/systray.ico", "${dir}/systray.ico" );
54 $zip->addFile( "${src}/resources/civetweb_64x64.png",
55 "${dir}/civetweb_64x64.png" );
56 $zip->addFile( "${src}/resources/itworks.html", "${dir}/index.html" );
57 $zip->addFile( "${src}/VS2012/Release/Win32/civetweb_lua.exe",
58 "${dir}/civetweb32.exe" );
59 $zip->addFile( "${src}/VS2012/Release/x64/civetweb_lua.exe",
60 "${dir}/civetweb64.exe" );
62 unless ( $zip->writeToFileNamed($archive) == AZ_OK
) {