浏览代码

update getopt

/zgh-build_scripts
guanghuispark 4 年前
当前提交
0fca71f8
共有 5 个文件被更改,包括 9 次插入15 次删除
  1. 7
      engine/Scripts/full_build.sh
  2. 2
      engine/Scripts/lib_build_android.sh
  3. 2
      engine/Scripts/lib_build_ios.sh
  4. 11
      engine/Scripts/lib_build_mac.sh
  5. 2
      engine/Scripts/lib_build_win.py

7
engine/Scripts/full_build.sh


ninja_params=""
bitcode=""
while getopts ":r:p:m:eo" opt
while getopts ":r:p:m:v:e" opt
do
case $opt in
r)

e)
bitcode="-e" # enable-bitcode switch
;;
v)
# do nothing here
;;
?)
echo "unknown param"
exit 1;;

;;
"mac") ./lib_build_mac.sh -m $runtime_mode -r $engine_path
;;
"windows") python3 lib_build_win.py -m $runtime_mode -r $engine_path
"windows") echo "Please run lib_build_win.py with params directly"
;;
*) echo "unknown platform, only support \"android\",\"ios\",\"mac\",\"windows\""
;;

2
engine/Scripts/lib_build_android.sh


echo "setting environment variable and other params..."
while getopts ":r:p:m:eo" opt
while getopts ":r:p:m:" opt
do
case $opt in
r)

2
engine/Scripts/lib_build_ios.sh


echo "setting environment variable and other params..."
while getopts ":r:p:m:eo" opt
while getopts ":r:p:m:e" opt
do
case $opt in
r)

11
engine/Scripts/lib_build_mac.sh


echo "setting environment variable and other params..."
while getopts ":r:p:m:eo" opt
while getopts ":r:m:" opt
p)
gn_params="$gn_params --$OPTARG" # set the target platform android/ios
;;
;;
e)
gn_params="$gn_params --bitcode" # enable-bitcode switch
;;
o)
optimize="" # optimize code switch
;;
?)
echo "unknown param"

2
engine/Scripts/lib_build_win.py


global bitcode
global visual_studio_path
options, args = getopt.getopt(sys.argv[1:], 'r:p:m:v:eo')
options, args = getopt.getopt(sys.argv[1:], 'r:p:m:v:')
for opt, arg in options:
if opt == '-r':
engine_path = arg # set engine_path, depot_tools and flutter engine folder will be put into this path

正在加载...
取消
保存