This repository has been archived by the owner on Jul 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbundleSamples.bat
45 lines (34 loc) · 2.13 KB
/
bundleSamples.bat
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
@echo off
SETLOCAL EnableDelayedExpansion
SET version=1.0.0
SET filename=SolARSample_MapUpdate_%version%
SET arg1=%1
IF NOT "!arg1!"=="" (SET filename=%arg1%)
echo filename is %filename%
echo "**** Install dependencies locally"
remaken install packagedependencies.txt || (echo "Error: could not remaken install release deps" && EXIT /B 1)
remaken install packagedependencies.txt -c debug || (echo "Error: could not remaken install debug deps" && EXIT /B 1)
echo "**** Bundle dependencies in bin folder"
FOR /D /R %%d IN (SolARSample*) DO (
For %%f IN (%%~fd\*_conf.xml) DO (
echo "** Bundle sample configuration file %%f"
remaken bundleXpcf --recurse -d ./deploy/bin/x86_64/shared/release -s modules "%%f" || (echo "Error: could not remaken bundleXpcf release deps of SolAR sample (%%f)" && EXIT /B 1)
remaken bundleXpcf --recurse -d ./deploy/bin/x86_64/shared/debug -s modules -c debug "%%f" || (echo "Error: could not remaken bundleXpcf debug deps of SolAR sample (%%f)" && EXIT /B 1)
)
)
FOR /D /R %%d IN (SolARPipeline*) DO (
For %%f IN (%%~fd\*_conf.xml) DO (
echo "** Bundle sample configuration file %%f"
remaken bundleXpcf --recurse -d ./deploy/bin/x86_64/shared/release -s modules "%%f" || (echo "Error: could not remaken bundleXpcf release deps of SolAR pipeline (%%f)" && EXIT /B 1)
remaken bundleXpcf --recurse -d ./deploy/bin/x86_64/shared/debug -s modules -c debug "%%f" || (echo "Error: could not remaken bundleXpcf debug deps of SolAR pipeline (%%f)" && EXIT /B 1)
)
)
echo "**** Zip bundles"
("7z.exe" a -tzip deploy\%filename%_debug.zip README.md ^
&& "7z.exe" a -tzip deploy\%filename%_release.zip README.md ^
&& "7z.exe" a -tzip deploy\%filename%_debug.zip LICENSE ^
&& "7z.exe" a -tzip deploy\%filename%_release.zip LICENSE ^
&& "7z.exe" a -tzip deploy\%filename%_debug.zip installData.bat ^
&& "7z.exe" a -tzip deploy\%filename%_release.zip installData.bat ^
&& "7z.exe" a -tzip deploy\%filename%_debug.zip deploy\bin\x86_64\shared\debug ^
&& "7z.exe" a -tzip deploy\%filename%_release.zip deploy\bin\x86_64\shared\release) || (echo "Error: could not create bundle archive" && EXIT /B 1)