Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Descent 1,2,3: Replace symbolic links with bind mounts. #1052

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ports/descent/Descent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ fi

source $controlfolder/control.txt
[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls

# Variables
Expand All @@ -30,8 +31,7 @@ rm -rf "$GAMEDIR/config/gamelog.txt"
$ESUDO chmod +x -R $GAMEDIR/*

# Set config dir
$ESUDO rm -rf ~/.$GAME
ln -sfv $GAMEDIR/config ~/.$GAME
bind_directories ~/.$GAME $GAMEDIR/config

# Exports
export LD_LIBRARY_PATH="$GAMEDIR/libs:$LD_LIBRARY_PATH"
Expand Down Expand Up @@ -90,3 +90,4 @@ fi

# Cleanup
pm_finish

5 changes: 3 additions & 2 deletions ports/descent2/Descent 2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ fi

source $controlfolder/control.txt
[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls

# Variables
Expand All @@ -30,8 +31,7 @@ rm -rf "$GAMEDIR/config/gamelog.txt"
$ESUDO chmod +x -R $GAMEDIR/*

# Set config dir
$ESUDO rm -rf ~/.$GAME
ln -sfv $GAMEDIR/config ~/.$GAME
bind_directories ~/.$GAME $GAMEDIR/config

# Exports
export LD_LIBRARY_PATH="$GAMEDIR/libs:$LD_LIBRARY_PATH"
Expand Down Expand Up @@ -90,3 +90,4 @@ fi

# Cleanup
pm_finish

9 changes: 4 additions & 5 deletions ports/descent3/Descent 3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ else
fi

source $controlfolder/control.txt
source $controlfolder/device_info.txt
[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls

# Variables - Set DEBUGMODE to 1 to use the Debug build
Expand All @@ -39,8 +39,7 @@ $ESUDO chmod 777 "$GAMEDIR/game"
echo "Loading, please wait... (might take a while!)" > /dev/tty0

# Create config dir
rm -rf "$XDG_DATA_HOME/Outrage Entertainment/Descent 3"
ln -s "$GAMEDIR/config" "$XDG_DATA_HOME/Outrage Entertainment/Descent 3"
bind_directories "$XDG_DATA_HOME/Outrage Entertainment/Descent 3" "$GAMEDIR/config"

# Source to parse d3.ini and import its settings
source "$GAMEDIR/config/parseini.txt"
Expand All @@ -57,7 +56,7 @@ else
fi

if [ "$LIBGL_FB" != "" ]; then
export SDL_VIDEO_GL_DRIVER="$GAMEDIR/gl4es.aarch64/libGL.so.1"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this change have to do with bind mounts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was one of the issues we had to address because it prevented the port from starting. So, it was done in the context of the bind-directories fixes. I figured not to make 2 PRs for the change.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know but the title of the PR is replace symbolic links and then does other things :P

export SDL_VIDEO_GL_DRIVER="$GAMEDIR/gl4es.$DEVICE_ARCH/libGL.so.1"
export LIBGL_DRIVERS_PATH="$GAMEDIR/gl4es.$DEVICE_ARCH/libGL.so.1"
ARG="-g $LIBGL_DRIVERS_PATH"
fi
Expand All @@ -71,4 +70,4 @@ SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"

$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" >> /dev/tty1
printf "\033c" >> /dev/tty1