Skip to content

Commit 3ecc549

Browse files
authored
Merge pull request #25 from Unity-Technologies/update-p4api-21.2
Update P4 C++ API to 2021.2/2201121 and PerforcePlugin infrastructure
2 parents 1fe8b5c + 6d06e0f commit 3ecc549

File tree

195 files changed

+1843
-397
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

195 files changed

+1843
-397
lines changed

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[*]
2+
charset=utf-8
3+
end_of_line=lf
4+
trim_trailing_whitespace=true
5+
insert_final_newline=true
6+
indent_style=space
7+
indent_size=4
8+
9+
[{*.json,*.yml}]
10+
indent_size=2
11+
12+
[{*.vcxproj}]
13+
end_of_line=crlf
14+
indent_size=2
15+
16+
[{*.pl,*.pm,Makefile.*}]
17+
indent_style=tab

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.lib filter=lfs diff=lfs merge=lfs -text
2+
*.a filter=lfs diff=lfs merge=lfs -text
3+
PerforceBinaries/**/p4* filter=lfs diff=lfs merge=lfs -text

.gitignore

Lines changed: 39 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,39 @@
1-
# Specific
2-
Build/
3-
PerforceBinaries/
4-
Library/
5-
*.BASE.*.cpp
6-
*.LOCAL.*.cpp
7-
*.BACKUP.*.cpp
8-
*.REMOTE.*.cpp
9-
*.orig
10-
Test/tmp/*
11-
PerforcePlugin
12-
SubversionPlugin
13-
14-
# Compiled Object files
15-
*.slo
16-
*.lo
17-
*.o
18-
*.obj
19-
20-
# Precompiled Headers
21-
*.gch
22-
*.pch
23-
*.ipch
24-
25-
# Compiled Dynamic libraries
26-
*.so
27-
*.dylib
28-
*.dll
29-
30-
# Fortran module files
31-
*.mod
32-
33-
# Compiled Static libraries
34-
*.lai
35-
*.la
36-
*.a
37-
*.lib
38-
39-
# Executables
40-
*.exe
41-
*.out
42-
*.app
43-
44-
# Output folders
45-
[Dd]ebug/
46-
[Rr]elease/
47-
[Bb]in/
48-
[Oo]bj/
49-
50-
# Visual Studio 2010 local files
51-
*.vcxproj.user
52-
*.opensdf
53-
*.sdf
54-
*.suo
55-
56-
# Visual Studio 2015 local files
57-
.vs/
58-
59-
# Test Ouput
60-
TestResults/
61-
62-
# Sublime files
63-
*.sublime-project
64-
*.sublime-workspace
65-
server.pid
66-
67-
# VI files
68-
*.swp
69-
70-
# CLion files
71-
.idea
1+
# Specific
2+
Build/
3+
Library/
4+
*.BASE.*.cpp
5+
*.LOCAL.*.cpp
6+
*.BACKUP.*.cpp
7+
*.REMOTE.*.cpp
8+
*.orig
9+
Test/tmp/*
10+
PerforcePlugin
11+
12+
# Output folders
13+
[Dd]ebug/
14+
[Rr]elease/
15+
[Bb]in/
16+
[Oo]bj/
17+
18+
# Visual Studio 2010 local files
19+
*.vcxproj.user
20+
*.opensdf
21+
*.sdf
22+
*.suo
23+
24+
# Visual Studio local files
25+
.vs/
26+
27+
# Test Ouput
28+
TestResults/
29+
30+
# Sublime files
31+
*.sublime-project
32+
*.sublime-workspace
33+
server.pid
34+
35+
# VI files
36+
*.swp
37+
38+
# JetBrains IDEs files
39+
.idea/

.yamato/linux-build.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
name: Linux - Build & Test VCS plugins
22
agent:
3-
type: Unity::VM
4-
image: cds-ops/ubuntu-16.04-katana-agent
5-
flavor: b1.large
3+
type: Unity::VM
4+
image: cds-ops/ubuntu-16.04-katana-agent
5+
flavor: b1.large
66

77
commands:
8-
- hg clone --config extensions.largefiles= http://hg-mirror-slo.hq.unity3d.com/unity-extra/perforce PerforceBinaries
9-
- perl build.pl | tee linux_build.txt
10-
- perl build.pl -test | tee linux_test.txt
8+
# Build PerforcePlugin and TestServer
9+
- perl build.pl
10+
11+
# Perforce CLI and server
12+
- chmod +x PerforceBinaries/linux64/p4 PerforceBinaries/linux64/p4d
13+
14+
# Run Perforce integration tests with the TestServer
15+
- perl build.pl -test
16+
1117
artifacts:
12-
builds:
13-
paths:
14-
- "Build/linux64/PerforcePlugin"
15-
logs:
16-
paths:
17-
- "linux_build.txt"
18-
- "linux_test.txt"
18+
builds:
19+
paths:
20+
- "Build/linux64/PerforcePlugin"

.yamato/osx-build.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
name: Mac - Build & Test VCS plugins
22
agent:
3-
type: Unity::VM::osx
4-
image: desktop/unity-macos-10.15-xcode-12.2:stable
5-
flavor: b1.large
3+
type: Unity::VM::osx
4+
image: desktop/unity-macos-10.15-xcode-12.2:stable
5+
flavor: b1.large
66

77
commands:
8-
- hg clone --config extensions.largefiles= http://hg-mirror-slo.hq.unity3d.com/unity-extra/perforce PerforceBinaries
9-
- perl build.pl | tee mac_build.txt
10-
- perl build.pl -test | tee mac_test.txt
8+
# Build PerforcePlugin and TestServer
9+
- perl build.pl
10+
11+
# Perforce CLI and server
12+
- chmod +x PerforceBinaries/OSX/p4 PerforceBinaries/OSX/p4d
13+
14+
# Run Perforce integration tests with the TestServer
15+
- perl build.pl -test
1116

1217
artifacts:
13-
builds:
14-
paths:
15-
- "Build/OSXx64/PerforcePlugin"
16-
logs:
17-
paths:
18-
- "mac_build.txt"
19-
- "mac_test.txt"
18+
builds:
19+
paths:
20+
- "Build/OSXx64/PerforcePlugin"

.yamato/windows-build.yml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
name: Win - Build & Test VCS plugins
22
agent:
3-
type: Unity::VM
4-
image: core-kaunas/win10-vs2010:latest
5-
flavor: b1.large
6-
7-
interpreter: powershell
3+
type: Unity::VM
4+
image: core-kaunas/win10-vs2010:latest
5+
flavor: b1.large
6+
87
commands:
9-
- perl build.pl | tee win_build.txt
10-
- hg clone --config extensions.largefiles= http://hg-mirror-slo.hq.unity3d.com/unity-extra/perforce PerforceBinaries
11-
- perl build.pl -test | tee win_test.txt
12-
8+
# Build PerforcePlugin and TestServer
9+
- perl build.pl
10+
11+
# Run Perforce integration tests with the TestServer
12+
- perl build.pl -test
13+
1314
artifacts:
14-
builds:
15-
paths:
16-
- "Build/Win32/PerforcePlugin.exe"
17-
- "Build/Win32/PerforcePlugin.pdb"
18-
logs:
19-
paths:
20-
- "win_build.txt"
21-
- "win_test.txt"
15+
builds:
16+
paths:
17+
- "Build/Win32/PerforcePlugin.exe"
18+
- "Build/Win32/PerforcePlugin.pdb"

.yamato/zipVCSPlugins.yml

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,31 @@
11
name: Zip VCS plugins
22
agent:
3-
type: Unity::VM
4-
image: core-kaunas/win10-vs2010:latest
5-
flavor: b1.small
3+
type: Unity::VM
4+
image: core-kaunas/win10-vs2010:latest
5+
flavor: b1.small
66

7-
interpreter: powershell
7+
interpreter: powershell
88
commands:
9-
- mkdir linux64
10-
- mkdir OSXx64
11-
- mkdir Win32
12-
- Copy-Item Build/linux64/* linux64 -Recurse
13-
- Copy-Item Build/OSXx64/* OSXx64 -Recurse
14-
- Copy-Item Build/Win32/* Win32 -Recurse
15-
9+
- mkdir linux64
10+
- mkdir OSXx64
11+
- mkdir Win32
12+
- Copy-Item Build/linux64/* linux64 -Recurse
13+
- Copy-Item Build/OSXx64/* OSXx64 -Recurse
14+
- Copy-Item Build/Win32/* Win32 -Recurse
15+
1616
artifacts:
17-
builds:
18-
paths:
19-
- "linux64/**"
20-
- "OSXx64/**"
21-
- "Win32/**"
22-
17+
builds:
18+
paths:
19+
- "linux64/**"
20+
- "OSXx64/**"
21+
- "Win32/**"
22+
2323
dependencies:
24-
- .yamato/windows-build.yml
25-
- .yamato/linux-build.yml
26-
- .yamato/osx-build.yml
27-
24+
- .yamato/windows-build.yml
25+
- .yamato/linux-build.yml
26+
- .yamato/osx-build.yml
27+
2828
triggers:
29-
branches:
30-
only:
29+
branches:
30+
only:
3131
- "/.*/"
32-
pull_requests:
33-
- sources:
34-
only:
35-
- "/.*/"

