Add setup script for linux
This commit is contained in:
Executable
+31
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo 'root privileges required' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
copy_sl_config() {
|
||||
if [ -e "/opt/itgmania/Themes/Simply Love.old/$1" ]; then
|
||||
cp "/opt/itgmania/Themes/Simply Love.old/$1" "/opt/itgmania/Themes/Simply Love/$1"
|
||||
fi
|
||||
}
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# Move the old SL release out of the way
|
||||
[ -d /opt/itgmania/Themes/Simply\ Love ] && mv /opt/itgmania/Themes/Simply\ Love{,.old}
|
||||
|
||||
# Install ITGm
|
||||
[ -d /opt ] || install -d -m 755 -o root -g root /opt
|
||||
cp -R --preserve=mode,timestamps itgmania /opt
|
||||
ln -sf /opt/itgmania/itgmania.desktop /usr/share/applications
|
||||
|
||||
# Copy persistent files over from the old SL folder
|
||||
if [ -d /opt/itgmania/Themes/Simply\ Love.old ]; then
|
||||
copy_sl_config Other/SongManager\ PreferredCourses.txt
|
||||
copy_sl_config Other/SongManager\ PreferredSongs.txt
|
||||
|
||||
rm -rf /opt/itgmania/Themes/Simply\ Love.old
|
||||
fi
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
[Desktop Entry]
|
||||
Name=ITGmania
|
||||
GenericName=Rhythm and dance game
|
||||
TryExec=/usr/local/itgmania/itgmania
|
||||
Exec=/usr/local/itgmania/itgmania
|
||||
TryExec=/opt/itgmania/itgmania
|
||||
Exec=/opt/itgmania/itgmania
|
||||
Terminal=false
|
||||
Icon=/usr/local/itgmania/Data/icon.png
|
||||
Icon=/opt/itgmania/Data/icon.png
|
||||
Type=Application
|
||||
Categories=Game;ArcadeGame
|
||||
Comment=A cross-platform rhythm video game.
|
||||
|
||||
@@ -507,6 +507,11 @@ if(WIN32)
|
||||
DESTINATION "${SM_FULL_INSTALLATION_PATH}")
|
||||
else()
|
||||
install(TARGETS "${SM_EXE_NAME}" DESTINATION "${SM_INSTALL_DESTINATION}")
|
||||
if(LINUX)
|
||||
install(FILES "${SM_ROOT_DIR}/itgmania.desktop"
|
||||
DESTINATION "${SM_INSTALL_DESTINATION}")
|
||||
install(PROGRAMS "${SM_ROOT_DIR}/Installer/setup.sh" DESTINATION ".")
|
||||
endif()
|
||||
endif()
|
||||
install(DIRECTORY "${SM_ROOT_DIR}/Announcers"
|
||||
DESTINATION "${SM_INSTALL_DESTINATION}")
|
||||
|
||||
Reference in New Issue
Block a user