#!/bin/sh

echo "cleaning json cache"
rm -rf "/c/dev/projects/dotabase-builder/jsoncache"


echo "copying regular files from dota dir.."
cd "/e/SteamLibrary/steamapps/common/dota 2 beta/game/dota/scripts/npc"
rsync -av ./ /f/dota_vpk/scripts/npc/

echo "done!"

# cd "/c/Development/outside_projects/ValveResourceFormat/Decompiler/bin/Debug/netcoreapp2.0"
# cd "/c/Users/dillerm/Documents/Tools/ValveResourceFormat/Decompiler"
cd "/c/tools/VRF"

echo "Decompiling files..."

dota_vpk="E:\SteamLibrary\steamapps\common\dota 2 beta\game\dota\pak01_dir.vpk"

./Decompiler.exe -i "$dota_vpk" --vpk_cache -d -e "txt,dat,vsndevts_c,vxml_c,vjs_c,vcss_c,png,cfg,res,vsnd_c" -o "F:\dota_vpk" --threads 16
# ./Decompiler.exe -i "$dota_vpk" -d -e "txt,dat,vsndevts_c,vxml_c,vjs_c,vcss_c,png,cfg,res,vsnd_c" -o "F:\dota_vpk" --threads 16
# dotnet Decompiler.dll -i "$dota_vpk" --recursive --vpk_cache -d -e "txt,dat,vsndevts_c,vxml_c,vjs_c,vcss_c,png,cfg,res,vsnd_c" -o "F:\dota_vpk" --threads 16

# dotnet Decompiler.dll -i "$dota_vpk" -f "panorama/" --recursive --vpk_cache -d -e "vtex_c" -o "F:\dota_vpk" --threads 16

# dotnet Decompiler.dll -filter "soundevents/" -i $dota_vpk -d -e "txt,dat,vsndevts_c,vxml_c,vjs_c,vcss_c,png,cfg,res,vsnd_c,vtex_c" -o "F:\dota_vpk" --threads 16

# -f "sounds\misc\soundboard"

# -i $dota_vpk -d -e "vsnd_c" -o "F:\dota_vpk" --threads 16

echo "done!"

sleep 3


# vsndevts thing
# ./Decompiler.exe -i "$dota_vpk" -d -e "vsndevts_c" -o "F:\dota_vpk" --threads 16


# vsnd thing (sound)
# -i $dota_vpk -d -e "vsnd_c" -o "F:\dota_vpk" --threads 16

