使用批处理打包C#开发程序
最近项目接近尾声,测试比较频繁,每天需要发布多个版本
@echo off
set zip=C:\Program Files\7-Zip\7z.exe
set timestamp=%date:~6,4%-%date:~0,2%-%date:~3,2%
set timestamp=%date:-=%
set tardir=%cd%\Car.SMIS.App\bin
set src=%cd%\Car.SMIS.App\bin\Release\
set src1=%src%Facility
set src2=%src%appsettings.json
set src3=%src%unity.config
set src4=%src%Car.*
set src5=%src%log4net.config cls
echo 7z.exe "%zip%"
echo "%src4%"
echo tardir "%tardir%\%timestamp%.zip" echo [%date% %time%] Start creating zip files -- mq > "%tardir%\ZipDescription.txt"
"%zip%" a "%tardir%\Car.SMIS.App_Release_%timestamp%_00_update.zip" "%src1%" "%src2%" "%src3%" "%src4%" "%src5%"
::"%zip%" a "%tardir%\Car.SMIS.App_Release_%timestamp%_00_SDK.zip" "%src%*" -x!"%src1%" -x!"%src2%" -x!"%src3%" -x!"%src4%" -x!"%src5%" rem Add zip description file
echo [%date% %time%] End creating zip file -- mq >> "%tardir%\ZipDescription.txt"
if exist "%tardir%\Car.SMIS.App_Release_%timestamp%_00_update.zip" (
"%zip%" u "%tardir%\Car.SMIS.App_Release_%timestamp%_00_update.zip" "%tardir%\ZipDescription.txt"
) else ( echo ----------------------------------------------------------------------------
echo [Error] file does not exist : "%tardir%\Car.SMIS.App_Release_%timestamp%_00_update.zip" )
if exist "%tardir%\Car.SMIS.App_Release_%timestamp%_00_SDK.zip" (
"%zip%" u "%tardir%\Car.SMIS.App_Release_%timestamp%_00_SDK.zip" "%tardir%\ZipDescription.txt"
) else ( echo ----------------------------------------------------------------------------
echo [Error] file does not exist : "%tardir%\Car.SMIS.App_Release_%timestamp%_00_SDK.zip" )
del "%tardir%\ZipDescription.txt" pause
explorer "%tardir%"
goto :eof
测试Debug的打包
@echo off
set zip=C:\Program Files\7-Zip\7z.exe
set timestamp=%date:~6,4%-%date:~0,2%-%date:~3,2%
set timestamp=%date:-=%
set src=%cd%\Debug\ echo 7z.exe : "%zip%"
echo src : "%src%"
echo tardir : "%timestamp%.zip"
echo cd : %cd% echo.
set fCount=0
for /f "delims=" %%i in ('dir /b /a-d "%cd%\Debug_%timestamp%_*.zip"') do (set /a fCount+=1)
set /a fCount+=1 ::"%zip%" a "%cd%\Debug_%timestamp%_%fCount%.zip" "%src%" pause
使用批处理打包C#开发程序的更多相关文章
- VS2010开发程序打包详解
VS2010开发程序打包详解 转自:http://blog.sina.com.cn/s/blog_473b385101019ufr.html 首先打开已经完成的工程,如图: 下面开始制作安装程序包. ...
- .net core 和 WPF 开发升讯威在线客服系统:把 .Net Framework 打包进安装程序
本系列文章详细介绍使用 .net core 和 WPF 开发 升讯威在线客服与营销系统 的过程. 系列文章目录: https://blog.shengxunwei.com/Home/Post/44a3 ...
- sencha touch打包成安装程序
为了更好地向大家演示如何打包一个sencha touch的项目,我们用sencha cmd创建一个演示项目,如果你的sencha cmd环境还没有配置,请参照 sencha touch 入门系列 (二 ...
- C#打包制作安装程序过程全记录
该文是根据网上的文章并结合自己实际打包的过程而整理的. 开发平台:VisualStudio2005中文版. 步骤如下: 1. 创建一个安装向导项目或安装部署项目 新建项目-〉其他项目类型-〉安装与部署 ...
- 使用cx_Freeze 将python3代码打包成.exe程序
在这里分享一下如何在py3下使用cx_Freeze打包pyqt5的程序 首先吐槽下,深深鄙视一下百度,各种百度各种没有,之前我在py2.7下使用pyqt4开发过一个小软件,用的是py2exe进行打包的 ...
- 图解 VS2015 如何打包winform 安装程序
http://learn.flexerasoftware.com/content/IS-EVAL-InstallShield-Limited-Edition-Visual-Studio?lang=10 ...
- VS2015 打包winform 安装程序
最近开发了一个小软件.由于需要打包.网上找了一些资料.然后整合了起来.希望对大家有所帮助.不全面请见谅. 打包控件 InstallShield-Limited-Edition 下面是注册地址 htt ...
- MapReduce开发程序,运行环境配置
Hadoop主机:linux 开发环境主机:Win7 + Itellij 本地运行 1. 下载hadoop安装包,放到本地目录中. 2. 配置环境变量$HADOOP_HOME及$PATH=$HADOO ...
- sencha touch 扩展篇之将sencha touch打包成安装程序(上)- 使用sencha cmd打包安装程序
由于最近一直忙着android原生的开发,很久没有更新博客了,官方的sencha cmd工具功能非常强大,创建项目,压缩项目,打包安装程序都能轻松实现,这讲我们就给大家介绍下如何使用sencha cm ...
随机推荐
- Jsp编写的页面如何适应手机浏览器页面
经常遇到JSP网页需要适配手机设备的尺寸问题 解决: 在JSP加入<meta name="viewport" content="width=device-width ...
- 【Spring Boot学习之九】缓存支持
环境 eclipse 4.7 jdk 1.8 Spring Boot 1.5.2 一.Spring Boot Cache以及整合EhCacheSpring从3.1开始定义了org.springfram ...
- ifcopenshell在VS2015下的编译
源起 今天使用 IfcOpenShell的IfcConvert ,因为是开源的所以就想自己编译下,编译过程中遇到不少问题,因此记录下来 什么是IfcOpenShell? IfcOpenShell是一个 ...
- xunit 单元测试
代码:GitHub 参考地址:https://github.com/Acumatica/xunit.autofac xunit +autofac进行单元测试 ①创建一个类库 引用nuget: xuni ...
- PHP多进程编程初步
转自:https://www.pureweber.com/article/php-multi-process-programming-preview/ 羡慕火影忍者里鸣人的影分身么?没错,PHP程序是 ...
- [转帖]VirtualBox 网络模式
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明.本文链接:https://xiaoyu.blog.csdn.net/article/detail ...
- git学习笔记 ---分支管理
分支就是科幻电影里面的平行宇宙,当你正在电脑前努力学习Git的时候,另一个你正在另一个平行宇宙里努力学习SVN. 如果两个平行宇宙互不干扰,那对现在的你也没啥影响.不过,在某个时间点,两个平行宇宙合并 ...
- Spring boot java.lang.NoClassDefFoundError: org/springframework/boot/bind/RelaxedPropertyResolver
Spring boot 2.0.3 RELEASE 配置报错 java.lang.NoClassDefFoundError: org/springframework/boot/bind/Relaxed ...
- java之spring mvc之ajax
1.可以使用servletAPI来实现 ajax Controller 类 @Controller public class AjaxController { @RequestMapping(&quo ...
- .Net Core WepApi-JWT认证
JWT 介绍 JWT(Json Web Token)是一种开放标准,已Json对象的方式在各方之间安全地传输信息 JWT登陆状态不在服务器端进行存储,而是通过秘钥生成一个具有有效时间的Token返回给 ...