浏览代码

update mac(remove deployNp)

/zgh-build_scripts
guanghuispark 3 年前
当前提交
240de256
共有 3 个文件被更改,包括 38 次插入40 次删除
  1. 28
      engine/Build.bee.cs
  2. 2
      engine/Scripts/full_build.sh
  3. 48
      engine/Scripts/lib_build_mac.sh

28
engine/Build.bee.cs


var builtNP = np.SetupSpecificConfiguration(config, toolchain.DynamicLibraryFormat)
.DeployTo("build_debug");
dependencies_d.Add(builtNP.Path);
builtNP.DeployTo("../com.unity.uiwidgets/Runtime/Plugins/x86_64_debug");
// builtNP.DeployTo("../com.unity.uiwidgets/Runtime/Plugins/x86_64");
}
else if(codegen == CodeGen.Release)
{

builtNP.DeployTo("../com.unity.uiwidgets/Runtime/Plugins/x86_64_release");
// builtNP.DeployTo("../com.unity.uiwidgets/Runtime/Plugins/x86_64");
}
}

if(codegen == CodeGen.Debug)
{
var buildNP = np.SetupSpecificConfiguration(config, androidToolchain.DynamicLibraryFormat).DeployTo("build_debug");
var deoployNp = buildNP.DeployTo("../com.unity.uiwidgets/Runtime/Plugins/Android_debug");
// var deoployNp = buildNP.DeployTo("../com.unity.uiwidgets/Runtime/Plugins/Android");
dependencies_d.Add(deoployNp.Path);
// dependencies_d.Add(deoployNp.Path);
var deoployNp = buildNP.DeployTo("../com.unity.uiwidgets/Runtime/Plugins/Android_release");
// var deoployNp = buildNP.DeployTo("../com.unity.uiwidgets/Runtime/Plugins/Android");
dependencies_r.Add(deoployNp.Path);
// dependencies_r.Add(deoployNp.Path);
}
}

if(codegen == CodeGen.Debug)
{
var buildNp = buildProgram.DeployTo("build_debug");
var deployNp = buildProgram.DeployTo("../com.unity.uiwidgets/Runtime/Plugins/osx_debug");
// var deployNp = buildProgram.DeployTo("../com.unity.uiwidgets/Runtime/Plugins/osx");
dependencies_d.Add(deployNp.Path);
// dependencies_d.Add(deployNp.Path);
var deployNp = buildProgram.DeployTo("../com.unity.uiwidgets/Runtime/Plugins/osx_release");
// var deployNp = buildProgram.DeployTo("../com.unity.uiwidgets/Runtime/Plugins/osx");
dependencies_r.Add(deployNp.Path);
// dependencies_r.Add(deployNp.Path);
}
}
np.ValidConfigurations = validConfigurations;

if(codegen == CodeGen.Debug)
{
var builtNP = buildProgram.DeployTo("build_debug");
var deployNP = buildProgram.DeployTo("../com.unity.uiwidgets/Runtime/Plugins/iOS_debug/");
// var deployNP = buildProgram.DeployTo("../com.unity.uiwidgets/Runtime/Plugins/iOS/");
dependencies_d.Add(deployNP.Path);
// dependencies_d.Add(deployNP.Path);
var deployNP = buildProgram.DeployTo("../com.unity.uiwidgets/Runtime/Plugins/iOS_release/");
// var deployNP = buildProgram.DeployTo("../com.unity.uiwidgets/Runtime/Plugins/iOS/");
dependencies_r.Add(deployNP.Path);
// dependencies_r.Add(deployNP.Path);
}
}

2
engine/Scripts/full_build.sh


;;
"windows") echo 'You select windows'
;;
"all") echo 'You select all'
;;
*) echo "unknown platform, only support \"android\",\"ios\",\"mac\",\"windows\""
;;
esac

48
engine/Scripts/lib_build_mac.sh


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)
gn_params="$gn_params --bitcode" # enable-bitcode switch

if [ "$runtime_mode" == "release" ] && [ "$optimize" == "--unoptimized" ];
then
output_path="host_release_unopt"
echo $ninja_params
output_path="host_release"
echo $ninja_params
output_path="host_debug_unopt"
output_path="host_debug"
ninja_params=" -C out/host_debug flutter/third_party/txt:txt_lib"
elif [ "$runtime_mode" == "profile" ];
then

echo "\nGetting Depot Tools..."
if [ ! -n "$engine_path" ]; then
echo "Flutter engine path is not exist, please set the path by using \"-r\" param to set a engine path."
echo "Flutter engine path is not exist, please set the path by using \"-r\" param to set an engine path."
exit 1
fi
cd $engine_path

cd ../..
./flutter/tools/gn $gn_params
if [ "$runtime_mode" == "release" ] && [ "$optimize" == "--unoptimized" ];
then
echo "icu_use_data_file=false" >> out/host_release_unopt/args.gn
elif [ "$runtime_mode" == "release" ] && [ "$optimize" == "" ];
then
echo "icu_use_data_file=false" >> out/host_release/args.gn
elif [ "$runtime_mode" == "debug" ] && [ "$optimize" == "--unoptimized" ];
then
echo "icu_use_data_file=false" >> out/host_debug_unopt/args.gn
elif [ "$runtime_mode" == "debug" ] && [ "$optimize" == "" ];
then
echo "icu_use_data_file=false" >> out/host_debug/args.gn
elif [ "$runtime_mode" == "profile" ];
then
echo "not support profile build yet"
exit 1
fi
echo "icu_use_data_file=false" >> out/$output_path/args.gn
ninja $ninja_params
echo "\nStarting build engine..."

then
mono bee.exe mac_release
if [ -d '../com.unity.uiwidgets/Runtime/Plugins/osx' ];
then
echo "engine folder already exist, skip"
else
mkdir ../com.unity.uiwidgets/Runtime/Plugins/osx
fi
rm -rf ../com.unity.uiwidgets/Runtime/Plugins/osx/*
cp -r build_release/. ../com.unity.uiwidgets/Runtime/Plugins/osx
if [ -d '../com.unity.uiwidgets/Runtime/Plugins/osx' ];
then
echo "engine folder already exist, skip create folder"
else
mkdir ../com.unity.uiwidgets/Runtime/Plugins/osx
fi
rm -rf ../com.unity.uiwidgets/Runtime/Plugins/osx/*
cp -r build_debug/. ../com.unity.uiwidgets/Runtime/Plugins/osx
正在加载...
取消
保存