Changeset 7407 for air-manager


Ignore:
Timestamp:
Jun 7, 2018, 12:54:01 PM (18 months ago)
Author:
Juanma
Message:

install mime at user level

Location:
air-manager/trunk/fuentes
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • air-manager/trunk/fuentes/air-installer/src/air_installer.py

    r7370 r7407  
    209209                        self.box_icon.hide()
    210210                subprocess.check_call(['/usr/bin/xhost','-'])
     211                subprocess.check_output(["xdg-mime","install","/usr/share/mime/packages/x-air-installer.xml"])
     212                subprocess.check_output(["xdg-mime","default","/usr/share/applications/air-installer.desktop","/usr/share/mime/packages/x-air-installer.xml"],input=b"")
    211213        #def _install_file
    212214
  • air-manager/trunk/fuentes/air-manager/src/InstallBox.py

    r7331 r7407  
    232232                except Exception as e:
    233233                        self._debug(e)
     234                subprocess.check_output(["xdg-mime","install","/usr/share/mime/packages/x-air-installer.xml"])
     235                subprocess.check_output(["xdg-mime","default","/usr/share/applications/air-installer.desktop","/usr/share/mime/packages/x-air-installer.xml"],input=b"")
    234236                subprocess.check_call(['/usr/bin/xhost','-'])
    235237        #def install
  • air-manager/trunk/fuentes/debian/changelog

    r7390 r7407  
     1air-manager (0.9.1) xenial; urgency=medium
     2
     3  * Assure that adobe's mime is deleted and our mime is applied (user level)
     4
     5 -- Juanma Navarro Mañez <juanma1980@gmail.com>  Thu, 07 Jun 2018 12:51:48 +0200
     6
    17air-manager (0.9.0) xenial; urgency=medium
    28
  • air-manager/trunk/fuentes/python3-air-manager/airmanager/airmanager.py

    r7390 r7407  
    33import stat
    44import datetime
     5import time
    56import subprocess
    67import sys
     
    7879                                self._modify_desktop(air_file,icon_name=icon_new)
    7980                #Remove adobeair mime association
     81                time.sleep(1)
     82                my_env=os.environ.copy()
     83                my_env["DISPLAY"]=":0"
     84                a=subprocess.check_output(["xdg-mime","install","--mode","system","/usr/share/mime/packages/x-air-installer.xml"],env=my_env)
     85                self._debug("Remove result: %s"%a)
    8086                if os.path.isfile('/usr/share/mime/application/vnd.adobe.air-application-installer-package+zip.xml'):
     87                        self._debug("Remove air mime")
    8188                        os.remove('/usr/share/mime/application/vnd.adobe.air-application-installer-package+zip.xml')
    82                         my_env=os.environ.copy()
    83                         my_env["DISPLAY"]=":0"
    84                         subprocess.check_output(["xdg-mime","default","/usr/share/applications/air-installer.desktop","/usr/share/mime/packages/x-air-installer.xml"],input=b"",env=my_env)
     89                self._debug("Fixing mime")
     90                a=subprocess.check_output(["xdg-mime","default","/usr/share/applications/air-installer.desktop","/usr/share/mime/packages/x-air-installer.xml"],input=b"",env=my_env)
     91                self._debug("Default result: %s"%a)
    8592        #def install
    8693
Note: See TracChangeset for help on using the changeset viewer.