BAT批处理一键生成APK包脚本分享_DOS/BAT教程-查字典教程网
BAT批处理一键生成APK包脚本分享
BAT批处理一键生成APK包脚本分享
发布时间:2016-12-28 来源:查字典编辑
摘要:BAT批处理一键生成APK包脚本分享将本bat放到cocos2dx目录下你的工程的project.android下(需修改变量)。ASmak...

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

将本bat放到cocos2dx目录下你的工程的project.android下(需修改变量)。

ASmaker 用来将Resources文件夹下的lua文件批量加密 算法参考我之前的rc4算法实现。

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

@echo off rem 工具路径 set JAVA_HOME = "C:Program FilesJavajdk1.8.0_05" set ANT_HOME = "D:ProgramSoftwareapache-ant-1.9.4" set ANDROID_HOME = "D:ProgramSoftwareandroid sdksdk" set NDK_HOME = "D:ProgramSoftwareandroid-ndk-r9d-windows-x86_64android-ndk-r9d" set SVN_HOME = "C:Program FilesTortoiseSVNbin" rem 目标路径 set WORK_DIR = "D:engineprojectsXXXXXproj.android" rem set PRO_DIR = "D:engineprojectsXXXXX" set RESOURCES_DIR= %WORK_DIR%..Resources set ASSETS_DIR = %WORK_DIR%assets rem 先删除旧的assets if exist D:engineprojectsXXXXXproj.androidassets ( echo "deleting assets" rd /q /s D:engineprojectsXXXXXproj.androidassets ) rem 再删除旧有的Resources if exist D:engineprojectsXXXXXResources ( echo "deleting Resources" rd /q /s D:engineprojectsXXXXXResources ) rem 删除旧的APK if exist D:engineprojectsXXXXXproj.androidbinXXXXX-release.apk ( echo "deleting old APK" del /q /f D:engineprojectsXXXXXproj.androidbinXXXXX-release.apk ) rem call ant clean rem svn "C:/Program Files/TortoiseSVN/bin/TortoiseProc.exe" /command:update /path:"D:engineprojectsXXXXX" /closeonend:1 "C:/Program Files/TortoiseSVN/bin/TortoiseProc.exe" /command:update /path:"D:engine" /closeonend:1 pushd D:engineprojectsXXXXXproj.android rem luajit Resources for /r D:engineprojectsXXXXXResources %%i in (*.lua) do ( echo %%i luajit.exe -b %%i %%i ) rem ASmaker assets ASmaker -i D:engineprojectsXXXXXResources -o D:engineprojectsXXXXXproj.androidassets rem ndk call "D:ProgramSoftwareandroid-ndk-r9d-windows-x86_64android-ndk-r9dndk-build" -C "D:engineprojectsXXXXXproj.android" "NDK_MODULE_PATH=D:engine;D:enginecocos2dxplatformthird_partyandroidprebuilt" rem ant release call "D:ProgramSoftwareandroid sdksdktoolsandroid" update project -p "D:engineprojectsXXXXXproj.android" call ant release popd pause

相关阅读
推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
  • 大家都在看
  • 小编推荐
  • 猜你喜欢
  • 最新DOS/BAT学习
    热门DOS/BAT学习
    脚本专栏子分类