{"id":18931088,"url":"https://github.com/kuiperzone/publish-appimage","last_synced_at":"2025-04-15T16:32:21.681Z","repository":{"id":41656072,"uuid":"414302661","full_name":"kuiperzone/Publish-AppImage","owner":"kuiperzone","description":"Publish-AppImage for .NET is a simple bash utility which calls `dotnet publish` and packages the output as an AppImage file (or zip) with a single command. The Linux \"Desktop Entry\" file is generated automatically.","archived":false,"fork":false,"pushed_at":"2023-03-24T12:54:15.000Z","size":412,"stargazers_count":30,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-01T03:32:27.389Z","etag":null,"topics":["appimage","appimage-builder","appimagetool","bash","c-sharp","dotnet","linux"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kuiperzone.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-06T17:10:27.000Z","updated_at":"2024-10-09T07:50:54.000Z","dependencies_parsed_at":"2024-06-21T17:30:45.446Z","dependency_job_id":"99d21433-ff50-47c2-b68d-63b31aec3d16","html_url":"https://github.com/kuiperzone/Publish-AppImage","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuiperzone%2FPublish-AppImage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuiperzone%2FPublish-AppImage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuiperzone%2FPublish-AppImage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuiperzone%2FPublish-AppImage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kuiperzone","download_url":"https://codeload.github.com/kuiperzone/Publish-AppImage/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223679376,"owners_count":17184856,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appimage","appimage-builder","appimagetool","bash","c-sharp","dotnet","linux"],"created_at":"2024-11-08T11:40:25.522Z","updated_at":"2024-11-08T11:40:26.103Z","avatar_url":"https://github.com/kuiperzone.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp style=\"text-align:left;background:gray;margin-bottom:4em;\"\u003e\n    \u003cimg src=\"Banner.png\" style=\"width:50%;max-width:600px;\"/\u003e\n\u003c/p\u003e\n\n# Publish-AppImage for .NET #\n\n**Publish-AppImage for .NET** is a simple bash script deployment utility which calls `dotnet publish` and\npackages the output as an [AppImage](https://appimage.org/) file (or zip) with a single command.\n\n## NOTICE ##\nPublish-AppImage for .NET for has been superseded by **Pupnet Deploy**:\n\nhttps://github.com/kuiperzone/PupNet-Deploy\n\n*Unlike Publish-AppImage, PupNet not only builds AppImages, but Windows Setup files, Flatpaks, Debs and RPMs.*\n\n\nTo use Publish-AppImage, you fill out the option fields in a simple configuration file called `publish-appimage.conf`, and run:\n\n    ./publish-appimage\n\nThis builds/publishes your project and generates a distributable AppImage output file for use on Linux systems.\nA Linux \"Desktop Entry\" file is generated automagically from the values provided by you in the configuration file.\nAdditionally, Freedesktop.org AppStream metadata (`appdata.xml`) is optionally supported. Detailed explanations, examples\nand a demo application are provided below.\n\nPublish-AppImage for .NET is licensed under MIT and is for use on Linux with the\n[Microsoft .NET SDK](https://dotnet.microsoft.com/download) (i.e. for C# applications).\n\n\n## Prerequisites ##\nPublish-AppImage for .NET requires (*):\n\n* Bash shell\n* .NET SDK 5.0 or later\n* The [appimagetool](https://github.com/AppImage/AppImageKit) utility to build the AppImage file\n* The Linux \"zip\" utility is optional and typically may already be installed on your system\n\n(*) Tested bash 4.4.20 and appimagetool r13 (31 Dec 2020).\n\n\n## Build HelloWorld ##\nA simple \"HelloWorld\" terminal demo application is provided with the script and the configuration (.conf) file.\nYou may use the .conf and `appdata.xml` files contained in this demo as templates for your own application.\n\nLet's start by building and running the \"HelloWorld\" demo. Clone or download the entire project, and follow\nthe instructions below.\n\n\u003cimg title=\"Terminal Screenshot\" alt=\"Terminal Screenshot\" src=\"Screenie.png\" style=\"width:50%;max-width:600px;\"/\u003e\n\n**IMPORTANT:** Download and install [appimagetool](https://github.com/AppImage/AppImageKit). Ensure that `appimagetool`\nis in the path, or you can specify its location in the .conf file if you have downloaded it as an AppImage file.\n\nFor example, in `publish-appimage.conf`, change this line:\n\n    APPIMAGETOOL_COMMAND=\"appimagetool\"\n\nto this as appropriate:\n\n    APPIMAGETOOL_COMMAND=\"/home/user/Apps/appimagetool-x86_64.AppImage\"\n\nThe `publish-appimage` file itself is just a bash script so there is no need to \"build\" it, but ensure that it\nhas the executable flag set. From the top-level project (the same directory as the .conf file), simply type:\n\n    ./publish-appimage\n\nThis will call `dot publish` (with \"linux-x64 as default) and create an output directory local to the .conf file,\ni.e.: *AppImages/HelloWorld-x86_64.AppImage*\n\nIf your system is ARM, type this instead:\n\n    ./publish-appimage -r linux-arm64\n\nRun `AppImages/HelloWorld-x86_64.AppImage` (or the arch64 variant) from a terminal, and it will output version\nand location information available to the application. That's all it does!\n\n\n## Use in Your Project ##\nThere are only two files you really need (although you may wish to use an `appdata.xml` file). Drop the files,\nbelow, into your application source preferably at the same level as your solution (.sln) or project (.csproj) file (*).\n\n* `publish-appimage` - the utility\n* `publish-appimage.conf` - your project config\n\nAlternatively, if you wish, you may put the `publish-appimage` script in any directory on your system and add\nits directory to your `PATH`. This way, only the \".conf file\" need go into your project.\n\n(*) If you do not wish to put `publish-appimage.conf` in the same directory as your .sln or .csproj, you can\nspecify the location with `DOTNET_PROJECT_PATH` in the .conf file.\n\n**IMPORTANT**: By default, `publish-appimage` will look for a file called `publish-appimage.conf` in the current\nworking directly. However, it is entirely possible to have multiple .conf files of different names in the same\ndirectory. You are not restricted to a single conf file in your project! See the \"--conf\" command option described\nbelow.\n\nNow edit the configuration file for your own application, providing an application name etc. This should be a\nrelatively trivial matter and **all parameters are documented** with comments. You can specify application\n\"Desktop Entry\" fields here, as well as publish/build arguments, along with project and output locations. Note that\nall project related paths in the .conf file itself are relative to the location of the .conf file, and not from where\ncommand was called.\n\n\u003cimg title=\"Example Configuration\" alt=\"Example Configuration\" src=\"ExampleConf.png\" style=\"width:50%;max-width:600px;\"/\u003e\n\nIf you wish to use a Freedesktop.org metadata file, copy the \"Hello World\" `appdata.xml` file from the \"Assets\"\ndirectory and use it as a template in your project, changing or adding properties to suit. Ensure that your\n`publish-appimage.conf` correctly references the file location using `APP_XML_SRC`. If you do not wish to use\n`appdata.xml`, ensure that `APP_XML_SRC` is unset.\n\nEnsure also that your `publish-appimage.conf` references an icon file location using `APP_ICON_SRC`,\nas this is a mandatory requirement.\n\n## App Versioning ##\nUse the `APP_VERSION` parameter in the .conf file to specify your application version, i.e. \"1.2.3.0\".\n\nThis will call `dotnet publish` with the `-p:Version` option (overriding any version value in your project files)\nand sets the `VERSION` environment variable for use by appimagetool. In the .conf file, you may optionally version\nthe output package filename with `PKG_VERSION_FLAG`.\n\nAlternatively, leave `APP_VERSION` unset to prefer application version information already provided in your project.\n\n## Post Publish Command ##\nThe configuration contains an option called `POST_PUBLISH`. This may contain one or more commands, or point to a\nscript file for example. It is called after `dotnet publish`, but before the final AppImage output. You can use this\nto create required directory structures under `AppDir` or copy additional files there.\n\nSee also \"Non-.NET Projects\", below.\n\n\n## Command Line Usage ##\n\n### Target Platform ###\nBy default, publish-appimage will build for \"linux-x64\". However, you can specify the dotnet \"runtime identifier\" as:\n\n    ./publish-appimage -r linux-arm64\n\nFor information, see: https://docs.microsoft.com/en-us/dotnet/core/rid-catalog\n\n### Conf Filename ###\nBy default, `publish-appimage` looks for a single file called `publish-appimage.conf`. However, your\napplication project may contain multiple .conf files, but you must specify the configuration to use at\nthe command line, like so:\n\n    ./publish-appimage -f other-file.conf\n\n### Zip and Windows? ###\nAmazingly, it is possible to build for Windows on a Linux box, although the binary is not suitable for use with\nthe AppImage format. However, you can do this instead:\n\n    ./publish-appimage -r win-x64 -k zip\n\nThis will create a simple zip file of the published content instead of an AppImage file.\n\n### All Options ###\n    Usage:\n        publish-appimage [-flags] [-option-n value-n]\n\n    Help Options:\n        -h, --help\n        Show help information flag.\n\n        -v, --version\n        Show version information flag.\n\n    Build Options:\n        -f, --conf value\n        Specifies the conf file. Defaults to publish-appimage.conf.\n\n        -r, --runtime value\n        Dotnet publish runtime identifier. Valid examples include:\n        linux-x64 and linux-arm64. Default is linux-x64 if unspecified.\n        See also: https://docs.microsoft.com/en-us/dotnet/core/rid-catalog\n\n        -k, --kind value\n        Package output kind. Value must be one of: appimage or zip.\n        Default is appimage if unspecified.\n\n        -b, --verbose\n        Verbose review info output flag.\n\n        -u, --run\n        Run the application after successful build flag.\n\n        -y, --skip-yes\n        Skip confirmation prompt flag (assumes yes).\n\n        -o, --output\n        Explicit final output filename (excluding directory part).\n\n## Additional Information ##\nPublish-AppImage for .NET was created by Andy Thomas at https://kuiper.zone\n\nSee also my other C# project, a cross-platform Avalonia XAML previewer called [AvantGarde](https://github.com/kuiperzone/AvantGarde).\n\n### Gotchas ###\n\n#### Metadata Validation ####\nThe appimagetool validates the application metadata file (appdata.xml) prior to generating the AppImage output.\nHowever, validation appears to be somewhat pedantic and may cause problems. In this case, you may leave the\n`APP_XML_SRC` configuration option empty to omit metadata. See also the following for clues and leads in problem\nsolving: https://github.com/AppImage/AppImageKit/issues/603\n\n#### Symlink ####\nIf you are using VirtualBox with your project within a shared folder, note that symbolic links are disabled within\nshared folders by VirtualBox, and this will prevent `appimagetool` from working. To overcome this, copy\nyour entire project to your home directory in the virtual machine. Alternatively, it is possible to enable shared-folder\nsymlinks in VirtualBox.\n\n### Non-.NET Projects? ###\nIt is also possible to use Publish-AppImage to build non-.NET projects (i.e. C++), although I don't imagine\nthis will be a primary use case. To do this, you must use a suitable build script and specify the file\nlocation using the `POST_PUBLISH` config parameter. Your build script must populate the directory `AppDir/usr/bin`.\n\nYou should also set `DOTNET_PROJECT_PATH=\"null\"` in order to disable the `dotnet publish` operation.\n\n### Git Ignore? ###\nYou may wish to consider adding your output directory (i.e. \"AppImages\") to your gitignore file.\n\n### Flatpak? ###\nI initially intended that this utility spit out Flatpaks as well as AppImages. However, the configuration\nand building of Flatpaks adds complexity. For the moment, I decided that this project was best served by\nkeeping things simple and elegant. I may do something on this a later, however.\n\nDon't forget to like (star) and share this project (but only if *you do like it* of course).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuiperzone%2Fpublish-appimage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkuiperzone%2Fpublish-appimage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuiperzone%2Fpublish-appimage/lists"}