~ubuntu-branches/debian/wheezy/playonlinux/wheezy

« back to all changes in this revision

Viewing changes to bash/uninstall

  • Committer: Bazaar Package Importer
  • Author(s): Bertrand Marc
  • Date: 2011-09-17 11:14:44 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20110917111444-b02ft5g75aljjkrp
Tags: 4.0.12-1
* New upstream release (Closes: #639558).
* Remove patches/license.diff, not necessary any more.
* debian/rules: remove permission fixing.
* debian/rules: add build-arch and build-indep.
* Migrate to dh_python2.
* debian/patches: disable update alert on new release
  (Closes: #639463).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/bash
2
2
 
3
 
# Copyright (C) 2007-2010 PlayOnLinux Team
4
 
# Copyright (C) 2007 Pâris Quentin
5
 
#                    Cassarin-Grand Arthur
 
3
# Copyright (C) 2007-2011 PlayOnLinux Team
 
4
# Copyright (C) 2007-2011 Pâris Quentin
6
5
 
7
6
# This program is free software; you can redistribute it and/or modify
8
7
# it under the terms of the GNU General Public License as published by
18
17
# with this program; if not, write to the Free Software Foundation, Inc.,
19
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 
20
19
 
21
 
if [ "$PLAYONLINUX" = "" ]
22
 
then
23
 
        exit 0
24
 
fi
25
 
 
26
 
source "$PLAYONLINUX/lib/sources" 
 
20
# Uninstall a program
 
21
 
 
22
[ "$PLAYONLINUX" = "" ] && exit 0
 
23
source "$PLAYONLINUX/lib/sources"
 
24
 
 
25
TITLE="$(eval_gettext '$APPLICATION_TITLE Uninstaller')"
 
26
POL_SetupWindow_Init "$PLAYONLINUX/resources/images/setups/delete/top.png" "$PLAYONLINUX/resources/images/setups/delete/left.jpg"
27
27
 
28
28
if [ "$1" = "" ]
29
29
then
30
 
        exit
 
30
        POL_SetupWindow_shortcuts_list "$(eval_gettext 'Please select a program to uninstall')" "$TITLE"
 
31
        ProgramUninstall="$APP_ANSWER"
 
32
else
 
33
        ProgramUninstall="$1"
31
34
fi
32
 
NOM_JEU="$REPERTOIRE/configurations/installed/$1"
33
 
POL_SetupWindow_Init "$PLAYONLINUX/etc/setups/delete/top.png" "$PLAYONLINUX/etc/setups/delete/left.jpg"
 
35
 
 
36
NOM_JEU="$REPERTOIRE/shortcuts/$ProgramUninstall"
34
37
if [ -e "$NOM_JEU" ]
35
38
then
36
 
        application_prefixe=$(detect_wineprefix "$1")
37
 
        delete_var=$1
38
 
        POL_SetupWindow_free_presentation "$(eval_gettext 'PlayOnLinux Uninstaller')" "$(eval_gettext "This wizard will help you uninstall: ")$delete_var\n$(eval_gettext "Click Next to continue.")"
 
39
        application_prefixe=$(detect_wineprefix "$ProgramUninstall")
 
40
        delete_var=$ProgramUninstall
 
41
        POL_SetupWindow_free_presentation "$TITLE" "$(eval_gettext "This wizard will help you to uninstall: ")$delete_var\n$(eval_gettext "Click Next to continue.")"
39
42
        
40
43
        # Icones
41
 
        rm -f "$REPERTOIRE/icones/32/$1"
42
 
        rm -f "$REPERTOIRE/icones/full_size/$1"
 
44
        rm -f "$REPERTOIRE/icones/32/$ProgramUninstall"
 
45
        rm -f "$REPERTOIRE/icones/full_size/$ProgramUninstall"
43
46
        
44
47
        # Shortcut
45
 
        rm -f "$REPERTOIRE/configurations/installed/$1"
46
 
        rm -f "$HOME/.local/share/applications/$1.desktop"
47
 
        rm -f "$DESKTOP/$1.desktop"
 
48
        rm -f "$REPERTOIRE/shortcuts/$ProgramUninstall"
 
49
        rm -f "$HOME/.local/share/applications/$ProgramUninstall.desktop"
 
50
        rm -f "$DESKTOP/$ProgramUninstall.desktop"
48
51
        
49
 
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Uninstalling...')" "$(eval_gettext 'PlayOnLinux Uninstaller')" 
 
52
        POL_SetupWindow_wait_next_signal "$(eval_gettext 'Uninstalling...')" "$(eval_gettext '$APPLICATION_TITLE Uninstaller')" 
50
53
        sleep 1
51
 
        POL_SetupWindow_detect_exit
52
54
        clean_wineprefix $application_prefixe
53
 
        POL_SetupWindow_message "$delete_var$(eval_gettext ' has been uninstalled successfully.')" "$(eval_gettext 'PlayOnLinux Uninstaller')"
 
55
        POL_SetupWindow_message "$delete_var$(eval_gettext ' has been uninstalled successfully.')" "$(eval_gettext '$APPLICATION_TITLE Uninstaller')"
54
56
else
55
57
        POL_SetupWindow_message "$(eval_gettext "Cannot find the shortcut")" "$(eval_gettext 'Error')"
56
58
fi