def _get_app_exe(self, xul_exe, app_path):
        """ Get the executable to run our app. This should take care
        that the runtime process shows up in the task manager with the
        correct exe_name.

        * xul_exe: the location of the xul executbale (can be a symlink)
        * app_path: the location of the xul app (the application.ini etc.)

        """

        if sys.platform.startswith('darwin'):
            # OSX: create an app, the name of the exe does not matter
            # much but the name to give the application does. We set
            # the latter to the title, because title and process name
            # seem the same thing in osx.
            exe = op.join(app_path, 'xulrunner.app')
            title = self._kwargs['title']
            self._osx_create_app(op.realpath(xul_exe), exe, title)
            exe += '/Contents/MacOS/xulrunner'
        else:
            # Define process name, so that our window is not grouped with
            # ff, and has a more meaningful name in the task manager. Using
            # sys.executable also works well when frozen.
            exe_name, ext = op.splitext(op.basename(sys.executable))
            exe_name = exe_name + '-ui' + ext
            if sys.platform.startswith('win'):
                # Windows: make a copy of the xulrunner executable
                exe = op.join(op.dirname(xul_exe), exe_name)
                if not op.isfile(exe):
                    shutil.copy2(xul_exe, exe)
            else:
                # Linux, create a symlink
                exe = op.join(app_path, exe_name)
                if not op.isfile(exe):
                    os.symlink(op.realpath(xul_exe), exe)

        return exe
dataset/ETHPy150Open zoofIO/flexx/flexx/webruntime/xul.py/XulRuntime._get_app_exe/original