Giter Site home page Giter Site logo

热更新出包工具

初衷

       由于游戏上线后,多个渠道分支版本频繁迭代,一周内更新数次,客户端一直为手动操作,效率较低,且偶尔出现操作失误等问题,为了提高工作效率及响应快速迭代需求,让客户端只关注bug修复和新功能开发,因此抽出时间写了版本迭代工具,只需和策划对好版本号,每次更新都会生成一个新版本目录v1.x.x和新版本增量包目录v1.x.x_delta,线上游戏进行使用增量包进行更新,同时该工具自行将增量目录进行zip格式打包然后上传到ftp服务器交给运维进行测试服和正式服更新,极大缩减了工作流程和提高版本更新效率。
       此zip包同时也为热更新包,内含此次更新的文件和资源。在游戏用户进入游戏时下载、更新游戏内容。

介绍

       ant是一个将软件编译、测试、部署等步骤联系在一起加以自动化的一个工具,大多用于Java环境中的软件开发。在实际软件开发中,有很多地方可以用到ant。
       本工具为自定义jar任务类给build.xml调用达到自动化构建,满足热更新打包需求

优点

  • 1.跨平台:Ant是纯java语音编写的,所以具有很好的跨平台性
  • 2.减少操作失误率、节省工作流程
  • 3.操作简单方便快捷:Ant是由一个内置任务和可选任务组成的,用ant任务就像是在dos中写命令行一样。Ant运行时需要一个XML文件(构建文件)。 Ant通过调用target树,就可以执行各种task。每个task实现了特定接口对象
  • 4.维护简单、可读性好、集成简单:由于Ant构建文件是XML格式的文件,所以很容易维护和书写,而且结构很清晰。Ant可以集成到开发环境中。
  • Ant 是Apache软件基金会JAKARTA目录中的一个子项目,由于Ant的跨平台性和操作简单的特点,它很容易集成到一些开发环境中去

相关库文件

  • commons.net-1.4.1.jar ftp连接第三方库
    常用类:FTPClient FTPFile

  • commons-codec-1.10 md5生成库
    文件生成md5方法:DigestUtils.md5Hex();

  • commons-io-2.6.jar 文件操作库
    文件拷贝:FileUtils.copyFile(file1Path, file2Path);

  • LayaBuild.jar 主要逻辑代码包库,主要功能:

    增量包目录生成
    dcc文件生成
    文件md5差异对比
    文件拷贝
    ftp上传

开发环境

system:Windows
JDK:1.8+
IDE:Intellij Idea
ant:1.10.6

环境部署

  • 1.下载apache-ant软件, 点击下载:https://dlcdn.apache.org//ant/binaries/apache-ant-1.10.12-bin.zip
  • 2.将ant目录下的bin目录配在系统环境变量path
  • 3.打开cmd窗口,输入命令 ant -version,如出现版本号则ant配置成功
  • 4.将lib目录下所有.jar文件拷贝到ant软件的lib目录
  • 5.将build.xml复制到自己项目根目录下,修改文件中注明需要修改的位置
  • 6.打开执行ant命令等待操作成功日志

相关网址

Apache-Ant官网 https://ant.apache.org/

nikeoboy's Projects

auxpi icon auxpi

🍭 集合多家 API 的新一代图床

cf2dns icon cf2dns

筛选出优质的Cloudflare IP,并使用域名服务商提供的API解析到不同线路以达到网站加速的效果

comparesoft icon comparesoft

App/H5文件差异对比,可快速压缩生成zip包,结合热更新使用

excel2json icon excel2json

把Excel表转换成json对象,并保存到一个文本文件中。

excelexport icon excelexport

导表工具,ExcelToLua ExcelToXml ExcelToJson,将Excel表转换成Xml、Json、 Lua、二进制文件。

gameframework icon gameframework

This is literally a game framework, based on Unity game engine. It encapsulates commonly used game modules during development, and, to a large degree, standardises the process, enhances the development speed and ensures the product quality.

go-xlsx-exporter icon go-xlsx-exporter

a tool for parse xlsx and export to other fomart and data, such as: protobuf3 file and buffers, golang, csharp and so on

h5 icon h5

个人制作或收集的一些H5微信场景

jasonambition icon jasonambition

A game sample using cocos2dx-js with some materials from Tencent's flying shooting game 'feiji'(http://feiji.qq.com/, 全民飞机大战). 基于Cocos2d JS的飞行射击游戏Demo。Cocos2dx-JS learning project.

jszip icon jszip

Create, read and edit .zip files with Javascript

nettygameserver icon nettygameserver

使用netty4.X实现的手机游戏分布式服务器,支持tcp,udp,http,websocket链接,采用protobuf自定义协议栈进行网络通信,支持rpc远程调用,使用mybatis3支持db存储分库分表,支持异步mysql存储,db保存时同步更新reids缓存。 使用ExcelToCode工程,将excel数据生成java类和json数据字典,DictService直接读取json,减少数据字典部分代码。使用game-executor工程,增加游戏内的异步事件全局服务, 支持事件sharding,均衡的异步执行事件逻辑

opentgx icon opentgx

A fullstack game development solution using typescript, can make 2d&3d games for all platforms easily. Based on Cocos Creator( support WebGL|WebGPU|Metal|Vulkan|OpenGLES ) and NodeJS( for server side ).

petbattle icon petbattle

这是一款宝可梦(Pokemon)类型的即时战斗回合制游戏,以精灵养成和联机对战玩法为主,客户端基于Cocos Creator,服务端基于本人的开源框架JCEngine,数据库使用MySQL,使用乐观帧同步实现联机对战。该游戏为本人独立制作,仅用于学习交流。

pomelo icon pomelo

A fast,scalable,distributed game server framework for Node.js.

protobuf icon protobuf

Protocol Buffers - Google's data interchange format

weixin icon weixin

微信小游戏辅助合集(加减大师、包你懂我、大家来找茬腾讯版、头脑王者、好友画我、悦动音符、我最在行、星途WeGoing、猜画小歌、知乎答题王、腾讯**象棋、跳一跳、题多多黄金版)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.