Skip to content

Commit

Permalink
Redesigned 0install tools
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianeicher committed Mar 29, 2024
1 parent 672b7af commit ea5ebbb
Show file tree
Hide file tree
Showing 12 changed files with 319 additions and 230 deletions.
2 changes: 1 addition & 1 deletion docs/packaging/examples/dotnet-lib.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# .NET library

This tutorial explains how to create feeds for a .NET application with a dependency on a .NET library using the [Zero Install Publishing Tools](../../tools/0publish-win.md).
This tutorial explains how to create feeds for a .NET application with a dependency on a .NET library using [0publish-gui](../../tools/0publish-gui.md).

## The application (EXE)

Expand Down
8 changes: 3 additions & 5 deletions docs/packaging/guide-gui.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,16 @@ We assume here that a binary release already exists (perhaps published by someon

## Tutorial

To make a program available via Zero Install you need to create an XML 'feed' file, describing which versions are available, where they can be downloaded, and what other software they require. In this tutorial, we'll use the graphical **0publish-gui** application to create this file. If you don't want to use a graphical interface (for example, because you want to publish new versions using a script) then you should read the [command-line tutorial](guide-cli.md) instead.
To make a program available via Zero Install you need to create an XML 'feed' file, describing which versions are available, where they can be downloaded, and what other software they require. In this tutorial, we'll use the graphical [0publish-gui](../tools/0publish-gui.md) application to create this file. If you don't want to use a graphical interface (for example, because you want to publish new versions using a script) then you should read the [command-line tutorial](guide-cli.md) instead.

Start by getting **0publish-gui** in the usual way:

```shell
0install add 0publish-gui https://apps.0install.net/0install/0publish-gui.xml
```

This program requires GTK >= 2.6 and Python >= 2.4 (these are not fetched using Zero Install at present).

!!! note
On Windows use [0publish-win](../tools/0publish-win.md) instead.
The following text currently on describes the steps on Linux. Documentation for Windows coming soon.

Run the program, giving it the name of the feed file you want to create, which should be named after the program:

Expand Down Expand Up @@ -93,7 +91,7 @@ $ 0install run http://0install.net/2007/3rd-party/Blender.xml
It's surprising how easy it is to forget to set the right permissions, etc, so check your new feed! [FeedLint](../tools/feedlint.md) is an easy first step:

```shell
0install add feedlint http://0install.net/2007/interfaces/FeedLint.xml
0install add feedlint https://apps.0install.net/0install/feedlint.xml
feedlint http://0install.net/2007/3rd-party/Blender.xml
```

Expand Down
2 changes: 1 addition & 1 deletion docs/packaging/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This page lists some example code packages which you can use as templates when c
## .NET

[Packaging .NET libraries](examples/dotnet-lib.md)
: This tutorial explains how to create feeds for a .NET application with a dependency on a .NET library using the Publishing Tools.
: This tutorial explains how to create feeds for a .NET application with a dependency on a .NET library using 0publish-gui.

## Python

Expand Down
2 changes: 1 addition & 1 deletion docs/specifications/catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Catalog files are automatically generated by [0repo](../tools/0repo.md).
You can also manually generate a catalog from a set of feeds downloaded to a local directory:

```shell
0install run --command=0publish https://apps.0install.net/0install/0publish-win.xml feeds/*.xml --catalog=catalog.xml --xmlsign
0install run https://apps.0install.net/0install/0publish.xml feeds/*.xml --catalog=catalog.xml --xmlsign
```

!!! note
Expand Down
84 changes: 42 additions & 42 deletions docs/tools/0bootstrap.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
# 0bootstrap

!!! info ""
**Maintainer:** Thomas Leonard
**License:** GNU General Public License
**Source:** <https://github.com/0install/0bootstrap>
**0bootstrap** generates a native package that installs 0install itself along with a launcher for a 0install app.

**0bootstrap** generates a native package that installs a 0install launcher.
=== "Linux / macOS"
!!! info ""
**Maintainer:** Thomas Leonard
**License:** GNU General Public License
**Source:** <https://github.com/0install/0bootstrap>
**Zero Install feed:** <https://apps.0install.net/0install/0bootstrap.xml>

**This program is not ready for use yet.**
!!! warning
The Linux version of this program is still experimental.

Normally, a launcher is created by passing its name (a URI) to the 0desktop command (or "Add New Program"). This downloads the appropriate feeds, their icons - if available, and makes a shortcut (creates a launcher, a .desktop file).
Normally, a launcher is created by passing a feed URI to the ["Add Zero Install Program" utility](../basics/menu.md). This downloads the appropriate feeds, their icons - if available, and makes a shortcut (creates a launcher, a .desktop file).

However, it is sometimes useful to bundle such a launcher and its icon together in a .deb package (for example), so that it can be installed on machines that don't have Zero Install available initially - by using the standard native package installation procedure.
However, it is sometimes useful to bundle such a launcher and its icon together in a .deb package (for example), so that it can be installed on machines that don't have Zero Install available initially - by using the standard native package installation procedure.

0bootstrap takes the URI of a program and creates a native package; currently the .deb and .rpm package formats are supported by the tool.
0bootstrap takes the URI of a program and creates a native package; currently the .deb and .rpm package formats are supported by the tool.

Programs launched using these packages are added to the Zero Install cache and are therefore still [shared between users](../details/sharing.md), and will get updates over the web where possible.
Programs launched using these packages are added to the Zero Install cache and are therefore still [shared between users](../details/sharing.md), and will get updates over the web where possible.

## Using a 0bootstrap package
## Using a 0bootstrap package

Open the file with your file manager, or run `gdebi-gtk edit.deb` in a terminal:
Open the file with your file manager, or run `gdebi-gtk edit.deb` in a terminal:

![Installing a 0bootstrap native package](../img/screens/0bootstrap-install.png)
![Installing a 0bootstrap native package](../img/screens/0bootstrap-install.png)

The package will require Zero Install in order to install, as seen in the Details view:
The package will require Zero Install in order to install, as seen in the Details view:

![Dependency details](../img/screens/0bootstrap-details.png)
![Dependency details](../img/screens/0bootstrap-details.png)

Installing native packages requires authentication.
Installing native packages requires authentication.

![Authenticate](../img/screens/0bootstrap-authenticate.png)
![Authenticate](../img/screens/0bootstrap-authenticate.png)

The installation will add the program to your menus.
The installation will add the program to your menus.

![Installation finished](../img/screens/0bootstrap-finish.png)
![Installation finished](../img/screens/0bootstrap-finish.png)

## Current status
## Installing 0bootstrap

This program is not yet released.
Since this program is not yet released, you need to run it from the source repository:

## Installing 0bootstrap
```shell
git clone git://zero-install.git.sourceforge.net/gitroot/zero-install/bootstrap
cd bootstrap
0install add-feed 0bootstrap.xml
0install add 0bootstrap 0bootstrap.xml
```

You can download `0bootstrap` and create a short-cut to it in the usual way:
## Creating a package for your program

```shell
0install add 0bootstrap http://0install.net/tools/0bootstrap.xml
```
Run 0bootstrap, passing in the package format and the name (URI) of the main program. For example, to create an Ubuntu package for Edit:

Before the program is released, you need to run it from the source repository:
```shell
0bootstrap --format=deb http://rox.sourceforge.net/2005/interfaces/Edit
```

```shell
$ git clone git://zero-install.git.sourceforge.net/gitroot/zero-install/bootstrap
$ cd bootstrap
$ 0install add-feed 0bootstrap.xml
$ 0install add 0bootstrap 0bootstrap.xml
```
The resulting edit.deb package can now be installed on a Ubuntu machine.

## Creating a package for your program

Run 0bootstrap, passing in the package format and the name (URI) of the main program. For example, to create an Ubuntu package for Edit:

```shell
$ 0bootstrap --format=deb http://rox.sourceforge.net/2005/interfaces/Edit
```

The resulting edit.deb package can now be installed on a Ubuntu machine.
=== "Windows"
!!! info ""
**Maintainer:** Bastian Eicher
**License:** GNU Lesser General Public License
**Source:** <https://github.com/0install/0bootstrap-dotnet>
**Zero Install feed:** <https://apps.0install.net/0install/0bootstrap.xml>

## FAQ

Expand Down
51 changes: 51 additions & 0 deletions docs/tools/0capture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# 0capture

!!! info ""
**Maintainer:** Bastian Eicher
**License:** GNU Lesser General Public License
**Source:** <https://github.com/0install/0capture>
**Zero Install feed:** <https://apps.0install.net/0install/0capture.xml>

0capture is a command-line tool for generating Zero Install feeds with metadata for [desktop integration](../details/desktop-integration.md). This currently only works on Windows.

To setup 0capture on your system you can run:

```
0install add 0capture https://github.com/0install/0capture
```

If you prefer a GUI, you can use the "New Feed Wizard" in the Windows version of [0publish-gui](0publish-gui.md), which provides similar functionality.

## Usage

### First snapshot

First you need to capture a snapshot of the current state of your system by running:

```
0capture start myapp.snapshot
```

This will create a file named `myapp.snapshot` storing information such as the currently installed binaries, registered file handlers, etc..

### App installation

Now you can install the app you wish to capture using its regular installer.

### Second snapshot

Once the app is installed you can run:

```
0capture finish myapp.snapshot myapp.xml --collect-files=myapp.zip
```

This create another snapshot of the system state and compare it with the previously stored one. By comparing the two snapshot, 0capture can then infer which [capabilities](../specifications/capabilities.md) the app has and uses this to generate the feed file `myapp.xml` along with an archive containing the app's binaries named `myapp.zip`.

## FAQ

Do I need to repeat this for each release of the app I captured?
: If the app provides non-installer archives, you can modify the feed to use those instead of the archive generated by `--collect-files`. Then you'll only need to run 0capture once to get the desktop integration capabilities.

The generated feed seems to be missing some capabilities. How can I improve the quality of the generated feed?
: Try running 0capture and the app's installer in an otherwise pristine VM.
Loading

0 comments on commit ea5ebbb

Please sign in to comment.