diff --git a/tools/docgen-pack.cmd b/tools/docgen-pack.cmd index ad177a5..3309565 100644 --- a/tools/docgen-pack.cmd +++ b/tools/docgen-pack.cmd @@ -1,11 +1,11 @@ @echo off REM This script builds KS documentation and packs the artifacts. Use when you have VS installed. -for /f "tokens=* USEBACKQ" %%f in (`type version`) do set version=%%f +for /f "tokens=* USEBACKQ" %%f in (`type version`) do set ksversion=%%f :pack echo Packing documentation... -"%ProgramFiles%\WinRAR\rar.exe" a -ep1 -r -m5 %temp%/%version%-doc.rar "..\docs\" +"%ProgramFiles%\7-Zip\7z.exe" a -tzip %temp%/%ksversion%-doc.zip "..\docs\*" if %errorlevel% == 0 goto :finalize echo There was an error trying to pack documentation (%errorlevel%). goto :finished @@ -14,7 +14,7 @@ goto :finished rmdir /S /Q "..\DocGen\api\" rmdir /S /Q "..\DocGen\obj\" rmdir /S /Q "..\docs\" -move %temp%\%version%-doc.rar +move %temp%\%ksversion%-doc.zip echo Build and pack successful. goto :finished diff --git a/tools/docgen-pack.sh b/tools/docgen-pack.sh index 74eab82..7ac1782 100644 --- a/tools/docgen-pack.sh +++ b/tools/docgen-pack.sh @@ -1,20 +1,20 @@ #!/bin/bash -# This script builds and packs the artifacts. Use when you have MSBuild installed. -version=$(cat version) +# This script builds KS and packs the artifacts. Use when you have MSBuild installed. +ksversion=$(cat version) # Check for dependencies -rarpath=`which rar` +zippath=`which zip` if [ ! $? == 0 ]; then - echo rar is not found. + echo zip is not found. exit 1 fi # Pack documentation echo Packing documentation... -"$rarpath" a -ep1 -r -m5 /tmp/$version-doc.rar "../docs/" +cd "../docs/" && "$zippath" -r /tmp/$ksversion-doc.zip . && cd - if [ ! $? == 0 ]; then - echo Packing using rar failed. + echo Packing failed. exit 1 fi @@ -22,6 +22,6 @@ fi rm -rf "../DocGen/api" rm -rf "../DocGen/obj" rm -rf "../docs" -mv /tmp/$version-doc.rar . +mv /tmp/$ksversion-doc.zip . echo Pack successful. exit 0 diff --git a/tools/pack.cmd b/tools/pack.cmd index 7ed10cd..d5f91a4 100644 --- a/tools/pack.cmd +++ b/tools/pack.cmd @@ -6,15 +6,15 @@ if "%releaseconfig%" == "" set releaseconfig=Release :packbin echo Packing binary... -"%ProgramFiles%\WinRAR\rar.exe" a -ep1 -r -m5 %temp%/%version%-bin.rar "..\Dictify\bin\%releaseconfig%\netstandard2.0\" -"%ProgramFiles%\WinRAR\rar.exe" a -ep1 -r -m5 %temp%/%version%-demo.rar "..\Dictify.Demo\bin\%releaseconfig%\net6.0\" +"%ProgramFiles%\7-Zip\7z.exe" a -tzip %temp%/%version%-bin.zip "..\Dictify\bin\%releaseconfig%\netstandard2.0\*" +"%ProgramFiles%\7-Zip\7z.exe" a -tzip %temp%/%version%-demo.zip "..\Dictify.Demo\bin\%releaseconfig%\net6.0\*" if %errorlevel% == 0 goto :complete echo There was an error trying to pack binary (%errorlevel%). goto :finished :complete -move %temp%\%version%-bin.rar -move %temp%\%version%-demo.rar +move %temp%\%version%-bin.zip +move %temp%\%version%-demo.zip echo Pack successful. :finished diff --git a/tools/pack.sh b/tools/pack.sh index f21897a..ac50e7d 100644 --- a/tools/pack.sh +++ b/tools/pack.sh @@ -8,23 +8,23 @@ if [ -z $releaseconf ]; then fi # Check for dependencies -rarpath=`which rar` +zippath=`which zip` if [ ! $? == 0 ]; then - echo rar is not found. + echo zip is not found. exit 1 fi # Pack binary echo Packing binary... -"$rarpath" a -ep1 -r -m5 /tmp/$version-bin.rar "../Dictify/bin/$releaseconf/netstandard2.0/" -"$rarpath" a -ep1 -r -m5 /tmp/$version-demo.rar "../Dictify.Demo/bin/$releaseconf/net6.0/" +cd "../Dictify/bin/$releaseconf/netstandard2.0/" && "$zippath" -r /tmp/$version-bin.zip . && cd - +cd "../Dictify.Demo/bin/$releaseconf/net6.0/" && "$zippath" -r /tmp/$version-demo.zip . && cd - if [ ! $? == 0 ]; then - echo Packing using rar failed. + echo Packing using zip failed. exit 1 fi # Inform success -mv ~/tmp/$version-bin.rar . -mv ~/tmp/$version-demo.rar . +mv ~/tmp/$version-bin.zip . +mv ~/tmp/$version-demo.zip . echo Build and pack successful. exit 0