echo "-----分离海外版本res资源开始-----"
rm -rf resFenli
mkdir resFenli
mkdir resFenli/font
mkdir resFenli/image
mkdir resFenli/image/ui
mkdir resFenli/language
mkdir resFenli/music
mkdir resFenli/particle
mkdir resFenli/particle/develop
mkdir resFenli/shader
mkdir resFenli/sound
mkdir resFenli/ui
mkdir resFenli/ui/common
mkdir resFenli/ui/develop
mkdir resFenli/ui/server
cp res/font/arts.ttf resFenli/font/arts.ttf
cp res/font/system.ttf resFenli/font/system.ttf
cp res/image/bg.plist resFenli/image/bg.plist
if [ -f "res/image/bg.png" ]; then
cp res/image/bg.png resFenli/image/bg.png
fi
if [ -f "res/image/bg.pkm" ]; then
cp res/image/bg.pkm resFenli/image/bg.pkm
fi
cp res/image/loading.plist resFenli/image/loading.plist
cp res/image/loading.png resFenli/image/loading.png
cp res/image/text_icon.plist resFenli/image/text_icon.plist
cp res/image/text_icon.png resFenli/image/text_icon.png
cp res/image/prop_icon.plist resFenli/image/prop_icon.plist
cp res/image/prop_icon.png resFenli/image/prop_icon.png
cp res/image/ui/bottom_tips.png resFenli/image/ui/bottom_tips.png
cp res/image/ui/common2.plist resFenli/image/ui/common2.plist
cp res/image/ui/common2.png resFenli/image/ui/common2.png
cp -R res/language resFenli/
cp res/music/login_bgm.mp3 resFenli/music/login_bgm.mp3
cp res/particle/develop/logo.plist resFenli/particle/develop/logo.plist
cp res/particle/develop/logo.png resFenli/particle/develop/logo.png
#将res下整个shader文件夹放到resFenli下面
cp -R res/shader resFenli/
cp res/sound/ui_button_click.mp3 resFenli/sound/ui_button_click.mp3
cp -R res/ui/common resFenli/ui
cp -R res/ui/develop resFenli/ui
cp -R res/ui/server resFenli/ui
cp res/ui/new_loading.csb resFenli/ui/new_loading.csb
cp res/ui/new_update.csb resFenli/ui/new_update.csb
echo "-----删除原先res资源-----"
rm -rf res
echo "-----将临时文件resFenli重命名为res-----"
mv resFenli res
echo "-----分离海外版本res资源完成-----"
版本2:新增Android和IOS控制不同的包体积大小
read -p "输入平台(Android, IOS):" platform
while [ true ]; do
if [ $platform = "Android" ]; then
break
elif [ $platform = "IOS" ]; then
break
else
read -p "输入错误请重新输入平台(Android, IOS):" platform
fi
done
echo "-----分离海外版本res资源开始-----"
rm -rf resFenli
mkdir resFenli
mkdir resFenli/font
mkdir resFenli/image
mkdir resFenli/image/ui
mkdir resFenli/language
mkdir resFenli/music
mkdir resFenli/particle
mkdir resFenli/particle/develop
mkdir resFenli/shader
mkdir resFenli/sound
mkdir resFenli/ui
mkdir resFenli/ui/common
mkdir resFenli/ui/develop
mkdir resFenli/ui/server
cp -R res/font resFenli/
#拷贝cg动画和skip资源
cp overseaRes/skip.png resFenli/image/skip.png
cp -R overseaRes/video resFenli/
#
cp res/image/loading04.plist resFenli/image/loading04.plist
if [ -f "res/image/loading04.png" ]; then
cp res/image/loading04.png resFenli/image/loading04.png
fi
if [ -f "res/image/loading04.pvr.ccz" ]; then
cp res/image/loading04.pvr.ccz resFenli/image/loading04.pvr.ccz
fi
cp res/image/bg.plist resFenli/image/bg.plist
if [ -f "res/image/bg.png" ]; then
cp res/image/bg.png resFenli/image/bg.png
fi
if [ -f "res/image/bg.pkm" ]; then
cp res/image/bg.pkm resFenli/image/bg.pkm
fi
if [ -f "res/image/bg.pvr.ccz" ]; then
cp res/image/bg.pvr.ccz resFenli/image/bg.pvr.ccz
fi
cp res/image/loading.plist resFenli/image/loading.plist
if [ -f "res/image/loading.png" ]; then
cp res/image/loading.png resFenli/image/loading.png
fi
if [ -f "res/image/loading.pvr.ccz" ]; then
cp res/image/loading.pvr.ccz resFenli/image/loading.pvr.ccz
fi
cp res/image/text_icon.plist resFenli/image/text_icon.plist
if [ -f "res/image/text_icon.png" ]; then
cp res/image/text_icon.png resFenli/image/text_icon.png
fi
if [ -f "res/image/text_icon.pvr.ccz" ]; then
cp res/image/text_icon.pvr.ccz resFenli/image/text_icon.pvr.ccz
fi
cp res/image/prop_icon.plist resFenli/image/prop_icon.plist
if [ -f "res/image/prop_icon.pvr.ccz" ]; then
cp res/image/prop_icon.pvr.ccz resFenli/image/prop_icon.pvr.ccz
fi
if [ -f "res/image/prop_icon.png" ]; then
cp res/image/prop_icon.png resFenli/image/prop_icon.png
fi
cp res/image/ui/bottom_tips.png resFenli/image/ui/bottom_tips.png
cp res/image/ui/common2.plist resFenli/image/ui/common2.plist
cp res/image/ui/common2.png resFenli/image/ui/common2.png
cp -R res/language resFenli/
cp res/music/login_bgm.mp3 resFenli/music/login_bgm.mp3
cp res/particle/develop/logo.plist resFenli/particle/develop/logo.plist
cp res/particle/develop/logo.png resFenli/particle/develop/logo.png
#将res下整个shader文件夹放到resFenli下面
cp -R res/shader resFenli/
cp res/sound/ui_button_click.mp3 resFenli/sound/ui_button_click.mp3
cp -R res/ui/common resFenli/ui
cp -R res/ui/develop resFenli/ui
cp -R res/ui/server resFenli/ui
cp res/ui/new_loading.csb resFenli/ui/new_loading.csb
cp res/ui/new_update.csb resFenli/ui/new_update.csb
if [ $platform = "Android" ]; then
echo "-----新增拷贝Android资源保持到100M左右-----"
cp -R res/image resFenli/
cp -R res/particle resFenli/
rm -rf resFenli/image/sea
rm -rf resFenli/image/ship
elif [ $platform = "IOS" ]; then
echo "-----新增拷贝IOS资源保持包在85M左右-----"
cp -R res/image resFenli/
cp -R res/particle resFenli/
rm -rf resFenli/image/sea
rm -rf resFenli/image/ship
rm -rf resFenli/image/battle
rm -rf resFenli/image/ship_big
rm -rf resFenli/image/ship_small
rm -rf resFenli/image/weather
# rm -rf resFenli/particle/buff #不注释的话, 包再增加4.2M左右
else
echo "有异常!"
exit 0
fi
echo "------删除原先res资源-----"
rm -rf res
echo "-----将临时文件resFenli重命名为res-----"
mv resFenli res
echo "-----分离海外版本res资源完成-----"