|
|
|
|
|
|
engine_path=$OPTARG # set engine_path, depot_tools and flutter engine folder will be put into this path |
|
|
|
;; |
|
|
|
p) |
|
|
|
gn_params="$gn_params --$OPTARG" # set the target platform android/ios/linux |
|
|
|
gn_params="$gn_params --$OPTARG" # set the target platform android/ios |
|
|
|
gn_params="$gn_params --runtime-mode=$runtime_mode" # set runtime mode release/debug/profile |
|
|
|
gn_params="$gn_params --runtime-mode=$runtime_mode" # set runtime mode release/debug |
|
|
|
;; |
|
|
|
e) |
|
|
|
bitcode="-bitcode_bundle -bitcode_verify" |
|
|
|
|
|
|
|
|
|
|
gclient sync |
|
|
|
|
|
|
|
cd src/flutter |
|
|
|
cd $FLUTTER_ROOT_PATH/flutter |
|
|
|
cd third_party/txt |
|
|
|
cd $FLUTTER_ROOT_PATH/flutter/third_party/txt |
|
|
|
cd $engine_path/engine/src/build/mac |
|
|
|
cp -f $work_path/patches/find_sdk.patch find_sdk.patch |
|
|
|
patch < find_sdk.patch -N |
|
|
|
cd ../.. |
|
|
|
cd $FLUTTER_ROOT_PATH |
|
|
|
./flutter/tools/gn $gn_params |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "\nStarting build engine..." |
|
|
|
cd $work_path |
|
|
|
cd .. |
|
|
|
cd $work_path/../ |
|
|
|
|
|
|
|
if [ -d '../com.unity.uiwidgets/Runtime/Plugins/ios' ]; |
|
|
|
then |
|
|
|
echo "ios folder already exist, skip create folder" |
|
|
|
else |
|
|
|
mkdir ../com.unity.uiwidgets/Runtime/Plugins/ios |
|
|
|
fi |
|
|
|
rm -rf build_release/* |
|
|
|
rm -rf ../com.unity.uiwidgets/Runtime/Plugins/ios/* |
|
|
|
cp -r build_release/. ../com.unity.uiwidgets/Runtime/Plugins/ios |
|
|
|
rm -rf build_debug/* |
|
|
|
rm -rf ../com.unity.uiwidgets/Runtime/Plugins/ios/* |
|
|
|
cp -r build_debug/. ../com.unity.uiwidgets/Runtime/Plugins/ios |
|
|
|
cd Scripts |
|
|
|
xcode_path="" |
|
|
|
xcode_path=`python -c 'import prelink; print prelink.get_xcode_path()'` |
|
|
|
|
|
|
|
target_files="" |
|
|
|
cd Scripts/../ |
|
|
|
cd .. |
|
|
|
python3 Scripts/prelink.py $tundra_file $runtime_mode $output_path $work_path $bitcode |
|
|
|
|