-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwin32-fixup.pl
More file actions
61 lines (53 loc) · 1.95 KB
/
win32-fixup.pl
File metadata and controls
61 lines (53 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#! e:/program files/perl/bin/perl.exe
# version info can be found in 'NEWS'
require "../local-paths.lib";
$major = 1;
$minor = 17;
$micro = 4;
$binary_age = 117;
$interface_age = 0;
$current_minus_age = 2;
sub process_file
{
my $outfilename = shift;
my $infilename = $outfilename . ".in";
open (INPUT, "< $infilename") || exit 1;
open (OUTPUT, "> $outfilename") || exit 1;
while (<INPUT>) {
s/\@CAIRO_VERSION_MAJOR\@/$major/g;
s/\@CAIRO_VERSION_MINOR\@/$minor/g;
s/\@CAIRO_VERSION_MICRO\@/$micro/g;
s/\@CAIRO_BINARY_AGE\@/$binary_age/g;
s/\@CAIRO_INTERFACE_AGE\@/$interface_age/g;
s/\@LT_CURRENT_MINUS_AGE\@/$current_minus_age/g;
s/\@GlibBuildRootFolder@/$glib_build_root_folder/g;
s/\@GenericIncludeFolder@/$generic_include_folder/g;
s/\@GenericLibraryFolder@/$generic_library_folder/g;
s/\@GenericWin32LibraryFolder@/$generic_win32_library_folder/g;
s/\@GenericWin32BinaryFolder@/$generic_win32_binary_folder/g;
s/\@Debug32TestSuiteFolder@/$debug32_testsuite_folder/g;
s/\@Release32TestSuiteFolder@/$release32_testsuite_folder/g;
s/\@Debug32TargetFolder@/$debug32_target_folder/g;
s/\@Release32TargetFolder@/$release32_target_folder/g;
s/\@GenericWin64LibraryFolder@/$generic_win64_library_folder/g;
s/\@GenericWin64BinaryFolder@/$generic_win64_binary_folder/g;
s/\@Debug64TestSuiteFolder@/$debug64_testsuite_folder/g;
s/\@Release64TestSuiteFolder@/$release64_testsuite_folder/g;
s/\@Debug64TargetFolder@/$debug64_target_folder/g;
s/\@Release64TargetFolder@/$release64_target_folder/g;
s/\@TargetSxSFolder@/$target_sxs_folder/g;
s/\@LibraryExt@/$library_ext/g;
print OUTPUT;
}
}
my $command=join(' ',@ARGV);
if (-1 != index($command, "-linux")) {
$library_ext = ".a";
} else {
$library_ext = ".lib";
}
if ($command eq -buildall) {
process_file ("msvc/cairo/cairo.rc");
process_file ("msvc/cairo.vsprops");
process_file ("msvc/cairo.props");
}