diff options
author | Alexandre Teles | 2018-09-09 22:58:36 -0300 |
---|---|---|
committer | Alexandre Teles | 2018-09-09 22:58:36 -0300 |
commit | 2d4cd7bacb37c05730a7079774c0302ba18f7ad5 (patch) | |
tree | 5224edcebd99151e836f9e285471e3628f24053e /deepin-crossover.install | |
parent | 4355ffa728347a3f2e9e6a5392383a47a44ce6bc (diff) | |
download | aur-2d4cd7bacb37c05730a7079774c0302ba18f7ad5.tar.gz |
new pkg
Diffstat (limited to 'deepin-crossover.install')
-rw-r--r-- | deepin-crossover.install | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/deepin-crossover.install b/deepin-crossover.install new file mode 100644 index 000000000000..a29918c4746c --- /dev/null +++ b/deepin-crossover.install @@ -0,0 +1,67 @@ +post_install() { + +echo "Updating wineserver link" + +CX_ROOT="/opt/cxoffice" +rm "$CX_ROOT/bin/wineserver" + +if "$CX_ROOT/bin/wineserver64" -v >/dev/null 2>/dev/null + then + ln -s wineserver64 "$CX_ROOT/bin/wineserver" + else + ln -s wineserver32 "$CX_ROOT/bin/wineserver" +fi + +echo "Creating menus and file associations, please wait..." + +/opt/cxoffice/bin/cxmenu --crossover --install +/opt/cxoffice/bin/cxassoc --crossover --install + +echo "Applying patches, please wait..." + +cd /opt/cxoffice/bin + +patch -p0 <<'EOF' +--- crossover 2018-09-09 19:57:41.000000000 -0300 ++++ crossover.edit 2018-09-09 22:35:05.050299884 -0300 +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#! /usr/bin/env python2 + # (c) Copyright 2009-2015. CodeWeavers, Inc. + + import os +@@ -85,17 +85,6 @@ + import cxopt + + def main(): +- # Popup a warn when the user run CrossOver for Deepin in other distro +- result = os.popen("cat /etc/issue | grep Deepin").readlines() +- if not result: +- # pylint: disable=W0601 +- global GUI +- import crossover_deepin +- GUI = crossover_deepin.CrossOverDeepin() +- import gtk +- gtk.main() +- return 0 +- + # Parse the command line before we do anything that assumes $DISPLAY is set + # so we can handle --help and issue usage errors normally. + opt_parser = cxopt.Parser(usage="%prog [--help]", +EOF + echo "Done!" +} + +post_upgrade() { + post_install +} + +pre_remove() { + echo "Removing menus and file associations, please wait..." + + /opt/cxoffice/bin/cxmenu --crossover --uninstall + /opt/cxoffice/bin/cxassoc --crossover --uninstall + rm -f /usr/local/share/icons/hicolor/*x*/apps/cxmenu-*.png + + echo "Done!" +} |