Xojo example project
This example Xojo project to shows to create a Shortcut
(Windows), Alias
(macOS) and Desktop Launch File
(Linux) in Xojo-built Applications.
You can use it for example to allow your users to save a Shortcut to launch the application.
- Windows: Using
OLEObject
for Windows Script Host - macOS: Declares using
NSURL
's writeBookmarkData - Linux: Writes a
Desktop Launch File
- Depending on the Linux Distribution you need to manually right click the created file and choose 'Allow Launching'.
- If saved to
~/.local/share/applications/
with filename matching exactly the executable name you then should be able to launch the app using the application Launcher of the operating system. And if saved there, the icon in the side bar will show for the app.
Linux: Desktop Launch File (with Icon)
Xojo is a rapid application development for Desktop, Web, Mobile & Raspberry Pi.
The Desktop application Xojo example project CreateShortcut.xojo_project
is using:
- Xojo 2024r4.2
- API 2
- Copy and Paste the Module
modShortcut
to your project. Or just copy and paste the extends methodCreateShortcut
to one of your global Modules. - You can then use it as an extension on a FolderItem:
anInstanceOfFolderItem.CreateShortcut(poShortcutFile As FolderItem, psLinuxDisplayname As String = "", poLinuxIconFile As FolderItem = nil)
Juerg Otter is a long term user of Xojo and working for CM Informatik AG. Their Application CMI LehrerOffice is a Xojo Design Award Winner 2018. In his leisure time Juerg provides some bits and pieces for Xojo Developers.
Do you like this project? Does it help you? Has it saved you time and money?
You're welcome - it's free... If you want to say thanks I'd appreciate a message or a small donation via PayPal.