您好,登錄后才能下訂單哦!
這篇文章主要介紹“有哪些BAT批處理一鍵生成APK包腳本”,在日常操作中,相信很多人在有哪些BAT批處理一鍵生成APK包腳本問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”有哪些BAT批處理一鍵生成APK包腳本”的疑惑有所幫助!接下來,請跟著小編一起來學(xué)習(xí)吧!
BAT批處理一鍵生成APK包腳本分享
將本bat放到cocos2dx目錄下你的工程的project.android下(需修改變量)。
ASmaker 用來將Resources文件夾下的lua文件批量加密 算法參考我之前的rc4算法實(shí)現(xiàn)。
每次打包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 目標(biāo)路徑 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
到此,關(guān)于“有哪些BAT批處理一鍵生成APK包腳本”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實(shí)踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識,請繼續(xù)關(guān)注億速云網(wǎng)站,小編會繼續(xù)努力為大家?guī)砀鄬?shí)用的文章!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。