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;"))
def test_get_application_desktop_file_with_extra(self): """We return expect results with extra content""" self.assertEqual( tools.get_application_desktop_file( name="Name 1", icon_path="/to/icon/path", exec="/to/exec/path %f", comment="Comment for Name 1", categories="Cat1:Cat2", extra="Extra=extra1\nFoo=foo", ), dedent( """\ [Desktop Entry] Version=1.0 Type=Application Name=Name 1 Icon=/to/icon/path Exec=/to/exec/path %f Comment=Comment for Name 1 Categories=Cat1:Cat2 Terminal=false Extra=extra1 Foo=foo """ ), )
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;"))
def post_install(self): """Create the Visual Studio Code launcher""" create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Visual Studio Code"), icon_path=os.path.join(self.install_path, "resources", "app", "vso.png"), exec=os.path.join(self.install_path, "Code"), comment=_("Visual Studio focused on modern web and cloud"), categories="Development;IDE;"))
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;"))
def post_install(self): """Create the Atom Code launcher""" create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Atom"), icon_path=os.path.join(self.install_path, "atom.png"), exec=self.exec_path, comment=_("The hackable text editor"), categories="Development;IDE;"))
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;"))
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;"))
def post_install(self): """Create the Processing Code launcher""" create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Processing"), icon_path=os.path.join(self.install_path, "lib", "icons", "pde-256.png"), try_exec=self.exec_path, exec=self.exec_link_name, comment=_("Processing is a flexible software sketchbook"), categories="Development;IDE;"))
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;"))
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"))
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"))
def post_install(self): """Create the Stencyl launcher""" create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Stencyl"), icon_path=os.path.join(self.install_path, "data", "other", "icon-30x30.png"), exec='"{}" %f'.format(os.path.join(self.install_path, "Stencyl")), comment=self.description, categories="Development;IDE;", extra="Path={}\nStartupWMClass=stencyl-sw-Launcher".format(self.install_path)))
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;"))
def post_install(self): """Create the LightTable Code launcher""" create_launcher(self.desktop_filename, get_application_desktop_file(name=_("LightTable"), icon_path=os.path.join(self.install_path, "resources", "app", "core", "img", "lticon.png"), exec=self.exec_path, comment=_("LightTable code editor"), categories="Development;IDE;"))
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"))
def post_install(self): """Create the Netbeans launcher""" create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Netbeans IDE"), icon_path=join(self.install_path, "nb", "netbeans.png"), exec=self.exec_path, comment=_("Netbeans IDE"), categories="Development;IDE;"))
def post_install(self): """Create the LiteIDE Code launcher""" create_launcher(self.desktop_filename, get_application_desktop_file(name=_("LiteIDE"), icon_path=os.path.join(self.install_path, "share", "liteide", "welcome", "images", "liteide128.xpm"), try_exec=self.exec_path, exec=self.exec_link_name, comment=_("LiteIDE is a simple, open source, cross-platform Go IDE."), categories="Development;IDE;"))
def post_install(self): """Create the Spring Tools Suite launcher""" categories = "Development;IDE;" create_launcher(self.desktop_filename, get_application_desktop_file(name=_(self.name), icon_path=os.path.join(self.install_path, self.icon_filename), exec='"{}" %f'.format(self.exec_path), comment=_(self.description), categories=categories))
def post_install(self): """Create the Visual Studio Code launcher""" create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Visual Studio Code"), icon_path=os.path.join(self.install_path, "resources", "app", "resources", "linux", "code.png"), try_exec=self.exec_path, exec=self.exec_link_name, comment=_("Visual Studio focused on modern web and cloud"), categories="Development;IDE;", extra="StartupWMClass=Code"))
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"))
def post_install(self): """Create the GDevelop launcher""" DownloadCenter(urls=[DownloadItem(self.icon_url, None)], on_done=self.save_icon, download=True) create_launcher(self.desktop_filename, get_application_desktop_file(name=_("GDevelop"), icon_path=os.path.join(self.install_path, self.icon_filename), try_exec=self.exec_path, exec=self.exec_link_name, comment=self.description, categories="Development;IDE;"))
def post_install(self): """Create the appropriate JetBrains launcher.""" icon_path = join(self.install_path, 'bin', self.icon_filename) comment = self.description + " (UDTC)" categories = "Development;IDE;" create_launcher(self.desktop_filename, get_application_desktop_file(name=self.name, icon_path=icon_path, exec='"{}" %f'.format(self.exec_path), comment=comment, categories=categories))
def post_install(self): """Create the Atom Code launcher""" # Add apm to PATH add_exec_link(os.path.join(self.install_path, "resources", "app", "apm", "bin", "apm"), os.path.join(self.default_binary_link_path, 'apm')) create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Atom"), icon_path=os.path.join(self.install_path, "atom.png"), try_exec=self.exec_path, exec=self.exec_link_name, comment=_("The hackable text editor"), categories="Development;IDE;"))
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"))
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="{} %u".format(os.path.join(self.install_path, "firefox")), comment=_("Firefox Aurora with Developer tools"), categories="Development;IDE;"))
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;"))
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;"))
def post_install(self): """Create the LightTable Code launcher""" create_launcher( self.desktop_filename, get_application_desktop_file( name=_("LightTable"), icon_path=os.path.join(self.install_path, "resources", "app", "core", "img", "lticon.png"), try_exec=self.exec_path, exec=self.exec_link_name, comment=_("LightTable code editor"), categories="Development;IDE;"))
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"))
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), try_exec=self.exec_path, exec=self.exec_link_name, comment=self.description, categories="Development;IDE;"))
def post_install(self): """Create the Processing Code launcher""" create_launcher( self.desktop_filename, get_application_desktop_file( name=_("Processing"), icon_path=os.path.join(self.install_path, "lib", "icons", "pde-256.png"), try_exec=self.exec_path, exec=self.exec_link_name, comment=_("Processing is a flexible software sketchbook"), categories="Development;IDE;"))
def post_install(self): """Create the Spring Tools Suite launcher""" categories = "Development;IDE;" create_launcher( self.desktop_filename, get_application_desktop_file(name=_(self.name), icon_path=os.path.join( self.install_path, self.icon_filename), exec='"{}" %f'.format(self.exec_path), comment=_(self.description), categories=categories))
def post_install(self): """Create the appropriate JetBrains launcher.""" icon_path = join(self.install_path, 'bin', self.icon_filename) comment = self.description + " (UDTC)" categories = "Development;IDE;" create_launcher( self.desktop_filename, get_application_desktop_file(name=self.name, icon_path=icon_path, exec='"{}" %f'.format(self.exec_path), comment=comment, categories=categories))
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"))
def post_install(self): """Create the Netbeans launcher""" create_launcher( self.desktop_filename, get_application_desktop_file(name=_("Netbeans IDE"), icon_path=join( self.install_path, "nb", "netbeans.png"), try_exec=self.exec_path, exec=self.exec_link_name, comment=_("Netbeans IDE"), categories="Development;IDE;"))
def post_install(self): """Create the Unity 3D launcher and setuid chrome sandbox""" with futures.ProcessPoolExecutor(max_workers=1) as executor: # chrome sandbox requires this: https//code.google.com/p/chromium/wiki/LinuxSUIDSandbox f = executor.submit(_chrome_sandbox_setuid, os.path.join(self.install_path, "Editor", "chrome-sandbox")) if not f.result(): UI.return_main_screen(exit_status=1) create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Unity3D Editor"), icon_path=os.path.join(self.install_path, "unity-editor-icon.png"), exec=self.exec_path, comment=self.description, categories="Development;IDE;"))
def post_install(self): """Create the Unity 3D launcher and setuid chrome sandbox""" with futures.ProcessPoolExecutor(max_workers=1) as executor: # chrome sandbox requires this: https//code.google.com/p/chromium/wiki/LinuxSUIDSandbox f = executor.submit(_chrome_sandbox_setuid, os.path.join(self.install_path, "Editor", "chrome-sandbox")) if not f.result(): UI.return_main_screen(exit_status=1) create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Unity3D Editor"), icon_path=os.path.join(self.install_path, "unity-editor-icon.png"), exec=os.path.join(self.install_path, "Editor", "Unity"), comment=self.description, categories="Development;IDE;"))
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;"))
def post_install(self): """Create the Luna launcher""" icon_filename = "icon.xpm" icon_path = join(self.install_path, icon_filename) exec_path = '"{}" %f'.format(join(self.install_path, "eclipse")) comment = _("The Eclipse Luna Integrated Development Environment") categories = "Development;IDE;" create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Eclipse Luna"), icon_path=icon_path, exec=exec_path, comment=comment, categories=categories))
def post_install(self): """Create the launcher""" icon_filename = "drjava.jpeg" icon_path = join(self.install_path, icon_filename) exec_path = 'java -jar {} %f'.format(join(self.install_path, "drjava.jar")) comment = "DrJava IDE" categories = "Developement;IDE;" create_launcher(self.desktop_filename, get_application_desktop_file(name="DrJava", icon_path=icon_path, exec=exec_path, comment=comment, categories=categories))
def post_install(self): """Create the Arduino launcher""" icon_path = join(self.install_path, 'lib', 'arduino_icon.ico') comment = _("The Arduino Software IDE") categories = "Development;IDE;" create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Arduino"), icon_path=icon_path, exec='"{}" %f'.format(self.exec_path), comment=comment, categories=categories)) if not self.was_in_arduino_group: UI.delayed_display(DisplayMessage(_("You need to logout and login again for your installation to work")))
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"))
def post_install(self): """Create the Eclipse launcher""" DownloadCenter(urls=[DownloadItem(self.icon_url, None)], on_done=self.save_icon, download=True) icon_path = join(self.install_path, self.icon_filename) comment = self.description categories = "Development;IDE;" create_launcher(self.desktop_filename, get_application_desktop_file(name=self.name, icon_path=icon_path, exec='"{}" %f'.format(self.exec_path), comment=comment, categories=categories))
def post_install(self): """Create the Arduino launcher""" icon_path = join(self.install_path, 'lib', 'arduino_icon.ico') comment = _("The Arduino Software IDE") categories = "Development;IDE;" create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Arduino"), icon_path=icon_path, exec='"{}" %f'.format(self.exec_path), comment=comment, categories=categories)) if not self.was_in_arduino_group: UI.delayed_display(DisplayMessage(_("You need to logout and login again for your installation to work")))
def post_install(self): """Create the Eclipse launcher""" DownloadCenter(urls=[DownloadItem(self.icon_url, None)], on_done=self.save_icon, download=True) icon_path = join(self.install_path, self.icon_filename) comment = self.description categories = "Development;IDE;" create_launcher(self.desktop_filename, get_application_desktop_file(name=self.name, icon_path=icon_path, exec='"{}" %f'.format(self.exec_path), comment=comment, categories=categories))
def post_install(self): """Create the Visual Studio Code launcher""" create_launcher( self.desktop_filename, get_application_desktop_file( name=_("Visual Studio Code"), icon_path=os.path.join(self.install_path, "resources", "app", "resources", "linux", "code.png"), try_exec=self.exec_path, exec=self.exec_link_name, comment=_("Visual Studio focused on modern web and cloud"), categories="Development;IDE;", extra="StartupWMClass=Code"))
def post_install(self): """Create the Stencyl launcher""" create_launcher( self.desktop_filename, get_application_desktop_file( name=_("Stencyl"), icon_path=os.path.join(self.install_path, "data", "other", "icon-30x30.png"), exec='"{}" %f'.format(self.exec_path), comment=self.description, categories="Development;IDE;", extra="Path={}\nStartupWMClass=stencyl-sw-Launcher".format( self.install_path)))
def post_install(self): """Create the VSCodium Code launcher""" create_launcher( self.desktop_filename, get_application_desktop_file( name=_("VSCodium"), icon_path=os.path.join( self.install_path, "resources/app/resources/linux/code.png"), try_exec=self.exec_path, exec=self.exec_link_name, comment=self.description, categories="Development;IDE;"))
def post_install(self): """Create the Luna launcher""" icon_filename = "icon.xpm" icon_path = join(self.install_path, icon_filename) exec_path = '"{}" %f'.format(join(self.install_path, "eclipse")) comment = _("The Eclipse Luna Integrated Development Environment") categories = "Development;IDE;" create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Eclipse Luna"), icon_path=icon_path, exec=exec_path, comment=comment, categories=categories))
def post_install(self): """Create the RStudio launcher""" create_launcher( self.desktop_filename, get_application_desktop_file( name=_("RStudio"), icon_path=os.path.join(self.install_path, "rstudio.png"), try_exec=self.exec_path, exec=self.exec_link_name, comment=_( "RStudio makes R easier to use." "It includes a code editor, debugging & visualization tools." ), categories="Development;IDE;"))
def post_install(self): """Create the LiteIDE Code launcher""" create_launcher( self.desktop_filename, get_application_desktop_file( name=_("LiteIDE"), icon_path=os.path.join(self.install_path, "share", "liteide", "welcome", "images", "liteide128.xpm"), try_exec=self.exec_path, exec=self.exec_link_name, comment=_( "LiteIDE is a simple, open source, cross-platform Go IDE." ), categories="Development;IDE;"))
def post_install(self): """Create the appropriate JetBrains launcher.""" icon_path = join(self.install_path, 'bin', self.icon_filename) comment = self.description + " (UDTC)" categories = "Development;IDE;" wmclass = "StartupWMClass=jetbrains-" + self.name.split(' ', 1)[0].lower() create_launcher(self.desktop_filename, get_application_desktop_file(name=self.name, icon_path=icon_path, try_exec=self.exec_path, exec=self.exec_link_name, comment=comment, categories=categories, extra=wmclass, ))
def test_get_application_desktop_file_all_empty(self): """We return expect results without any content""" self.assertEqual(tools.get_application_desktop_file(), dedent("""\ [Desktop Entry] Version=1.0 Type=Application Name= Icon= Exec= Comment= Categories= Terminal=false """))
def post_install(self): """Create the Twine launcher""" DownloadCenter(urls=[DownloadItem(self.icon_url, None)], on_done=self.save_icon, download=True) create_launcher( self.desktop_filename, get_application_desktop_file(name=_("Twine"), icon_path=os.path.join( self.install_path, self.icon_name), try_exec=self.exec_path, exec=self.exec_link_name, comment=self.description, categories="Development;IDE;"))
def post_install(self): """Create the Atom Code launcher""" # Add apm to PATH add_exec_link( os.path.join(self.install_path, "resources", "app", "apm", "bin", "apm"), os.path.join(self.default_binary_link_path, 'apm')) create_launcher( self.desktop_filename, get_application_desktop_file(name=_("Atom"), icon_path=os.path.join( self.install_path, "atom.png"), exec=self.exec_path, comment=_("The hackable text editor"), categories="Development;IDE;"))
def post_install(self): """Create the Godot launcher""" # Override the exec_path. # Rename the binary to remove the version. self.set_exec_path() shutil.move(self.exec_path, os.path.join(self.install_path, 'godot')) self.exec_path = os.path.join(self.install_path, 'godot') DownloadCenter(urls=[DownloadItem(self.icon_url, None)], on_done=self.save_icon, download=True) create_launcher(self.desktop_filename, get_application_desktop_file(name=_("Godot"), icon_path=os.path.join(self.install_path, self.icon_filename), try_exec=self.exec_path, exec=self.exec_link_name, comment=self.description, categories="Development;IDE;"))
def test_get_application_desktop_file(self): """We return expect results with normal content""" self.assertEqual(tools.get_application_desktop_file(name="Name 1", icon_path="/to/icon/path", exec="/to/exec/path %f", comment="Comment for Name 1", categories="Cat1:Cat2"), dedent("""\ [Desktop Entry] Version=1.0 Type=Application Name=Name 1 Icon=/to/icon/path Exec=/to/exec/path %f Comment=Comment for Name 1 Categories=Cat1:Cat2 Terminal=false """))
def post_install(self): """Create the Eclipse launcher""" icon_path = os.path.join(self.install_path, "icon.xpm") if not os.path.exists(icon_path): DownloadCenter(urls=[DownloadItem(self.icon_url, None)], on_done=self.save_icon, download=True) icon_path = os.path.join(self.install_path, self.icon_filename) comment = self.description categories = "Development;IDE;" create_launcher( self.desktop_filename, get_application_desktop_file(name=self.name, icon_path=icon_path, try_exec=self.exec_path, exec=self.exec_link_name, comment=comment, categories=categories))
def post_install(self): """Create the Android Studio launcher""" add_env_to_user( self.name, {"ANDROID_HOME": { "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"))