• 批处理 进行svn代码拉取,vs编译,dotfuscator混淆,winrar压缩


    Dotfuscator的使用:https://www.cnblogs.com/aitong/p/10684004.html

    从拉取代码,编译到最后的混淆步骤很多。这时就可以使用批处理来进行自动化。

    用到的软件:TortoiseSVN, VS2013 , Dotfuscator Professional Edition,WinRAR

    前置条件:提前使用dotfuscator进行一次混淆,并合理存放工程文件,设置混淆前后目录。

    在编译之前批处理程序会先删除原先的编译结果,这样在编译出错时会发现文件缺失。

    ::拉取svn
    "D:Program FilesTortoiseSVNinTortoiseProc.exe" /command:update /path:"D:MySVNCompile" /closeonend:1
    
    ::删除文件
    set filepath1="D:MySVNCompileMyApp1OutPutReleaseMyApp1Back.exe"
    set filepath2="D:MySVNCompileMyApp1OutPutReleaseMyApp1Front.exe"
    set filepath3="D:MySVNCompileMyApp1OutPutReleaseMyApp1Basic.dll"
    del /q %filepath1%
    del /q %filepath2%
    del /q %filepath3%
    
    ::编译
    set vspath="D:Program Files (x86)Microsoft Visual Studio 12.0Common7IDEdevenv.exe"
    set slnpath="D:MySVNCompileMyApp1MyApp1.sln"
    %vspath%   /rebuild Release  %slnpath% 
    
    ::复制文件
    set outpath1="C:Users11320DesktopMyApp1混淆eforeMyApp1Back.exe"
    set outpath2="C:Users11320DesktopMyApp1混淆eforeMyApp1Front.exe"
    set outpath3="C:Users11320DesktopMyApp1混淆eforeMyApp1Basic.dll"
    copy %filepath1% %outpath1%
    @IF %errorlevel%==1 echo "编译出错,文件不存在。"&goto End
    copy %filepath2% %outpath2%
    @IF %errorlevel%==1 echo "编译出错,文件不存在。"&goto End
    copy %filepath3% %outpath3%
    @IF %errorlevel%==1 echo "编译出错,文件不存在。"&goto End
    
    ::混淆
    set dotfuscatorpath="C:Program Files (x86)PreEmptive SolutionsDotfuscator Professional Edition 4.9dotfuscator"
    set xmlpath="C:Users11320DesktopMyApp1Basic混淆	empMyApp1Basic混淆.xml"
    %dotfuscatorpath% /v %xmlpath%
    
    ::压缩
    set pathwinrar="C:Program FilesWinRARWinRAR.exe"
    set pathzipfile="C:Users11320DesktopMyApp1混淆afterMyApp1.zip"
    set afterpath1="C:Users11320DesktopMyApp1混淆afterMyApp1Front.exe"
    set afterpath2="C:Users11320DesktopMyApp1混淆afterMyApp1Basic.dll"
    set afterpath3="C:Users11320DesktopMyApp1混淆afterMyApp1Back.exe"
    %pathwinrar% a -ep1 -o+ -ibck %pathzipfile% %afterpath1%
    %pathwinrar% a -ep1 -o+ -ibck %pathzipfile% %afterpath2%
    %pathwinrar% a -ep1 -o+ -ibck %pathzipfile% %afterpath3%
    
    :End
    pause

     

  • 相关阅读:
    C/C++各种类型int、long、double、char表示范围(最大和最小)
    XSS学习笔记(五)-XSS防御
    组态Log4j(非常具体的)
    C#抽象类其中创建一个静态方法
    DirectSound应用
    谈论Hibernate级联删除——JPA根据Hibernate实现许多级联删除CascadeType.DELETE_ORPHAN
    failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
    英语语法总结---一、英语中定语放在哪
    windows常用命令有哪些(整理)
    css如何实现垂直居中(5种方法)
  • 原文地址:https://www.cnblogs.com/aitong/p/10627930.html
Copyright © 2020-2023  润新知