Permalink
Browse files

Add wine install code, minor bug fixes in salineos-backup

  • Loading branch information...
1 parent 3ecae77 commit d13f4882d4b38549beec9262f773a7fe7ce6ec96 @SalineOS committed Apr 27, 2012
@@ -1186,6 +1186,8 @@ exit 0
UpdateRestore () {
+tail -f /usr/bin/salineos-backup | yad --progress --pulsate --title="SalineOS Backup" --text=" Unmounting all partitions on $UseDrive \n" --no-buttons &
+
## Unmount all partitions on the drive
Unmount=$(mount | grep "$UseDrive" | awk '{print $1}')
@@ -1204,6 +1206,10 @@ if [ ! -f /etc/salineos-backup/mount-points/Target/use.backup ]; then
exit 0
fi
+sleep 3
+
+killall -KILL tail
+
BackupImage=$(yad --file-selection --window-icon=/usr/share/pixmaps/salineos-backup.png --file-filter "*.backup" --title="SalineOS-Backup" --height=450 --width=600 --text="\n Select the backup image you wish to use:\n" --button=$"gtk-quit:3" --button=$"gtk-ok:2")
ret="$?"
@@ -1243,7 +1249,7 @@ elif [ "$ret" = "3" ]; then
exit 0
fi
-tail -f /usr/bin/salineos-backup | yad --progress --pulsate --title="SalineOS Backup" --text=" Coping $BackupImage to $UseDrive now. \n" --no-buttons
+tail -f /usr/bin/salineos-backup | yad --progress --pulsate --title="SalineOS Backup" --text=" Coping $BackupImage to $UseDrive now. \n" --no-buttons &
cp -f "$BackupImage" /etc/salineos-backup/mount-points/Target/use.backup
@@ -1308,7 +1314,7 @@ elif [ "$ret" = "3" ]; then
exit 0
fi
-tail -f /usr/bin/salineos-backup | yad --progress --pulsate --title="SalineOS Backup" --text=" Creating USB recovery drive now, this may take awhile. \n" --no-buttons
+tail -f /usr/bin/salineos-backup | yad --progress --pulsate --title="SalineOS Backup" --text=" Creating USB recovery drive now, this may take awhile. \n" --no-buttons &
## Unmount all partitions on the drive
Unmount=$(mount | grep "$UseDrive" | awk '{print $1}')
@@ -1400,6 +1406,8 @@ umount /etc/salineos-backup/mount-points/Target
sleep 2
umount /etc/salineos-backup/mount-points/Source
+killall -KILL tail
+
yad --title="SalineOS Backup" --wrap --width=250 --window-icon=/usr/share/pixmaps/salineos-backup.png --text="Creation of USB recovery drive on $UseDrive complete." --button=$"gtk-ok:1"
rm /tmp/salineos-backup-create
@@ -1417,10 +1425,11 @@ USBDriveMenu=("")
## Pay no mind to the man behind the curtain :)
if [ "$(ls /dev/disk/by-path | grep 'usb')" != "" ]; then
-USBDrives=$(find /dev/disk/by-path/ -name "*usb*" | xargs ls -l | grep -v "part" | awk '{print $NF}' | awk -F "/" '{print $NF}')
+ USBDrives=$(find /dev/disk/by-path/ -name "*usb*" | xargs ls -l | grep -v "part" | awk '{print $NF}' | awk -F "/" '{print $NF}')
else
-yad $Icon --title="Image to USB" --text=" No USB drives found. \n" --width=250 --button=$"gtk-quit:1"
-exit 0
+ yad $Icon --title="Image to USB" --text=" No USB drives found. \n" --width=250 --button=$"gtk-ok:1"
+ MainMenu
+ exit 0
fi
for i in $USBDrives; do
@@ -148,6 +148,10 @@ elif [ "$Operation" = "Local DNS" ]; then
gksudo sed -i -e 's|#prepend domain-name-servers|prepend domain-name-servers|g' /etc/dhcp/dhclient.conf
MainMenu
exit 0
+elif [ "$Operation" = "Install Wine" ]; then
+ gksudo /usr/bin/salineos-system-utilities-INSTALLWINE
+ MainMenu
+ exit 0
fi
@@ -0,0 +1,59 @@
+#!/bin/bash
+# Licensed under the GNU General Public License Version 2
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+####################################################################################################
+# Copyright 2011,2012 Anthony Nordquist http://www.salineos.com salinelinux@gmail.com
+
+tail -f /usr/bin/salineos-system-utilities-INSTALLWINE | yad --progress --pulsate --title="SalineOS Utils" --window-icon=system-settings --text=" Installing Winetricks. \n" --no-buttons &
+
+cd /tmp
+
+wget http://www.kegel.com/wine/winetricks
+
+
+for i in $(ls /home); do
+ mkdir -p "/home/$i/.winetricks"
+ cp -f /tmp/winetricks "/home/$i/.winetricks/winetricks"
+ chmod +x "/home/$i/.winetricks/winetricks"
+ chown "$i" "/home/$i/.winetricks/winetricks"
+
+cat > "/home/$i/.local/share/applications/winetricks.desktop" <<FOO
+[Desktop Entry]
+Version=1.0
+Type=Application
+TryExec=/home/$i/.winetricks/winetricks
+Exec=/home/$i/.winetricks/winetricks
+Categories=Other;
+
+FOO
+done
+
+sleep 1
+
+killall -KILL tail
+
+sudo /usr/bin/packagekit-url 'pkgkit://wine'
+
+for i in $(ls /home); do
+if [ -f "/home/$i/.local/share/defaults.list" ]; then
+ sed -i -e 's|text/plain=wine-extension-txt.desktop|text/plain=mousepad.desktop|g' "/home/$i/.local/share/defaults.list"
+fi
+if [ -f "/home/$i/.local/share/mimeapps.list" ]; then
+ sed -i -e 's|text/plain=wine-extension-txt.desktop|text/plain=mousepad.desktop|g' "/home/$i/.local/share/mimeapps.list"
+fi
+done
+exit
+

0 comments on commit d13f488

Please sign in to comment.