Skip to content

Commit 38e2fc5

Browse files
committed
Fixed Zip target. Created README.md.
1 parent d4a5b19 commit 38e2fc5

File tree

3 files changed

+51
-8
lines changed

3 files changed

+51
-8
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,37 @@
11
# PostSharp.LicenseServer
2+
3+
This repository contains the source code and releases of PostSharp License Server.
4+
5+
The use of the license server is optional. Since all commercial licenses are floating ones,
6+
the license server can help teams knowing how many licenses they actually use.
7+
8+
The license server is a classic ASP.NET application with an MS SQL back-end.
9+
10+
We at PostSharp consider that it is the customer's sole responsibility to respect the license agreement, and this is why we are providing the source code of the license server. Note that the use of licenses keys [are audited anyway](http://doc.postsharp.net/license-audit); if this is not an option for your organization, you can ask the PostSharp sales team for a license key with audit waiver.
11+
12+
## License
13+
14+
The license server itself is licensed under the *MIT License*. Note that PostSharp is a commercial product with a proprietary license.
15+
16+
## Documentation
17+
18+
* [Installing the license server](http://doc.postsharp.net/license-server-admin).
19+
* [Using the license server](http://doc.postsharp.net/license-server).
20+
21+
## Building from source
22+
23+
### Requirements
24+
25+
* Visual Studio 2013 with Web Tools.
26+
* To build from the command line, download `nuget.exe` from http://dist.nuget.org/win-x86-commandline/latest/nuget.exe.
27+
28+
### Instructions
29+
30+
1. Open a Developer Command Prompt and go to repository directory.
31+
2. Restore NuGet packages with the command: `nuget restore`.
32+
3. Go to directory `src\PostSharp.LicenseServer`.
33+
4. Execute `msbuild PostSharp.LicenseServer.csproj /t:Zip`.
34+
35+
## Support
36+
37+
Please use PostSharp support facility at https://www.postsharp.net/support.

src/PostSharp.LicenseServer/PostSharp.LicenseServer.csproj

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<IISExpressWindowsAuthentication />
2626
<IISExpressUseClassicPipelineMode />
2727
<TargetFrameworkProfile />
28+
<MSBuildCommunityTasksPath>$(MSBuildThisFileDirectory)..\..\packages\MSBuildTasks.1.4.0.88\tools</MSBuildCommunityTasksPath>
2829
</PropertyGroup>
2930
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
3031
<DebugSymbols>true</DebugSymbols>
@@ -240,6 +241,7 @@
240241
</PropertyGroup>
241242
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
242243
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v12.0\WebApplications\Microsoft.WebApplication.targets" />
244+
<Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.Targets"/>
243245
<ProjectExtensions>
244246
<VisualStudio>
245247
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
@@ -249,7 +251,7 @@
249251
</FlavorProperties>
250252
</VisualStudio>
251253
</ProjectExtensions>
252-
<Target Name="CreateZip" DependsOnTargets="Package">
254+
<Target Name="Zip" DependsOnTargets="Package">
253255
<XmlUpdate XmlFileName="obj\$(Configuration)\Package\PackageTmp\web.config" XPath="/configuration/applicationSettings/PostSharp.LicenseServer.Properties.Settings/setting[@name='GracePeriodWarningDays']/value" Value="1" />
254256
<XmlUpdate XmlFileName="obj\$(Configuration)\Package\PackageTmp\web.config" XPath="/configuration/applicationSettings/PostSharp.LicenseServer.Properties.Settings/setting[@name='MachinesPerUser']/value" Value="2" />
255257
<XmlUpdate XmlFileName="obj\$(Configuration)\Package\PackageTmp\web.config" XPath="/configuration/applicationSettings/PostSharp.LicenseServer.Properties.Settings/setting[@name='MinLeaseDays']/value" Value="1" />
@@ -259,13 +261,17 @@
259261
<XmlUpdate XmlFileName="obj\$(Configuration)\Package\PackageTmp\web.config" XPath="/configuration/applicationSettings/PostSharp.LicenseServer.Properties.Settings/setting[@name='GracePeriodWarningEmailCC']/value" Value="[email protected]" />
260262
<XmlUpdate XmlFileName="obj\$(Configuration)\Package\PackageTmp\web.config" XPath="/configuration/connectionStrings/add/@connectionString" Value="Data Source=localhost;Initial Catalog=SharpCraftersLicenseServer;Integrated Security=True" />
261263
<XmlUpdate XmlFileName="obj\$(Configuration)\Package\PackageTmp\web.config" XPath="/configuration/system.net/mailSettings/smtp/network/@host" Value="localhost" />
262-
<Exec Command="$(ZipTool) a -tzip -mx=9 &quot;$(MSBuildProjectDirectory)\$(ReleaseDir)\PostSharp.LicenseServer.zip&quot; *.* -r" WorkingDirectory="obj\$(Configuration)\Package\PackageTmp" />
264+
<ItemGroup>
265+
<_ZipFiles Include="obj\$(Configuration)\Package\PackageTmp\**\*"/>
266+
</ItemGroup>
267+
<Zip ZipFileName="$(OutputPath)PostSharp.LicenseServer.zip" Files="@(_ZipFiles)" WorkingDirectory="obj\$(Configuration)\Package\PackageTmp" />
268+
<Message Importance="High" Text="The license server release is ready in $(MSBuildThisFileDirectory)$(OutputPath)PostSharp.LicenseServer.zip is ready."/>
269+
</Target>
270+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
271+
Other similar extension points exist, see Microsoft.Common.targets.
272+
<Target Name="BeforeBuild">
273+
</Target>
274+
<Target Name="AfterBuild">
263275
</Target>
264-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
265-
Other similar extension points exist, see Microsoft.Common.targets.
266-
<Target Name="BeforeBuild">
267-
</Target>
268-
<Target Name="AfterBuild">
269-
</Target>
270276
-->
271277
</Project>

src/PostSharp.LicenseServer/packages.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3+
<package id="MSBuildTasks" version="1.4.0.88" targetFramework="net45" />
34
<package id="PostSharp" version="4.2.9-preview" targetFramework="net45" />
45
<package id="PostSharp.Compiler.Common" version="4.2.9-preview" targetFramework="net45" />
56
<package id="PostSharp.Compiler.Settings" version="4.2.9-preview" targetFramework="net45" />

0 commit comments

Comments
 (0)