FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
TF2-Source-Code/tf2_src/vpc_scripts/generateSnapshot.pl at master · sr2echa/TF2-Source-Code · GitHub
sr2echa
/
TF2-Source-Code
Public
Notifications
You must be signed in to change notification settings
Fork
22
Star
81
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
TF2-Source-Code
/
tf2_src
/
vpc_scripts
/
generateSnapshot.pl
Copy path
More file actions
More file actions
Latest commit
History
History
History
74 lines (53 loc) · 1.45 KB
Breadcrumbs
TF2-Source-Code
/
tf2_src
/
vpc_scripts
/
generateSnapshot.pl
Copy path
File metadata and controls
74 lines (53 loc) · 1.45 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
use
strict;
use
File::Path;
print
(
"
\n
Deleting old backup
\n
"
);
system
(
"
rmdir
\/
s
\/
q backup
"
);
print
(
"
\n
Moving previous snapshot to backup
\n
"
);
system
(
"
ren snapshot backup
"
);
print
(
"
\n
Searching for .vcproj files...
\n
"
);
#
Find all vcproj's in src
system
(
"
dir
\/
s U:
\\
main
\\
src
\\
*.vcproj
\>
vcproj.txt
"
);
#
Read in the source file
open
(INFILE,
"
vcproj.txt
"
);
my
@lines
= <INFILE>;
close
( INFILE );
#
Process the file one line at a time
my
@output
;
#
print the header lines
push
(
@output
,
"
\/\/
VGC file
\n
"
);
push
(
@output
,
"
\n
"
);
push
(
@output
,
"
\/\/\n
"
);
push
(
@output
,
"
\/\/
Project definitions
\n
"
);
push
(
@output
,
"
\/\/\n
"
);
push
(
@output
,
"
\n
"
);
for
(
my
(
$i
) = 0;
$i
<
@lines
; ++
$i
)
{
#
Grab the path
if
(
$lines
[
$i
] =~
/
Directory of U:
\\
main
\\
src
\\
(.*)
/
)
{
my
(
$path
) =
$1
;
++
$i
;
#
ignore projects in vpc_scripts!
if
(
$path
=~
/
vpc_scripts
/
)
{
next
;
}
#
Grab the .vcproj filenames
while
(
$lines
[++
$i
] =~
/
[
\d
+
\/
]{2}
\d
+
\s
+
\S
+
\s
+
\w
{2}
\s
+
\S
+
\s
+(
\w
+).vcproj
/
)
{
if
(
$1
=~
/
_x360
/
)
{
next
;
}
my
(
$projectName
) =
$1
;
my
(
$fullpath
) =
join
(
'
\\
'
,
"
snapshot
"
,
$path
);
mkpath (
$fullpath
);
my
(
$fullname
) =
join
(
'
\\
'
,
$fullpath
,
$projectName
);
print
"
\n
Processing
$projectName
\n\n
"
;
#
generate the vpc
system
(
"
generateVPC2005.pl ..
\\
$path
\\
$projectName
-o
$fullpath
"
);
#
copy the .vcproj into the script tree
system
(
"
copy /y ..
\\
$path
\\
$projectName
.vcproj
$fullpath
"
);
}
}
}
Back
|
FazBrowse Home
|
New Git URL