#!/bin/bash
set -e

# assume that regular build.sh has been run

cd "$(dirname $0)/../../build"

rm -rf windows
mkdir windows

cp ../scripts/windows/launcher.vbs windows
cp ../scripts/windows/installer.iss windows
cp -r luan_editor/jars windows
cp -r luan_editor/dictionaries windows

cd windows

# https://jrsoftware.org/isinfo.php
ISCC installer.iss

cp LuanEditorInstaller.exe ../../website/src/download

echo "finished windows build"
