• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python tools.create_launcher函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中umake.tools.create_launcher函数的典型用法代码示例。如果您正苦于以下问题:Python create_launcher函数的具体用法?Python create_launcher怎么用?Python create_launcher使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了create_launcher函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: test_already_existing_file_different_content

    def test_already_existing_file_different_content(self, SettingsMock):
        """A file with a different file content already exists and is updated"""
        SettingsMock.list_schemas.return_value = ["foo", "bar", "baz"]
        result_file = self.write_desktop_file("foo.desktop")
        create_launcher("foo.desktop", self.get_generic_desktop_content())

        self.assertEqual(open(result_file).read(), self.get_generic_desktop_content())
开发者ID:Ubuntu420,项目名称:ubuntu-make,代码行数:7,代码来源:test_tools.py


示例2: post_install

 def post_install(self):
     """Create the Firefox Developer launcher"""
     create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Firefox Developer Edition"),
                     icon_path=os.path.join(self.install_path, "browser", "icons", "mozicon128.png"),
                     exec=os.path.join(self.install_path, "firefox"),
                     comment=_("Firefox Aurora with Developer tools"),
                     categories="Development;IDE;"))
开发者ID:Ubuntu420,项目名称:ubuntu-make,代码行数:7,代码来源:web.py


示例3: post_install

 def post_install(self):
     """Create the Twine launcher"""
     create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Twine"),
                     icon_path=os.path.join(self.install_path, self.icon_name),
                     exec='"{}" %f'.format(os.path.join(self.install_path, "Twine")),
                     comment=self.description,
                     categories="Development;IDE;"))
开发者ID:collinsnji,项目名称:ubuntu-make,代码行数:7,代码来源:games.py


示例4: post_install

 def post_install(self):
     """Create the Sublime Text Code launcher"""
     create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Sublime Text"),
                     icon_path=os.path.join(self.install_path, "Icon", "128x128", "sublime-text.png"),
                     exec=self.exec_path,
                     comment=_("Sophisticated text editor for code, markup and prose"),
                     categories="Development;TextEditor;"))
开发者ID:jravetch,项目名称:ubuntu-make,代码行数:7,代码来源:ide.py


示例5: post_install

 def post_install(self):
     """Create the Dart Editor launcher"""
     create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Dart Editor"),
                     icon_path=os.path.join(self.install_path, "icon.xpm"),
                     exec=os.path.join(self.install_path, "DartEditor"),
                     comment=_("Dart Editor for the dart language"),
                     categories="Development;IDE;"))
开发者ID:henryzhao,项目名称:ubuntu-make,代码行数:7,代码来源:dart.py


示例6: test_create_launcher_without_xdg_dir

    def test_create_launcher_without_xdg_dir(self, SettingsMock):
        """Save a new launcher in an unexisting directory"""
        shutil.rmtree(self.local_dir)
        SettingsMock.list_schemas.return_value = ["foo", "bar", "baz"]
        create_launcher("foo.desktop", self.get_generic_desktop_content())

        self.assertTrue(os.path.exists(get_launcher_path("foo.desktop")))
开发者ID:Ubuntu420,项目名称:ubuntu-make,代码行数:7,代码来源:test_tools.py


示例7: post_install

 def post_install(self):
     """Create the launcher"""
     create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Base Framework"),
                     icon_path=os.path.join(self.install_path, "bin", "studio.png"),
                     exec='"{}" %f'.format(self.exec_path),
                     comment=_("Base Framework developer environment"),
                     categories="Development;IDE;",
                     extra="StartupWMClass=jetbrains-base-framework"))
开发者ID:jravetch,项目名称:ubuntu-make,代码行数:8,代码来源:baseinstallerfake.py


示例8: post_install

 def post_install(self):
     """Create the DBeaver launcher"""
     create_launcher(self.desktop_filename, get_application_desktop_file(name=self.name,
                     icon_path=os.path.join(self.install_path, "dbeaver.png"),
                     try_exec=self.exec_path,
                     exec=self.exec_link_name,
                     comment=self.description,
                     categories="Development;IDE;"))
开发者ID:ubuntu,项目名称:ubuntu-make,代码行数:8,代码来源:ide.py


示例9: post_install

 def post_install(self):
     """Create the Superpowers launcher"""
     create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Superpowers"),
                     icon_path=os.path.join(self.install_path, "resources", "app", "renderer",
                                            "images", "superpowers-256.png"),
                     exec='"{}" %f'.format(self.exec_path),
                     comment=self.description,
                     categories="Development;IDE;"))
开发者ID:jravetch,项目名称:ubuntu-make,代码行数:8,代码来源:games.py


示例10: test_install_no_schema_file

    def test_install_no_schema_file(self, SettingsMock):
        """No schema file still installs the file"""
        SettingsMock.list_schemas.return_value = ["foo", "bar", "baz"]
        create_launcher("foo.desktop", self.get_generic_desktop_content())

        self.assertFalse(SettingsMock.return_value.get_strv.called)
        self.assertFalse(SettingsMock.return_value.set_strv.called)
        self.assertTrue(os.path.exists(get_launcher_path("foo.desktop")))
