File: build-deps.pl

package info (click to toggle)
sleuthkit 4.6.5-1%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 39,264 kB
  • sloc: ansic: 171,812; cpp: 44,216; sh: 31,364; java: 17,674; makefile: 1,241; xml: 838; perl: 797; python: 707; sed: 16
file content (93 lines) | stat: -rwxr-xr-x 4,005 bytes parent folder | download | duplicates (3)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/usr/bin/perl

# Builds the dependent libraries
# run this from cygwin (that's what I do at least).

# This assumes that:
# - libewf has already been converted to 2010
# - msbuild is on the path (requires .Net in the path)

sub build_libewf() {
	print "Building libewf\n";

	chdir "$ENV{'LIBEWF_HOME'}" or die "error changing into libewf folder";
	chdir "msvscpp/" or die "error changing into libewf msvscpp folder";

	die "Project needs to be upgraded to 2010" unless (-e "libewf_dll/libewf_dll.vcxproj");
        `rm -f Release/*`;

        `rm -f libewf_dll/Release/*`;
        `rm -f BuildErrors.txt`;
        # 2010 version
        `msbuild.exe libewf.sln /p:Configuration=Release /clp:ErrorsOnly /nologo > BuildErrors.txt`;
        die "Build errors -- check libewf/msvscpp/BuildErrors.txt" if (-s "BuildErrors.txt");
}

sub build_poco() {
	print "Building Poco\n";

	chdir "$ENV{'POCO_HOME'}" or die "error changing into POCO folder";
	`rm -f bin/*`;
	`rm -f lib/*`;

	chdir "Foundation" or die "error changing into poco foundation folder";
        `rm -f BuildErrors.txt`;
        # 2010 version
        `msbuild.exe Foundation_vs100.vcxproj /p:Configuration=release_shared /clp:ErrorsOnly /nologo > BuildErrors.txt`;
        die "Build errors -- check poco/foundation/BuildErrors.txt" if (-s "BuildErrors.txt");

        `rm -f BuildErrors.txt`;
        # 2010 version
        `msbuild.exe Foundation_vs100.vcxproj /p:Configuration=debug_shared /clp:ErrorsOnly /nologo > BuildErrors.txt`;
        die "Build errors -- check poco/foundation/BuildErrors.txt" if (-s "BuildErrors.txt");
	chdir "..";

	chdir "Net" or die "error changing into poco Net folder";
        `rm -f BuildErrors.txt`;
        # 2010 version
        `msbuild.exe Net_vs100.vcxproj /p:Configuration=release_shared /clp:ErrorsOnly /nologo > BuildErrors.txt`;
        die "Build errors -- check poco/Net/BuildErrors.txt" if (-s "BuildErrors.txt");
        `rm -f BuildErrors.txt`;
        # 2010 version
        `msbuild.exe Net_vs100.vcxproj /p:Configuration=debug_shared /clp:ErrorsOnly /nologo > BuildErrors.txt`;
        die "Build errors -- check poco/Net/BuildErrors.txt" if (-s "BuildErrors.txt");
	chdir "..";

	chdir "XML" or die "error changing into poco XML folder";
        `rm -f BuildErrors.txt`;
        # 2010 version
        `msbuild.exe XML_vs100.vcxproj /p:Configuration=release_shared /clp:ErrorsOnly /nologo > BuildErrors.txt`;
        die "Build errors -- check poco/xml/BuildErrors.txt" if (-s "BuildErrors.txt");
        `rm -f BuildErrors.txt`;
        # 2010 version
        `msbuild.exe XML_vs100.vcxproj /p:Configuration=debug_shared /clp:ErrorsOnly /nologo > BuildErrors.txt`;
        die "Build errors -- check poco/xml/BuildErrors.txt" if (-s "BuildErrors.txt");
	chdir "..";

	chdir "Util" or die "error changing into poco Util folder";
        `rm -f BuildErrors.txt`;
        # 2010 version
        `msbuild.exe Util_vs100.vcxproj /p:Configuration=release_shared /clp:ErrorsOnly /nologo > BuildErrors.txt`;
        die "Build errors -- check poco/Util/BuildErrors.txt" if (-s "BuildErrors.txt");
        `rm -f BuildErrors.txt`;
        # 2010 version
        `msbuild.exe Util_vs100.vcxproj /p:Configuration=debug_shared /clp:ErrorsOnly /nologo > BuildErrors.txt`;
        die "Build errors -- check poco/Util/BuildErrors.txt" if (-s "BuildErrors.txt");
	chdir "..";

	chdir "Zip" or die "error changing into poco Zip folder";
        `rm -f BuildErrors.txt`;
        # 2010 version
        `msbuild.exe Zip_vs100.vcxproj /p:Configuration=release_shared /clp:ErrorsOnly /nologo > BuildErrors.txt`;
        die "Build errors -- check poco/Zip/BuildErrors.txt" if (-s "BuildErrors.txt");
        `rm -f BuildErrors.txt`;
        # 2010 version
        `msbuild.exe Zip_vs100.vcxproj /p:Configuration=debug_shared /clp:ErrorsOnly /nologo > BuildErrors.txt`;
        die "Build errors -- check poco/Zip/BuildErrors.txt" if (-s "BuildErrors.txt");
	chdir "..";


}

build_libewf();
build_poco();