Skip to content

Commit

Permalink
build: create NuGet specs, build with appveyor (#33)
Browse files Browse the repository at this point in the history
* build: create NuGet specs, build with appveyor

This PR updates the code to build the NuGet packages from *.nuspec files
directly from the appveyor build. It removes obsoleted scripts and
cleans up the docs.

* build: fix ConsoleControl.WPF.nuspec file name

* build: add nuspecs to project

* build: fix file path
  • Loading branch information
dwmkerr committed Nov 28, 2018
1 parent 76ce770 commit 1d4d48d
Show file tree
Hide file tree
Showing 11 changed files with 197 additions and 254 deletions.
43 changes: 26 additions & 17 deletions README.md
Expand Up @@ -4,36 +4,45 @@

ConsoleControl is a C# class library that lets you embed a console in a WinForms or WPF application. This console can be used for input and output for a process. It's great for making tools and utilities.

![ConsoleControl Screenshot](./docs/screenshot.png "ConsoleControl Screenshot")

![ConsoleControl Screenshot](https://github.com/dwmkerr/consolecontrol/blob/master/Assets/screenshot.png?raw=true "ConsoleControl Screenshot")
## Installing

Installing ConsoleControl
-------------------------

Installing couldn't be easier, just use Nuget. You can search for 'ConsoleControl' or install directly.
Installing couldn't be easier, just use NuGet. You can search for 'ConsoleControl' or install directly.

For WinForms:

````
```
PM> Install-Package ConsoleControl
````
```

For WPF:

````
```
PM> Install-Package ConsoleControl.WPF
````
```

## Using ConsoleControl

Once you've installed the package, the ConsoleControl will be available in the toolbox. Add a ConsoleControl to your WPF or WinForms project and call `StartProcess` to start a new process. The process will run and all output will be directed to the ConsoleControl. You can also optionally enable input from the control.

## Developer Guide

To build, open the main `./source/ConsoleControl.sln` solution to build and run any of the code or samples.

You can also use the following scripts to run the processes:

Using ConsoleControl
--------------------
| Script | Notes |
|-------------|-------------------------------------------|
| `build.ps1` | Build the solution from the command line. |

Once you've installed the package, the ConsoleControl will be available in the toolbox. Add a ConsoleControl to your WPF or WinForms project and call 'StartProcess' to start a new process. The process will run and all output will be directed to the ConsoleControl. You can also optionally enable input from the control.
You can learn how the ConsoleControl was created by reading the article [Embedding a Console in a C# Application](http://www.codeproject.com/Articles/335909/Embedding-a-Console-in-a-C-Application) article on the CodeProject.

Buidling and Extending the Code
-------------------------------
### Creating a Release

You can learn how the ConsoleControl was created by reading this article on the CodeProject:
To create a release:

http://www.codeproject.com/Articles/335909/Embedding-a-Console-in-a-C-Application
1. Update the version number in [`SharedAssemblyInfo.cs`](./source/SharedAssemblyInfo.cs)
2. Create a new version tag, then push `git push --follow-tags`

Building the code is as straightforward as downloading it and building the project.
AppVeyor will build and publish a new NuGet package and as long as a new semver tag is pushed.
7 changes: 1 addition & 6 deletions appveyor.yml
Expand Up @@ -2,11 +2,6 @@ version: 1.0.{build}
image: Visual Studio 2017
configuration: Release

# Before building, restore Nuget packages and install dependencies.
before_build:
- ps: |
nuget restore source\ConsoleControl.sln
build:
project: source\ConsoleControl.sln
publish_nuget: true
Expand All @@ -22,6 +17,6 @@ deploy:
- provider: GitHub
auth_token:
secure: KTWUORrnJKPKLSf/3ROLY50T9UfgTMnKHf3OjBOv8tlY/DAxtlglRU3eM+j45fMt
artifact: SharpShell.*.nupkg, ServerRegistrationManager.*.nupkg, ServerManager.zip, ServerRegistrationManager.zip
artifact: SharpShell.*.nupkg, ServerRegistrationManager.*.nupkg
on:
APPVEYOR_REPO_TAG: true
47 changes: 0 additions & 47 deletions build/BuildRelease.ps1

This file was deleted.

25 changes: 0 additions & 25 deletions build/Resources/PowershellFunctions.ps1

This file was deleted.

Binary file removed build/Resources/nuget.exe
Binary file not shown.
File renamed without changes
1 change: 1 addition & 0 deletions source/ConsoleControl.WPF/ConsoleControl.WPF.csproj
Expand Up @@ -88,6 +88,7 @@
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="ConsoleControl.snk" />
<Content Include="ControlControl.WPF.nuspec" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
Expand Down
@@ -1,15 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>ConsoleControl.WPF</id>
<version>1.0.3</version>
<title>ConsoleControl for WPF</title>
<authors>Dave Kerr</authors>
<licenseUrl>https://github.com/dwmkerr/consolecontrol</licenseUrl>
<projectUrl>https://github.com/dwmkerr/consolecontrol</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>The ConsoleControl is a WPF control that you can drop into a WPF applcation to run an external process in a C# application.</description>
<releaseNotes />
<copyright>Dave Kerr 2013-2015</copyright>
</metadata>
</package>
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>$id$</id>
<version>$version$</version>
<title>ConsoleControl for WPF</title>
<authors>Dave Kerr</authors>
<owners>Dave Kerr</owners>
<licenseUrl>https://github.com/dwmkerr/consolecontrol/LICENSE.md</licenseUrl>
<projectUrl>https://github.com/dwmkerr/consolecontrol</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>The ConsoleControl is a WPF control that you can drop into a WPF applcation to run an external process in a C# application.</description>
<copyright>Copyright © Dave Kerr 2018</copyright>
<tags>Console,Shell</tags>
</metadata>
</package>

0 comments on commit 1d4d48d

Please sign in to comment.