Skip to content

Commit

Permalink
Fix build script bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kai Yang committed May 18, 2015
1 parent 82a00da commit e7fe571
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
3 changes: 3 additions & 0 deletions DoubanFM/DoubanFM.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
<ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup>
<GenerateManifests>true</GenerateManifests>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
Expand Down
14 changes: 8 additions & 6 deletions ScriptForInstaller/make.bat
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
@echo off
setlocal
set nosign=false
set version=%1
if "%1" == "" echo 必须输入版本号!
if "%1" == "" echo Version number needed.
if "%1" == "" goto :eof
cd /d %~dp0
@call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" x86
@set "PATH=%WindowsSdkDir%bin;%PATH%"
path %WindowsSdkDir%bin;%PATH%
set projectdir=..\DoubanFM\bin\Release
set imagedir=Images
set tempdir=Temp
Expand Down Expand Up @@ -43,7 +42,7 @@ call :SignFile "%outputdir%\%setup%"
if %errorlevel% NEQ 0 goto :clear

:end
if "%nosign%" == "true" echo 警告:没有数字签名
if "%nosign%" == "true" echo Warning: No digital signiture.
goto :clear

:clear
Expand All @@ -53,4 +52,7 @@ goto :eof

:SignFile
signtool sign /n K.F.Storm /i K.F.Storm /sha1 445D84D888E121C10503F13E1F6A16757F1F78B2 /t "http://timestamp.globalsign.com/scripts/timstamp.dll" "%1"
@exit /B %errorlevel%
@exit /B %errorlevel%

:eof
endlocal
16 changes: 8 additions & 8 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if not defined VisualStudioVersion (
)

if defined VS100COMNTOOLS (
call "%VS110COMNTOOLS%\VsDevCmd.bat"
call "%VS100COMNTOOLS%\VsDevCmd.bat"
goto :Build
)

Expand All @@ -30,19 +30,19 @@ if %errorlevel% NEQ 0 exit /b 1

:Copy
rd bin /s /q
robocopy DoubanFM\bin\Release bin *.dll *.exe *.config version.dat /MIR /XD
robocopy DoubanFM\bin\Release bin *.dll *.exe *.config version.dat /MIR /XD app.publish

:CreateInstaller
if exist "%ProgramFiles(x86)%\NSIS\Unicode\makensis.exe" (
if exist "%ProgramFiles(x86)%\NSIS\Unicode\Plugins\FindProcDLL.dll" (
for /F %%I IN (bin\version.dat) DO set version=%%I
pushd ScriptForInstaller
make.bat %version%
popd
for /F %%I IN (bin\version.dat) DO (
pushd ScriptForInstaller
make.bat %%I
popd
)
goto :EOF
)
)

echo NSIS is not found or not ready. Will not create the installer.
exit /b 1

exit /b 1

0 comments on commit e7fe571

Please sign in to comment.