Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.

Commit a6ea70f

Browse files
authored
Merge pull request #170 from Unity-Technologies/zgh/build_scripts
Zgh/build scripts
2 parents cbf231b + 0d774e2 commit a6ea70f

File tree

7 files changed

+97
-57
lines changed

7 files changed

+97
-57
lines changed

com.unity.uiwidgets/Runtime/Plugins/Android/libUIWidgets.so.meta

Lines changed: 1 addition & 54 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

engine/Scripts/lib_build.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ def build_engine():
297297
os.makedirs(Path(work_path + "/../artifacts/rsp/backup"))
298298
copy_file(Path(work_path + "/../" + rsp), Path(work_path + "/../artifacts/rsp/backup"))
299299
os.chdir(Path(work_path))
300-
rsp_patch()
300+
rsp_patch(rsp)
301301
os.chdir(Path(work_path + "/../"))
302302
os.system("artifacts/Stevedore/android-ndk-mac/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ " + "@\"" + rsp + "\"")
303303
os.system(flutter_root_path + "/buildtools/mac-x64/clang/bin/clang++ " + "@\"" + rsp + "\"")
@@ -364,10 +364,10 @@ def copy_file(source_path, target_path):
364364
shutil.copy(src_file, target_path)
365365

366366

367-
def rsp_patch():
367+
def rsp_patch(rsp_path):
368368
global work_path
369369
file_data = ""
370-
file = Path(work_path + "/../artifacts/rsp/14590475716575637239.rsp")
370+
file = Path(work_path + "/../" + rsp_path)
371371
old_str = ',--icf-iterations=5'
372372
with open(file, "r") as f:
373373
for line in f:
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
engine_path=$(pwd)
2+
runtime_mode=release
3+
4+
while getopts ":r:m:" opt
5+
do
6+
case $opt in
7+
r)
8+
engine_path=$OPTARG # set engine_path, depot_tools and flutter engine folder will be put into this path
9+
;;
10+
m)
11+
runtime_mode=$OPTARG
12+
;;
13+
?)
14+
echo "unknown param"
15+
exit 1;;
16+
esac
17+
done
18+
19+
python3 lib_build.py -r $engine_path -p android -m $runtime_mode

engine/Scripts/lib_build_ios.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
engine_path=$(pwd)
2+
runtime_mode=release
3+
4+
while getopts ":r:m:" opt
5+
do
6+
case $opt in
7+
r)
8+
engine_path=$OPTARG # set engine_path, depot_tools and flutter engine folder will be put into this path
9+
;;
10+
m)
11+
runtime_mode=$OPTARG
12+
;;
13+
?)
14+
echo "unknown param"
15+
exit 1;;
16+
esac
17+
done
18+
19+
python3 lib_build.py -r $engine_path -p ios -m $runtime_mode
20+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
engine_path=$(pwd)
2+
runtime_mode=release
3+
4+
while getopts ":r:m:" opt
5+
do
6+
case $opt in
7+
r)
8+
engine_path=$OPTARG # set engine_path, depot_tools and flutter engine folder will be put into this path
9+
;;
10+
m)
11+
runtime_mode=$OPTARG
12+
;;
13+
?)
14+
echo "unknown param"
15+
exit 1;;
16+
esac
17+
done
18+
19+
python3 lib_build.py -r $engine_path -m $runtime_mode -p ios -e
20+

engine/Scripts/lib_build_mac.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
engine_path=$(pwd)
2+
runtime_mode=release
3+
4+
while getopts ":r:m:" opt
5+
do
6+
case $opt in
7+
r)
8+
engine_path=$OPTARG # set engine_path, depot_tools and flutter engine folder will be put into this path
9+
;;
10+
m)
11+
runtime_mode=$OPTARG
12+
;;
13+
?)
14+
echo "unknown param"
15+
exit 1;;
16+
esac
17+
done
18+
19+
python3 lib_build.py -r $engine_path -p mac -m $runtime_mode
20+

engine/Scripts/lib_build_win.bat

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@echo off
2+
set current_dir=%~dp0
3+
set runtime_mode=release
4+
set engine_path=%~dp0
5+
set vs_path="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community"
6+
7+
:GETOPTS
8+
if /I "%1" == "-m" set runtime_mode=%2 & shift
9+
if /I "%1" == "-r" set engine_path=%2 & shift
10+
if /I "%1" == "-v" set vs_path=%2 & shift
11+
shift
12+
if not "%1" == "" goto GETOPTS
13+
14+
cmd /k python3 lib_build.py -m %runtime_mode% -r %engine_path% -p windows -v %vs_path%

0 commit comments

Comments
 (0)