BAT批处理一键生成APK包脚本分享

将本bat放到cocos2dx目录下你的工程的project.android下(需修改变量)。
ASmaker 用来将Resources文件夹下的lua文件批量加密 算法参考我之前的rc4算法实现。

每次打包apk前 svn 最新的工程代码 和 cocos2dx引擎代码。

@echo off
rem 工具路径
set JAVA_HOME = "C:\Program Files\Java\jdk1.8.0_05"
set ANT_HOME = "D:\ProgramSoftware\apache-ant-1.9.4"
set ANDROID_HOME = "D:\ProgramSoftware\android sdk\sdk"
set NDK_HOME = "D:\ProgramSoftware\android-ndk-r9d-windows-x86_64\android-ndk-r9d"
set SVN_HOME = "C:\Program Files\TortoiseSVN\bin\"
 
rem 目标路径
set WORK_DIR = "D:\engine\projects\XXXXX\proj.android"
rem set PRO_DIR = "D:\engine\projects\XXXXX"
set RESOURCES_DIR= %WORK_DIR%\..\Resources
set ASSETS_DIR = %WORK_DIR%\assets
 
 
 
rem 先删除旧的assets
if exist D:\engine\projects\XXXXX\proj.android\assets (
  echo "deleting assets" 
  rd /q /s D:\engine\projects\XXXXX\proj.android\assets
)
 
rem 再删除旧有的Resources
if exist D:\engine\projects\XXXXX\Resources (
  echo "deleting Resources"
  rd /q /s D:\engine\projects\XXXXX\Resources
)
 
rem 删除旧的APK
if exist D:\engine\projects\XXXXX\proj.android\bin\XXXXX-release.apk (
  echo "deleting old APK"
  del /q /f D:\engine\projects\XXXXX\proj.android\bin\XXXXX-release.apk
)
 
rem call ant clean
 
rem svn
"C:/Program Files/TortoiseSVN/bin/TortoiseProc.exe" /command:update /path:"D:\engine\projects\XXXXX" /closeonend:1
"C:/Program Files/TortoiseSVN/bin/TortoiseProc.exe" /command:update /path:"D:\engine" /closeonend:1
 
pushd D:\engine\projects\XXXXX\proj.android
 
rem luajit Resources
for /r D:\engine\projects\XXXXX\Resources %%i in (*.lua) do ( 
  echo %%i  
  luajit.exe -b %%i %%i
)
 
rem ASmaker assets
ASmaker -i D:\engine\projects\XXXXX\Resources -o D:\engine\projects\XXXXX\proj.android\assets
 
rem ndk
call "D:\ProgramSoftware\android-ndk-r9d-windows-x86_64\android-ndk-r9d\ndk-build" -C "D:\engine\projects\XXXXX\proj.android" "NDK_MODULE_PATH=D:\engine;D:\engine\cocos2dx\platform\third_party\android\prebuilt"
 
rem ant release
call "D:\ProgramSoftware\android sdk\sdk\tools\android" update project -p "D:\engine\projects\XXXXX\proj.android"
call ant release 
 
popd
 
pause

广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!

RTX 5090要首发 性能要翻倍!三星展示GDDR7显存

三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。

首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。

据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。