批处理处理美术资源(cocos2d)

@echo off
color 0a

rmdir /s /q /f ..\fonts\atlas

rmdir /s /q 2X
mkdir 2X
mkdir 2X\icons
mkdir 2X\icons\item
mkdir 2X\icons\spell
mkdir 2X\fonts
mkdir 2X\fonts\atlas
del /s /q /f "..\common\*.png"

rmdir /s /q /f ..\icons
mkdir ..\icons
mkdir ..\icons\Item
mkdir ..\icons\spell

rmdir /s /q /f ..\fonts\atlas
mkdir ..\fonts
mkdir ..\fonts\atlas
:: 面板
del /f /s tmp.txt
dir /b /a 界面\面框\*.png >> tmp.txt
for /f %%i in (tmp.txt) do (
copy "界面\面框\%%i" "2X\ui_panel_%%i" /y
)

:: 按钮
del /f /s tmp.txt
dir /b /a 界面\按钮\*.png >> tmp.txt
for /f %%i in (tmp.txt) do (
copy "界面\按钮\%%i" "2X\ui_btn_%%i" /y
)

:: 条
del /f /s tmp.txt
dir /b /a 界面\条\*.png >> tmp.txt
for /f %%i in (tmp.txt) do (
copy "界面\条\%%i" "2X\ui_progress_%%i" /y
)

:: 字体文件
del /f /s tmp.txt
dir /b /a 界面\字体文件\*.png >> tmp.txt
for /f %%i in (tmp.txt) do (
copy "界面\字体文件\%%i" "2X\fonts\atlas\font_atlas_%%i" /y
)

:: 字体图像
del /f /s tmp.txt
dir /b /a 界面\字体\*.png >> tmp.txt
for /f %%i in (tmp.txt) do (
copy "界面\字体\%%i" "2X\ui_font_img_%%i" /y
)

:: 道具图标
del /f /s tmp.txt
dir /b /a 界面\图标\item_icon\*.png >> tmp.txt
for /f %%i in (tmp.txt) do (
copy "界面\图标\item_icon\%%i" "2X\Icons\Item\icon_item_%%i" /y
)

:: 技能图标
del /f /s tmp.txt
dir /b /a 界面\图标\spell_icon\*.png >> tmp.txt
for /f %%i in (tmp.txt) do (
copy "界面\图标\spell_icon\%%i" "2X\Icons\Spell\icon_spell_%%i" /y
)

:: 幻兽图标
del /f /s tmp.txt
dir /b /a 界面\图标\pet_icon\*.png >> tmp.txt
for /f %%i in (tmp.txt) do (
copy "界面\图标\pet_icon\%%i" "2X\ui_icon_pet_%%i" /y
)

:: 系统图标
del /f /s tmp.txt
dir /b /a 界面\图标\system_icon\*.png >> tmp.txt
for /f %%i in (tmp.txt) do (
copy "界面\图标\system_icon\%%i" "2X\ui_icon_system_%%i" /y
)

:: 方块图标
del /f /s tmp.txt
dir /b /a 界面\图标\normal_icon\*.png >> tmp.txt
for /f %%i in (tmp.txt) do (
copy "界面\图标\normal_icon\%%i" "2X\ui_icon_normal_%%i" /y
)



:: 压缩

:: 字体
del /s /q /f tmp.txt
dir /b /a 2X\fonts\atlas\*.png >> tmp.txt
for /f %%i in (tmp.txt) do (
@echo 正在将'%%i'压缩到Iphone目录
convert 2X\fonts\atlas\%%i -resize "50%%x50%%" "..\fonts\atlas\%%i"
)
:: 道具图标
del /s /q /f tmp.txt
dir /b /a 2X\Icons\Item\*.png >> tmp.txt
for /f %%i in (tmp.txt) do (
@echo 正在将'%%i'压缩到Iphone目录
convert 2X\Icons\Item\%%i -resize "50%%x50%%" "..\icons\Item\%%i"
)
:: 技能图标
del /s /q /f tmp.txt
dir /b /a 2X\Icons\Spell\*.png >> tmp.txt
for /f %%i in (tmp.txt) do (
@echo 正在将'%%i'压缩到Iphone目录
convert 2X\Icons\Spell\%%i -resize "50%%x50%%" "..\icons\Spell\%%i"
)
:: 其它
del /s /q /f tmp.txt
dir /b /a 2X\*.png >> tmp.txt
for /f %%i in (tmp.txt) do (
@echo 正在将'%%i'压缩到Iphone目录
convert 2X\%%i -resize "50%%x50%%" "..\common\%%i"
)
del /s /q /f tmp.txt
rmdir /s /q 2X
pause


posted on 2013-04-16 09:43  几百人有爱  阅读(221)  评论(0编辑  收藏  举报