Changeset 7386 for air-manager


Ignore:
Timestamp:
Jun 7, 2018, 8:35:33 AM (18 months ago)
Author:
Juanma
Message:

Fix default app after installing an air

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

Legend:

Unmodified
Added
Removed
  • air-manager/trunk/fuentes/debian/changelog

    r7385 r7386  
     1air-manager (0.1.3.0) xenial; urgency=medium
     2
     3  * Force default application after installing an air
     4
     5 -- Juanma Navarro Mañez <juanma1980@gmail.com>  Thu, 07 Jun 2018 08:34:48 +0200
     6
    17air-manager (0.1.2.9) xenial; urgency=medium
    28
  • air-manager/trunk/fuentes/python3-air-manager/airmanager/airmanager.py

    r7385 r7386  
    7777                                icon_new=os.path.basename(hicolor_icon)
    7878                                self._modify_desktop(air_file,icon_name=icon_new)
     79                #Remove adobeair mime association
     80                if os.path.isfile('/usr/share/mime/application/vnd.adobe.air-application-installer-package+zip.xml'):
     81                        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)
    7985        #def install
    8086
     
    138144
    139145                if sw_download==False:
    140                         self._debug("Adobeair failed to install")
     146                        if sw_install_adobe:
     147                                self._debug("Adobeair failed to install")
     148                        else:
     149                                self._debug("Adobeair already installed")
    141150                #Now install the sdk
    142151                if not os.path.isdir(self.adobeair_folder):
     
    266275
    267276        def _install_adobeair_sdk(self):
    268                         #               if os.path.isfile(self.adobeairsdk_folder+'adobe-air/adobe-air'):
    269 #                       return
     277                if os.path.isfile(self.adobeairsdk_folder+'adobe-air/adobe-air'):
     278                        return
    270279                self._install_adobeair_depends()
    271280                self._debug("Installing Adobe Air SDK")
     
    294303                os.chmod("/opt/adobe-air-sdk/adobe-air/adobe-air",st.st_mode | 0o111)
    295304
    296 #               self._debug("Downloading Air Runtime SDK from Archlinux")
    297 #       subprocess.call(["zero-lliurex-wget","http://lliurex.net/recursos-edu/misc/adobe-air.tar.gz","/tmp"])
    298 #       subprocess.call(["tar","xvf","/tmp/adobe-air.tar.gz","-C","/opt/adobe-air-sdk"])
    299 #       subprocess.call(["chmod","+x","/opt/adobe-air-sdk/adobe-air/adobe-air"])
    300305        #def _install_adobeair_sdk
    301306
     
    327332                else:
    328333                        return False
    329                 #Remove adobeair mime association
    330                 if os.path.isfile('/usr/share/mime/application/vnd.adobe.air-application-installer-package+zip.xml'):
    331                         os.remove('/usr/share/mime/application/vnd.adobe.air-application-installer-package+zip.xml')
    332334        #def _install_adobeair
    333335
     
    357359                except Exception as e:
    358360                        self._debug(e)
    359                 #Remove adobeair mime association
    360                 if os.path.isfile('/usr/share/mime/application/vnd.adobe.air-application-installer-package+zip'):
    361                         os.remove('/usr/share/mime/application/vnd.adobe.air-application-installer-package+zip')
    362361                return True
    363362        #def _install_adobeair_depends
Note: See TracChangeset for help on using the changeset viewer.