Skip to content

Instantly share code, notes, and snippets.

@flamendless
Last active June 26, 2022 13:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flamendless/36b1d4dcab7f265170af6d2a70f68128 to your computer and use it in GitHub Desktop.
Save flamendless/36b1d4dcab7f265170af6d2a70f68128 to your computer and use it in GitHub Desktop.
WSL love setup
#!/bin/bash
function run()
{
echo "Running build.sh"
if [ $(uname -r | sed -n 's/.*\( *Microsoft *\).*/\1/ip') ]; then
echo "This is Windows WSL!"
./build_win.sh run
else
echo "This is Linux"
love "$dir_output"
fi
echo "Completed build.sh"
}
if [ $# -eq 0 ]; then
echo "Must pass command: run
else
"$@"
fi
#!/bin/bash
love_title=game.love
cmd="/mnt/c/Windows/System32/cmd.exe"
path_love="C:\Program Files\LOVE"
path_game='Z:\home\user\game\release\love\'${love_title}
function love_only()
{
if [ ! -d release ]; then
mkdir -p ./release/love
fi
zip -9r "./release/love/${love_title}" . -x \*.git\* -x \*release\* -x \*.sh\*
}
function run()
{
echo "Running build_win.sh"
love_only
$cmd /c start cmd.exe /c "cd $path_love && lovec.exe $path_game & pause"
echo "Completed build_win.sh"
}
if [ $# -eq 0 ]; then
echo "Must pass command: run"
else
"$@"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment