fix install and launch scripts

This commit is contained in:
Michael Becker 2022-03-16 12:40:59 -04:00
parent c0af3f555c
commit 307d71334a
No known key found for this signature in database
GPG Key ID: DA394832305DA332
2 changed files with 17 additions and 4 deletions

View File

@ -3,7 +3,10 @@
cp MainIcon.png /usr/share/icons/universal-editor.png
cp net.alcetech.UniversalEditor.desktop /usr/share/applications
mkdir /usr/lib/universal-editor
if [ ! -d /usr/lib/universal-editor ]; then
mkdir /usr/lib/universal-editor
fi
cp -r Output/Debug/* /usr/lib/universal-editor
cp universal-editor /usr/lib/universal-editor
@ -11,7 +14,7 @@ cp universal-editor /usr/lib/universal-editor
echo "#!/bin/sh
cd /usr/lib/universal-editor
./universal-editor ${1+\"$@\"}
./universal-editor \${1+\"\$@\"}
" > /usr/bin/universal-editor
chmod a+x /usr/bin/universal-editor

View File

@ -2,5 +2,15 @@
FLAVOR=Debug
APPNAME=UniversalEditor
cd Output/$FLAVOR
mono $APPNAME.exe ${1+"$@"}
if [ -d Output/$FLAVOR ]; then
# running from git repository
cd Output/$FLAVOR
mono $APPNAME.exe ${1+"$@"}
else
# installed to local machine
mono $APPNAME.exe ${1+"$@"}
fi