Browse Source

Update scripts/package.sh for the new Windows stuff

Signed-off-by: Gavin Howard <gavin@yzena.com>
line_libs
Gavin Howard 10 months ago
parent
commit
aac37fabeb
Signed by: gavin
GPG Key ID: C08038BDF280D33E
  1. 94
      scripts/package.sh

94
scripts/package.sh

@ -84,7 +84,7 @@ proj="bc"
cd "$repo"
if [ ! -f "../Debug.zip" ] || [ ! -f "../Release.zip" ]; then
if [ ! -f "../vs.zip" ]; then
printf 'Must have Windows builds!\n'
exit 1
fi
@ -181,6 +181,15 @@ cd ..
parent="$repo/.."
# Cleanup old stuff.
if [ -f "$projver.tar.xz" ]; then
rm -rf "$projver.tar.xz"
fi
if [ -f "$projver.tar.xz.sig" ]; then
rm -rf "$projver.tar.xz.sig"
fi
# Tar and compress and move into the parent directory of the repo.
tar cf "$projver.tar" "$projver/"
xz -z -v -9 -e "$projver.tar" > /dev/null 2> /dev/null
@ -189,64 +198,47 @@ mv "$projver.tar.xz" "$parent"
cd "$parent"
# Clean up old Windows stuff.
if [ -d Win32_Debug ]; then
rm -rf Win32_Debug
fi
if [ -d Win32_Release ]; then
rm -rf Win32_Release
fi
if [ -d Win64_Debug ]; then
rm -rf Win64_Debug
if [ -d windows ]; then
rm -rf windows
fi
if [ -d Win64_Release ]; then
rm -rf Win64_Release
if [ -f windows.zip ]; then
rm -rf windows.zip
fi
# Prepare Windows stuff.
if [ ! -d Debug ]; then
unzip Debug.zip > /dev/null
fi
if [ ! -d Release ]; then
unzip Release.zip > /dev/null
fi
unzip vs.zip > /dev/null
mv vs windows
# Remove unneeded Windows stuff.
rm -rf windows/*.vcxproj.user
rm -rf windows/src2
rm -rf windows/bin/{Win32,x64}/{Debug,Release}/*.obj
rm -rf windows/bin/{Win32,x64}/{Debug,Release}/*.iobj
rm -rf windows/bin/{Win32,x64}/{Debug,Release}/bc.exe.recipe
rm -rf windows/bin/{Win32,x64}/{Debug,Release}/bc.ilk
rm -rf windows/bin/{Win32,x64}/{Debug,Release}/bc.log
rm -rf windows/bin/{Win32,x64}/{Debug,Release}/bc.tlog
rm -rf windows/bin/{Win32,x64}/{Debug,Release}/bc.pdb
rm -rf windows/bin/{Win32,x64}/{Debug,Release}/bc.ipdb
rm -rf windows/bin/{Win32,x64}/{Debug,Release}/bc.vcxproj.FileListAbsolute.txt
rm -rf windows/bin/{Win32,x64}/{Debug,Release}/strgen.exe
rm -rf windows/bin/{Win32,x64}/{Debug,Release}/vc142.idb
rm -rf windows/bin/{Win32,x64}/{Debug,Release}/vc142.pdb
rm -rf windows/lib/{Win32,x64}/{Debug,ReleaseMD,ReleaseMT}/*.obj
rm -rf windows/lib/{Win32,x64}/{Debug,ReleaseMD,ReleaseMT}/bcl.lib.recipe
rm -rf windows/lib/{Win32,x64}/{Debug,ReleaseMD,ReleaseMT}/bcl.log
rm -rf windows/lib/{Win32,x64}/{Debug,ReleaseMD,ReleaseMT}/bcl.tlog
rm -rf windows/lib/{Win32,x64}/{Debug,ReleaseMD,ReleaseMT}/bcl.idb
rm -rf windows/lib/{Win32,x64}/{Debug,ReleaseMD,ReleaseMT}/bcl.pdb
rm -rf windows/lib/{Win32,x64}/{Debug,ReleaseMD,ReleaseMT}/bcl.vcxproj.FileListAbsolute.txt
# Zip the Windows stuff.
mkdir Win32_Debug
cp Debug/Win32/bc/bc.exe Win32_Debug
cp Debug/Win32/bc/dc.exe Win32_Debug
cp Debug/Win32/bcl/bcl.lib Win32_Debug
mkdir Win32_Release
cp Release/Win32/bc/bc.exe Win32_Release
cp Release/Win32/bc/dc.exe Win32_Release
cp Release/Win32/bcl/bcl.lib Win32_Release
mkdir Win64_Debug
cp Debug/x64/bc/bc.exe Win64_Debug
cp Debug/x64/bc/dc.exe Win64_Debug
cp Debug/x64/bcl/bcl.lib Win64_Debug
mkdir Win64_Release
cp Release/x64/bc/bc.exe Win64_Release
cp Release/x64/bc/dc.exe Win64_Release
cp Release/x64/bcl/bcl.lib Win64_Release
zip -r Win32_Debug.zip Win32_Debug > /dev/null
zip -r Win32_Release.zip Win32_Release > /dev/null
zip -r Win64_Debug.zip Win64_Debug > /dev/null
zip -r Win64_Release.zip Win64_Release > /dev/null
zip -r windows.zip windows > /dev/null
printf '\n'
shasum "$projver.tar.xz"
printf '\n'
shasum "Win32_Debug.zip"
printf '\n'
shasum "Win32_Release.zip"
printf '\n'
shasum "Win64_Debug.zip"
printf '\n'
shasum "Win64_Release.zip"
shasum "windows.zip"

Loading…
Cancel
Save