Skip to content

Commit

Permalink
added build script for zip archive
Browse files Browse the repository at this point in the history
  • Loading branch information
micjahn committed Aug 30, 2020
1 parent d7c5ce6 commit 7684c06
Show file tree
Hide file tree
Showing 6 changed files with 172 additions and 0 deletions.
Binary file added 3rdParty/Zip/7-zip.chm
Binary file not shown.
Binary file added 3rdParty/Zip/7za.exe
Binary file not shown.
29 changes: 29 additions & 0 deletions 3rdParty/Zip/license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
7-Zip Command line version
~~~~~~~~~~~~~~~~~~~~~~~~~~
License for use and distribution
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

7-Zip Copyright (C) 1999-2010 Igor Pavlov.

7za.exe is distributed under the GNU LGPL license

Notes:
You can use 7-Zip on any computer, including a computer in a commercial
organization. You don't need to register or pay for 7-Zip.


GNU LGPL information
--------------------

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You can receive a copy of the GNU Lesser General Public License from
http://www.gnu.org/
41 changes: 41 additions & 0 deletions 3rdParty/Zip/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
7-Zip Command line version 9.20
-------------------------------

7-Zip is a file archiver with high compression ratio.
7za.exe is a standalone command line version of 7-Zip.

7-Zip Copyright (C) 1999-2010 Igor Pavlov.

Features of 7za.exe:
- High compression ratio in new 7z format
- Supported formats:
- Packing / unpacking: 7z, xz, ZIP, GZIP, BZIP2 and TAR
- Unpacking only: Z, lzma
- Highest compression ratio for ZIP and GZIP formats.
- Fast compression and decompression
- Strong AES-256 encryption in 7z and ZIP formats.

7za.exe is a free software distributed under the GNU LGPL.
Read license.txt for more information.

Source code of 7za.exe and 7-Zip can be found at
http://www.7-zip.org/

7za.exe can work in Windows 95/98/ME/NT/2000/2003/2008/XP/Vista/7.

There is also port of 7za.exe for POSIX systems like Unix (Linux, Solaris, OpenBSD,
FreeBSD, Cygwin, AIX, ...), MacOS X and BeOS:

http://p7zip.sourceforge.net/


This distributive packet contains the following files:

7za.exe - 7-Zip standalone command line version.
readme.txt - This file.
license.txt - License information.
7-zip.chm - User's Manual in HTML Help format.


---
End of document
92 changes: 92 additions & 0 deletions build_deployment.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
@ECHO OFF

SETLOCAL EnableDelayedExpansion EnableExtensions

SET VERSION=1.0.0.0

SET CURRENT_DIR=%CD%
SET BUILD_DIR=%CD%\Build
SET LOGFILE=%CD%\build_deployment.log
SET DEPLOYMENT_DIR=%BUILD_DIR%\Deployment
SET BINARY_DIR=%BUILD_DIR%\Release
SET FILENAME_BINARY=%DEPLOYMENT_DIR%\SSMSDatabaseFolders.%VERSION%.zip
SET ZIP_TOOL=%CD%\3rdparty\zip\7za.exe
SET HAS_VALIDATION_ERROR=0

echo. > %LOGFILE%

echo.
echo Check for missing files...
echo.

CD "%BINARY_DIR%"

FOR /F %%b IN (build_deployment_files.txt) DO (
SET f=%%b
SET f=!f:%%BINARY_DIR%%=%BINARY_DIR%!
SET f=!f:%%CURRENT_DIR%%=%CURRENT_DIR%!
IF NOT EXIST !f! (
ECHO The file !f! were not found
SET HAS_VALIDATION_ERROR=1
)
)

CD "%CURRENT_DIR%"

IF NOT "!HAS_VALIDATION_ERROR!" == "0" (
ECHO.
ECHO The file validation procedure was not successful.
GOTO END
)

ECHO.
ECHO Build deployment files in directory
ECHO %DEPLOYMENT_DIR%...
ECHO.

REM
REM prepare deployment directory
REM ***************************************************************************************

IF NOT EXIST "%BUILD_DIR%" GOTO BUILD_DIR_NOT_FOUND
IF NOT EXIST "%BINARY_DIR%" GOTO BINARY_DIR_NOT_FOUND

MKDIR "%DEPLOYMENT_DIR%" >NUL: 2>&1
DEL /F "%DEPLOYMENT_DIR%\%FILENAME_BINARY%" >NUL: 2>&1

REM
REM build archives for binaries
REM ***************************************************************************************

CD "%BINARY_DIR%"

echo Build assembly archive...
echo.

"%ZIP_TOOL%" a -tzip -mx9 -r "%FILENAME_BINARY%" -i@%CURRENT_DIR%\build_deployment_files.txt >> %LOGFILE% 2>&1
if ERRORLEVEL 1 GOTO ERROR_OPERATION

CD "%CURRENT_DIR%"

GOTO END

:BUILD_DIR_NOT_FOUND
ECHO The directory
ECHO %BUILD_DIR%
ECHO doesn't exist.
ECHO.
GOTO END

:BINARY_DIR_NOT_FOUND
ECHO The directory
ECHO %BINARY_DIR%
ECHO doesn't exist.
ECHO.
GOTO END

:ERROR_OPERATION
ECHO An error occurred, please check the logfile %LOGFILE%

:END

ENDLOCAL
10 changes: 10 additions & 0 deletions build_deployment_files.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
SsmsDatabaseFolders.Interfaces.dll
SsmsDatabaseFolders.Ssms18.dll
SsmsDatabaseFolders.Ssms2012.dll
SsmsDatabaseFolders.Ssms2014.dll
SsmsDatabaseFolders.Ssms2016.dll
SsmsDatabaseFolders.Ssms2017.dll
SsmsDatabaseFolders.VSPackage.dll
SsmsDatabaseFolders.VSPackage.pkgdef
extension.vsixmanifest
de\SsmsDatabaseFolders.VSPackage.resources.dll

0 comments on commit 7684c06

Please sign in to comment.