Makefile.gnu

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ AR = ar
77
GTK3_INCLUDE = -I/usr/include/gtk-3.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0 -I/usr/include/harfbuzz
88
GTK3_LIBRARIES = -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0
99

10-
CXXFLAGS += -O2 -g -fpermissive -Wno-deprecated-declarations $(GTK3_INCLUDE) $(P4PLUGIN_INCLUDE)
11-
LDFLAGS += -g
12-
LIBRARIES = -lstdc++ -lrt $(GTK3_LIBRARIES)
10+
CFLAGS += -O3 -g -fPIC -fexceptions -fvisibility=hidden -DLINUX
11+
CXXFLAGS += $(CFLAGS) -fpermissive -Wno-deprecated-declarations $(GTK3_INCLUDE) $(P4PLUGIN_INCLUDE)
12+
LDFLAGS += -g -pthread
13+
LIBRARIES += -lstdc++ -lrt $(GTK3_LIBRARIES)
14+
PLATFORM = linux64
1315

1416
COMMON_MODULES = $(COMMON_SRCS:.c=.o)
1517
COMMON_MODULES := $(COMMON_MODULES:.cpp=.o)
@@ -21,7 +23,7 @@ TESTSERVER_TARGET= Build/$(PLATFORM)/TestServer
2123
P4PLUGIN_MODULES = $(P4PLUGIN_SRCS:.c=.o)
2224
P4PLUGIN_MODULES := $(P4PLUGIN_MODULES:.cpp=.o)
2325
P4PLUGIN_TARGET = PerforcePlugin
24-
P4PLUGIN_LINK += $(LIBRARIES) -ldl -fPIC -no-pie
26+
P4PLUGIN_LINK += $(LIBRARIES) -ldl -no-pie
2527

