From 6cdd2e6c269bdc274c40b2c5b3812dd169055d92 Mon Sep 17 00:00:00 2001 From: Kubo Takehiro Date: Mon, 6 Dec 2021 13:35:49 +0900 Subject: [PATCH] Add packaging scripts --- packaging/autotools.sh | 11 +++++++++++ packaging/windows.bat | 16 ++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100755 packaging/autotools.sh create mode 100644 packaging/windows.bat diff --git a/packaging/autotools.sh b/packaging/autotools.sh new file mode 100755 index 0000000..3ce70d3 --- /dev/null +++ b/packaging/autotools.sh @@ -0,0 +1,11 @@ +#! /bin/sh +set -e +./autogen.sh +mkdir work +cd work +../configure +make dist +mv snzip-*.tar.gz .. +cd .. +rm -rf work + diff --git a/packaging/windows.bat b/packaging/windows.bat new file mode 100644 index 0000000..075271a --- /dev/null +++ b/packaging/windows.bat @@ -0,0 +1,16 @@ +@echo off +setlocal enableextensions +for /F "tokens=3" %%F in ('findstr /c:"project(snzip" CMakeLists.txt') do (set VER=%%F) + +call :mkpkg 32 Win32 +call :mkpkg 64 x64 +exit /b + +:mkpkg +cmake -G "Visual Studio 16 2019" -A %2 -S . -B build%1 +cmake --build build%1 --config Release + +mkdir snzip-%VER%-win%1 +copy build%1\Release\snzip.exe snzip-%VER%-win%1\snzip.exe +copy build%1\Release\snzip.exe snzip-%VER%-win%1\snunzip.exe +zip -r snzip-%VER%-win%1.zip snzip-%VER%-win%1