Skip to content

Commit

Permalink
Extracted from 0install-win repo
Browse files Browse the repository at this point in the history
Previous location: http://github.com/0install/0install-win

Switched to new MSBuild format
  • Loading branch information
bastianeicher committed Aug 21, 2017
1 parent b327904 commit e3c2acb
Show file tree
Hide file tree
Showing 59 changed files with 16,621 additions and 1,261 deletions.
7 changes: 7 additions & 0 deletions .gitattributes
@@ -0,0 +1,7 @@
# Disable linebreak normalization
* -text

# Visual Studio file types
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
13 changes: 13 additions & 0 deletions .gitignore
@@ -0,0 +1,13 @@
/build/
/src/.vs/
/src/_ReSharper*/
obj/
bin/
*.bak
*.cache
*.pidb
*.suo
*.user
*.userprefs
*.resources
*.filtered.resx
54 changes: 54 additions & 0 deletions 3rd party code.txt
@@ -0,0 +1,54 @@
Moq
http://github.com/Moq/moq4
New BSD license: http://opensource.org/licenses/BSD-3-Clause
NuGet package: Moq

Moq.Contrib
http://code.google.com/p/moq-contrib/
New BSD license: http://opensource.org/licenses/BSD-3-Clause
NuGet package: Moq.Contrib

ICSharpCode.SharpZipLib (patched)
http://www.icsharpcode.net/OpenSource/SharpZipLib/ + https://github.com/nano-byte/SharpZipLib
GNU GPL with GNU Classpath exception
NuGet package: ICSharpCode.SharpZipLib.Patched

Json.NET
http://james.newtonking.com/json
MIT license: http://opensource.org/licenses/MIT
NuGet package: Newtonsoft.Json

Bouncy Castle (OpenPGP-only version)
http://www.bouncycastle.org/csharp
Bouncy Castle license: http://www.bouncycastle.org/csharp/licence.html
NuGet package: BouncyCastle.OpenPgp

SevenZipSharp
http://sevenzipsharp.codeplex.com/
GNU LGPL 2.1: http://opensource.org/licenses/LGPL-2.1
Self-compiled managed DLL: SevenZipSharp.dll

7-Zip Extra files
http://www.7-zip.org/
GNU LGPL 2.1: http://opensource.org/licenses/LGPL-2.1
Pre-compiled native DLLs: 7zxa.dll, 7zxa-x64.dll

XZ.NET
https://github.com/RomanBelkov/XZ.NET
MIT license: http://opensource.org/licenses/MIT
Self-compiled managed DLL: XZ.NET.dll

liblzma (XZ Utils)
http://tukaani.org/xz/
Public domain
Pre-compiled native DLLs: liblzma.dll, liblzma64.dll

INI File Parser 2.0.4
http://github.com/rickyah/ini-parser
MIT license: http://opensource.org/licenses/MIT
Pre-compiled managed DLL: INIFileParser.dll

WiX Toolset 3.8
http://wixtoolset.org/
Microsoft Reciprocal License: http://opensource.org/licenses/MS-RL
Pre-compiled managed DLLs: Microsoft.Deployment.*.dll
165 changes: 165 additions & 0 deletions COPYING.txt
@@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.


This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.

0. Additional Definitions.

As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.

"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.

An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.

A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".

The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.

The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.

1. Exception to Section 3 of the GNU GPL.

You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.

2. Conveying Modified Versions.

If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:

a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or

b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.

3. Object Code Incorporating Material from Library Header Files.

The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:

a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.

b) Accompany the object code with a copy of the GNU GPL and this license
document.

4. Combined Works.

You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:

a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.

b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.

c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.

d) Do one of the following:

0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.

1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.

e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)

5. Combined Libraries.

You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:

a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.

b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.

6. Revised Versions of the GNU Lesser General Public License.

The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.

If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
27 changes: 27 additions & 0 deletions README.md
@@ -0,0 +1,27 @@
Zero Install .NET Backend
=========================