2628
default: all
2729

@@ -49,7 +51,7 @@ $(TESTSERVER_TARGET): $(COMMON_MODULES) $(TESTSERVER_MODULES)
4951
$(CXX) -g $(LDFLAGS) -o $@ $^
5052

5153
$(P4PLUGIN_TARGET): $(COMMON_MODULES) $(P4PLUGIN_MODULES)
52-
$(CXX) $(LDFLAGS) -o $@ $^ $(P4PLUGIN_LINK) -L./P4Plugin/Source/r19.1/lib/$(PLATFORM)
54+
$(CXX) $(LDFLAGS) -o $@ $^ $(P4PLUGIN_LINK) -L./P4Plugin/Source/p4api/lib/$(PLATFORM) -L./P4Plugin/Source/openssl/lib/$(PLATFORM)
5355

5456
clean:
5557
rm -f Build/*.* $(COMMON_MODULES) $(P4PLUGIN_MODULES) $(TESTSERVER_MODULES)

Makefile.osx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ $(TESTSERVER_TARGET): $(COMMON_MODULES) $(TESTSERVER_MODULES)
5353
$(CXX) -g $(LDFLAGS) -o $@ $^
5454

5555
$(P4PLUGIN_TARGET): $(COMMON_MODULES) $(P4PLUGIN_MODULES)
56-
$(CXX) $(LDFLAGS) -o $@ -framework Cocoa $^ -L./P4Plugin/Source/r19.1/lib/osx64 $(P4PLUGIN_LINK)
56+
$(CXX) $(LDFLAGS) -o $@ -framework Cocoa -framework Security $^ -L./P4Plugin/Source/p4api/lib/osx64 -L./P4Plugin/Source/openssl/lib/osx64 $(P4PLUGIN_LINK)
5757

5858
clean:
5959
rm -f Build/*.* $(COMMON_MODULES) $(P4PLUGIN_MODULES) $(TESTSERVER_MODULES)

0 commit comments

Comments
 (0)