开发者ID:Ubuntu420,项目名称:ubuntu-make,代码行数:8,代码来源:test_tools.py


示例11: post_install

 def post_install(self):
     """Create the Blender launcher"""
     create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Blender"),
                     icon_path=os.path.join(self.install_path, "icons", "scalable", "apps", "blender.svg"),
                     try_exec=self.exec_path,
                     exec=self.exec_link_name,
                     comment=self.description,
                     categories="Development;IDE;Graphics"))
开发者ID:ubuntu,项目名称:ubuntu-make,代码行数:8,代码来源:games.py


示例12: post_install

 def post_install(self):
     """Create the Eagle launcher"""
     create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Eagle"),
                     icon_path=os.path.join(self.install_path, "bin", "eagle-logo.png"),
                     try_exec=self.exec_path,
                     exec=self.exec_link_name,
                     comment=self.description,
                     categories="Development;"))
开发者ID:ubuntu,项目名称:ubuntu-make,代码行数:8,代码来源:electronics.py


示例13: post_install

 def post_install(self):
     """Create the Android Studio launcher"""
     create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Android Studio"),
                     icon_path=os.path.join(self.install_path, "bin", "studio.png"),
                     exec='"{}" %f'.format(os.path.join(self.install_path, "bin", "studio.sh")),
                     comment=_("Android Studio developer environment"),
                     categories="Development;IDE;",
                     extra="StartupWMClass=jetbrains-android-studio"))
开发者ID:kuldipem,项目名称:ubuntu-make,代码行数:8,代码来源:android.py


示例14: test_can_install_already_in_launcher

    def test_can_install_already_in_launcher(self, SettingsMock):
        """A file listed in launcher still install the files, but the entry isn't changed"""
        SettingsMock.list_schemas.return_value = ["foo", "bar", "com.canonical.Unity.Launcher", "baz"]
        SettingsMock.return_value.get_strv.return_value = ["application://bar.desktop", "application://foo.desktop",
                                                           "unity://running-apps"]
        create_launcher("foo.desktop", self.get_generic_desktop_content())

        self.assertFalse(SettingsMock.return_value.set_strv.called)
        self.assertTrue(os.path.exists(get_launcher_path("foo.desktop")))
开发者ID:Ubuntu420,项目名称:ubuntu-make,代码行数:9,代码来源:test_tools.py


示例15: test_can_install_without_unity_running

    def test_can_install_without_unity_running(self, SettingsMock):
        """Install a basic launcher icon, without a running apps entry (so will be last)"""
        SettingsMock.list_schemas.return_value = ["foo", "bar", "com.canonical.Unity.Launcher", "baz"]
        SettingsMock.return_value.get_strv.return_value = ["application://bar.desktop", "application://baz.desktop"]
        create_launcher("foo.desktop", self.get_generic_desktop_content())

        self.assertTrue(SettingsMock.list_schemas.called)
        SettingsMock.return_value.set_strv.assert_called_with("favorites", ["application://bar.desktop",
                                                                            "application://baz.desktop",
                                                                            "application://foo.desktop"])
开发者ID:Ubuntu420,项目名称:ubuntu-make,代码行数:10,代码来源:test_tools.py


示例16: post_install

 def post_install(self):
     """Create the Firefox Developer launcher"""
     create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Firefox Developer Edition"),
                     icon_path=os.path.join(self.install_path,
                                            "browser", "chrome", "icons", "default", "default128.png"),
                     try_exec=self.exec_path,
                     exec=self.exec_link_name,
                     comment=_("Firefox Aurora with Developer tools"),
                     categories="Development;IDE;",
                     extra="StartupWMClass=Firefox Developer Edition"))
开发者ID:ubuntu,项目名称:ubuntu-make,代码行数:10,代码来源:web.py


示例17: post_install

 def post_install(self):
     """Create the Android Studio launcher"""
     add_env_to_user(self.name, {"ANDROID_HOME": {"value": self.install_path, "keep": False},
                                 "ANDROID_SDK": {"value": self.install_path, "keep": False}})
     create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Android Studio"),
                     icon_path=os.path.join(self.install_path, "bin", "studio.png"),
                     try_exec=os.path.join(self.install_path, "bin", "studio.sh"),
                     exec=self.exec_link_name,
                     comment=_("Android Studio developer environment"),
                     categories="Development;IDE;",
                     extra="StartupWMClass=jetbrains-studio"))
开发者ID:ubuntu,项目名称:ubuntu-make,代码行数:11,代码来源:android.py



注:本文中的umake.tools.create_launcher函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python tools.get_application_desktop_file函数代码示例发布时间:2022-05-27
下一篇:
Python tools.add_env_to_user函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap