= Building a UNetbootin Plugin = == What a plugin does == A UNetbootin plugin will provide custom branding for your distribution's installer, and will allow you to specify the distributions and versions to be displayed under the distribution selection box. It is a simpler process compared to [wiki:buildcustomversion Building a Custom UNetbootin Version] as you will NOT have to compile your own version of UNetbootin. Also note that using the [wiki:commands command-line interface] via a script in a (7-zip) self-extractor is another alternative (see [wiki:commands#BundlingtogetherascriptadiskimageandUNetbootinintoasingleexecutable Bundling together a script, a disk image, and UNetbootin into a single executable]). === Abilities === * Can specify up to 9 custom distributions * Can specify up to 36 versions per distribution * Can add a diskimage (.iso or floppy/HDD .img) download location for each distribution * Can add an HTML description for each distribution. === Limitations === If you absolutely must have one of the following features, you will have to [wiki:buildcustomversion Build a Custom UNetbootin Version] instead. * A plugin cannot load a distribution that the default UNetbootin version can't load via the "Diskimage" option. If you need one of the following features, you can accomplish it either via the procedure described on [wiki:commands#BundlingtogetherascriptadiskimageandUNetbootinintoasingleexecutable Bundling together a script, a disk image, and UNetbootin into a single executable] or by [wiki:buildcustomversion Building a Custom UNetbootin Version] * A plugin cannot embed external resources (images, disk images, etc) * A plugin cannot load custom kernel and initrd files. == Example == This example shows a customized version of UNetbootin for K/X/Ubuntu, with custom descriptions and download locations for each. Other examples can be obtained from the [wiki:listcustomversion List of Custom UNetbootin Versions and Plugins] page. For usage instructions, see [wiki:useplugin Using a UNetbootin Plugin]. === Screenshot === [[Image(MiscWikiFiles:unetbootin-custom.png)]] === Download === Plugin: [http://unetbootin.wiki.sourceforge.net/space/showimage/unetbootin_ubuntu_en.qm unetbootin_ubuntu_en.qm] [[br]] Standalone Executable: [http://downloads.sourceforge.net/unetbootin/unetbootin-ubuntu-customsfx-windows-248.exe unetbootin-ubuntu-customsfx-windows-248.exe] [[br]] Source: [http://unetbootin.wiki.sourceforge.net/space/showimage/unetbootin_ubuntu_en.ts unetbootin_ubuntu_en.ts] == Creating a Plugin == == == === Prerequisites === Before you will begin, you will need to download and install the open-source version of [http://trolltech.com/products/qt Qt]. Windows users can download the "Qt Open Source Edition for C++ Developers - Desktop " from the [http://trolltech.com/downloads/opensource Qt Downloads Page], while Linux users can install the ''qt4-dev-tools'' package or their distribution's equivalent. Now, download the [http://unetbootin.wiki.sourceforge.net/space/showimage/unetbootin_ubuntu_en.ts example source file] and open it in Qt Linguist. You should now see something like this: [[Image(MiscWikiFiles:qt-linguist-small.png, link=http://unetbootin.wiki.sourceforge.net/space/showimage/qt-linguist.png)]] The field on the left describes the purpose of the option, while the field on the right is where you can input the options for your customized version and click the green checkbox or press ''Ctrl-Enter'' to confirm your changes. === Description of Options === ''__'''Key:'''__'' [[br]] '''N''' signifies distribution number, in the order in which they are displayed (1-9) [[br]] '''M''' signifies version number for a particular distribution, in the order in which they are displayed (1-9) [[br]] ''']|[''' separates multiple example entries || '''''Field''''' || '''''Description''''' || '''''Example''''''s''''' || iscustomver-no || Should always be set to "iscustomver-yes" || iscustomver-yes || Custom UNetbootin Build || Name you want displayed for your rebranded UNetbootin version. || Ubuntu LiveUSB Creator || amd64 || Name that corresponds to your distribution's codename for 64-bit processors on download pages. || amd64 ]|[ x86_64 || i386 || Name that correspondes to your distribution's codename for 32-bit processors on download pages. || i386 ]|[ x86 || Distro Name '''N''' || Name of the '''N'''-th distribution (1=first, 2=second, etc) you want displayed (The entry corresponding to "Distro Name 1" is shown by default, if you want the others to be hidden then make the second field for those you won't use empty) || Ubuntu ]|[ Kubuntu ]|[ "" (<-- this is an empty entry, meaning this distro won't be shown) || Homepage: [http://www.distro'''N'''site.org%3C/a%3E%3Cbr/%3E%3Cb%3EDescription:%3C/b http://www.distroNsite.org
Description: This distro '''N''' is unique and great in these ways.
Install Notes: You will have to do this to install this distribution '''N'''. || HTML description and instructions for the '''N'''-th distribution to show when it is selected. || Homepage: [http://www.ubuntu.com%3c/a%3E%3Cbr/%3E%3Cb%3EDescription:%3C/b http://www.ubuntu.com
Description: Ubuntu is a user-friendly Debian-based distribution. It is currently the most popular Linux desktop distribution.
Install Notes: This version allows for booting in Live mode, from which the installer can optionally be launched. || default-distro'''N'''version-1.0 || Default version of the '''N'''-th distribution. If it is a 64-bit version, add _x64 to the end of the name. If distribution number '''N''' is enabled (__Distro Name '''N'''__ isn't empty), this must NOT be empty, though it can be left empty if the corresponding distribution '''N''' is disabled (__Distro Name '''N'''__ is empty). || 8.04.1 ]|[ 8.04.1_x64 ]|[ "" (<-- this is an empty entry, meaning this version won't be shown) || [http://distro'''N'''site.org/distro-release-%1/distro-architecture%2.iso http://distroNsite.org/distro-release-%1/distro-architecture%2.iso] || Download location for the ISO or IMG file for the '''N'''-th distribution. %1 will be substituted with the specified version name (contents of "default-distro'''N'''version-1.0"), while %2 will be substituted with the text specified in the field __i386__ if the version name contains "_x64", or with the text specified in the field __amd64__ if the version name doesn't contain "_x64". || http://releases.ubuntu.com/%1/ubuntu-%1-desktop-%2.iso ]|[ http://archive.ubuntu.com/ubuntu/dists/%1/main/installer-%2/current/images/netboot/boot.img.gz || distro'''N'''format-iso || Format of the file specified in the download URL. If it's an ISO file, leave it as "distro'''N'''format-iso", but if it's a floppy/hard disk image, change it to "distro'''N'''format-img" || distro1format-iso ]|[ distro4format-img || someotherversion'''N'''-'''M''' || Same as __default-distro'''N'''version-1.0__, only for versions other than the first one ('''M'''-th version) for distribution number '''N'''. If left empty, this version won't be shown. || 7.10 ]|[ 7.04_x64 ]|[edgy ]|[ dapper_x64 ]|[ "" (<-- this is an empty entry, meaning this version won't be shown) === Releasing a Plugin === Once done, you can release your plugin by going to ''File -> Release As'' in Qt Linguist, giving it a new name (which must begin with "unetbootin" and have the extension ".qm" to be properly recognized and loaded), then uploading the .qm file and adding it to the [wiki:listcustomversion List of Custom UNetbootin Versions and Plugins]. === Releasing a Standalone Executable === If you'd prefer to bundle together your plugin and the UNetbootin executable as a single downloadable file, rather than releasing a seperate plugin, you can use a variety of self-extractor creators to do this. For example, for Windows, the 7-zip sfx creator can be used, as described at http://www.msfn.org/board/lofiversion/index.php/t39048.html First, download the following files: [http://unetbootin.wiki.sourceforge.net/space/showimage/7zS.sfx 7zS.sfx] [[br]] [http://unetbootin.wiki.sourceforge.net/space/showimage/config.txt config.txt] Then, download the [http://unetbootin.sourceforge.net/unetbootin-windows-latest.exe Latest Release for Windows] and rename it to unetbootin.exe Then, create an archive "unetbootin.7z" containing the files "unetbootin.exe" and "unetbootin_custom.qm". On Windows, this can be done via the [http://www.7-zip.org/ 7-zip] GUI, or if on Linux, install the package ''p7zip-full'' or your distribution's equivalent, and enter the command: {{{ 7z a unetbootin.7z unetbootin.exe unetbootin_custom.qm }}} Then, if on Windows, open a command line and enter: {{{ copy /b 7zs.sfx + config.txt + unetbootin.7z unetbootin-customsfx-windows.exe }}} Or, if on Linux, enter: {{{ cat 7zS.sfx config.txt unetbootin.7z > unetbootin-customsfx-windows.exe }}} Now, you should have a standalone, self-extracting executable with UNetbootin and your plugin bundled in. Standalone Executable: [http://downloads.sourceforge.net/unetbootin/unetbootin-ubuntu-customsfx-windows-248.exe unetbootin-ubuntu-customsfx-windows-248.exe] = See Also = = = [wiki:useplugin Using a UNetbootin Plugin] [[br]] [wiki:buildcustomversion Building a Custom UNetbootin Version] [[br]] [wiki:listcustomversion List of Custom UNetbootin Versions and Plugins] (''publicly editable'')