打包指令碼的流程和自動打包基本相同:
1. 編譯軟體
2. 拷貝需要的內容
3. **簽名
4. 打包成安裝檔案
5. 再次簽名,並將安裝檔案名稱改成需要的格式
編譯軟體需要初始化vs的執行環境,如
call "d:\program files (x86)\microsoft visual studio 12.0\vc\bin\vcvars32.bat
"
然後開編譯。
編譯完成,拷貝檔案,使用signtool對軟體進行簽名,
最後將其修改為需要的命名風格,這裡使用了 git rev-list head --count 來獲取git的提交次數作為build version
rem 修改軟體名稱for /f "
delims=
" %%i in ('
git rev-list head --count
') do
(set
"buildversion=%%i")
echo %buildversion%cd setup
set year=%date:~0,4%set month=%date:~5,2%set day=%date:~8,2%set ymd=%year%%month%%day%-b%buildversion%ren setup.exe joywok-aws-setup-%ymd%.exe
完整的示例:
@echo offcall
"d:\program files (x86)\microsoft visual studio 12.0\vc\bin\vcvars32.bat
"rmdir /s/q ..\src\buildlib
mkdir
..\src\buildlib
cd ..\src\buildlib
qmake ..\jwlib_qt\jwlib_qt.pro -spec win32-msvc2013 "
config-=debug""
config+=release force_debug_info""
defines+=jw_aws
"d:\qt\qtcreator-4.2.1
\bin\jom qmake_all
nmake -f makefile.release
rmdir /s/q ..\buildjoy
mkdir
..\buildjoy
cd ..\buildjoy
qmake ..\joywok_qt\joywok_qt.pro -spec win32-msvc2013 "
config-=debug""
config+=release force_debug_info""
defines+=jw_aws
"d:\qt\qtcreator-4.2.1
\bin\jom qmake_all
nmake -f makefile.release
rem 拷貝檔案並打包
cd ..\..\setup
mkdir
mkdir
set year=%date:~0,4%set month=%date:~5,2%set day=%date:~8,2%set hour=%time:~0,2%set minute=%time:~3,2%set second=%time:~6,2%set ymd=%year%%month%%day%_%hour%%minute%%second%cd ..\crashlog
md "
%ymd%
"copy /y ..\lib\release\jwlib_qt.pdb "
%ymd%
"copy /y ..\bin\release\joywok.pdb "
%ymd%
"copy /y ..\lib\release\jwlib_qt.dll "
%ymd%
"copy /y ..\bin\release\joywok.exe "
%ymd%
"cd ..\setup
rem 簽名
rem 打包
del setup.exe
..\software\
signtool sign /f codesign.cer setup.exe
rem 修改軟體名稱
cd ..
for /f "
delims=
" %%i in ('
git rev-list head --count
') do
(set
"buildversion=%%i")
echo %buildversion%cd setup
set year=%date:~0,4%set month=%date:~5,2%set day=%date:~8,2%set ymd=%year%%month%%day%-b%buildversion%ren setup.exe joywok-aws-setup-%ymd%.exe
pause
gxt工程打包指令碼
build.xml the directories where all the source information is located that is used to populate the target directory.the directory where all the interm...
iOS自動打包指令碼
最近比較對指令碼感興趣,但是學起來,感覺不但很多編輯器,而且指令碼種類眾多,而且實現方法也比較多,所以所學以shell指令碼為準,編輯器以vim,但是大同小異,大家也可以參考。首先貼上 bin sh 工程絕對路徑 cd 1 project path pwd build資料夾路徑 build path...
iOS自動打包指令碼
ios自動打包指令碼,並實現素材 文字資源 部分 的替換和重簽名,基於python實現。config.py 配置指令碼 autopackage.py 自動化指令碼 prepareimagestool.py 拷貝工程中的結構出來用來更換後準備替換 2 伺服器的ip位址 3 反饋郵箱 6 在mac電腦中...