-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squashed commit of the following: commit c4e142a Author: Joaquin <joaquin.f.fernandez@gmail.com> Date: Wed Dec 16 13:33:38 2020 -0300 Fix Windows launcher script. commit 976102d Author: Joaquin <joaquin.f.fernandez@gmail.com> Date: Wed Dec 16 13:33:16 2020 -0300 Fix setup script in Windows installer. commit e13878d Author: Joaquin <joaquin.f.fernandez@gmail.com> Date: Wed Dec 16 13:32:50 2020 -0300 Fix typo in dependency installer. commit 6461492 Author: Joaquin <joaquin.f.fernandez@gmail.com> Date: Wed Dec 16 13:32:12 2020 -0300 Update setup Windows script. commit 4b2eae6 Author: Joaquin <joaquin.f.fernandez@gmail.com> Date: Wed Dec 16 13:31:45 2020 -0300 Move folder linking to init script. commit 46a4275 Author: Joaquin <joaquin.f.fernandez@gmail.com> Date: Wed Dec 16 13:29:19 2020 -0300 Remove unused installer checks.
- Loading branch information
1 parent
b0b6375
commit b8b523b
Showing
8 changed files
with
95 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/bin/bash | ||
if [ ! -d $HOME/powerdevs ] | ||
then | ||
# No previous instalation and first run | ||
echo "Linking PowerDEVS user folder" | ||
|
||
cmd.exe /c "echo %USERNAME%" > user.txt | ||
WINDOWS_USER=`tr -d '\r' < user.txt` | ||
rm user.txt | ||
|
||
echo "Found Windows user: " $WINDOWS_USER | ||
|
||
LINUX_POWERDEVS=~/powerdevs | ||
LINUX_POWERDEVS_TMP=${LINUX_POWERDEVS}-tmp | ||
WINDOWS_USER_FOLDER=/mnt/c/Users/${WINDOWS_USER} | ||
WINDOWS_POWERDEVS=${WINDOWS_USER_FOLDER}/PowerDEVS | ||
|
||
echo Temp folders: | ||
echo $LINUX_POWERDEVS | ||
echo $LINUX_POWERDEVS_TMP | ||
echo $WINDOWS_POWERDEVS | ||
|
||
if [[ -L "$LINUX_POWERDEVS" && -d "$LINUX_POWERDEVS" ]] | ||
then | ||
echo "Removing previous symbolic link to Windows user folder" | ||
rm $LINUX_POWERDEVS | ||
fi | ||
|
||
if [ -d "$LINUX_POWERDEVS" ] | ||
then | ||
mv $LINUX_POWERDEVS $LINUX_POWERDEVS_TMP | ||
fi | ||
|
||
mkdir -p $WINDOWS_POWERDEVS | ||
|
||
ln -s $WINDOWS_POWERDEVS/ $LINUX_POWERDEVS | ||
ln -s $WINDOWS_USER_FOLDER/ ~/$WINDOWS_USER | ||
ln -s /mnt/c/ ~/C | ||
|
||
if [ -d "$LINUX_POWERDEVS_TMP" ] | ||
then | ||
cp -r $LINUX_POWERDEVS_TMP/* $LINUX_POWERDEVS/ | ||
rm -rf $LINUX_POWERDEVS_TMP | ||
fi | ||
|
||
echo "Installing PowerDEVS..." | ||
cp -a /opt/powerdevs $HOME/powerdevs | ||
rm $HOME/powerdevs/bin/run.sh | ||
cd $HOME/powerdevs/bin | ||
./pdme | ||
else | ||
VEROPT=`cat /opt/powerdevs/version` | ||
VERHOME=`cat $HOME/powerdevs/version` | ||
if [ "$VEROPT" == "$VERHOME" ]; | ||
then | ||
# Previous instalation and same version | ||
cd $HOME/powerdevs/bin | ||
./pdme | ||
else | ||
# Previous instalation and different version | ||
OW=`zenity --question --text "There is a different version of PowerDEVS on your home folder (ver. $VERHOME). Do you wish to overwrite it with ver. $VEROPT?\nNOTE: you will not lose your models."; echo $?` | ||
if [ $OW == 0 ]; | ||
then | ||
cp -a -f /opt/powerdevs/* $HOME/powerdevs | ||
rm $HOME/powerdevs/bin/BackDoor/loader.sce | ||
rm $HOME/powerdevs/build/lib/* | ||
rm $HOME/powerdevs/build/objs/* | ||
rm $HOME/powerdevs/bin/run.sh | ||
cd $HOME/powerdevs/bin | ||
./pdme | ||
else | ||
cd $HOME/powerdevs/bin | ||
./pdme | ||
fi | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,3 @@ | ||
echo "Adding X server display environment variables" | ||
echo 'export DISPLAY=:0.0' >> ~/.bashrc | ||
echo 'export LIBGL_ALWAYS_INDIRECT=1' >> ~/.bashrc | ||
|
||
echo "Linking PowerDEVS user folder" | ||
|
||
cmd.exe /c "echo %USERNAME%" > user.txt | ||
WINDOWS_USER=`tr -d '\r' < user.txt` | ||
rm user.txt | ||
|
||
echo "Found Windows user: " $WINDOWS_USER | ||
|
||
LINUX_POWERDEVS=~/powerdevs | ||
LINUX_POWERDEVS_TMP=${LINUX_POWERDEVS}-tmp | ||
WINDOWS_USER_FOLDER=/mnt/c/Users/${WINDOWS_USER} | ||
WINDOWS_POWERDEVS=${WINDOWS_USER_FOLDER}/PowerDEVS | ||
|
||
echo Temp folders: | ||
echo $LINUX_POWERDEVS | ||
echo $LINUX_POWERDEVS_TMP | ||
echo $WINDOWS_POWERDEVS | ||
|
||
if [[ -L "$LINUX_POWERDEVS" && -d "$LINUX_POWERDEVS" ]] | ||
then | ||
echo "Removing previous symbolic link to Windows user folder" | ||
rm $LINUX_POWERDEVS | ||
fi | ||
|
||
if [ -d "$LINUX_POWERDEVS" ] | ||
then | ||
mv $LINUX_POWERDEVS $LINUX_POWERDEVS_TMP | ||
fi | ||
|
||
mkdir -p $WINDOWS_POWERDEVS | ||
|
||
ln -s $WINDOWS_POWERDEVS/ $LINUX_POWERDEVS | ||
ln -s $WINDOWS_USER_FOLDER/ ~/$WINDOWS_USER | ||
ln -s /mnt/c/ ~/C | ||
|
||
if [ -d "$LINUX_POWERDEVS_TMP" ] | ||
then | ||
cp -r $LINUX_POWERDEVS_TMP/* $LINUX_POWERDEVS/ | ||
rm -rf $LINUX_POWERDEVS_TMP | ||
fi | ||
echo 'export LIBGL_ALWAYS_INDIRECT=1' >> ~/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
powershell.exe -ExecutionPolicy ByPass -File ../scripts/check-vcxsrv.ps1 | ||
cd C:\Users\%USERNAME%\PowerDEVS | ||
wsl -d Ubuntu-20.04 bash -ic "/opt/powerdevs/bin/run.sh" | ||
wsl -u powerdevs -d Ubuntu-20.04 bash -ic "/opt/powerdevs/bin/run_win.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters