工具 【u3d相关的PostProcessBuildPlayer,PerformBuild.cs】

1.Jenkins 开源包  Java -jar jenkins.war,参考链接 http://www.cnblogs.com/itech/archive/2011/11/02/2233343.html

2.JDK

3.ANT

4.Eclipse

5.Jenkins 插件管理

This plugin adds Apache Ant support to Jenkins.
1.2      
This plugin allows you to store credentials in Jenkins.
1.18      
Integrates Jenkins with CVS version control system using a modified version of the Netbeans cvsclient.
2.11      
Adds the ability to monitor the result of externally executed jobs.
1.4      
This plugin adds Javadoc support to Jenkins.
1.1      
Allows JUnit-format test results to be published.
1.2-beta-4      
Security realm based on LDAP authentication.
1.6      
This plugin allows you to configure email notifications. This is a break-out of the original core based email component.
1.11      
Offers matrix-based security authorization strategies (global and per-project).
1.1      
Multi-configuration (matrix) project type.
1.3      
Jenkins plugin for building Maven 2/3 jobs via a special project type.
2.7.1      
Uses the OWASP Java HTML Sanitizer to allow safe-seeming HTML markup to be entered in project descriptions and the like.
1.1      
Adds Unix Pluggable Authentication Module (PAM) support to Jenkins.
1.1      
This plugin allows you to store SSH credentials in Jenkins.
1.10      
This plugin allows you to manage slaves running on \*nix machines over SSH.
1.9      
This plugin adds the Subversion support (via SVNKit) to Jenkins.
1.54      
This plugin adds an additional dialog box in every page, which enables people to contribute localizations for the messages they are seeing in the current page.
1.10      
Allows you to connect to Windows machines and start slave agents on them.

6.因为考虑在MAC上执行,安装Cygwin

7.新建项目开始配置步骤:

1>.源码管理 :SVN更新代码工程与资源 。

2>.构建触发器,可以不要 指定时间自己构建  Poll SCM  H 22 * * *  【每天22.00点自动构建一次】

3>.添加Windows的batch command: 先到Android Project再打包APK

COPY %WORKSPACE%\Tools\PerformBuild.cs %WORKSPACE%\code\Assets\Editor\
COPY %WORKSPACE%\Tools\PostProcessBuildPlayer %WORKSPACE%\code\Assets\Editor\

RD /S /Q %WORKSPACE%\build-android
MKDIR %WORKSPACE%\build-android

echo Start building Unity project to Android project..........
"C:\Program Files (x86)\Unity\Editor\Unity" -projectPath %WORKSPACE%\code -executeMethod PerformBuild.CommandLineBuildAndroid -batchmode -quit -logFile %WORKSPACE%\build-android\log.txt

把U3D的工程使用命令行导出Eclipse工程。中间需要手动设置一次AndroidSDK。

SET LANG="en_US.UTF-8"
SET ANT_ROOT="E:\helptools\eclipse\plugins\org.apache.ant_1.9.2.v201404171502\bin"
SET ANDROID_SDK_ROOT="E:\helptools\android-sdk"
SET PATH=%PATH%;%ANT_ROOT%;%ANDROID_SDK_ROOT%;%ANDROID_SDK_ROOT%/tools;

cd %WORKSPACE%/build-android
ren dragonandroid dragon

echo Copy resource to build directory.....
mkdir dragon\assets\ClientRes
copy /y %WORKSPACE%\ClientRes\Config dragon\assets\ClientRes
copy /y %WORKSPACE%\ClientRes\Assetbundles_Android \dragon\assets\ClientRes
del \dragon\assets\ClientRes\Config\.svn
del \dragon\assets\ClientRes\Assetbundles_Android\.svn

copy %WORKSPACE%\Tools\strings.xml %WORKSPACE%\build-android\dragon\res\values

cd dragon
echo unzip android -d ./dragon
android update project -p ./ --name Dragon
ant debug
zipalign -v 4 bin/Dragon-debug.apk "bin/dragon 0.8.${BUILD_NUMBER}.apk"

如果上面相关命令不对需要在系统环境变量中添加。

4>.batch command:  直接 APK

echo Copy resource to build directory.....
cd %WORKSPACE%
copy /y %WORKSPACE%\ClientRes\Config code\Assets\Plugins\Android\assets\ClientRes\Config
copy /y %WORKSPACE%\ClientRes\Assetbundles_Android\ code\Assets\Plugins\Android\assets\ClientRes\Assetbundles_Android
rd /s/q code\Assets\Plugins\Android\assets\ClientRes\Config\.svn
rd /s/q code\Assets\Plugins\Android\assets\ClientRes\Assetbundles_Android\.svn

MKDIR %WORKSPACE%\build-android

echo Start building Unity project to Android APK..........
"C:\Program Files (x86)\Unity\Editor\Unity" -projectPath %WORKSPACE%\code -executeMethod PerformBuild.CommandLineBuildAndroid -batchmode -quit -logFile %WORKSPACE%\build-android\log.txt

PerformBuild.cs 有变动

