Skip to content

Commit

Permalink
Merge from TFS remote branch
Browse files Browse the repository at this point in the history
  • Loading branch information
micjahn committed Aug 12, 2017
2 parents 2087874 + b05c554 commit 25e1294
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 44 deletions.
18 changes: 9 additions & 9 deletions Clients/ASP.NetCoreDemo/Helper/BarcodeTagHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
using Microsoft.AspNetCore.Razor.TagHelpers;

using ZXing;
using ZXing.QrCode;
using ZXing.Common;

namespace ASP.NetCoreDemo.Helper
{
Expand All @@ -42,16 +42,16 @@ public override void Process(TagHelperContext context, TagHelperOutput output)

var alt = context.AllAttributes["alt"]?.Value.ToString();
var width =
Convert.ToInt32(context.AllAttributes["width"] == null
? "500"
Convert.ToInt32(String.IsNullOrEmpty(context.AllAttributes["width"]?.Value.ToString())
? "1"
: context.AllAttributes["width"].Value.ToString());
var height =
Convert.ToInt32(context.AllAttributes["height"] == null
? "500"
Convert.ToInt32(String.IsNullOrEmpty(context.AllAttributes["height"]?.Value.ToString())
? "1"
: context.AllAttributes["height"].Value.ToString());
var margin =
Convert.ToInt32(context.AllAttributes["margin"] == null
? "5"
Convert.ToInt32(String.IsNullOrEmpty(context.AllAttributes["margin"]?.Value.ToString())
? "0"
: context.AllAttributes["margin"].Value.ToString());
var barcodeformat = BarcodeFormat.QR_CODE;
var outputformat = OutputFormat.PNG;
Expand Down Expand Up @@ -88,7 +88,7 @@ private void GeneratePng(TagHelperOutput output, string content, BarcodeFormat b
var qrWriter = new ZXing.BarcodeWriterPixelData
{
Format = barcodeformat,
Options = new QrCodeEncodingOptions { Height = height, Width = width, Margin = margin }
Options = new EncodingOptions { Height = height, Width = width, Margin = margin }
};


Expand Down Expand Up @@ -131,7 +131,7 @@ private void GenerateSvg(TagHelperOutput output, string content, BarcodeFormat b
var qrWriter = new ZXing.BarcodeWriterSvg
{
Format = barcodeformat,
Options = new QrCodeEncodingOptions { Height = height, Width = width, Margin = margin }
Options = new EncodingOptions { Height = height, Width = width, Margin = margin }
};


Expand Down
8 changes: 4 additions & 4 deletions Clients/ASP.NetCoreDemo/Views/Home/Encode.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div class="form-group">
<div class="col-md-10">
<p>Content:</p>
<input type="text" name="content" />
<input type="text" name="content" value="@ViewData["BarcodeContent"]" required />
</div>
<div class="col-md-10">
<p>Type:</p>
Expand All @@ -23,15 +23,15 @@
</div>
<div class="col-md-10">
<p>Width:</p>
<input type="text" name="width" value="500" />
<input type="text" name="width" value="@ViewData["BarcodeWidth"]" />
</div>
<div class="col-md-10">
<p>Height:</p>
<input type="text" name="height" value="500" />
<input type="text" name="height" value="@ViewData["BarcodeHeight"]" />
</div>
<div class="col-md-10">
<p>Margin:</p>
<input type="text" name="margin" value="5" />
<input type="text" name="margin" value="@ViewData["BarcodeMargin"]" />
</div>
</div>
<div class="form-group">
Expand Down
28 changes: 28 additions & 0 deletions Source/Bindings/ZXing.Kinect/project.V1.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<version>0.16.0</version>
<authors>Michael Jahn</authors>
<owners>Michael Jahn</owners>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
<projectUrl>https://github.com/micjahn/ZXing.Net/</projectUrl>
<iconUrl>https://raw.githubusercontent.com/micjahn/ZXing.Net/master/Icons/logo.jpg</iconUrl>
<id>ZXing.Net.Bindings.Kinect.V1</id>
<title>ZXing.Net.Bindings.Kinect.V1</title>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>ZXing.Net Bindings for Kinect V1 - use Kinect with ZXing.Net for barcode reading</description>
<summary>ZXing.Net Bindings for Kinect V1</summary>
<releaseNotes></releaseNotes>
<tags>ZXing Kinect</tags>
<dependencies>
<group targetFramework="net40">
<dependency id="ZXing.Net" version="0.16.0.0" exclude="Build,Analyzers" />
</group>
</dependencies>
</metadata>
<files>
<file src="..\..\..\Build\Release\Bindings\kinect\V1\zxing.kinect.dll" target="lib\net40\zxing.kinect.dll" />
<file src="..\..\..\Build\Release\Bindings\kinect\V1\zxing.kinect.pdb" target="lib\net40\zxing.kinect.pdb" />
<file src="..\..\..\Build\Release\Bindings\kinect\V1\zxing.kinect.xml" target="lib\net40\zxing.kinect.xml" />
</files>
</package>
28 changes: 28 additions & 0 deletions Source/Bindings/ZXing.Kinect/project.V2.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<version>0.16.0</version>
<authors>Michael Jahn</authors>
<owners>Michael Jahn</owners>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
<projectUrl>https://github.com/micjahn/ZXing.Net/</projectUrl>
<iconUrl>https://raw.githubusercontent.com/micjahn/ZXing.Net/master/Icons/logo.jpg</iconUrl>
<id>ZXing.Net.Bindings.Kinect.V2</id>
<title>ZXing.Net.Bindings.Kinect.V2</title>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>ZXing.Net Bindings for Kinect V2 - use Kinect with ZXing.Net for barcode reading</description>
<summary>ZXing.Net Bindings for Kinect V2</summary>
<releaseNotes></releaseNotes>
<tags>ZXing Kinect</tags>
<dependencies>
<group targetFramework="net45">
<dependency id="ZXing.Net" version="0.16.0.0" exclude="Build,Analyzers" />
</group>
</dependencies>
</metadata>
<files>
<file src="..\..\..\Build\Release\Bindings\kinect\V2\zxing.kinect.dll" target="lib\net45\zxing.kinect.dll" />
<file src="..\..\..\Build\Release\Bindings\kinect\V2\zxing.kinect.pdb" target="lib\net45\zxing.kinect.pdb" />
<file src="..\..\..\Build\Release\Bindings\kinect\V2\zxing.kinect.xml" target="lib\net45\zxing.kinect.xml" />
</files>
</package>
16 changes: 9 additions & 7 deletions build_deployment.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ IF NOT EXIST "%BINARY_DIR%\wp7.1\zxing.wp7.1.dll" GOTO BINARY_WP71_NOT_FOUND
IF NOT EXIST "%BINARY_DIR%\wp8.0\zxing.wp8.0.dll" GOTO BINARY_WP80_NOT_FOUND
IF NOT EXIST "%BINARY_DIR%\monodroid\zxing.monoandroid.dll" GOTO BINARY_MONODROID_NOT_FOUND
IF NOT EXIST "%BINARY_DIR%\winmd\zxing.winmd" GOTO BINARY_WINRTCOMPONENTS_NOT_FOUND
IF NOT EXIST "%CURRENT_DIR%\Source\lib\netstandard\bin\Release\netstandard1.0\zxing.dll" GOTO BINARY_NETSTANDARD10_NOT_FOUND
IF NOT EXIST "%CURRENT_DIR%\Source\lib\netstandard\bin\Release\netstandard1.1\zxing.dll" GOTO BINARY_NETSTANDARD11_NOT_FOUND
IF NOT EXIST "%CURRENT_DIR%\Source\lib\netstandard\bin\Release\netstandard1.3\zxing.dll" GOTO BINARY_NETSTANDARD13_NOT_FOUND
IF NOT EXIST "%CURRENT_DIR%\Source\lib\ZXing.Net\bin\Release\netstandard1.0\zxing.dll" GOTO BINARY_NETSTANDARD10_NOT_FOUND
IF NOT EXIST "%CURRENT_DIR%\Source\lib\ZXing.Net\bin\Release\netstandard1.1\zxing.dll" GOTO BINARY_NETSTANDARD11_NOT_FOUND
IF NOT EXIST "%CURRENT_DIR%\Source\lib\ZXing.Net\bin\Release\netstandard1.3\zxing.dll" GOTO BINARY_NETSTANDARD13_NOT_FOUND
IF NOT EXIST "%CURRENT_DIR%\Source\Bindings\ZXing.CoreCompat.System.Drawing\bin\Release\netstandard1.3\zxing.corecompat.system.drawing.dll" GOTO BINARY_CORECOMPAT_NOT_FOUND
IF NOT EXIST "%CURRENT_DIR%\Source\Bindings\ZXing.ImageSharp\bin\Release\netstandard1.1\zxing.imagesharp.dll" GOTO BINARY_IMAGESHARP_NOT_FOUND
IF NOT EXIST "%BINARY_DIR%\Bindings\kinect\V1\zxing.kinect.dll" GOTO BINARY_KINECT_V1_NOT_FOUND
Expand Down Expand Up @@ -164,6 +164,8 @@ MKDIR "%SVN_EXPORT_DIR%\WinMD\Source\lib" >NUL: 2>&1
MKDIR "%SVN_EXPORT_DIR%\WinMD\Clients" >NUL: 2>&1

"%SVN_TOOL%" export --force "%SVN_URL%/Source/lib" "%SVN_EXPORT_DIR%\Base\Source\lib"
"%SVN_TOOL%" export --force "%SVN_URL%/Source/Bindings" "%SVN_EXPORT_DIR%\Base\Source\Bindings"
"%SVN_TOOL%" export --force "%SVN_URL%/Source/interop" "%SVN_EXPORT_DIR%\Base\Source\interop"
"%SVN_TOOL%" export --force "%SVN_URL%/Source/test/src" "%SVN_EXPORT_DIR%\Base\Source\test\src"
"%SVN_TOOL%" export --force "%SVN_URL%/Clients" "%SVN_EXPORT_DIR%\Base\Clients"
"%SVN_TOOL%" export --force "%SVN_URL%/3rdparty/AForge" "%SVN_EXPORT_DIR%\Base\3rdparty\AForge"
Expand All @@ -190,7 +192,7 @@ MKDIR "%SVN_EXPORT_DIR%\WinMD\Clients" >NUL: 2>&1
"%SVN_TOOL%" export --force "%SVN_URL_WINMD%/zxing.vs2012.sln" "%SVN_EXPORT_DIR%\WinMD"

CD "%SVN_EXPORT_DIR%"
"%ZIP_TOOL%" a -tzip -mx9 -r "%FILENAME_SOURCE%" Base\Source\lib\*.* Base\Source\test\src\*.* Base\Clients\*.* Base\3rdparty\*.* Base\Key\*.* Base\zxing.sln Base\zxing.ce.sln Base\zxing.vs2012.sln Base\zxing.vs2015.sln Base\zxing.monoandroid.sln Base\zxing.monotouch.sln Base\zxing.nunit Base\THANKS Base\COPYING WinMD\Source\lib\*.* WinMD\Clients\*.* WinMD\Key\*.* WinMD\zxing.vs2012.sln
"%ZIP_TOOL%" a -tzip -mx9 -r "%FILENAME_SOURCE%" Base\Source\lib\*.* Base\Source\Bindings\*.* Base\Source\interop\*.* Base\Source\test\src\*.* Base\Clients\*.* Base\3rdparty\*.* Base\Key\*.* Base\zxing.sln Base\zxing.ce.sln Base\zxing.vs2012.sln Base\zxing.vs2015.sln Base\zxing.monoandroid.sln Base\zxing.monotouch.sln Base\zxing.nunit Base\THANKS Base\COPYING WinMD\Source\lib\*.* WinMD\Clients\*.* WinMD\Key\*.* WinMD\zxing.vs2012.sln
CD "%CURRENT_DIR%"

RMDIR /S /Q "%SVN_EXPORT_DIR%" >NUL: 2>&1
Expand Down Expand Up @@ -396,21 +398,21 @@ GOTO END

:BINARY_NETSTANDARD10_NOT_FOUND
ECHO The .Net Standard 1.0 binaries
ECHO %CURRENT_DIR%\Source\lib\netstandard\bin\Release\netstandard1.0\...
ECHO %CURRENT_DIR%\Source\lib\ZXing.Net\bin\Release\netstandard1.0\...
ECHO weren't found.
ECHO.
GOTO END

:BINARY_NETSTANDARD11_NOT_FOUND
ECHO The .Net Standard 1.1 binaries
ECHO %CURRENT_DIR%\Source\lib\netstandard\bin\Release\netstandard1.1\...
ECHO %CURRENT_DIR%\Source\lib\ZXing.Net\bin\Release\netstandard1.1\...
ECHO weren't found.
ECHO.
GOTO END

:BINARY_NETSTANDARD13_NOT_FOUND
ECHO The .Net Standard 1.3 binaries
ECHO %CURRENT_DIR%\Source\lib\netstandard\bin\Release\netstandard1.3\...
ECHO %CURRENT_DIR%\Source\lib\ZXing.Net\bin\Release\netstandard1.3\...
ECHO weren't found.
ECHO.
GOTO END
Expand Down
14 changes: 7 additions & 7 deletions nuget-pack.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ SET OUTDIR=Build\Deployment
mkdir %OUTDIR%

3rdParty\nuget\nuget pack zxing.nuspec -outputdirectory %OUTDIR%
3rdParty\nuget\nuget pack Source\adapters\ZXing.CoreCompat.System.Drawing\project.nuspec -outputdirectory %OUTDIR%
3rdParty\nuget\nuget pack Source\adapters\ZXing.ImageSharp\project.nuspec -outputdirectory %OUTDIR%
3rdParty\nuget\nuget pack Source\adapters\ZXing.Magick\project.nuspec -outputdirectory %OUTDIR%
3rdParty\nuget\nuget pack Source\adapters\ZXing.OpenCV\project.nuspec -outputdirectory %OUTDIR%
3rdParty\nuget\nuget pack Source\adapters\ZXing.SkiaSharp\project.nuspec -outputdirectory %OUTDIR%
3rdParty\nuget\nuget pack Source\adapters\ZXing.Kinect\project.V1.nuspec -outputdirectory %OUTDIR%
3rdParty\nuget\nuget pack Source\adapters\ZXing.Kinect\project.V2.nuspec -outputdirectory %OUTDIR%
3rdParty\nuget\nuget pack Source\Bindings\ZXing.CoreCompat.System.Drawing\project.nuspec -outputdirectory %OUTDIR%
3rdParty\nuget\nuget pack Source\Bindings\ZXing.ImageSharp\project.nuspec -outputdirectory %OUTDIR%
3rdParty\nuget\nuget pack Source\Bindings\ZXing.Magick\project.nuspec -outputdirectory %OUTDIR%
3rdParty\nuget\nuget pack Source\Bindings\ZXing.OpenCV\project.nuspec -outputdirectory %OUTDIR%
3rdParty\nuget\nuget pack Source\Bindings\ZXing.SkiaSharp\project.nuspec -outputdirectory %OUTDIR%
3rdParty\nuget\nuget pack Source\Bindings\ZXing.Kinect\project.V1.nuspec -outputdirectory %OUTDIR%
3rdParty\nuget\nuget pack Source\Bindings\ZXing.Kinect\project.V2.nuspec -outputdirectory %OUTDIR%
16 changes: 8 additions & 8 deletions nuget-push.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ SET VERSION=0.16.0
echo Next step - uploading all nuget packages to nuget.org...
pause

3rdParty\nuget\nuget push Build\Deployment\%ID%.%VERSION%.nupkg
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.CoreCompat.System.Drawing.%VERSION%-beta.nupkg
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.ImageSharp.%VERSION%-beta.nupkg
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.Kinect.V1.%VERSION%.nupkg
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.Kinect.V2.%VERSION%.nupkg
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.Magick.%VERSION%.nupkg
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.OpenCV.%VERSION%.nupkg
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.SkiaSharp.%VERSION%.nupkg
3rdParty\nuget\nuget push Build\Deployment\%ID%.%VERSION%.nupkg -Source https://www.nuget.org/api/v2/package
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.CoreCompat.System.Drawing.%VERSION%-beta.nupkg -Source https://www.nuget.org/api/v2/package
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.ImageSharp.%VERSION%-beta.nupkg -Source https://www.nuget.org/api/v2/package
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.Kinect.V1.%VERSION%.nupkg -Source https://www.nuget.org/api/v2/package
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.Kinect.V2.%VERSION%.nupkg -Source https://www.nuget.org/api/v2/package
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.Magick.%VERSION%.nupkg -Source https://www.nuget.org/api/v2/package
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.OpenCV.%VERSION%.nupkg -Source https://www.nuget.org/api/v2/package
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.SkiaSharp.%VERSION%.nupkg -Source https://www.nuget.org/api/v2/package
18 changes: 9 additions & 9 deletions zxing.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ It is now compatible with .Net 2.0, .Net 3.5, .Net 4.0, .Net 4.5, .Net 4.6, .Net
<file src="Build\Release\uwp\zxing.pdb" target="lib\uap10\zxing.pdb" />
<file src="Build\Release\uwp\zxing.xml" target="lib\uap10\zxing.xml" />
<file src="Build\Release\uwp\zxing.pri" target="lib\uap10\zxing.pri" />
<file src="Build\Release\netstandard1.0\zxing.dll" target="lib\netstandard1.0\zxing.dll" />
<file src="Build\Release\netstandard1.0\zxing.pdb" target="lib\netstandard1.0\zxing.pdb" />
<file src="Build\Release\netstandard1.0\zxing.xml" target="lib\netstandard1.0\zxing.xml" />
<file src="Build\Release\netstandard1.1\zxing.dll" target="lib\netstandard1.1\zxing.dll" />
<file src="Build\Release\netstandard1.1\zxing.pdb" target="lib\netstandard1.1\zxing.pdb" />
<file src="Build\Release\netstandard1.1\zxing.xml" target="lib\netstandard1.1\zxing.xml" />
<file src="Build\Release\netstandard1.3\zxing.dll" target="lib\netstandard1.3\zxing.dll" />
<file src="Build\Release\netstandard1.3\zxing.pdb" target="lib\netstandard1.3\zxing.pdb" />
<file src="Build\Release\netstandard1.3\zxing.xml" target="lib\netstandard1.3\zxing.xml" />
<file src="Build\Release\netstandard\1.0\zxing.dll" target="lib\netstandard1.0\zxing.dll" />
<file src="Build\Release\netstandard\1.0\zxing.pdb" target="lib\netstandard1.0\zxing.pdb" />
<file src="Build\Release\netstandard\1.0\zxing.xml" target="lib\netstandard1.0\zxing.xml" />
<file src="Build\Release\netstandard\1.1\zxing.dll" target="lib\netstandard1.1\zxing.dll" />
<file src="Build\Release\netstandard\1.1\zxing.pdb" target="lib\netstandard1.1\zxing.pdb" />
<file src="Build\Release\netstandard\1.1\zxing.xml" target="lib\netstandard1.1\zxing.xml" />
<file src="Build\Release\netstandard\1.3\zxing.dll" target="lib\netstandard1.3\zxing.dll" />
<file src="Build\Release\netstandard\1.3\zxing.pdb" target="lib\netstandard1.3\zxing.pdb" />
<file src="Build\Release\netstandard\1.3\zxing.xml" target="lib\netstandard1.3\zxing.xml" />
</files>
</package>

0 comments on commit 25e1294

Please sign in to comment.