commit bd55cc0510d73063fb468f32179da1680d757a5c Author: logikonline Date: Sat Jan 24 03:39:33 2026 +0000 Initial check in diff --git a/OpenMaui.AppImage.sln b/OpenMaui.AppImage.sln new file mode 100644 index 0000000..6a1956d --- /dev/null +++ b/OpenMaui.AppImage.sln @@ -0,0 +1,24 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenMaui.AppImage", "src\OpenMaui.AppImage\OpenMaui.AppImage.csproj", "{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenMaui.AppImage.Installer", "src\OpenMaui.AppImage.Installer\OpenMaui.AppImage.Installer.csproj", "{B2C3D4E5-F678-9012-BCDE-F12345678901}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Release|Any CPU.Build.0 = Release|Any CPU + {B2C3D4E5-F678-9012-BCDE-F12345678901}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B2C3D4E5-F678-9012-BCDE-F12345678901}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B2C3D4E5-F678-9012-BCDE-F12345678901}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B2C3D4E5-F678-9012-BCDE-F12345678901}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/README.md b/README.md new file mode 100644 index 0000000..6fe4364 --- /dev/null +++ b/README.md @@ -0,0 +1,188 @@ +# OpenMaui.AppImage + +A CLI tool to package .NET MAUI Linux applications as AppImages. + +## What is AppImage? + +AppImage is a universal Linux package format that allows you to distribute applications as a single executable file that works on most Linux distributions without installation. + +## Features + +- Package any .NET MAUI Linux app as an AppImage +- Automatic `.desktop` file generation +- Icon embedding +- Built-in install/uninstall support +- No root access required + +## Prerequisites + +1. **.NET 9 SDK** or later +2. **appimagetool** - Download from [AppImageKit releases](https://github.com/AppImage/AppImageKit/releases) + +### Installing appimagetool + +```bash +# Download +wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage + +# Make executable +chmod +x appimagetool-x86_64.AppImage + +# Move to PATH +sudo mv appimagetool-x86_64.AppImage /usr/local/bin/appimagetool +``` + +## Installation + +### As a .NET tool (recommended) + +```bash +dotnet tool install --global OpenMaui.AppImage +``` + +### From source + +```bash +git clone https://github.com/AuroraNetworks/openmaui-appimage.git +cd openmaui-appimage +dotnet build +``` + +## Usage + +### 1. Publish your MAUI app + +```bash +cd YourMauiApp +dotnet publish -c Release -r linux-x64 --self-contained false +``` + +### 2. Create the AppImage + +```bash +openmaui-appimage \ + --input bin/Release/net9.0/linux-x64/publish \ + --output YourApp.AppImage \ + --name "Your App" \ + --executable YourMauiApp \ + --icon path/to/icon.png \ + --category Utility \ + --version 1.0.0 +``` + +### Options + +| Option | Short | Required | Description | +|--------|-------|----------|-------------| +| `--input` | `-i` | Yes | Path to published .NET app directory | +| `--output` | `-o` | Yes | Output AppImage file path | +| `--name` | `-n` | Yes | Application name | +| `--executable` | `-e` | No | Main executable name (defaults to app name) | +| `--icon` | | No | Path to icon (PNG or SVG) | +| `--category` | `-c` | No | Desktop category (default: Utility) | +| `--version` | `-v` | No | App version (default: 1.0.0) | +| `--comment` | | No | App description | + +### Desktop Categories + +Common categories: `Utility`, `Development`, `Game`, `Graphics`, `Network`, `Office`, `AudioVideo`, `System` + +## Running the AppImage + +```bash +# Make executable (first time only) +chmod +x YourApp.AppImage + +# Run +./YourApp.AppImage + +# Install to system (adds to app menu) +./YourApp.AppImage --install + +# Uninstall +./YourApp.AppImage --uninstall +``` + +## Example: Packaging ShellDemo + +```bash +# Build and publish +cd maui-linux-samples/ShellDemo +dotnet publish -c Release -r linux-x64 --self-contained false + +# Create AppImage +openmaui-appimage \ + -i bin/Release/net9.0/linux-x64/publish \ + -o ShellDemo.AppImage \ + -n "OpenMaui Shell Demo" \ + -e ShellDemo \ + --icon Resources/Images/logo_only.svg \ + -c Utility \ + -v 1.0.0 \ + --comment "OpenMaui Controls Demonstration" +``` + +## How It Works + +1. **AppDir Structure**: Creates the standard AppImage directory structure: + ``` + YourApp.AppDir/ + ├── AppRun # Entry point script + ├── YourApp.desktop # Desktop integration + ├── YourApp.svg # Application icon + └── usr/ + └── bin/ # Your published .NET app + ``` + +2. **AppRun Script**: A bash script that: + - Sets up the environment (PATH, LD_LIBRARY_PATH) + - Handles `--install` and `--uninstall` flags + - Launches the .NET application via `dotnet` + +3. **appimagetool**: Packages everything into a single executable AppImage file + +## Self-Contained vs Framework-Dependent + +### Framework-Dependent (smaller, requires .NET runtime) +```bash +dotnet publish -c Release -r linux-x64 --self-contained false +``` +- Smaller AppImage (~50-100MB smaller) +- Requires .NET runtime on target system + +### Self-Contained (larger, no dependencies) +```bash +dotnet publish -c Release -r linux-x64 --self-contained true +``` +- Larger AppImage +- Works on any Linux system without .NET installed +- Recommended for distribution + +## Troubleshooting + +### "appimagetool not found" +Install appimagetool as described in Prerequisites. + +### "Could not find executable" +Use `--executable` to specify the correct DLL name (without .dll extension). + +### AppImage won't run +1. Ensure it's executable: `chmod +x YourApp.AppImage` +2. Check for missing dependencies: `./YourApp.AppImage` (errors will be shown) + +### FUSE errors +Some systems require FUSE to mount AppImages. Install with: +```bash +sudo apt install fuse libfuse2 # Debian/Ubuntu +sudo dnf install fuse fuse-libs # Fedora +``` + +Or extract and run: +```bash +./YourApp.AppImage --appimage-extract +./squashfs-root/AppRun +``` + +## License + +MIT License - see [LICENSE](LICENSE) diff --git a/src/OpenMaui.AppImage.Installer/OpenMaui.AppImage.Installer.csproj b/src/OpenMaui.AppImage.Installer/OpenMaui.AppImage.Installer.csproj new file mode 100644 index 0000000..674786d --- /dev/null +++ b/src/OpenMaui.AppImage.Installer/OpenMaui.AppImage.Installer.csproj @@ -0,0 +1,17 @@ + + + + Exe + net9.0 + enable + enable + true + false + false + + + + + + + diff --git a/src/OpenMaui.AppImage.Installer/Program.cs b/src/OpenMaui.AppImage.Installer/Program.cs new file mode 100644 index 0000000..7959ee0 --- /dev/null +++ b/src/OpenMaui.AppImage.Installer/Program.cs @@ -0,0 +1,321 @@ +using Gtk; +using System.Diagnostics; +using IOPath = System.IO.Path; + +namespace OpenMaui.AppImage.Installer; + +class Program +{ + static int Main(string[] args) + { + // Parse arguments + string? appName = null; + string? appImage = null; + string? iconPath = null; + string? execPath = null; + string? comment = null; + string? category = null; + string? version = null; + + for (int i = 0; i < args.Length; i++) + { + switch (args[i]) + { + case "--name" when i + 1 < args.Length: + appName = args[++i]; + break; + case "--appimage" when i + 1 < args.Length: + appImage = args[++i]; + break; + case "--icon" when i + 1 < args.Length: + iconPath = args[++i]; + break; + case "--exec" when i + 1 < args.Length: + execPath = args[++i]; + break; + case "--comment" when i + 1 < args.Length: + comment = args[++i]; + break; + case "--category" when i + 1 < args.Length: + category = args[++i]; + break; + case "--version" when i + 1 < args.Length: + version = args[++i]; + break; + } + } + + // Get from environment if not provided + appImage ??= Environment.GetEnvironmentVariable("APPIMAGE"); + appName ??= Environment.GetEnvironmentVariable("APPIMAGE_NAME") ?? "Application"; + comment ??= Environment.GetEnvironmentVariable("APPIMAGE_COMMENT") ?? appName; + category ??= Environment.GetEnvironmentVariable("APPIMAGE_CATEGORY") ?? "Utility"; + version ??= Environment.GetEnvironmentVariable("APPIMAGE_VERSION") ?? "1.0.0"; + + if (string.IsNullOrEmpty(appImage)) + { + Console.Error.WriteLine("Error: --appimage or APPIMAGE environment variable required"); + return 1; + } + + Application.Init(); + + var dialog = new InstallerDialog(appName, appImage, iconPath, execPath, comment, category, version); + dialog.ShowAll(); + + Application.Run(); + + return dialog.ResultCode; + } +} + +class InstallerDialog : Window +{ + private readonly string _appName; + private readonly string _appImagePath; + private readonly string? _iconPath; + private readonly string? _execPath; + private readonly string _comment; + private readonly string _category; + private readonly string _version; + + public int ResultCode { get; private set; } = 1; + + public InstallerDialog(string appName, string appImagePath, string? iconPath, string? execPath, + string comment, string category, string version) + : base(WindowType.Toplevel) + { + _appName = appName; + _appImagePath = appImagePath; + _iconPath = iconPath; + _execPath = execPath; + _comment = comment; + _category = category; + _version = version; + + SetupWindow(); + BuildUI(); + } + + private void SetupWindow() + { + Title = $"Install {_appName}"; + SetDefaultSize(400, 300); + SetPosition(WindowPosition.Center); + BorderWidth = 20; + Resizable = false; + + DeleteEvent += (o, e) => + { + ResultCode = 1; + Application.Quit(); + }; + } + + private void BuildUI() + { + var mainBox = new Box(Orientation.Vertical, 20); + + // Icon + var iconBox = new Box(Orientation.Horizontal, 0); + iconBox.Halign = Align.Center; + + Image appIcon; + if (!string.IsNullOrEmpty(_iconPath) && File.Exists(_iconPath)) + { + try + { + var pixbuf = new Gdk.Pixbuf(_iconPath, 96, 96); + appIcon = new Image(pixbuf); + } + catch + { + appIcon = CreateDefaultIcon(); + } + } + else + { + appIcon = CreateDefaultIcon(); + } + iconBox.PackStart(appIcon, false, false, 0); + mainBox.PackStart(iconBox, false, false, 0); + + // App name + var nameLabel = new Label(); + nameLabel.Markup = $"{GLib.Markup.EscapeText(_appName)}"; + nameLabel.Halign = Align.Center; + mainBox.PackStart(nameLabel, false, false, 0); + + // Version + var versionLabel = new Label(); + versionLabel.Markup = $"Version {GLib.Markup.EscapeText(_version)}"; + versionLabel.Halign = Align.Center; + mainBox.PackStart(versionLabel, false, false, 0); + + // Description + var descLabel = new Label(_comment); + descLabel.Halign = Align.Center; + descLabel.LineWrap = true; + descLabel.MaxWidthChars = 40; + mainBox.PackStart(descLabel, false, false, 10); + + // Install location info + var installInfo = new Label(); + var binDir = IOPath.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".local", "bin"); + installInfo.Markup = $"Will install to: {GLib.Markup.EscapeText(binDir)}"; + installInfo.Halign = Align.Center; + mainBox.PackStart(installInfo, false, false, 0); + + // Buttons + var buttonBox = new Box(Orientation.Horizontal, 10); + buttonBox.Halign = Align.Center; + buttonBox.Valign = Align.End; + buttonBox.MarginTop = 20; + + var runButton = new Button("Run Without Installing"); + runButton.SetSizeRequest(180, 40); + runButton.Clicked += OnRunClicked; + + var installButton = new Button("Install"); + installButton.SetSizeRequest(120, 40); + installButton.Clicked += OnInstallClicked; + + buttonBox.PackStart(runButton, false, false, 0); + buttonBox.PackStart(installButton, false, false, 0); + mainBox.PackStart(buttonBox, false, false, 0); + + Add(mainBox); + } + + private Image CreateDefaultIcon() + { + // Create a simple colored square as default icon + var pixbuf = new Gdk.Pixbuf(Gdk.Colorspace.Rgb, true, 8, 96, 96); + pixbuf.Fill(0x2196F3FF); // Blue color + return new Image(pixbuf); + } + + private void OnRunClicked(object? sender, EventArgs e) + { + ResultCode = 0; // Success - run the app + Hide(); + Application.Quit(); + } + + private void OnInstallClicked(object? sender, EventArgs e) + { + try + { + var homeDir = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); + var binDir = IOPath.Combine(homeDir, ".local", "bin"); + var applicationsDir = IOPath.Combine(homeDir, ".local", "share", "applications"); + var iconsDir = IOPath.Combine(homeDir, ".local", "share", "icons", "hicolor", "256x256", "apps"); + var markerDir = IOPath.Combine(homeDir, ".local", "share", "openmaui-installed"); + + // Create directories + Directory.CreateDirectory(binDir); + Directory.CreateDirectory(applicationsDir); + Directory.CreateDirectory(iconsDir); + Directory.CreateDirectory(markerDir); + + var appImageName = IOPath.GetFileName(_appImagePath); + var sanitizedName = SanitizeName(_appName); + var destPath = IOPath.Combine(binDir, appImageName); + + // Copy AppImage + File.Copy(_appImagePath, destPath, overwrite: true); + + // Make executable + var chmod = Process.Start(new ProcessStartInfo + { + FileName = "chmod", + Arguments = $"+x \"{destPath}\"", + UseShellExecute = false, + CreateNoWindow = true + }); + chmod?.WaitForExit(); + + // Copy icon if available + string iconName = sanitizedName; + if (!string.IsNullOrEmpty(_iconPath) && File.Exists(_iconPath)) + { + var iconExt = IOPath.GetExtension(_iconPath); + var destIcon = IOPath.Combine(iconsDir, $"{sanitizedName}{iconExt}"); + File.Copy(_iconPath, destIcon, overwrite: true); + } + + // Create .desktop file + var desktopContent = $@"[Desktop Entry] +Type=Application +Name={_appName} +Comment={_comment} +Exec={destPath} +Icon={iconName} +Categories={_category}; +Terminal=false +X-AppImage-Version={_version} +"; + var desktopPath = IOPath.Combine(applicationsDir, $"{sanitizedName}.desktop"); + File.WriteAllText(desktopPath, desktopContent); + + // Create marker file + File.WriteAllText(IOPath.Combine(markerDir, appImageName), DateTime.Now.ToString("O")); + + // Update desktop database + try + { + var updateDb = Process.Start(new ProcessStartInfo + { + FileName = "update-desktop-database", + Arguments = applicationsDir, + UseShellExecute = false, + CreateNoWindow = true, + RedirectStandardError = true + }); + updateDb?.WaitForExit(); + } + catch { } + + // Show success message + var successDialog = new MessageDialog( + this, + DialogFlags.Modal, + MessageType.Info, + ButtonsType.Ok, + $"{_appName} has been installed successfully!\n\nYou can find it in your application menu."); + successDialog.Title = "Installation Complete"; + successDialog.Run(); + successDialog.Destroy(); + + ResultCode = 2; // Installed - run the app + Hide(); + Application.Quit(); + } + catch (Exception ex) + { + var errorDialog = new MessageDialog( + this, + DialogFlags.Modal, + MessageType.Error, + ButtonsType.Ok, + $"Installation failed: {ex.Message}"); + errorDialog.Title = "Installation Error"; + errorDialog.Run(); + errorDialog.Destroy(); + } + } + + private string SanitizeName(string name) + { + var invalid = IOPath.GetInvalidFileNameChars(); + var result = new System.Text.StringBuilder(); + foreach (var c in name) + { + if (invalid.Contains(c) || c == ' ') + result.Append('_'); + else + result.Append(c); + } + return result.ToString(); + } +} diff --git a/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/AtkSharp.dll b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/AtkSharp.dll new file mode 100755 index 0000000..6fadf5c Binary files /dev/null and b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/AtkSharp.dll differ diff --git a/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/CairoSharp.dll b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/CairoSharp.dll new file mode 100755 index 0000000..ad0efd2 Binary files /dev/null and b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/CairoSharp.dll differ diff --git a/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/GLibSharp.dll b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/GLibSharp.dll new file mode 100755 index 0000000..0b5ac48 Binary files /dev/null and b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/GLibSharp.dll differ diff --git a/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/GdkSharp.dll b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/GdkSharp.dll new file mode 100755 index 0000000..0371601 Binary files /dev/null and b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/GdkSharp.dll differ diff --git a/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/GioSharp.dll b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/GioSharp.dll new file mode 100755 index 0000000..148f15e Binary files /dev/null and b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/GioSharp.dll differ diff --git a/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/GtkSharp.dll b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/GtkSharp.dll new file mode 100755 index 0000000..26ef061 Binary files /dev/null and b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/GtkSharp.dll differ diff --git a/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/OpenMaui.AppImage.Installer b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/OpenMaui.AppImage.Installer new file mode 100755 index 0000000..f736f24 Binary files /dev/null and b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/OpenMaui.AppImage.Installer differ diff --git a/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/OpenMaui.AppImage.Installer.deps.json b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/OpenMaui.AppImage.Installer.deps.json new file mode 100644 index 0000000..e682db1 --- /dev/null +++ b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/OpenMaui.AppImage.Installer.deps.json @@ -0,0 +1,164 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v9.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v9.0": { + "OpenMaui.AppImage.Installer/1.0.0": { + "dependencies": { + "GtkSharp": "3.24.24.95", + "Microsoft.NET.ILLink.Tasks": "9.0.11" + }, + "runtime": { + "OpenMaui.AppImage.Installer.dll": {} + } + }, + "AtkSharp/3.24.24.95": { + "dependencies": { + "GLibSharp": "3.24.24.95" + }, + "runtime": { + "lib/net6.0/AtkSharp.dll": { + "assemblyVersion": "3.24.24.95", + "fileVersion": "3.24.24.95" + } + } + }, + "CairoSharp/3.24.24.95": { + "runtime": { + "lib/net6.0/CairoSharp.dll": { + "assemblyVersion": "3.24.24.95", + "fileVersion": "3.24.24.95" + } + } + }, + "GdkSharp/3.24.24.95": { + "dependencies": { + "CairoSharp": "3.24.24.95", + "GLibSharp": "3.24.24.95", + "GioSharp": "3.24.24.95", + "PangoSharp": "3.24.24.95" + }, + "runtime": { + "lib/net6.0/GdkSharp.dll": { + "assemblyVersion": "3.24.24.95", + "fileVersion": "3.24.24.95" + } + } + }, + "GioSharp/3.24.24.95": { + "dependencies": { + "GLibSharp": "3.24.24.95" + }, + "runtime": { + "lib/net6.0/GioSharp.dll": { + "assemblyVersion": "3.24.24.95", + "fileVersion": "3.24.24.95" + } + } + }, + "GLibSharp/3.24.24.95": { + "runtime": { + "lib/net6.0/GLibSharp.dll": { + "assemblyVersion": "3.24.24.95", + "fileVersion": "3.24.24.95" + } + } + }, + "GtkSharp/3.24.24.95": { + "dependencies": { + "AtkSharp": "3.24.24.95", + "CairoSharp": "3.24.24.95", + "GLibSharp": "3.24.24.95", + "GdkSharp": "3.24.24.95", + "GioSharp": "3.24.24.95", + "PangoSharp": "3.24.24.95" + }, + "runtime": { + "lib/net6.0/GtkSharp.dll": { + "assemblyVersion": "3.24.24.95", + "fileVersion": "3.24.24.95" + } + } + }, + "Microsoft.NET.ILLink.Tasks/9.0.11": {}, + "PangoSharp/3.24.24.95": { + "dependencies": { + "CairoSharp": "3.24.24.95", + "GLibSharp": "3.24.24.95" + }, + "runtime": { + "lib/net6.0/PangoSharp.dll": { + "assemblyVersion": "3.24.24.95", + "fileVersion": "3.24.24.95" + } + } + } + } + }, + "libraries": { + "OpenMaui.AppImage.Installer/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "AtkSharp/3.24.24.95": { + "type": "package", + "serviceable": true, + "sha512": "sha512-LnSfsc0y11gfzczZj5bnpwcFkXFZuVTSSd92ML/FcHIM7FU+cAfm1UkAonv5BdwTRhzDbNDE39vihao/k75sUA==", + "path": "atksharp/3.24.24.95", + "hashPath": "atksharp.3.24.24.95.nupkg.sha512" + }, + "CairoSharp/3.24.24.95": { + "type": "package", + "serviceable": true, + "sha512": "sha512-EZ9KT3pwVAol35XbZW0Uwdg2LqhDvPnWdhqIrsedhDx+Omnu56hLzxh8mZGqmQvEwJE8Opbda4w9CqDtXbX6Vw==", + "path": "cairosharp/3.24.24.95", + "hashPath": "cairosharp.3.24.24.95.nupkg.sha512" + }, + "GdkSharp/3.24.24.95": { + "type": "package", + "serviceable": true, + "sha512": "sha512-rABpIGkxr8lOdyhEmrKXzjih3z3932kjqUmm5qaQhWVSvu9YepEk3J1FApgnKCW/EWEzlerzxnJArsyOlgMsZQ==", + "path": "gdksharp/3.24.24.95", + "hashPath": "gdksharp.3.24.24.95.nupkg.sha512" + }, + "GioSharp/3.24.24.95": { + "type": "package", + "serviceable": true, + "sha512": "sha512-avYEDFlYgbogb+Y7ZhIXQpyJfL83bnPpBKY642YEW9PQ+pRK3qf2k0opvd5oHccXfByj6kAQjmRUSIS0pj19Fg==", + "path": "giosharp/3.24.24.95", + "hashPath": "giosharp.3.24.24.95.nupkg.sha512" + }, + "GLibSharp/3.24.24.95": { + "type": "package", + "serviceable": true, + "sha512": "sha512-1viZRMVjddf2HUCW7WDXT47rHssteHkAOimXQ2/pI8oGrPGNFuuw5MbX8BOIy73hCWVqo7JEMONv3z32OrCoCQ==", + "path": "glibsharp/3.24.24.95", + "hashPath": "glibsharp.3.24.24.95.nupkg.sha512" + }, + "GtkSharp/3.24.24.95": { + "type": "package", + "serviceable": true, + "sha512": "sha512-RRUY45hAa5gsMcadvVjcLUzMjVtmuHSYTcIwM6j8LNgKhzFFHk69qM1D5ULfGxaWmVjicqNWiFtOtk8WsvPqaQ==", + "path": "gtksharp/3.24.24.95", + "hashPath": "gtksharp.3.24.24.95.nupkg.sha512" + }, + "Microsoft.NET.ILLink.Tasks/9.0.11": { + "type": "package", + "serviceable": true, + "sha512": "sha512-vvB9rtDmWaXgYkViT00KORBVmA3pcYsHlgd9vOPqL9sf5bKy3rvLMF1+sI1uUfVj28S3itirHlHmX5/kcpZKNw==", + "path": "microsoft.net.illink.tasks/9.0.11", + "hashPath": "microsoft.net.illink.tasks.9.0.11.nupkg.sha512" + }, + "PangoSharp/3.24.24.95": { + "type": "package", + "serviceable": true, + "sha512": "sha512-H7JeyEvLsgvsbamGpRgoNtdvzPiGwwsUuoeTobN1C/JRjw1J8Snw0yf2WBr7CKx5GLwbrwpQYOb7N/HD17ME8A==", + "path": "pangosharp/3.24.24.95", + "hashPath": "pangosharp.3.24.24.95.nupkg.sha512" + } + } +} \ No newline at end of file diff --git a/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/OpenMaui.AppImage.Installer.dll b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/OpenMaui.AppImage.Installer.dll new file mode 100644 index 0000000..4230370 Binary files /dev/null and b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/OpenMaui.AppImage.Installer.dll differ diff --git a/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/OpenMaui.AppImage.Installer.pdb b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/OpenMaui.AppImage.Installer.pdb new file mode 100644 index 0000000..2830a14 Binary files /dev/null and b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/OpenMaui.AppImage.Installer.pdb differ diff --git a/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/OpenMaui.AppImage.Installer.runtimeconfig.json b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/OpenMaui.AppImage.Installer.runtimeconfig.json new file mode 100644 index 0000000..b19c3c8 --- /dev/null +++ b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/OpenMaui.AppImage.Installer.runtimeconfig.json @@ -0,0 +1,12 @@ +{ + "runtimeOptions": { + "tfm": "net9.0", + "framework": { + "name": "Microsoft.NETCore.App", + "version": "9.0.0" + }, + "configProperties": { + "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false + } + } +} \ No newline at end of file diff --git a/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/PangoSharp.dll b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/PangoSharp.dll new file mode 100755 index 0000000..2c96ace Binary files /dev/null and b/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/PangoSharp.dll differ diff --git a/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs new file mode 100644 index 0000000..9e76325 --- /dev/null +++ b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] diff --git a/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.A8D22EC6.Up2Date b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.A8D22EC6.Up2Date new file mode 100644 index 0000000..e69de29 diff --git a/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.AssemblyInfo.cs b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.AssemblyInfo.cs new file mode 100644 index 0000000..2b2cef1 --- /dev/null +++ b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.AssemblyInfo.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("OpenMaui.AppImage.Installer")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] +[assembly: System.Reflection.AssemblyProductAttribute("OpenMaui.AppImage.Installer")] +[assembly: System.Reflection.AssemblyTitleAttribute("OpenMaui.AppImage.Installer")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.AssemblyInfoInputs.cache b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.AssemblyInfoInputs.cache new file mode 100644 index 0000000..278f48c --- /dev/null +++ b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +c7f52ac9278921ebc17b73f811f98dc7b89c0f6b0f333cfc26e6206bd65bdaa5 diff --git a/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.GeneratedMSBuildEditorConfig.editorconfig b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..6cbf924 --- /dev/null +++ b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,19 @@ +is_global = true +build_property.EnableAotAnalyzer = +build_property.EnableSingleFileAnalyzer = true +build_property.EnableTrimAnalyzer = +build_property.IncludeAllContentForSelfExtract = +build_property.TargetFramework = net9.0 +build_property.TargetPlatformMinVersion = +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.InvariantGlobalization = +build_property.PlatformNeutralAssembly = +build_property.EnforceExtendedAnalyzerRules = +build_property._SupportedPlatformList = Linux,macOS,Windows +build_property.RootNamespace = OpenMaui.AppImage.Installer +build_property.ProjectDir = /home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = +build_property.EffectiveAnalysisLevelStyle = 9.0 +build_property.EnableCodeStyleSeverity = diff --git a/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.GlobalUsings.g.cs b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.GlobalUsings.g.cs new file mode 100644 index 0000000..8578f3d --- /dev/null +++ b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.GlobalUsings.g.cs @@ -0,0 +1,8 @@ +// +global using global::System; +global using global::System.Collections.Generic; +global using global::System.IO; +global using global::System.Linq; +global using global::System.Net.Http; +global using global::System.Threading; +global using global::System.Threading.Tasks; diff --git a/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.assets.cache b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.assets.cache new file mode 100644 index 0000000..30ec614 Binary files /dev/null and b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.assets.cache differ diff --git a/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.csproj.AssemblyReference.cache b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.csproj.AssemblyReference.cache new file mode 100644 index 0000000..261a432 Binary files /dev/null and b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.csproj.AssemblyReference.cache differ diff --git a/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.csproj.CoreCompileInputs.cache b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..19d9f13 --- /dev/null +++ b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +877f8abf432128ccebc079b686d950569597ea4cf23a2a5c83152ddb59382ad3 diff --git a/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.csproj.FileListAbsolute.txt b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..c243023 --- /dev/null +++ b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.csproj.FileListAbsolute.txt @@ -0,0 +1,23 @@ +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.csproj.AssemblyReference.cache +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.GeneratedMSBuildEditorConfig.editorconfig +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.AssemblyInfoInputs.cache +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.AssemblyInfo.cs +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.csproj.CoreCompileInputs.cache +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/OpenMaui.AppImage.Installer +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/OpenMaui.AppImage.Installer.deps.json +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/OpenMaui.AppImage.Installer.runtimeconfig.json +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/OpenMaui.AppImage.Installer.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/OpenMaui.AppImage.Installer.pdb +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/AtkSharp.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/CairoSharp.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/GdkSharp.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/GioSharp.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/GLibSharp.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/GtkSharp.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/bin/Debug/net9.0/PangoSharp.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.A8D22EC6.Up2Date +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/refint/OpenMaui.AppImage.Installer.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.pdb +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.genruntimeconfig.cache +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/ref/OpenMaui.AppImage.Installer.dll diff --git a/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.dll b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.dll new file mode 100644 index 0000000..4230370 Binary files /dev/null and b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.dll differ diff --git a/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.genruntimeconfig.cache b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.genruntimeconfig.cache new file mode 100644 index 0000000..9c4c227 --- /dev/null +++ b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.genruntimeconfig.cache @@ -0,0 +1 @@ +d7ed09b823c80d52f357fe93bcbb418806255c523d3f08e93a685d097f656cac diff --git a/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.pdb b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.pdb new file mode 100644 index 0000000..2830a14 Binary files /dev/null and b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/OpenMaui.AppImage.Installer.pdb differ diff --git a/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/apphost b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/apphost new file mode 100755 index 0000000..f736f24 Binary files /dev/null and b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/apphost differ diff --git a/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/ref/OpenMaui.AppImage.Installer.dll b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/ref/OpenMaui.AppImage.Installer.dll new file mode 100644 index 0000000..81c2895 Binary files /dev/null and b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/ref/OpenMaui.AppImage.Installer.dll differ diff --git a/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/refint/OpenMaui.AppImage.Installer.dll b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/refint/OpenMaui.AppImage.Installer.dll new file mode 100644 index 0000000..81c2895 Binary files /dev/null and b/src/OpenMaui.AppImage.Installer/obj/Debug/net9.0/refint/OpenMaui.AppImage.Installer.dll differ diff --git a/src/OpenMaui.AppImage.Installer/obj/OpenMaui.AppImage.Installer.csproj.nuget.dgspec.json b/src/OpenMaui.AppImage.Installer/obj/OpenMaui.AppImage.Installer.csproj.nuget.dgspec.json new file mode 100644 index 0000000..8522aad --- /dev/null +++ b/src/OpenMaui.AppImage.Installer/obj/OpenMaui.AppImage.Installer.csproj.nuget.dgspec.json @@ -0,0 +1,79 @@ +{ + "format": 1, + "restore": { + "/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/OpenMaui.AppImage.Installer.csproj": {} + }, + "projects": { + "/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/OpenMaui.AppImage.Installer.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/OpenMaui.AppImage.Installer.csproj", + "projectName": "OpenMaui.AppImage.Installer", + "projectPath": "/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/OpenMaui.AppImage.Installer.csproj", + "packagesPath": "/home/friedel/.nuget/packages/", + "outputPath": "/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/obj/", + "projectStyle": "PackageReference", + "configFilePaths": [ + "/home/friedel/.nuget/NuGet/NuGet.Config" + ], + "originalTargetFrameworks": [ + "net9.0" + ], + "sources": { + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net9.0": { + "targetAlias": "net9.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "direct" + }, + "SdkAnalysisLevel": "9.0.300" + }, + "frameworks": { + "net9.0": { + "targetAlias": "net9.0", + "dependencies": { + "GtkSharp": { + "target": "Package", + "version": "[3.24.24.95, )" + }, + "Microsoft.NET.ILLink.Tasks": { + "suppressParent": "All", + "target": "Package", + "version": "[9.0.11, )", + "autoReferenced": true + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "/home/friedel/.dotnet/sdk/9.0.308/PortableRuntimeIdentifierGraph.json" + } + } + } + } +} \ No newline at end of file diff --git a/src/OpenMaui.AppImage.Installer/obj/OpenMaui.AppImage.Installer.csproj.nuget.g.props b/src/OpenMaui.AppImage.Installer/obj/OpenMaui.AppImage.Installer.csproj.nuget.g.props new file mode 100644 index 0000000..42fbccf --- /dev/null +++ b/src/OpenMaui.AppImage.Installer/obj/OpenMaui.AppImage.Installer.csproj.nuget.g.props @@ -0,0 +1,21 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + /home/friedel/.nuget/packages/ + /home/friedel/.nuget/packages/ + PackageReference + 6.14.0 + + + + + + + + + /home/friedel/.nuget/packages/microsoft.net.illink.tasks/9.0.11 + + \ No newline at end of file diff --git a/src/OpenMaui.AppImage.Installer/obj/OpenMaui.AppImage.Installer.csproj.nuget.g.targets b/src/OpenMaui.AppImage.Installer/obj/OpenMaui.AppImage.Installer.csproj.nuget.g.targets new file mode 100644 index 0000000..6129aef --- /dev/null +++ b/src/OpenMaui.AppImage.Installer/obj/OpenMaui.AppImage.Installer.csproj.nuget.g.targets @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/OpenMaui.AppImage.Installer/obj/project.assets.json b/src/OpenMaui.AppImage.Installer/obj/project.assets.json new file mode 100644 index 0000000..b89e39b --- /dev/null +++ b/src/OpenMaui.AppImage.Installer/obj/project.assets.json @@ -0,0 +1,328 @@ +{ + "version": 3, + "targets": { + "net9.0": { + "AtkSharp/3.24.24.95": { + "type": "package", + "dependencies": { + "GLibSharp": "3.24.24.95" + }, + "compile": { + "lib/net6.0/AtkSharp.dll": {} + }, + "runtime": { + "lib/net6.0/AtkSharp.dll": {} + } + }, + "CairoSharp/3.24.24.95": { + "type": "package", + "compile": { + "lib/net6.0/CairoSharp.dll": {} + }, + "runtime": { + "lib/net6.0/CairoSharp.dll": {} + } + }, + "GdkSharp/3.24.24.95": { + "type": "package", + "dependencies": { + "CairoSharp": "3.24.24.95", + "GLibSharp": "3.24.24.95", + "GioSharp": "3.24.24.95", + "PangoSharp": "3.24.24.95" + }, + "compile": { + "lib/net6.0/GdkSharp.dll": {} + }, + "runtime": { + "lib/net6.0/GdkSharp.dll": {} + } + }, + "GioSharp/3.24.24.95": { + "type": "package", + "dependencies": { + "GLibSharp": "3.24.24.95" + }, + "compile": { + "lib/net6.0/GioSharp.dll": {} + }, + "runtime": { + "lib/net6.0/GioSharp.dll": {} + } + }, + "GLibSharp/3.24.24.95": { + "type": "package", + "compile": { + "lib/net6.0/GLibSharp.dll": {} + }, + "runtime": { + "lib/net6.0/GLibSharp.dll": {} + } + }, + "GtkSharp/3.24.24.95": { + "type": "package", + "dependencies": { + "AtkSharp": "3.24.24.95", + "CairoSharp": "3.24.24.95", + "GLibSharp": "3.24.24.95", + "GdkSharp": "3.24.24.95", + "GioSharp": "3.24.24.95", + "PangoSharp": "3.24.24.95" + }, + "compile": { + "lib/net6.0/GtkSharp.dll": {} + }, + "runtime": { + "lib/net6.0/GtkSharp.dll": {} + }, + "build": { + "build/GtkSharp.targets": {} + } + }, + "Microsoft.NET.ILLink.Tasks/9.0.11": { + "type": "package", + "build": { + "build/Microsoft.NET.ILLink.Tasks.props": {} + } + }, + "PangoSharp/3.24.24.95": { + "type": "package", + "dependencies": { + "CairoSharp": "3.24.24.95", + "GLibSharp": "3.24.24.95" + }, + "compile": { + "lib/net6.0/PangoSharp.dll": {} + }, + "runtime": { + "lib/net6.0/PangoSharp.dll": {} + } + } + } + }, + "libraries": { + "AtkSharp/3.24.24.95": { + "sha512": "LnSfsc0y11gfzczZj5bnpwcFkXFZuVTSSd92ML/FcHIM7FU+cAfm1UkAonv5BdwTRhzDbNDE39vihao/k75sUA==", + "type": "package", + "path": "atksharp/3.24.24.95", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "atksharp.3.24.24.95.nupkg.sha512", + "atksharp.nuspec", + "lib/net6.0/AtkSharp.dll", + "lib/netstandard2.0/AtkSharp.dll" + ] + }, + "CairoSharp/3.24.24.95": { + "sha512": "EZ9KT3pwVAol35XbZW0Uwdg2LqhDvPnWdhqIrsedhDx+Omnu56hLzxh8mZGqmQvEwJE8Opbda4w9CqDtXbX6Vw==", + "type": "package", + "path": "cairosharp/3.24.24.95", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "cairosharp.3.24.24.95.nupkg.sha512", + "cairosharp.nuspec", + "lib/net6.0/CairoSharp.dll", + "lib/netstandard2.0/CairoSharp.dll" + ] + }, + "GdkSharp/3.24.24.95": { + "sha512": "rABpIGkxr8lOdyhEmrKXzjih3z3932kjqUmm5qaQhWVSvu9YepEk3J1FApgnKCW/EWEzlerzxnJArsyOlgMsZQ==", + "type": "package", + "path": "gdksharp/3.24.24.95", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "gdksharp.3.24.24.95.nupkg.sha512", + "gdksharp.nuspec", + "lib/net6.0/GdkSharp.dll", + "lib/netstandard2.0/GdkSharp.dll" + ] + }, + "GioSharp/3.24.24.95": { + "sha512": "avYEDFlYgbogb+Y7ZhIXQpyJfL83bnPpBKY642YEW9PQ+pRK3qf2k0opvd5oHccXfByj6kAQjmRUSIS0pj19Fg==", + "type": "package", + "path": "giosharp/3.24.24.95", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "giosharp.3.24.24.95.nupkg.sha512", + "giosharp.nuspec", + "lib/net6.0/GioSharp.dll", + "lib/netstandard2.0/GioSharp.dll" + ] + }, + "GLibSharp/3.24.24.95": { + "sha512": "1viZRMVjddf2HUCW7WDXT47rHssteHkAOimXQ2/pI8oGrPGNFuuw5MbX8BOIy73hCWVqo7JEMONv3z32OrCoCQ==", + "type": "package", + "path": "glibsharp/3.24.24.95", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "glibsharp.3.24.24.95.nupkg.sha512", + "glibsharp.nuspec", + "lib/net6.0/GLibSharp.dll", + "lib/netstandard2.0/GLibSharp.dll" + ] + }, + "GtkSharp/3.24.24.95": { + "sha512": "RRUY45hAa5gsMcadvVjcLUzMjVtmuHSYTcIwM6j8LNgKhzFFHk69qM1D5ULfGxaWmVjicqNWiFtOtk8WsvPqaQ==", + "type": "package", + "path": "gtksharp/3.24.24.95", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "build/GtkSharp.targets", + "gtksharp.3.24.24.95.nupkg.sha512", + "gtksharp.nuspec", + "lib/net6.0/GtkSharp.dll", + "lib/netstandard2.0/GtkSharp.dll" + ] + }, + "Microsoft.NET.ILLink.Tasks/9.0.11": { + "sha512": "vvB9rtDmWaXgYkViT00KORBVmA3pcYsHlgd9vOPqL9sf5bKy3rvLMF1+sI1uUfVj28S3itirHlHmX5/kcpZKNw==", + "type": "package", + "path": "microsoft.net.illink.tasks/9.0.11", + "hasTools": true, + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "Sdk/Sdk.props", + "THIRD-PARTY-NOTICES.TXT", + "analyzers/dotnet/cs/ILLink.CodeFixProvider.dll", + "analyzers/dotnet/cs/ILLink.RoslynAnalyzer.dll", + "build/Microsoft.NET.ILLink.Analyzers.props", + "build/Microsoft.NET.ILLink.Tasks.props", + "build/Microsoft.NET.ILLink.targets", + "microsoft.net.illink.tasks.9.0.11.nupkg.sha512", + "microsoft.net.illink.tasks.nuspec", + "tools/net472/ILLink.Tasks.dll", + "tools/net472/ILLink.Tasks.dll.config", + "tools/net472/Mono.Cecil.Mdb.dll", + "tools/net472/Mono.Cecil.Pdb.dll", + "tools/net472/Mono.Cecil.Rocks.dll", + "tools/net472/Mono.Cecil.dll", + "tools/net472/Sdk/Sdk.props", + "tools/net472/System.Buffers.dll", + "tools/net472/System.Collections.Immutable.dll", + "tools/net472/System.Memory.dll", + "tools/net472/System.Numerics.Vectors.dll", + "tools/net472/System.Reflection.Metadata.dll", + "tools/net472/System.Runtime.CompilerServices.Unsafe.dll", + "tools/net472/build/Microsoft.NET.ILLink.Analyzers.props", + "tools/net472/build/Microsoft.NET.ILLink.Tasks.props", + "tools/net472/build/Microsoft.NET.ILLink.targets", + "tools/net9.0/ILLink.Tasks.deps.json", + "tools/net9.0/ILLink.Tasks.dll", + "tools/net9.0/Mono.Cecil.Mdb.dll", + "tools/net9.0/Mono.Cecil.Pdb.dll", + "tools/net9.0/Mono.Cecil.Rocks.dll", + "tools/net9.0/Mono.Cecil.dll", + "tools/net9.0/Sdk/Sdk.props", + "tools/net9.0/build/Microsoft.NET.ILLink.Analyzers.props", + "tools/net9.0/build/Microsoft.NET.ILLink.Tasks.props", + "tools/net9.0/build/Microsoft.NET.ILLink.targets", + "tools/net9.0/illink.deps.json", + "tools/net9.0/illink.dll", + "tools/net9.0/illink.runtimeconfig.json", + "useSharedDesignerContext.txt" + ] + }, + "PangoSharp/3.24.24.95": { + "sha512": "H7JeyEvLsgvsbamGpRgoNtdvzPiGwwsUuoeTobN1C/JRjw1J8Snw0yf2WBr7CKx5GLwbrwpQYOb7N/HD17ME8A==", + "type": "package", + "path": "pangosharp/3.24.24.95", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "lib/net6.0/PangoSharp.dll", + "lib/netstandard2.0/PangoSharp.dll", + "pangosharp.3.24.24.95.nupkg.sha512", + "pangosharp.nuspec" + ] + } + }, + "projectFileDependencyGroups": { + "net9.0": [ + "GtkSharp >= 3.24.24.95", + "Microsoft.NET.ILLink.Tasks >= 9.0.11" + ] + }, + "packageFolders": { + "/home/friedel/.nuget/packages/": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/OpenMaui.AppImage.Installer.csproj", + "projectName": "OpenMaui.AppImage.Installer", + "projectPath": "/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/OpenMaui.AppImage.Installer.csproj", + "packagesPath": "/home/friedel/.nuget/packages/", + "outputPath": "/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/obj/", + "projectStyle": "PackageReference", + "configFilePaths": [ + "/home/friedel/.nuget/NuGet/NuGet.Config" + ], + "originalTargetFrameworks": [ + "net9.0" + ], + "sources": { + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net9.0": { + "targetAlias": "net9.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "direct" + }, + "SdkAnalysisLevel": "9.0.300" + }, + "frameworks": { + "net9.0": { + "targetAlias": "net9.0", + "dependencies": { + "GtkSharp": { + "target": "Package", + "version": "[3.24.24.95, )" + }, + "Microsoft.NET.ILLink.Tasks": { + "suppressParent": "All", + "target": "Package", + "version": "[9.0.11, )", + "autoReferenced": true + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "/home/friedel/.dotnet/sdk/9.0.308/PortableRuntimeIdentifierGraph.json" + } + } + } +} \ No newline at end of file diff --git a/src/OpenMaui.AppImage.Installer/obj/project.nuget.cache b/src/OpenMaui.AppImage.Installer/obj/project.nuget.cache new file mode 100644 index 0000000..77f3b44 --- /dev/null +++ b/src/OpenMaui.AppImage.Installer/obj/project.nuget.cache @@ -0,0 +1,17 @@ +{ + "version": 2, + "dgSpecHash": "9YJjqvWj58A=", + "success": true, + "projectFilePath": "/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage.Installer/OpenMaui.AppImage.Installer.csproj", + "expectedPackageFiles": [ + "/home/friedel/.nuget/packages/atksharp/3.24.24.95/atksharp.3.24.24.95.nupkg.sha512", + "/home/friedel/.nuget/packages/cairosharp/3.24.24.95/cairosharp.3.24.24.95.nupkg.sha512", + "/home/friedel/.nuget/packages/gdksharp/3.24.24.95/gdksharp.3.24.24.95.nupkg.sha512", + "/home/friedel/.nuget/packages/giosharp/3.24.24.95/giosharp.3.24.24.95.nupkg.sha512", + "/home/friedel/.nuget/packages/glibsharp/3.24.24.95/glibsharp.3.24.24.95.nupkg.sha512", + "/home/friedel/.nuget/packages/gtksharp/3.24.24.95/gtksharp.3.24.24.95.nupkg.sha512", + "/home/friedel/.nuget/packages/microsoft.net.illink.tasks/9.0.11/microsoft.net.illink.tasks.9.0.11.nupkg.sha512", + "/home/friedel/.nuget/packages/pangosharp/3.24.24.95/pangosharp.3.24.24.95.nupkg.sha512" + ], + "logs": [] +} \ No newline at end of file diff --git a/src/OpenMaui.AppImage/OpenMaui.AppImage.csproj b/src/OpenMaui.AppImage/OpenMaui.AppImage.csproj new file mode 100644 index 0000000..b19d318 --- /dev/null +++ b/src/OpenMaui.AppImage/OpenMaui.AppImage.csproj @@ -0,0 +1,30 @@ + + + + Exe + net9.0 + enable + enable + + + true + openmaui-appimage + OpenMaui.AppImage + 1.0.0 + OpenMaui Contributors + CLI tool to package .NET MAUI Linux apps as AppImages + https://github.com/AuroraNetworks/openmaui-appimage + MIT + maui;linux;appimage;packaging + + + + + + + + + + + + diff --git a/src/OpenMaui.AppImage/Program.cs b/src/OpenMaui.AppImage/Program.cs new file mode 100644 index 0000000..10006a0 --- /dev/null +++ b/src/OpenMaui.AppImage/Program.cs @@ -0,0 +1,520 @@ +using System.CommandLine; +using System.Diagnostics; +using System.Reflection; +using System.Text; + +namespace OpenMaui.AppImage; + +class Program +{ + static async Task Main(string[] args) + { + var rootCommand = new RootCommand("Package .NET MAUI Linux apps as AppImages"); + + var inputOption = new Option( + aliases: new[] { "--input", "-i" }, + description: "Path to the published .NET app directory") + { IsRequired = true }; + + var outputOption = new Option( + aliases: new[] { "--output", "-o" }, + description: "Output AppImage file path") + { IsRequired = true }; + + var nameOption = new Option( + aliases: new[] { "--name", "-n" }, + description: "Application name (used in .desktop file)") + { IsRequired = true }; + + var execOption = new Option( + aliases: new[] { "--executable", "-e" }, + description: "Name of the main executable (without extension)"); + + var iconOption = new Option( + aliases: new[] { "--icon" }, + description: "Path to application icon (PNG or SVG)"); + + var categoryOption = new Option( + aliases: new[] { "--category", "-c" }, + () => "Utility", + description: "Desktop category (e.g., Utility, Development, Game)"); + + var versionOption = new Option( + aliases: new[] { "--app-version" }, + () => "1.0.0", + description: "Application version"); + + var commentOption = new Option( + aliases: new[] { "--comment" }, + description: "Application description/comment"); + + rootCommand.AddOption(inputOption); + rootCommand.AddOption(outputOption); + rootCommand.AddOption(nameOption); + rootCommand.AddOption(execOption); + rootCommand.AddOption(iconOption); + rootCommand.AddOption(categoryOption); + rootCommand.AddOption(versionOption); + rootCommand.AddOption(commentOption); + + rootCommand.SetHandler(async (context) => + { + var input = context.ParseResult.GetValueForOption(inputOption)!; + var output = context.ParseResult.GetValueForOption(outputOption)!; + var name = context.ParseResult.GetValueForOption(nameOption)!; + var exec = context.ParseResult.GetValueForOption(execOption); + var icon = context.ParseResult.GetValueForOption(iconOption); + var category = context.ParseResult.GetValueForOption(categoryOption)!; + var version = context.ParseResult.GetValueForOption(versionOption)!; + var comment = context.ParseResult.GetValueForOption(commentOption); + + var builder = new AppImageBuilder(); + var result = await builder.BuildAsync(new AppImageOptions + { + InputDirectory = input, + OutputFile = output, + AppName = name, + ExecutableName = exec, + IconPath = icon, + Category = category, + Version = version, + Comment = comment ?? $"{name} - Built with OpenMaui" + }); + + context.ExitCode = result ? 0 : 1; + }); + + return await rootCommand.InvokeAsync(args); + } +} + +public class AppImageOptions +{ + public required DirectoryInfo InputDirectory { get; init; } + public required FileInfo OutputFile { get; init; } + public required string AppName { get; init; } + public string? ExecutableName { get; init; } + public FileInfo? IconPath { get; init; } + public required string Category { get; init; } + public required string Version { get; init; } + public required string Comment { get; init; } +} + +public class AppImageBuilder +{ + public async Task BuildAsync(AppImageOptions options) + { + Console.WriteLine($"Building AppImage for {options.AppName}..."); + Console.WriteLine($" Input: {options.InputDirectory.FullName}"); + Console.WriteLine($" Output: {options.OutputFile.FullName}"); + + // Validate input directory + if (!options.InputDirectory.Exists) + { + Console.Error.WriteLine($"Error: Input directory does not exist: {options.InputDirectory.FullName}"); + return false; + } + + // Find the main executable + var execName = options.ExecutableName ?? options.AppName; + var mainExec = Path.Combine(options.InputDirectory.FullName, execName); + if (!File.Exists(mainExec)) + { + // Try with common variations + var candidates = new[] + { + mainExec, + mainExec + ".dll", + Path.Combine(options.InputDirectory.FullName, execName.Replace(" ", "")), + Path.Combine(options.InputDirectory.FullName, execName.Replace(" ", "") + ".dll") + }; + + mainExec = candidates.FirstOrDefault(File.Exists) ?? ""; + if (string.IsNullOrEmpty(mainExec)) + { + // List available executables + var dlls = Directory.GetFiles(options.InputDirectory.FullName, "*.dll") + .Select(Path.GetFileNameWithoutExtension) + .Take(10) + .ToList(); + + Console.Error.WriteLine($"Error: Could not find executable '{execName}' in {options.InputDirectory.FullName}"); + Console.Error.WriteLine($"Available DLLs: {string.Join(", ", dlls)}"); + Console.Error.WriteLine("Use --executable to specify the correct name."); + return false; + } + } + + // Create temporary AppDir structure + var tempDir = Path.Combine(Path.GetTempPath(), $"appimage-{Guid.NewGuid():N}"); + var appDir = Path.Combine(tempDir, $"{options.AppName}.AppDir"); + + try + { + Directory.CreateDirectory(appDir); + Console.WriteLine($" Creating AppDir at: {appDir}"); + + // Copy application files + Console.WriteLine(" Copying application files..."); + CopyDirectory(options.InputDirectory.FullName, Path.Combine(appDir, "usr", "bin")); + + // Copy installer if available + Console.WriteLine(" Copying installer..."); + await CopyInstaller(Path.Combine(appDir, "usr", "bin")); + + // Create AppRun script + Console.WriteLine(" Creating AppRun script..."); + var appRunPath = Path.Combine(appDir, "AppRun"); + await CreateAppRunScript(appRunPath, options); + + // Create .desktop file + Console.WriteLine(" Creating .desktop file..."); + var desktopPath = Path.Combine(appDir, $"{SanitizeFileName(options.AppName)}.desktop"); + await CreateDesktopFile(desktopPath, options); + + // Copy or create icon + Console.WriteLine(" Setting up icon..."); + await SetupIcon(appDir, options); + + // Create the AppImage using appimagetool + Console.WriteLine(" Creating AppImage..."); + var success = await CreateAppImage(appDir, options.OutputFile.FullName); + + if (success) + { + Console.WriteLine(); + Console.WriteLine($"AppImage created successfully: {options.OutputFile.FullName}"); + Console.WriteLine(); + Console.WriteLine("To run:"); + Console.WriteLine($" chmod +x {options.OutputFile.Name}"); + Console.WriteLine($" ./{options.OutputFile.Name}"); + } + + return success; + } + finally + { + // Cleanup temp directory + try + { + if (Directory.Exists(tempDir)) + Directory.Delete(tempDir, recursive: true); + } + catch { } + } + } + + private async Task CopyInstaller(string destDir) + { + // Find installer in the same directory as the tool + var toolDir = Path.GetDirectoryName(typeof(AppImageBuilder).Assembly.Location) ?? ""; + var installerDll = Path.Combine(toolDir, "..", "..", "..", "..", "OpenMaui.AppImage.Installer", "bin", "Debug", "net9.0"); + + // Also check published location + if (!Directory.Exists(installerDll)) + { + installerDll = Path.Combine(toolDir, "installer"); + } + + // Also check relative to current directory + if (!Directory.Exists(installerDll)) + { + var currentDir = Directory.GetCurrentDirectory(); + installerDll = Path.Combine(currentDir, "src", "OpenMaui.AppImage.Installer", "bin", "Debug", "net9.0"); + } + + if (Directory.Exists(installerDll)) + { + var installerFiles = new[] { "OpenMaui.AppImage.Installer.dll", "OpenMaui.AppImage.Installer.deps.json", "OpenMaui.AppImage.Installer.runtimeconfig.json" }; + foreach (var file in installerFiles) + { + var srcPath = Path.Combine(installerDll, file); + if (File.Exists(srcPath)) + { + File.Copy(srcPath, Path.Combine(destDir, file), overwrite: true); + } + } + Console.WriteLine(" Installer included for first-run dialog."); + } + else + { + Console.WriteLine(" Installer not found, skipping first-run dialog."); + } + } + + private async Task CreateAppRunScript(string path, AppImageOptions options) + { + var execName = options.ExecutableName ?? options.AppName; + var script = $@"#!/bin/bash +# AppRun script for OpenMaui applications + +SELF=$(readlink -f ""$0"") +HERE=${{SELF%/*}} + +# App metadata +export APPIMAGE_NAME=""{options.AppName}"" +export APPIMAGE_COMMENT=""{options.Comment}"" +export APPIMAGE_CATEGORY=""{options.Category}"" +export APPIMAGE_VERSION=""{options.Version}"" +EXEC_NAME=""{execName}"" + +export PATH=""$HERE/usr/bin:$PATH"" +export LD_LIBRARY_PATH=""$HERE/usr/bin:$LD_LIBRARY_PATH"" +export XDG_DATA_DIRS=""$HERE/usr/share:${{XDG_DATA_DIRS:-/usr/local/share:/usr/share}}"" + +INSTALLED_MARKER=""$HOME/.local/share/openmaui-installed"" + +# Handle command line flags +if [ ""$1"" = ""--install"" ]; then + SHOW_INSTALLER=1 + shift +elif [ ""$1"" = ""--uninstall"" ]; then + echo ""Uninstalling $APPIMAGE_NAME..."" + APPIMAGE_BASENAME=$(basename ""$APPIMAGE"") + SANITIZED_NAME=$(echo ""$APPIMAGE_NAME"" | tr ' ' '_') + rm -f ""$HOME/.local/bin/$APPIMAGE_BASENAME"" + rm -f ""$HOME/.local/share/applications/${{SANITIZED_NAME}}.desktop"" + rm -f ""$INSTALLED_MARKER/$APPIMAGE_BASENAME"" + command -v update-desktop-database &> /dev/null && update-desktop-database ""$HOME/.local/share/applications"" 2>/dev/null + echo ""Uninstallation complete!"" + exit 0 +elif [ ""$1"" = ""--help"" ]; then + echo ""Usage: $(basename ""$APPIMAGE"") [OPTIONS]"" + echo """" + echo ""Options:"" + echo "" --install Show the installation dialog"" + echo "" --uninstall Remove the application"" + echo "" --help Show this help message"" + exit 0 +fi + +# Check for first run +if [ -n ""$APPIMAGE"" ]; then + APPIMAGE_BASENAME=$(basename ""$APPIMAGE"") + if [ ! -f ""$INSTALLED_MARKER/$APPIMAGE_BASENAME"" ] || [ ""$SHOW_INSTALLER"" = ""1"" ]; then + if [ -f ""$HERE/usr/bin/OpenMaui.AppImage.Installer.dll"" ]; then + SANITIZED=$(echo ""$APPIMAGE_NAME"" | tr ' ' '_') + ICON_PATH="""" + for ext in svg png ico; do + [ -f ""$HERE/${{SANITIZED}}.${{ext}}"" ] && ICON_PATH=""$HERE/${{SANITIZED}}.${{ext}}"" && break + done + cd ""$HERE/usr/bin"" + dotnet OpenMaui.AppImage.Installer.dll --name ""$APPIMAGE_NAME"" --appimage ""$APPIMAGE"" --comment ""$APPIMAGE_COMMENT"" --category ""$APPIMAGE_CATEGORY"" --version ""$APPIMAGE_VERSION"" ${{ICON_PATH:+--icon ""$ICON_PATH""}} + RESULT=$? + [ ""$RESULT"" = ""1"" ] && exit 0 + fi + fi +fi + +cd ""$HERE/usr/bin"" +exec dotnet ""$EXEC_NAME.dll"" ""$@"" +"; + await File.WriteAllTextAsync(path, script); + await RunCommandAsync("chmod", $"+x \"{path}\""); + } + + private async Task CreateDesktopFile(string path, AppImageOptions options) + { + var desktop = $@"[Desktop Entry] +Type=Application +Name={options.AppName} +Comment={options.Comment} +Exec={SanitizeFileName(options.AppName)} +Icon={SanitizeFileName(options.AppName)} +Categories={options.Category}; +Terminal=false +X-AppImage-Version={options.Version} +"; + await File.WriteAllTextAsync(path, desktop); + } + + private async Task SetupIcon(string appDir, AppImageOptions options) + { + var iconName = SanitizeFileName(options.AppName); + + if (options.IconPath != null && options.IconPath.Exists) + { + // Copy provided icon + var ext = options.IconPath.Extension.ToLowerInvariant(); + var destIcon = Path.Combine(appDir, $"{iconName}{ext}"); + File.Copy(options.IconPath.FullName, destIcon); + + // Also copy to standard locations + var iconDirs = new[] + { + Path.Combine(appDir, "usr", "share", "icons", "hicolor", "256x256", "apps"), + Path.Combine(appDir, "usr", "share", "icons", "hicolor", "scalable", "apps") + }; + + foreach (var dir in iconDirs) + { + Directory.CreateDirectory(dir); + var iconPath = Path.Combine(dir, $"{iconName}{ext}"); + if (!File.Exists(iconPath)) + File.Copy(options.IconPath.FullName, iconPath); + } + } + else + { + // Create a simple default icon (placeholder SVG) + var defaultIcon = $@" + + + {options.AppName[0]} +"; + + var iconPath = Path.Combine(appDir, $"{iconName}.svg"); + await File.WriteAllTextAsync(iconPath, defaultIcon); + + // Also create in standard location + var svgDir = Path.Combine(appDir, "usr", "share", "icons", "hicolor", "scalable", "apps"); + Directory.CreateDirectory(svgDir); + await File.WriteAllTextAsync(Path.Combine(svgDir, $"{iconName}.svg"), defaultIcon); + } + } + + private async Task CreateAppImage(string appDir, string outputPath) + { + // Ensure output directory exists + var outputDir = Path.GetDirectoryName(outputPath); + if (!string.IsNullOrEmpty(outputDir) && !Directory.Exists(outputDir)) + Directory.CreateDirectory(outputDir); + + // Check if appimagetool is available + var appImageTool = await FindAppImageTool(); + if (appImageTool == null) + { + Console.Error.WriteLine(); + Console.Error.WriteLine("Error: appimagetool not found."); + Console.Error.WriteLine(); + Console.Error.WriteLine("Please install appimagetool:"); + Console.Error.WriteLine(" wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"); + Console.Error.WriteLine(" chmod +x appimagetool-x86_64.AppImage"); + Console.Error.WriteLine(" sudo mv appimagetool-x86_64.AppImage /usr/local/bin/appimagetool"); + Console.Error.WriteLine(); + Console.Error.WriteLine("Or install via package manager:"); + Console.Error.WriteLine(" Ubuntu/Debian: sudo apt install appimagetool"); + Console.Error.WriteLine(" Fedora: sudo dnf install appimagetool"); + Console.Error.WriteLine(" Arch: yay -S appimagetool-bin"); + return false; + } + + // Set ARCH environment variable + var arch = Environment.GetEnvironmentVariable("ARCH") ?? "x86_64"; + + var result = await RunCommandAsync(appImageTool, $"\"{appDir}\" \"{outputPath}\"", + new Dictionary { ["ARCH"] = arch }); + + if (result == 0) + { + // Make the AppImage executable + await RunCommandAsync("chmod", $"+x \"{outputPath}\""); + return true; + } + + return false; + } + + private async Task FindAppImageTool() + { + var candidates = new[] + { + "appimagetool", + "/usr/local/bin/appimagetool", + "/usr/bin/appimagetool", + Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "bin", "appimagetool"), + Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".local", "bin", "appimagetool"), + }; + + foreach (var candidate in candidates) + { + var result = await RunCommandAsync("which", candidate, captureOutput: true); + if (result == 0) + return candidate; + + if (File.Exists(candidate)) + return candidate; + } + + // Try to find any appimagetool AppImage + var homeDir = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); + var searchDirs = new[] { homeDir, "/usr/local/bin", "/opt" }; + + foreach (var dir in searchDirs) + { + if (Directory.Exists(dir)) + { + var tools = Directory.GetFiles(dir, "appimagetool*", SearchOption.TopDirectoryOnly); + if (tools.Length > 0) + return tools[0]; + } + } + + return null; + } + + private void CopyDirectory(string source, string destination) + { + Directory.CreateDirectory(destination); + + foreach (var file in Directory.GetFiles(source)) + { + var destFile = Path.Combine(destination, Path.GetFileName(file)); + File.Copy(file, destFile, overwrite: true); + } + + foreach (var dir in Directory.GetDirectories(source)) + { + var destDir = Path.Combine(destination, Path.GetFileName(dir)); + CopyDirectory(dir, destDir); + } + } + + private string SanitizeFileName(string name) + { + var invalid = Path.GetInvalidFileNameChars(); + var sanitized = new StringBuilder(); + foreach (var c in name) + { + if (invalid.Contains(c) || c == ' ') + sanitized.Append('_'); + else + sanitized.Append(c); + } + return sanitized.ToString(); + } + + private async Task RunCommandAsync(string command, string arguments, + Dictionary? envVars = null, bool captureOutput = false) + { + try + { + var psi = new ProcessStartInfo + { + FileName = command, + Arguments = arguments, + UseShellExecute = false, + RedirectStandardOutput = captureOutput, + RedirectStandardError = captureOutput, + CreateNoWindow = true + }; + + if (envVars != null) + { + foreach (var (key, value) in envVars) + psi.EnvironmentVariables[key] = value; + } + + using var process = Process.Start(psi); + if (process == null) return -1; + + await process.WaitForExitAsync(); + return process.ExitCode; + } + catch + { + return -1; + } + } +} diff --git a/src/OpenMaui.AppImage/bin/Debug/net9.0/OpenMaui.AppImage b/src/OpenMaui.AppImage/bin/Debug/net9.0/OpenMaui.AppImage new file mode 100755 index 0000000..fb6423c Binary files /dev/null and b/src/OpenMaui.AppImage/bin/Debug/net9.0/OpenMaui.AppImage differ diff --git a/src/OpenMaui.AppImage/bin/Debug/net9.0/OpenMaui.AppImage.deps.json b/src/OpenMaui.AppImage/bin/Debug/net9.0/OpenMaui.AppImage.deps.json new file mode 100644 index 0000000..dc45a65 --- /dev/null +++ b/src/OpenMaui.AppImage/bin/Debug/net9.0/OpenMaui.AppImage.deps.json @@ -0,0 +1,82 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v9.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v9.0": { + "OpenMaui.AppImage/1.0.0": { + "dependencies": { + "System.CommandLine": "2.0.0-beta4.22272.1" + }, + "runtime": { + "OpenMaui.AppImage.dll": {} + } + }, + "System.CommandLine/2.0.0-beta4.22272.1": { + "runtime": { + "lib/net6.0/System.CommandLine.dll": { + "assemblyVersion": "2.0.0.0", + "fileVersion": "2.0.22.27201" + } + }, + "resources": { + "lib/net6.0/cs/System.CommandLine.resources.dll": { + "locale": "cs" + }, + "lib/net6.0/de/System.CommandLine.resources.dll": { + "locale": "de" + }, + "lib/net6.0/es/System.CommandLine.resources.dll": { + "locale": "es" + }, + "lib/net6.0/fr/System.CommandLine.resources.dll": { + "locale": "fr" + }, + "lib/net6.0/it/System.CommandLine.resources.dll": { + "locale": "it" + }, + "lib/net6.0/ja/System.CommandLine.resources.dll": { + "locale": "ja" + }, + "lib/net6.0/ko/System.CommandLine.resources.dll": { + "locale": "ko" + }, + "lib/net6.0/pl/System.CommandLine.resources.dll": { + "locale": "pl" + }, + "lib/net6.0/pt-BR/System.CommandLine.resources.dll": { + "locale": "pt-BR" + }, + "lib/net6.0/ru/System.CommandLine.resources.dll": { + "locale": "ru" + }, + "lib/net6.0/tr/System.CommandLine.resources.dll": { + "locale": "tr" + }, + "lib/net6.0/zh-Hans/System.CommandLine.resources.dll": { + "locale": "zh-Hans" + }, + "lib/net6.0/zh-Hant/System.CommandLine.resources.dll": { + "locale": "zh-Hant" + } + } + } + } + }, + "libraries": { + "OpenMaui.AppImage/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "System.CommandLine/2.0.0-beta4.22272.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-1uqED/q2H0kKoLJ4+hI2iPSBSEdTuhfCYADeJrAqERmiGQ2NNacYKRNEQ+gFbU4glgVyK8rxI+ZOe1onEtr/Pg==", + "path": "system.commandline/2.0.0-beta4.22272.1", + "hashPath": "system.commandline.2.0.0-beta4.22272.1.nupkg.sha512" + } + } +} \ No newline at end of file diff --git a/src/OpenMaui.AppImage/bin/Debug/net9.0/OpenMaui.AppImage.dll b/src/OpenMaui.AppImage/bin/Debug/net9.0/OpenMaui.AppImage.dll new file mode 100644 index 0000000..1b61b95 Binary files /dev/null and b/src/OpenMaui.AppImage/bin/Debug/net9.0/OpenMaui.AppImage.dll differ diff --git a/src/OpenMaui.AppImage/bin/Debug/net9.0/OpenMaui.AppImage.pdb b/src/OpenMaui.AppImage/bin/Debug/net9.0/OpenMaui.AppImage.pdb new file mode 100644 index 0000000..0ed4e00 Binary files /dev/null and b/src/OpenMaui.AppImage/bin/Debug/net9.0/OpenMaui.AppImage.pdb differ diff --git a/src/OpenMaui.AppImage/bin/Debug/net9.0/OpenMaui.AppImage.runtimeconfig.json b/src/OpenMaui.AppImage/bin/Debug/net9.0/OpenMaui.AppImage.runtimeconfig.json new file mode 100644 index 0000000..b19c3c8 --- /dev/null +++ b/src/OpenMaui.AppImage/bin/Debug/net9.0/OpenMaui.AppImage.runtimeconfig.json @@ -0,0 +1,12 @@ +{ + "runtimeOptions": { + "tfm": "net9.0", + "framework": { + "name": "Microsoft.NETCore.App", + "version": "9.0.0" + }, + "configProperties": { + "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false + } + } +} \ No newline at end of file diff --git a/src/OpenMaui.AppImage/bin/Debug/net9.0/System.CommandLine.dll b/src/OpenMaui.AppImage/bin/Debug/net9.0/System.CommandLine.dll new file mode 100755 index 0000000..3c8597b Binary files /dev/null and b/src/OpenMaui.AppImage/bin/Debug/net9.0/System.CommandLine.dll differ diff --git a/src/OpenMaui.AppImage/bin/Debug/net9.0/cs/System.CommandLine.resources.dll b/src/OpenMaui.AppImage/bin/Debug/net9.0/cs/System.CommandLine.resources.dll new file mode 100755 index 0000000..77a35a6 Binary files /dev/null and b/src/OpenMaui.AppImage/bin/Debug/net9.0/cs/System.CommandLine.resources.dll differ diff --git a/src/OpenMaui.AppImage/bin/Debug/net9.0/de/System.CommandLine.resources.dll b/src/OpenMaui.AppImage/bin/Debug/net9.0/de/System.CommandLine.resources.dll new file mode 100755 index 0000000..61ab752 Binary files /dev/null and b/src/OpenMaui.AppImage/bin/Debug/net9.0/de/System.CommandLine.resources.dll differ diff --git a/src/OpenMaui.AppImage/bin/Debug/net9.0/es/System.CommandLine.resources.dll b/src/OpenMaui.AppImage/bin/Debug/net9.0/es/System.CommandLine.resources.dll new file mode 100755 index 0000000..cdd0618 Binary files /dev/null and b/src/OpenMaui.AppImage/bin/Debug/net9.0/es/System.CommandLine.resources.dll differ diff --git a/src/OpenMaui.AppImage/bin/Debug/net9.0/fr/System.CommandLine.resources.dll b/src/OpenMaui.AppImage/bin/Debug/net9.0/fr/System.CommandLine.resources.dll new file mode 100755 index 0000000..5839cd6 Binary files /dev/null and b/src/OpenMaui.AppImage/bin/Debug/net9.0/fr/System.CommandLine.resources.dll differ diff --git a/src/OpenMaui.AppImage/bin/Debug/net9.0/it/System.CommandLine.resources.dll b/src/OpenMaui.AppImage/bin/Debug/net9.0/it/System.CommandLine.resources.dll new file mode 100755 index 0000000..bdca685 Binary files /dev/null and b/src/OpenMaui.AppImage/bin/Debug/net9.0/it/System.CommandLine.resources.dll differ diff --git a/src/OpenMaui.AppImage/bin/Debug/net9.0/ja/System.CommandLine.resources.dll b/src/OpenMaui.AppImage/bin/Debug/net9.0/ja/System.CommandLine.resources.dll new file mode 100755 index 0000000..be146d9 Binary files /dev/null and b/src/OpenMaui.AppImage/bin/Debug/net9.0/ja/System.CommandLine.resources.dll differ diff --git a/src/OpenMaui.AppImage/bin/Debug/net9.0/ko/System.CommandLine.resources.dll b/src/OpenMaui.AppImage/bin/Debug/net9.0/ko/System.CommandLine.resources.dll new file mode 100755 index 0000000..910483d Binary files /dev/null and b/src/OpenMaui.AppImage/bin/Debug/net9.0/ko/System.CommandLine.resources.dll differ diff --git a/src/OpenMaui.AppImage/bin/Debug/net9.0/pl/System.CommandLine.resources.dll b/src/OpenMaui.AppImage/bin/Debug/net9.0/pl/System.CommandLine.resources.dll new file mode 100755 index 0000000..bfee4aa Binary files /dev/null and b/src/OpenMaui.AppImage/bin/Debug/net9.0/pl/System.CommandLine.resources.dll differ diff --git a/src/OpenMaui.AppImage/bin/Debug/net9.0/pt-BR/System.CommandLine.resources.dll b/src/OpenMaui.AppImage/bin/Debug/net9.0/pt-BR/System.CommandLine.resources.dll new file mode 100755 index 0000000..8fc42f2 Binary files /dev/null and b/src/OpenMaui.AppImage/bin/Debug/net9.0/pt-BR/System.CommandLine.resources.dll differ diff --git a/src/OpenMaui.AppImage/bin/Debug/net9.0/ru/System.CommandLine.resources.dll b/src/OpenMaui.AppImage/bin/Debug/net9.0/ru/System.CommandLine.resources.dll new file mode 100755 index 0000000..e98f737 Binary files /dev/null and b/src/OpenMaui.AppImage/bin/Debug/net9.0/ru/System.CommandLine.resources.dll differ diff --git a/src/OpenMaui.AppImage/bin/Debug/net9.0/tr/System.CommandLine.resources.dll b/src/OpenMaui.AppImage/bin/Debug/net9.0/tr/System.CommandLine.resources.dll new file mode 100755 index 0000000..6e29e3e Binary files /dev/null and b/src/OpenMaui.AppImage/bin/Debug/net9.0/tr/System.CommandLine.resources.dll differ diff --git a/src/OpenMaui.AppImage/bin/Debug/net9.0/zh-Hans/System.CommandLine.resources.dll b/src/OpenMaui.AppImage/bin/Debug/net9.0/zh-Hans/System.CommandLine.resources.dll new file mode 100755 index 0000000..06e46a1 Binary files /dev/null and b/src/OpenMaui.AppImage/bin/Debug/net9.0/zh-Hans/System.CommandLine.resources.dll differ diff --git a/src/OpenMaui.AppImage/bin/Debug/net9.0/zh-Hant/System.CommandLine.resources.dll b/src/OpenMaui.AppImage/bin/Debug/net9.0/zh-Hant/System.CommandLine.resources.dll new file mode 100755 index 0000000..afb03e9 Binary files /dev/null and b/src/OpenMaui.AppImage/bin/Debug/net9.0/zh-Hant/System.CommandLine.resources.dll differ diff --git a/src/OpenMaui.AppImage/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs b/src/OpenMaui.AppImage/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs new file mode 100644 index 0000000..9e76325 --- /dev/null +++ b/src/OpenMaui.AppImage/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] diff --git a/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.46D7F9ED.Up2Date b/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.46D7F9ED.Up2Date new file mode 100644 index 0000000..e69de29 diff --git a/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.AssemblyInfo.cs b/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.AssemblyInfo.cs new file mode 100644 index 0000000..12698c8 --- /dev/null +++ b/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.AssemblyInfo.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("OpenMaui Contributors")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyDescriptionAttribute("CLI tool to package .NET MAUI Linux apps as AppImages")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] +[assembly: System.Reflection.AssemblyProductAttribute("OpenMaui.AppImage")] +[assembly: System.Reflection.AssemblyTitleAttribute("OpenMaui.AppImage")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.AssemblyInfoInputs.cache b/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.AssemblyInfoInputs.cache new file mode 100644 index 0000000..e3bbd83 --- /dev/null +++ b/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +bf99d2ffe27c9c790485e51419e712a4b2df073b18f432dfe5131e090c6513a2 diff --git a/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.GeneratedMSBuildEditorConfig.editorconfig b/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..3085a83 --- /dev/null +++ b/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,15 @@ +is_global = true +build_property.TargetFramework = net9.0 +build_property.TargetPlatformMinVersion = +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.InvariantGlobalization = +build_property.PlatformNeutralAssembly = +build_property.EnforceExtendedAnalyzerRules = +build_property._SupportedPlatformList = Linux,macOS,Windows +build_property.RootNamespace = OpenMaui.AppImage +build_property.ProjectDir = /home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = +build_property.EffectiveAnalysisLevelStyle = 9.0 +build_property.EnableCodeStyleSeverity = diff --git a/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.GlobalUsings.g.cs b/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.GlobalUsings.g.cs new file mode 100644 index 0000000..8578f3d --- /dev/null +++ b/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.GlobalUsings.g.cs @@ -0,0 +1,8 @@ +// +global using global::System; +global using global::System.Collections.Generic; +global using global::System.IO; +global using global::System.Linq; +global using global::System.Net.Http; +global using global::System.Threading; +global using global::System.Threading.Tasks; diff --git a/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.assets.cache b/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.assets.cache new file mode 100644 index 0000000..b5acd05 Binary files /dev/null and b/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.assets.cache differ diff --git a/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.csproj.AssemblyReference.cache b/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.csproj.AssemblyReference.cache new file mode 100644 index 0000000..e5469bb Binary files /dev/null and b/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.csproj.AssemblyReference.cache differ diff --git a/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.csproj.CoreCompileInputs.cache b/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..94d6c9a --- /dev/null +++ b/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +6d12895822d98ab28330aa4307b387e8f3fac85baa39fa7b678f5ca4cfe0033a diff --git a/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.csproj.FileListAbsolute.txt b/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..fcd0f51 --- /dev/null +++ b/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.csproj.FileListAbsolute.txt @@ -0,0 +1,30 @@ +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/bin/Debug/net9.0/OpenMaui.AppImage +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/bin/Debug/net9.0/OpenMaui.AppImage.deps.json +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/bin/Debug/net9.0/OpenMaui.AppImage.runtimeconfig.json +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/bin/Debug/net9.0/OpenMaui.AppImage.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/bin/Debug/net9.0/OpenMaui.AppImage.pdb +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/bin/Debug/net9.0/System.CommandLine.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/bin/Debug/net9.0/cs/System.CommandLine.resources.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/bin/Debug/net9.0/de/System.CommandLine.resources.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/bin/Debug/net9.0/es/System.CommandLine.resources.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/bin/Debug/net9.0/fr/System.CommandLine.resources.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/bin/Debug/net9.0/it/System.CommandLine.resources.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/bin/Debug/net9.0/ja/System.CommandLine.resources.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/bin/Debug/net9.0/ko/System.CommandLine.resources.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/bin/Debug/net9.0/pl/System.CommandLine.resources.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/bin/Debug/net9.0/pt-BR/System.CommandLine.resources.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/bin/Debug/net9.0/ru/System.CommandLine.resources.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/bin/Debug/net9.0/tr/System.CommandLine.resources.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/bin/Debug/net9.0/zh-Hans/System.CommandLine.resources.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/bin/Debug/net9.0/zh-Hant/System.CommandLine.resources.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.csproj.AssemblyReference.cache +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.GeneratedMSBuildEditorConfig.editorconfig +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.AssemblyInfoInputs.cache +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.AssemblyInfo.cs +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.csproj.CoreCompileInputs.cache +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.46D7F9ED.Up2Date +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/obj/Debug/net9.0/refint/OpenMaui.AppImage.dll +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.pdb +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.genruntimeconfig.cache +/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/obj/Debug/net9.0/ref/OpenMaui.AppImage.dll diff --git a/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.dll b/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.dll new file mode 100644 index 0000000..1b61b95 Binary files /dev/null and b/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.dll differ diff --git a/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.genruntimeconfig.cache b/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.genruntimeconfig.cache new file mode 100644 index 0000000..1eed2e2 --- /dev/null +++ b/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.genruntimeconfig.cache @@ -0,0 +1 @@ +15ca7a5b1f6bd3fdd96439b1498278d65b31949e1b1b994dda2f40fff992f573 diff --git a/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.pdb b/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.pdb new file mode 100644 index 0000000..0ed4e00 Binary files /dev/null and b/src/OpenMaui.AppImage/obj/Debug/net9.0/OpenMaui.AppImage.pdb differ diff --git a/src/OpenMaui.AppImage/obj/Debug/net9.0/apphost b/src/OpenMaui.AppImage/obj/Debug/net9.0/apphost new file mode 100755 index 0000000..fb6423c Binary files /dev/null and b/src/OpenMaui.AppImage/obj/Debug/net9.0/apphost differ diff --git a/src/OpenMaui.AppImage/obj/Debug/net9.0/ref/OpenMaui.AppImage.dll b/src/OpenMaui.AppImage/obj/Debug/net9.0/ref/OpenMaui.AppImage.dll new file mode 100644 index 0000000..531df29 Binary files /dev/null and b/src/OpenMaui.AppImage/obj/Debug/net9.0/ref/OpenMaui.AppImage.dll differ diff --git a/src/OpenMaui.AppImage/obj/Debug/net9.0/refint/OpenMaui.AppImage.dll b/src/OpenMaui.AppImage/obj/Debug/net9.0/refint/OpenMaui.AppImage.dll new file mode 100644 index 0000000..531df29 Binary files /dev/null and b/src/OpenMaui.AppImage/obj/Debug/net9.0/refint/OpenMaui.AppImage.dll differ diff --git a/src/OpenMaui.AppImage/obj/OpenMaui.AppImage.csproj.nuget.dgspec.json b/src/OpenMaui.AppImage/obj/OpenMaui.AppImage.csproj.nuget.dgspec.json new file mode 100644 index 0000000..6cd2c2f --- /dev/null +++ b/src/OpenMaui.AppImage/obj/OpenMaui.AppImage.csproj.nuget.dgspec.json @@ -0,0 +1,73 @@ +{ + "format": 1, + "restore": { + "/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/OpenMaui.AppImage.csproj": {} + }, + "projects": { + "/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/OpenMaui.AppImage.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/OpenMaui.AppImage.csproj", + "projectName": "OpenMaui.AppImage", + "projectPath": "/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/OpenMaui.AppImage.csproj", + "packagesPath": "/home/friedel/.nuget/packages/", + "outputPath": "/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/obj/", + "projectStyle": "PackageReference", + "configFilePaths": [ + "/home/friedel/.nuget/NuGet/NuGet.Config" + ], + "originalTargetFrameworks": [ + "net9.0" + ], + "sources": { + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net9.0": { + "targetAlias": "net9.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "direct" + }, + "SdkAnalysisLevel": "9.0.300" + }, + "frameworks": { + "net9.0": { + "targetAlias": "net9.0", + "dependencies": { + "System.CommandLine": { + "target": "Package", + "version": "[2.0.0-beta4.22272.1, )" + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "/home/friedel/.dotnet/sdk/9.0.308/PortableRuntimeIdentifierGraph.json" + } + } + } + } +} \ No newline at end of file diff --git a/src/OpenMaui.AppImage/obj/OpenMaui.AppImage.csproj.nuget.g.props b/src/OpenMaui.AppImage/obj/OpenMaui.AppImage.csproj.nuget.g.props new file mode 100644 index 0000000..3d39470 --- /dev/null +++ b/src/OpenMaui.AppImage/obj/OpenMaui.AppImage.csproj.nuget.g.props @@ -0,0 +1,15 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + /home/friedel/.nuget/packages/ + /home/friedel/.nuget/packages/ + PackageReference + 6.14.0 + + + + + \ No newline at end of file diff --git a/src/OpenMaui.AppImage/obj/OpenMaui.AppImage.csproj.nuget.g.targets b/src/OpenMaui.AppImage/obj/OpenMaui.AppImage.csproj.nuget.g.targets new file mode 100644 index 0000000..3dc06ef --- /dev/null +++ b/src/OpenMaui.AppImage/obj/OpenMaui.AppImage.csproj.nuget.g.targets @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/src/OpenMaui.AppImage/obj/project.assets.json b/src/OpenMaui.AppImage/obj/project.assets.json new file mode 100644 index 0000000..077c3d6 --- /dev/null +++ b/src/OpenMaui.AppImage/obj/project.assets.json @@ -0,0 +1,180 @@ +{ + "version": 3, + "targets": { + "net9.0": { + "System.CommandLine/2.0.0-beta4.22272.1": { + "type": "package", + "compile": { + "lib/net6.0/System.CommandLine.dll": { + "related": ".pdb;.xml" + } + }, + "runtime": { + "lib/net6.0/System.CommandLine.dll": { + "related": ".pdb;.xml" + } + }, + "resource": { + "lib/net6.0/cs/System.CommandLine.resources.dll": { + "locale": "cs" + }, + "lib/net6.0/de/System.CommandLine.resources.dll": { + "locale": "de" + }, + "lib/net6.0/es/System.CommandLine.resources.dll": { + "locale": "es" + }, + "lib/net6.0/fr/System.CommandLine.resources.dll": { + "locale": "fr" + }, + "lib/net6.0/it/System.CommandLine.resources.dll": { + "locale": "it" + }, + "lib/net6.0/ja/System.CommandLine.resources.dll": { + "locale": "ja" + }, + "lib/net6.0/ko/System.CommandLine.resources.dll": { + "locale": "ko" + }, + "lib/net6.0/pl/System.CommandLine.resources.dll": { + "locale": "pl" + }, + "lib/net6.0/pt-BR/System.CommandLine.resources.dll": { + "locale": "pt-BR" + }, + "lib/net6.0/ru/System.CommandLine.resources.dll": { + "locale": "ru" + }, + "lib/net6.0/tr/System.CommandLine.resources.dll": { + "locale": "tr" + }, + "lib/net6.0/zh-Hans/System.CommandLine.resources.dll": { + "locale": "zh-Hans" + }, + "lib/net6.0/zh-Hant/System.CommandLine.resources.dll": { + "locale": "zh-Hant" + } + } + } + } + }, + "libraries": { + "System.CommandLine/2.0.0-beta4.22272.1": { + "sha512": "1uqED/q2H0kKoLJ4+hI2iPSBSEdTuhfCYADeJrAqERmiGQ2NNacYKRNEQ+gFbU4glgVyK8rxI+ZOe1onEtr/Pg==", + "type": "package", + "path": "system.commandline/2.0.0-beta4.22272.1", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "lib/net6.0/System.CommandLine.dll", + "lib/net6.0/System.CommandLine.pdb", + "lib/net6.0/System.CommandLine.xml", + "lib/net6.0/cs/System.CommandLine.resources.dll", + "lib/net6.0/de/System.CommandLine.resources.dll", + "lib/net6.0/es/System.CommandLine.resources.dll", + "lib/net6.0/fr/System.CommandLine.resources.dll", + "lib/net6.0/it/System.CommandLine.resources.dll", + "lib/net6.0/ja/System.CommandLine.resources.dll", + "lib/net6.0/ko/System.CommandLine.resources.dll", + "lib/net6.0/pl/System.CommandLine.resources.dll", + "lib/net6.0/pt-BR/System.CommandLine.resources.dll", + "lib/net6.0/ru/System.CommandLine.resources.dll", + "lib/net6.0/tr/System.CommandLine.resources.dll", + "lib/net6.0/zh-Hans/System.CommandLine.resources.dll", + "lib/net6.0/zh-Hant/System.CommandLine.resources.dll", + "lib/netstandard2.0/System.CommandLine.dll", + "lib/netstandard2.0/System.CommandLine.pdb", + "lib/netstandard2.0/System.CommandLine.xml", + "lib/netstandard2.0/cs/System.CommandLine.resources.dll", + "lib/netstandard2.0/de/System.CommandLine.resources.dll", + "lib/netstandard2.0/es/System.CommandLine.resources.dll", + "lib/netstandard2.0/fr/System.CommandLine.resources.dll", + "lib/netstandard2.0/it/System.CommandLine.resources.dll", + "lib/netstandard2.0/ja/System.CommandLine.resources.dll", + "lib/netstandard2.0/ko/System.CommandLine.resources.dll", + "lib/netstandard2.0/pl/System.CommandLine.resources.dll", + "lib/netstandard2.0/pt-BR/System.CommandLine.resources.dll", + "lib/netstandard2.0/ru/System.CommandLine.resources.dll", + "lib/netstandard2.0/tr/System.CommandLine.resources.dll", + "lib/netstandard2.0/zh-Hans/System.CommandLine.resources.dll", + "lib/netstandard2.0/zh-Hant/System.CommandLine.resources.dll", + "system.commandline.2.0.0-beta4.22272.1.nupkg.sha512", + "system.commandline.nuspec" + ] + } + }, + "projectFileDependencyGroups": { + "net9.0": [ + "System.CommandLine >= 2.0.0-beta4.22272.1" + ] + }, + "packageFolders": { + "/home/friedel/.nuget/packages/": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/OpenMaui.AppImage.csproj", + "projectName": "OpenMaui.AppImage", + "projectPath": "/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/OpenMaui.AppImage.csproj", + "packagesPath": "/home/friedel/.nuget/packages/", + "outputPath": "/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/obj/", + "projectStyle": "PackageReference", + "configFilePaths": [ + "/home/friedel/.nuget/NuGet/NuGet.Config" + ], + "originalTargetFrameworks": [ + "net9.0" + ], + "sources": { + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net9.0": { + "targetAlias": "net9.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "direct" + }, + "SdkAnalysisLevel": "9.0.300" + }, + "frameworks": { + "net9.0": { + "targetAlias": "net9.0", + "dependencies": { + "System.CommandLine": { + "target": "Package", + "version": "[2.0.0-beta4.22272.1, )" + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "/home/friedel/.dotnet/sdk/9.0.308/PortableRuntimeIdentifierGraph.json" + } + } + } +} \ No newline at end of file diff --git a/src/OpenMaui.AppImage/obj/project.nuget.cache b/src/OpenMaui.AppImage/obj/project.nuget.cache new file mode 100644 index 0000000..2e8c397 --- /dev/null +++ b/src/OpenMaui.AppImage/obj/project.nuget.cache @@ -0,0 +1,10 @@ +{ + "version": 2, + "dgSpecHash": "s/Fcy88GmSs=", + "success": true, + "projectFilePath": "/home/friedel/Documents/Gitea/appimage/src/OpenMaui.AppImage/OpenMaui.AppImage.csproj", + "expectedPackageFiles": [ + "/home/friedel/.nuget/packages/system.commandline/2.0.0-beta4.22272.1/system.commandline.2.0.0-beta4.22272.1.nupkg.sha512" + ], + "logs": [] +} \ No newline at end of file diff --git a/templates/AppRun.template b/templates/AppRun.template new file mode 100644 index 0000000..661f17a --- /dev/null +++ b/templates/AppRun.template @@ -0,0 +1,95 @@ +#!/bin/bash +# AppRun script for OpenMaui applications +# This script is the entry point for the AppImage + +SELF=$(readlink -f "$0") +HERE=${SELF%/*} + +# App metadata (filled in by builder) +export APPIMAGE_NAME="{{APP_NAME}}" +export APPIMAGE_COMMENT="{{COMMENT}}" +export APPIMAGE_CATEGORY="{{CATEGORY}}" +export APPIMAGE_VERSION="{{VERSION}}" +EXEC_NAME="{{EXEC_NAME}}" + +export PATH="$HERE/usr/bin:$PATH" +export LD_LIBRARY_PATH="$HERE/usr/bin:$LD_LIBRARY_PATH" +export XDG_DATA_DIRS="$HERE/usr/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" + +# Configuration +INSTALLED_MARKER="$HOME/.local/share/openmaui-installed" + +# Handle command line flags +if [ "$1" = "--install" ]; then + # Force show installer + SHOW_INSTALLER=1 + shift +elif [ "$1" = "--uninstall" ]; then + # Uninstall + echo "Uninstalling $APPIMAGE_NAME..." + APPIMAGE_BASENAME=$(basename "$APPIMAGE") + SANITIZED_NAME=$(echo "$APPIMAGE_NAME" | tr ' ' '_') + + rm -f "$HOME/.local/bin/$APPIMAGE_BASENAME" + rm -f "$HOME/.local/share/applications/${SANITIZED_NAME}.desktop" + rm -f "$INSTALLED_MARKER/$APPIMAGE_BASENAME" + + if command -v update-desktop-database &> /dev/null; then + update-desktop-database "$HOME/.local/share/applications" 2>/dev/null || true + fi + + echo "Uninstallation complete!" + exit 0 +elif [ "$1" = "--help" ]; then + echo "Usage: $(basename "$APPIMAGE") [OPTIONS]" + echo "" + echo "Options:" + echo " --install Show the installation dialog" + echo " --uninstall Remove the application" + echo " --help Show this help message" + echo "" + exit 0 +fi + +# Check if running from AppImage and if first run +if [ -n "$APPIMAGE" ]; then + APPIMAGE_BASENAME=$(basename "$APPIMAGE") + + # Check if already installed + if [ ! -f "$INSTALLED_MARKER/$APPIMAGE_BASENAME" ] || [ "$SHOW_INSTALLER" = "1" ]; then + # First run - show installer dialog + if [ -f "$HERE/usr/bin/OpenMaui.AppImage.Installer.dll" ]; then + # Find icon + ICON_PATH="" + for ext in svg png ico; do + if [ -f "$HERE/${APPIMAGE_NAME}.${ext}" ]; then + ICON_PATH="$HERE/${APPIMAGE_NAME}.${ext}" + break + fi + SANITIZED=$(echo "$APPIMAGE_NAME" | tr ' ' '_') + if [ -f "$HERE/${SANITIZED}.${ext}" ]; then + ICON_PATH="$HERE/${SANITIZED}.${ext}" + break + fi + done + + cd "$HERE/usr/bin" + RESULT=$(dotnet OpenMaui.AppImage.Installer.dll \ + --name "$APPIMAGE_NAME" \ + --appimage "$APPIMAGE" \ + --comment "$APPIMAGE_COMMENT" \ + --category "$APPIMAGE_CATEGORY" \ + --version "$APPIMAGE_VERSION" \ + ${ICON_PATH:+--icon "$ICON_PATH"}; echo $?) + + # Check result: 0=run, 1=cancel, 2=installed + if [ "$RESULT" = "1" ]; then + exit 0 + fi + fi + fi +fi + +# Run the application +cd "$HERE/usr/bin" +exec dotnet "$EXEC_NAME.dll" "$@" diff --git a/templates/app.desktop.template b/templates/app.desktop.template new file mode 100644 index 0000000..1fbb368 --- /dev/null +++ b/templates/app.desktop.template @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Application +Name={{APP_NAME}} +Comment={{COMMENT}} +Exec={{EXEC_NAME}} +Icon={{ICON_NAME}} +Categories={{CATEGORY}}; +Terminal=false +X-AppImage-Version={{VERSION}} +StartupWMClass={{WM_CLASS}}