Jenkins 搭建U3D自动发布 Android的更多相关文章

  1. Jenkins 搭建U3D自动发布 IOS

    http://www.cnblogs.com/yinghuochong/archive/2013/09/01/3294940.html 1.安装包,工具略过. 2.插件管理 Subversion Pl ...

  2. Jenkins搭建.NET自动编译发布远程环境

    继上一篇文章Jenkins搭建.NET自动编译发布本地环境 发布到本地成功后,接下来配置发布到远程环境. Build配置——发布到远程 根据前面VS中发布项目,生成的CustomProfile2 来配 ...

  3. Jenkins搭建.NET自动编译发布本地环境

    最近在做一个团队项目的时候,用到了自动编译发布部署环境[也可以说是持续集成],于是顺便学习了下这个环境的搭建过程. 持续集成 持续集成是一种软件开发实践,即团队开发成员经常集成它们的工作,通常每个成员 ...

  4. Jenkins搭建.NET自动编译测试与发布环境

    本文地址: http://blog.csdn.net/wangjia184/article/details/18365553 操作系统Windows, 确保需要的.NET Framework已经安装 ...

  5. Windows2012中Jenkins搭建.NET自动编译测试与发布环境

    安装7Zip 下载地址: http://www.7-zip.org/a/7z1602-x64.exe 安装Git 下载地址:https://github.com/git-for-windows/git ...

  6. Jenkins+Ansible+Gitlab自动发布/回滚Spring项目

    一.实现方法流程图 流程图如下:代码托管在本地GitLab上(为了复现整套流水线,我直接使用了GitHub,懒得再搭建GitLab),开发完成后提交代码到代码仓库,[自动]触发Jenkins进行持续集 ...

  7. 在docker中运行jenkins实现代码自动发布到测试服务器

    在docker中运行jenkins 用的镜像是apline版:lts-alpine,并设置正确的时区. docker run --name jenkins_master -d \ -p 8081:80 ...

  8. 持续集成 Jenkins +Gitlab + SSH 自动发布 HTML 代码

    目录 一.整体流程 二.Jenkins 配置 2.1.首先安装插件 2.2.配置目标服务器 2.3.创建 job 2.4.配置 gitlab 触发 三.改进 一.整体流程 二.Jenkins 配置 2 ...

  9. Docker+Jenkins持续集成环境(5): android构建与apk发布

    项目组除了常规的java项目,还有不少android项目,如何使用jenkins来实现自动构建呢?本文会介绍安卓项目通过jenkins构建的方法,并设计开发一个类似蒲公英的app托管平台. andro ...

随机推荐

  1. [android界面]android中src和background区别——前景与背景

    ImageView中XML属性src和background的区别: background会根据ImageView组件给定的长宽进行拉伸,而src就存放的是原图的大小,不会进行拉伸.src是图片内容(前 ...

  2. SQL Server 阻止了对组件 'Ole Automation Procedures' 的 过程'sys.sp_OACreate' 的访问

    --开启 Ole Automation Procedures sp_configure ; GO RECONFIGURE; GO sp_configure ; GO RECONFIGURE; GO E ...

  3. VBS操作Excel常见方法

    VBS操作Excel常见方法 作者: 字体:[增加 减小] 类型:转载 时间:2009-11-13我要评论 VBS控制Excel常见方法,需要的朋友可以参考下. dim oExcel,oWb,oShe ...

  4. linux(centos 6.4)下安装php memcache服务端及其客户端(详细教程)

    前言 在搭建个人博客时,由于没有使用任何框架,纯手工code前台和后台,导致遇到许多问题,其中一个问题就是mysql连接导致的页面相应速度异常低.在查询各种途径后,只能考虑使用memcache缓存.在 ...

  5. Linux常用指令---定时任务

    linux定时任务crontab命令选项基本只有对用户操作选项:-u 指定用户-l 列出某用户任务计划-r 删除某用户任务-e 编辑某用户任务 查看某一用户的定时任务crontab -u root - ...

  6. 第10章 系统级I/O

    第10章 系统级I/O 10.1 Unix I/O 一个Unix文件就是一个m个字节的序列:B0,B1,…,BK,…,Bm-1 Unix I/O:一种将设备优雅地映射为文件的方式,允许Unix内核引出 ...

  7. C语言学习的记忆

    优于他人的技能 会玩双截棍: 我的经验就是Practice make perfect,熟能生巧:还有就是坚持不懈. 关于C语言的学习的回忆 1.我通过老师的教导和课外C语言书籍中学习,和我的技能相比, ...

  8. 物联网-手机远程控制家里的摄像头(2) - POP3和SMTP的C语言精简实现

    在上一篇博客里面,使用了Python来发送.接收mail,但是实际测试中出现了一些不稳定的 情况,而且Python和即将使用的opencv会不兼容,使用进程间通讯或者其他方法会让整个系统 显得复杂而且 ...

  9. Opencv实现运动检测

    运动检测多种多样,这里的需求只是检测到有运动物体就行了,而且 要尽量减少误报的情况.另外尽量降低CPU的消耗,因为最终需要在树莓派上面运行. 看了一些中文的文章,发现无法很好地理解别人说的内容,反而是 ...

  10. 第三章 Js变量的作用域和匿名函数

    3.1 先看下面的事例: ①var temp=0; ②temp=0; 当js解析器检测到①这种情况的时候,解析器会为这个变量开辟一个内存空间,如果前面已经存在这个变量,就会把这个变量覆盖掉. 当解析器 ...