浏览代码

Merge pull request #170 from Unity-Technologies/zgh/build_scripts

Zgh/build scripts
/main
GitHub 3 年前
当前提交
7cfe6de7
共有 7 个文件被更改,包括 97 次插入57 次删除
  1. 55
      com.unity.uiwidgets/Runtime/Plugins/Android/libUIWidgets.so.meta
  2. 6
      engine/Scripts/lib_build.py
  3. 19
      engine/Scripts/lib_build_android.sh
  4. 20
      engine/Scripts/lib_build_ios.sh
  5. 20
      engine/Scripts/lib_build_ios_bitcode.sh
  6. 20
      engine/Scripts/lib_build_mac.sh
  7. 14
      engine/Scripts/lib_build_win.bat

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


validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 0
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 1
- first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
- first:
enabled: 0
enabled: 1
settings: {}
- first:
Editor: Editor

CPU: AnyCPU
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
iPhone: iOS
second:
enabled: 0
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

6
engine/Scripts/lib_build.py


os.makedirs(Path(work_path + "/../artifacts/rsp/backup"))
copy_file(Path(work_path + "/../" + rsp), Path(work_path + "/../artifacts/rsp/backup"))
os.chdir(Path(work_path))
rsp_patch()
rsp_patch(rsp)
os.chdir(Path(work_path + "/../"))
os.system("artifacts/Stevedore/android-ndk-mac/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ " + "@\"" + rsp + "\"")
os.system(flutter_root_path + "/buildtools/mac-x64/clang/bin/clang++ " + "@\"" + rsp + "\"")

shutil.copy(src_file, target_path)
def rsp_patch():
def rsp_patch(rsp_path):
file = Path(work_path + "/../artifacts/rsp/14590475716575637239.rsp")
file = Path(work_path + "/../" + rsp_path)
old_str = ',--icf-iterations=5'
with open(file, "r") as f:
for line in f:

19
engine/Scripts/lib_build_android.sh


engine_path=$(pwd)
runtime_mode=release
while getopts ":r:m:" opt
do
case $opt in
r)
engine_path=$OPTARG # set engine_path, depot_tools and flutter engine folder will be put into this path
;;
m)
runtime_mode=$OPTARG
;;
?)
echo "unknown param"
exit 1;;
esac
done
python3 lib_build.py -r $engine_path -p android -m $runtime_mode

20
engine/Scripts/lib_build_ios.sh


engine_path=$(pwd)
runtime_mode=release
while getopts ":r:m:" opt
do
case $opt in
r)
engine_path=$OPTARG # set engine_path, depot_tools and flutter engine folder will be put into this path
;;
m)
runtime_mode=$OPTARG
;;
?)
echo "unknown param"
exit 1;;
esac
done
python3 lib_build.py -r $engine_path -p ios -m $runtime_mode

20
engine/Scripts/lib_build_ios_bitcode.sh


engine_path=$(pwd)
runtime_mode=release
while getopts ":r:m:" opt
do
case $opt in
r)
engine_path=$OPTARG # set engine_path, depot_tools and flutter engine folder will be put into this path
;;
m)
runtime_mode=$OPTARG
;;
?)
echo "unknown param"
exit 1;;
esac
done
python3 lib_build.py -r $engine_path -m $runtime_mode -p ios -e

20
engine/Scripts/lib_build_mac.sh


engine_path=$(pwd)
runtime_mode=release
while getopts ":r:m:" opt
do
case $opt in
r)
engine_path=$OPTARG # set engine_path, depot_tools and flutter engine folder will be put into this path
;;
m)
runtime_mode=$OPTARG
;;
?)
echo "unknown param"
exit 1;;
esac
done
python3 lib_build.py -r $engine_path -p mac -m $runtime_mode

14
engine/Scripts/lib_build_win.bat


@echo off
set current_dir=%~dp0
set runtime_mode=release
set engine_path=%~dp0
set vs_path="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community"
:GETOPTS
if /I "%1" == "-m" set runtime_mode=%2 & shift
if /I "%1" == "-r" set engine_path=%2 & shift
if /I "%1" == "-v" set vs_path=%2 & shift
shift
if not "%1" == "" goto GETOPTS
cmd /k python3 lib_build.py -m %runtime_mode% -r %engine_path% -p windows -v %vs_path%
正在加载...
取消
保存