-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathinstall-build-obs-rematrix-filter.cmd
163 lines (135 loc) · 5.38 KB
/
install-build-obs-rematrix-filter.cmd
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
@echo off
SETLOCAL EnableDelayedExpansion
REM Check if obs-studio build exists.
REM If the obs-studio directory does exist, check if the last OBS tag built
REM matches the latest OBS tag.
REM If the tags match, do not build obs-studio.
REM If the tags do not match, build obs-studio.
REM If the obs-studio directory doesn't exist, build obs-studio.
echo Checking for obs-studio build...
set OBSLatestTagPrePull=0
set OBSLatestTagPostPull=0
set "BuildOBS="
REM Check the last tag successfully built by CI.
if exist C:\projects\obs-studio-last-tag-built.txt (
set /p OBSLastTagBuilt=<C:\projects\obs-studio-last-tag-built.txt
) else (
set OBSLastTagBuilt=0
)
if exist C:\projects\obs-studio (
echo obs-studio directory exists
echo Updating tag info
cd C:\projects\obs-studio
git fetch --all
git branch
cd C:\projects\obs-studio\plugins
dir
cd C:\projects\obs-studio
git checkout -b rematrix-filter-install
git describe --tags --abbrev=0 > C:\projects\latest-obs-studio-tag-pre-pull.txt
set /p OBSLatestTagPrePull=<C:\projects\latest-obs-studio-tag-pre-pull.txt
git branch
git reset --hard origin/rematrix-filter-install
git submodule update --init --recursive
cd C:\projects\obs-studio\plugins
dir
cd C:\projects\obs-studio\plugins\rematrix-filter\
dir
git log master --pretty=oneline --max-count=3
git checkout full-mix-sse
git status
git pull
git describe --tags --abbrev=0 > C:\projects\latest-obs-studio-tag-post-pull.txt
set /p OBSLatestTagPostPull=<C:\projects\latest-obs-studio-tag-post-pull.txt
)
REM Check the obs-studio tags for mismatches.
REM If a new tag was pulled, set the build flag.
if not %OBSLatestTagPrePull%==%OBSLatestTagPostPull% (
echo Latest tag pre-pull: %OBSLatestTagPrePull%
echo Latest tag post-pull: %OBSLatestTagPostPull%
echo Tags do not match. Need to rebuild OBS.
set BuildOBS=true
)
if not exist C:\projects\obs-studio (
echo obs-studio directory does not exist
cd C:\projects
git clone --recursive https://github.com/Andersama/obs-studio.git
cd C:\projects\obs-studio
git fetch --all
git branch
cd C:\projects\obs-studio\plugins
dir
cd C:\projects\obs-studio
git checkout -b rematrix-filter-install
git branch
git reset --hard origin/rematrix-filter-install
git submodule update --init --recursive
cd C:\projects\obs-studio\plugins
dir
cd C:\projects\obs-studio\plugins\rematrix-filter\
dir
git log master --pretty=oneline --max-count=3
git checkout full-mix-sse
git status
git pull
git describe --tags --abbrev=0 > C:\projects\obs-studio-latest-tag.txt
set /p OBSLatestTag=<C:\projects\obs-studio-latest-tag.txt
set BuildOBS=true
)
REM Some debug info
echo:
echo Latest tag pre-pull: %OBSLatestTagPrePull%
echo Latest tag post-pull: %OBSLatestTagPostPull%
echo Latest tag: %OBSLatestTag%
echo Last built OBS tag: %OBSLastTagBuilt%
if defined BuildOBS (
echo BuildOBS: true
) else (
echo BuildOBS: false
)
echo Building obs-studio w/ rematrix filter...
echo:
cd C:\projects\obs-studio\
if exist dependencies2015.zip (curl -kLO https://obsproject.com/downloads/dependencies2015.zip -f --retry 5 -z dependencies2015.zip) else (curl -kLO https://obsproject.com/downloads/dependencies2015.zip -f --retry 5 -C -)
REM if exist dependencies2017.zip (curl -kLO https://obsproject.com/downloads/dependencies2017.zip -f --retry 5 -z dependencies2017.zip) else (curl -kLO https://obsproject.com/downloads/dependencies2017.zip -f --retry 5 -C -)
if exist vlc.zip (curl -kLO https://obsproject.com/downloads/vlc.zip -f --retry 5 -z vlc.zip) else (curl -kLO https://obsproject.com/downloads/vlc.zip -f --retry 5 -C -)
if exist dependencies2015 rmdir /s /q C:\projects\obs-studio\dependencies2015
7z x dependencies2015.zip -odependencies2015
REM 7z x dependencies2017.zip -odependencies2017
if exist vlc rmdir /s /q C:\projects\obs-studio\vlc
7z x vlc.zip -ovlc
echo Setting Up VLC
echo:
set VLCPath=%CD%\vlc
echo Setting Up QT
echo:
call C:\projects\rematrix-filter\CI\install-setup-qt.cmd
echo Removing previous build dirs...
if exist build rmdir /s /q C:\projects\obs-studio\build
if exist build32 rmdir /s /q C:\projects\obs-studio\build32
if exist build64 rmdir /s /q C:\projects\obs-studio\build64
echo Making new build dirs...
mkdir build
mkdir build32
mkdir build64
echo Setting DepsPath
echo:
set DepsPath32=%CD%\dependencies2015\win32
set DepsPath64=%CD%\dependencies2015\win64
echo Running cmake for obs-studio %OBSLatestTag% 32-bit...
cd ./build32
cmake -G "Visual Studio 14 2015" -DCOPIED_DEPENDENCIES=false -DCOPY_DEPENDENCIES=true ..
echo:
echo:
echo Running cmake for obs-studio %OBSLatestTag% 64-bit...
cd ../build64
cmake -G "Visual Studio 14 2015 Win64" -DCOPIED_DEPENDENCIES=false -DCOPY_DEPENDENCIES=true ..
echo:
echo:
REM echo Building obs-studio %OBSLatestTag% 32-bit ^(Build Config: %build_config%^)...
REM call msbuild /m /p:Configuration=%build_config% C:\projects\obs-studio\build32\obs-studio.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
REM echo Building obs-studio %OBSLatestTag% 64-bit ^(Build Config: %build_config%^)...
REM call msbuild /m /p:Configuration=%build_config% C:\projects\obs-studio\build64\obs-studio.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
REM cd ..
REM git describe --tags --abbrev=0 > C:\projects\obs-studio-last-tag-built.txt
REM set /p OBSLastTagBuilt=<C:\projects\obs-studio-last-tag-built.txt