diff --git a/README.md b/README.md index 82eee0a..4725936 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,6 @@ WinSW wraps and manages any application as a Windows service. **We are actively developing WinSW 3. Please refer to the [v2](https://github.com/winsw/winsw/tree/master) branch for previous version documentation.** -**Please help us prioritize items by voting or commenting on the issues!** - ## Why? See the [project manifest](MANIFEST.md). @@ -43,6 +41,44 @@ Alternative sources: * [Maven packaging](https://github.com/jenkinsci/winsw-maven-packaging) for executables, hosted by the [Jenkins project](https://jenkins.io/). Binaries are available [here](https://repo.jenkins-ci.org/releases/com/sun/winsw/winsw/). (2.x) +## Get started + +### Use WinSW as a global tool + +1. Take *WinSW.exe* or *WinSW.zip* from the distribution. +1. Write *myapp.xml* (see the [XML config file specification](docs/xml-config-file.md) and [samples](samples) for more details). +1. Run [`winsw install myapp.xml [options]`](docs/cli-commands.md#install-command) to install the service. +1. Run [`winsw start myapp.xml`](docs/cli-commands.md#start-command) to start the service. +1. Run [`winsw status myapp.xml`](docs/cli-commands.md#status-command) to see if your service is up and running. + +### Use WinSW as a bundled tool + +1. Take *WinSW.exe* or *WinSW.zip* from the distribution, and rename the *.exe* to your taste (such as *myapp.exe*). +1. Write *myapp.xml* (see the [XML config file specification](docs/xml-config-file.md) and [samples](samples) for more details). +1. Place those two files side by side, because that's how WinSW discovers its co-related configuration. +1. Run [`myapp.exe install [options]`](docs/cli-commands.md#install-command) to install the service. +1. Run [`myapp.exe start`](docs/cli-commands.md#start-command) to start the service. + +### Sample configuration file + +You write the configuration file that defines your service. +The example below is a primitive example being used in the Jenkins project: + +```xml + + jenkins + Jenkins + This service runs Jenkins continuous integration system. + + java + -Xrs -Xmx256m -jar "%BASE%\jenkins.war" --httpPort=8080 + + +``` + +The full specification of the configuration file is available [here](docs/xml-config-file.md). +You can find more samples [here](samples). + ## Usage WinSW is being managed by the [XML configuration file](docs/xml-config-file.md). @@ -51,7 +87,7 @@ Your renamed *WinSW.exe* binary also accepts the following commands: | Command | Description | | ------- | ----------- | -| [install](docs/cli-commands.md#install-command) | Installs the service. This command requires some preliminary steps described in the [installation guide](docs/installation.md). | +| [install](docs/cli-commands.md#install-command) | Installs the service. | | [uninstall](docs/cli-commands.md#uninstall-command) | Uninstalls the service. | | [start](docs/cli-commands.md#start-command) | Starts the service. | | [stop](docs/cli-commands.md#stop-command) | Stops the service. | @@ -74,7 +110,6 @@ Most commands require Administrator privileges to execute. WinSW will prompt for ## Documentation -* [Get started](docs/installation.md) * [Migrate to WinSW 3.x](docs/migrate-to-3-x.md) * Configuration: * [XML configuration file](docs/xml-config-file.md) diff --git a/WinSW.nuspec b/WinSW.nuspec index 41b20e8..87ab227 100644 --- a/WinSW.nuspec +++ b/WinSW.nuspec @@ -26,6 +26,6 @@ More info about the wrapper is available in the projects GitHub repository. - + diff --git a/docs/developer/project-structure.md b/docs/developer/project-structure.md index 58392a4..f15b366 100644 --- a/docs/developer/project-structure.md +++ b/docs/developer/project-structure.md @@ -20,7 +20,7 @@ ## :open_file_folder: samples -This folder contains templates for configuration files. *sample-minimal.xml* contains a template for mandatory configurations and *sample-complete.xml* contains all possible configurations with documentation. +This folder contains templates for configuration files. *minimal.xml* contains a template for mandatory configurations and *complete.xml* contains all possible configurations with documentation. ## :open_file_folder: Core diff --git a/docs/installation.md b/docs/installation.md deleted file mode 100644 index 6109ba4..0000000 --- a/docs/installation.md +++ /dev/null @@ -1,49 +0,0 @@ -# Get started - -This page provides WinSW installation guidelines for different cases. - -## Use WinSW as a global tool - -1. Take *WinSW.exe* or *WinSW.zip* from the distribution. -1. Write *myapp.xml* (see the [XML config file specification](xml-config-file.md) for more details) -1. Run [`winsw install myapp.xml [options]`](cli-commands.md#install-command) to install the service. -1. Run [`winsw start myapp.xml`](cli-commands.md#start-command) to start the service. -1. Run [`winsw status myapp.xml`](cli-commands.md#status-command) to see if your service is up and running. - -## Use WinSW as a bundled tool - -In order to setup WinSW, you commonly need to perform the following steps: - -1. Take *WinSW.exe* from the distribution, and rename it to your taste (such as *myapp.exe*) -1. Write *myapp.xml* (see the [XML config file specification](xml-config-file.md) for more details) -1. Place those two files side by side, because that's how WinSW discovers its configuration. -1. Run [`myapp.exe install [options]`](cli-commands.md#install-command) to install the service. -1. Run [`myapp.exe start`](cli-commands.md#start-command) to start the service. - -There are some details for each step available below. - -## Installation step details - -### Step 2. Configuration file - -You write the configuration file that defines your service. -The example below is a primitive example being used in the Jenkins project: - -```xml - - jenkins - Jenkins - This service runs Jenkins continuous integration system. - - java - -Xrs -Xmx256m -jar "%BASE%\jenkins.war" --httpPort=8080 - - -``` - -The full specification of the configuration file is available [here](xml-config-file.md). - -### Step 3. Service registration - -The Installer can be also started with the `/p` option. -In such case it will prompt for an account name and password, which should be used as a service account. diff --git a/samples/sample-complete.xml b/samples/complete.xml similarity index 100% rename from samples/sample-complete.xml rename to samples/complete.xml diff --git a/samples/jenkins.xml b/samples/jenkins.xml new file mode 100644 index 0000000..676a081 --- /dev/null +++ b/samples/jenkins.xml @@ -0,0 +1,10 @@ + + jenkins + Jenkins + This service runs Jenkins continuous integration system. + + java + -Xrs -Xmx256m -jar "%BASE%\jenkins.war" --httpPort=8080 + + + diff --git a/samples/sample-minimal.xml b/samples/minimal.xml similarity index 98% rename from samples/sample-minimal.xml rename to samples/minimal.xml index 5e8c9d1..b95a6a0 100644 --- a/samples/sample-minimal.xml +++ b/samples/minimal.xml @@ -30,7 +30,7 @@ E.g. for myapp.exe the configuration file name should be myapp.xml You can find more information about the configuration options here: https://github.com/winsw/winsw/blob/master/docs/xml-config-file.md - Full example: https://github.com/winsw/winsw/blob/master/samples/sample-complete.xml + Full example: https://github.com/winsw/winsw/blob/master/samples/complete.xml --> diff --git a/samples/sample-shared-directory-mapper.xml b/samples/shared-directory-mapper.xml similarity index 100% rename from samples/sample-shared-directory-mapper.xml rename to samples/shared-directory-mapper.xml diff --git a/src/WinSW.Tests/Configuration/ExamplesTest.cs b/src/WinSW.Tests/Configuration/ExamplesTest.cs index 963905c..6d6820d 100644 --- a/src/WinSW.Tests/Configuration/ExamplesTest.cs +++ b/src/WinSW.Tests/Configuration/ExamplesTest.cs @@ -37,7 +37,7 @@ namespace WinSW.Tests.Configuration { string directory = Layout.RepositoryRoot; - string path = Path.Combine(directory, $@"samples\sample-{exampleName}.xml"); + string path = Path.Combine(directory, $@"samples\{exampleName}.xml"); Assert.True(File.Exists(path)); var dom = new XmlDocument();