您好,登錄后才能下訂單哦!
這篇文章主要介紹“有哪些BAT批處理一鍵生成APK包腳本”,在日常操作中,相信很多人在有哪些BAT批處理一鍵生成APK包腳本問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”有哪些BAT批處理一鍵生成APK包腳本”的疑惑有所幫助!接下來,請跟著小編一起來學習吧!
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
到此,關于“有哪些BAT批處理一鍵生成APK包腳本”的學習就結束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學習,快去試試吧!若想繼續學習更多相關知識,請繼續關注億速云網站,小編會繼續努力為大家帶來更多實用的文章!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。