The Zero Install .NET Backend implements the core features of Zero Install. It also allow developers to embed Zero Install functionality in their own .NET applications. [Zero Install for Windows](https://github.com/0install/0install-win) is built upon this backend.

NuGet packages:
- **[ZeroInstall.Store](https://www.nuget.org/packages/ZeroInstall.Store/)** (data models and management functions for local file storage)
- **[ZeroInstall.Services](https://www.nuget.org/packages/ZeroInstall.Services/)** (services such as dependency resolution and implementation downloading)
- **[ZeroInstall.Services.Interfaces](https://www.nuget.org/packages/ZeroInstall.Services.Interfaces/)** (interfaces and extension methods)
- **[ZeroInstall.DesktopIntegration](https://www.nuget.org/packages/ZeroInstall.DesktopIntegration/)** (methods for integrating applications with desktop environments, creating menu entries, etc.)

**[API documentation](http://0install.de/api/backend/)**

Directory structure
-------------------
- `src` contains source code.
- `lib` contains pre-compiled 3rd party libraries which are not available via NuGet.
- `doc` contains a Doxyfile project for generation the API documentation.
- `build` contains the results of various compilation processes. It is created on first usage.
- `samples` contains code snippets in different languages illustrating how to use the Zero Install Backend.

Building
--------
- You need to install [Visual Studio 2017 Update 3](https://www.visualstudio.com/downloads/), [.NET Core 2.0 SDK](https://dot.net/core) and [Zero Install](http://0install.de/downloads/) to build this project.
- The file `VERSION` contains the current version number of the project.
- Run `.\Set-Version.ps1 "X.Y.Z"` in PowerShall to change the version number. This ensures that the version also gets set in other locations (e.g. `.csproj` files).
- Run `.\build.ps1` in PowerShell to build everything.
17 changes: 17 additions & 0 deletions Set-Version.ps1
@@ -0,0 +1,17 @@
Param ([Parameter(Mandatory=$True)] [string]$NewVersion)
$ErrorActionPreference = "Stop"
$ScriptDir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent

function SearchAndReplace($FilePath, $PatternLeft, $PatternRight)
{
(Get-Content "$ScriptDir\$FilePath" -Encoding UTF8) `
-replace "$PatternLeft.*$PatternRight", ($PatternLeft + $NewVersion + $PatternRight) |
Set-Content "$ScriptDir\$FilePath" -Encoding UTF8
}

[System.IO.File]::WriteAllText("$ScriptDir\VERSION", $NewVersion)
SearchAndReplace doc\Doxyfile -PatternLeft 'PROJECT_NUMBER = "' -PatternRight '"'
SearchAndReplace src\DesktopIntegration\DesktopIntegration.csproj -PatternLeft '<Version>' -PatternRight '</Version>'
SearchAndReplace src\Services\Services.csproj -PatternLeft '<Version>' -PatternRight '</Version>'
SearchAndReplace src\Services.Interfaces\Services.Interfaces.csproj -PatternLeft '<Version>' -PatternRight '</Version>'
SearchAndReplace src\Store\Store.csproj -PatternLeft '<Version>' -PatternRight '</Version>'
10 changes: 10 additions & 0 deletions Set-Version.sh
@@ -0,0 +1,10 @@
#!/bin/bash
set -e
cd `dirname $0`

printf $1 > VERSION
sed -b -i "s/PROJECT_NUMBER = \".*\"/PROJECT_NUMBER = \"$1\"/" doc/Doxyfile
sed -b -i "s/<Version>.*<\/Version>/<Version>$1<\/Version>/" src/DesktopIntegration/DesktopIntegration.csproj
sed -b -i "s/<Version>.*<\/Version>/<Version>$1<\/Version>/" src/Store/Store.csproj
sed -b -i "s/<Version>.*<\/Version>/<Version>$1<\/Version>/" src/Services/Services.csproj
sed -b -i "s/<Version>.*<\/Version>/<Version>$1<\/Version>/" src/Services.Interfaces/Services.Interfaces.csproj
1 change: 1 addition & 0 deletions VERSION
@@ -0,0 +1 @@
2.13.3
7 changes: 7 additions & 0 deletions build.ps1
@@ -0,0 +1,7 @@
$ErrorActionPreference = "Stop"
pushd $(Split-Path -Path $MyInvocation.MyCommand.Definition -Parent)

src\build.ps1
doc\build.ps1

popd
6 changes: 6 additions & 0 deletions build.sh
@@ -0,0 +1,6 @@
#!/bin/sh
set -e
cd `dirname $0`

src/build.ps1
doc/build.ps1
22 changes: 22 additions & 0 deletions doc/Doxyfile
@@ -0,0 +1,22 @@
PROJECT_NAME = "Zero Install .NET Backend API"
PROJECT_NUMBER = "2.13.3"

INPUT = main.md ../src
USE_MDFILE_AS_MAINPAGE = main.md
STRIP_FROM_PATH = ../src
RECURSIVE = YES
EXCLUDE_PATTERNS = */UnitTests/* */Properties/* */obj/* */bin/*
TAGFILES = nanobyte-common.tag=http://nano-byte.de/common/api/

OUTPUT_DIRECTORY = ../build/Documentation
GENERATE_TAGFILE = ../build/Documentation/0install-backend.tag
HTML_OUTPUT = .

GENERATE_LATEX = NO
CASE_SENSE_NAMES = NO

EXTRACT_PACKAGE = YES
EXTRACT_STATIC = YES
AUTOLINK_SUPPORT = NO
WARN_IF_UNDOCUMENTED = NO
QUIET = YES
8 changes: 8 additions & 0 deletions doc/build.ps1
@@ -0,0 +1,8 @@
$ErrorActionPreference = "Stop"
pushd $(Split-Path -Path $MyInvocation.MyCommand.Definition -Parent)

if (Test-Path ..\build\Documentation) {rm -Recurse -Force ..\build\Documentation}
mkdir ..\build\Documentation | Out-Null
0install run http://0install.de/feeds/Doxygen.xml

popd
7 changes: 7 additions & 0 deletions doc/build.sh
@@ -0,0 +1,7 @@
#!/bin/bash
set -e
cd `dirname $0`

rm -rf ../build/Documentation
mkdir -p ../build/Documentation
0install run http://0install.de/feeds/Doxygen.xml
9 changes: 9 additions & 0 deletions doc/main.md
@@ -0,0 +1,9 @@
The Zero Install .NET Backend implements the core features of Zero Install. It also allow developers to embed Zero Install functionality in their own .NET applications. [Zero Install for Windows](https://github.com/0install/0install-win) is built upon this backend.

NuGet packages:
- [ZeroInstall.Store](https://www.nuget.org/packages/ZeroInstall.Store/) (data models and management functions for local file storage)
- [ZeroInstall.Services](https://www.nuget.org/packages/ZeroInstall.Services/) (services such as dependency resolution and implementation downloading)
- [ZeroInstall.Services.Interfaces](https://www.nuget.org/packages/ZeroInstall.Services.Interfaces/) (interfaces and extension methods)
- [ZeroInstall.DesktopIntegration](https://www.nuget.org/packages/ZeroInstall.DesktopIntegration/) (methods for integrating applications with desktop environments, creating menu entries, etc.)

This API documentation lists the public interfaces provided by the Zero Install .NET Backend. It is intended primarily for developers consuming the libraries.
Binary file added lib/7zxa-x64.dll
Binary file not shown.
Binary file added lib/7zxa.dll
Binary file not shown.
Binary file added lib/INIFileParser.dll
Binary file not shown.

0 comments on commit e3c2acb

Please sign in to comment.