Skip to content

Commit

Permalink
Merge pull request #189 from csturm83/feature/single-project
Browse files Browse the repository at this point in the history
Feature/single project
  • Loading branch information
codebude authored Mar 25, 2020
2 parents a45f953 + a714a3e commit 57e32d2
Show file tree
Hide file tree
Showing 35 changed files with 1,506 additions and 1,152 deletions.
13 changes: 0 additions & 13 deletions CheckBinaries.bat

This file was deleted.

2 changes: 0 additions & 2 deletions Compile.bat

This file was deleted.

5 changes: 0 additions & 5 deletions Compile_Single.bat

This file was deleted.

57 changes: 13 additions & 44 deletions MyGet.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,58 +3,27 @@ set config=%1
if "%config%" == "" (
set config=Release
)

set version=1.3.7
if not "%PackageVersion%" == "" (
set version=%PackageVersion%
)

echo Working dir: %cd%

echo Create template folders

mkdir Build
mkdir Build\lib
mkdir Build\lib\net35
mkdir Build\lib\net40
mkdir Build\lib\netcore
mkdir Build\lib\netstandard2.0

echo Compile single projects

"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" QRCoder\QRCoder.csproj /p:Configuration="%config%";VisualStudioVersion=15.0 /tv:15.0 /v:M /fl /flp:LogFile=msbuild.log;Verbosity=diag /nr:false /t:Rebuild
copy "QRCoder\bin\%config%\net35\*.dll" "Build\lib\net35"
del /F /S /Q "QRCoder\bin"
del /F /S /Q "QRCoder\obj"

"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" QRCoder\QRCoder.NET40.csproj /p:Configuration="%config%";VisualStudioVersion=15.0 /tv:15.0 /v:M /fl /flp:LogFile=msbuild.log;Verbosity=diag /nr:false /t:Rebuild
copy "QRCoder\bin\%config%\net40\*.dll" "Build\lib\net40"
del /F /S /Q "QRCoder\bin"
del /F /S /Q "QRCoder\obj"

"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" QRCoder\QRCoderProject.Portable.csproj /p:Configuration="%config%";VisualStudioVersion=15.0 /tv:15.0 /v:M /fl /flp:LogFile=msbuild.log;Verbosity=diag /nr:false /t:Rebuild
copy "QRCoder\bin\%config%\netcore\*.dll" "Build\lib\netcore"
del /F /S /Q "QRCoder\bin"
del /F /S /Q "QRCoder\obj"

dotnet build /p:Configuration="%config%" QRCoder\QRCoder.NETCore20.csproj
copy "QRCoder\bin\%config%\netstandard2.0\*.dll" "Build\lib\netstandard2.0"
del /F /S /Q "QRCoder\bin"
del /F /S /Q "QRCoder\obj"
dotnet clean -c %config%

dotnet build -c %config% || EXIT /B 1

echo Assembly information

powershell -Command "[Reflection.Assembly]::ReflectionOnlyLoadFrom(\"%cd%\Build\lib\net35\QRCoder.dll\").ImageRuntimeVersion"
certUtil -hashfile "Build\lib\net35\QRCoder.dll" md5
powershell -Command "[Reflection.Assembly]::ReflectionOnlyLoadFrom(\"%cd%\QRCoder\bin\%config%\net35\QRCoder.dll\").ImageRuntimeVersion"
certUtil -hashfile "QRCoder\bin\%config%\net35\QRCoder.dll" md5

powershell -Command "[Reflection.Assembly]::ReflectionOnlyLoadFrom(\"%cd%\QRCoder\bin\%config%\net40\QRCoder.dll\").ImageRuntimeVersion"
certUtil -hashfile "QRCoder\bin\%config%\net40\QRCoder.dll" md5

powershell -Command "[Reflection.Assembly]::ReflectionOnlyLoadFrom(\"%cd%\Build\lib\net40\QRCoder.dll\").ImageRuntimeVersion"
certUtil -hashfile "Build\lib\net40\QRCoder.dll" md5
powershell -Command "[Reflection.Assembly]::ReflectionOnlyLoadFrom(\"%cd%\QRCoder\bin\%config%\netstandard1.1\QRCoder.dll\").ImageRuntimeVersion"
certUtil -hashfile "QRCoder\bin\%config%\netstandard1.1\QRCoder.dll" md5

powershell -Command "[Reflection.Assembly]::ReflectionOnlyLoadFrom(\"%cd%\Build\lib\netcore\QRCoder.dll\").ImageRuntimeVersion"
certUtil -hashfile "Build\lib\netcore\QRCoder.dll" md5
powershell -Command "[Reflection.Assembly]::ReflectionOnlyLoadFrom(\"%cd%\QRCoder\bin\%config%\netstandard2.0\QRCoder.dll\").ImageRuntimeVersion"
certUtil -hashfile "QRCoder\bin\%config%\netstandard2.0\QRCoder.dll" md5

powershell -Command "[Reflection.Assembly]::ReflectionOnlyLoadFrom(\"%cd%\Build\lib\netstandard2.0\QRCoder.dll\").ImageRuntimeVersion"
certUtil -hashfile "Build\lib\netstandard2.0\QRCoder.dll" md5
dotnet test QRCoderTests\QRCoderTests.csproj || EXIT /B 1

call %NuGet% pack "QRCoder.nuspec" -NoPackageAnalysis -verbosity detailed -o Build -Version %version% -p Configuration="%config%"
dotnet pack QRCoder\QRCoder.csproj -c %config% --no-build
25 changes: 0 additions & 25 deletions QRCoder.NETCore20.sln

This file was deleted.

40 changes: 0 additions & 40 deletions QRCoder.nuspec

This file was deleted.

113 changes: 113 additions & 0 deletions QRCoder.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QRCoder", "QRCoder\QRCoder.csproj", "{AA6BE23A-7813-4D2A-835E-B673631AE9F1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QRCoderConsole", "QRCoderConsole\QRCoderConsole.csproj", "{014F04C6-6099-4552-9A4F-D09C6E39D576}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QRCoderDemo", "QRCoderDemo\QRCoderDemo.csproj", "{CA6DB0F5-DB6C-4DDD-8B5F-EF82FBB963E9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QRCoderDemoUWP", "QRCoderDemoUWP\QRCoderDemoUWP.csproj", "{61933D20-DB1F-4EE8-AC8E-3A2316CDD20C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QRCoderTests", "QRCoderTests\QRCoderTests.csproj", "{1B51624B-9915-4ED6-8FC1-1B7C472246E5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AA6BE23A-7813-4D2A-835E-B673631AE9F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AA6BE23A-7813-4D2A-835E-B673631AE9F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA6BE23A-7813-4D2A-835E-B673631AE9F1}.Debug|ARM.ActiveCfg = Debug|Any CPU
{AA6BE23A-7813-4D2A-835E-B673631AE9F1}.Debug|ARM.Build.0 = Debug|Any CPU
{AA6BE23A-7813-4D2A-835E-B673631AE9F1}.Debug|x64.ActiveCfg = Debug|Any CPU
{AA6BE23A-7813-4D2A-835E-B673631AE9F1}.Debug|x64.Build.0 = Debug|Any CPU
{AA6BE23A-7813-4D2A-835E-B673631AE9F1}.Debug|x86.ActiveCfg = Debug|Any CPU
{AA6BE23A-7813-4D2A-835E-B673631AE9F1}.Debug|x86.Build.0 = Debug|Any CPU
{AA6BE23A-7813-4D2A-835E-B673631AE9F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AA6BE23A-7813-4D2A-835E-B673631AE9F1}.Release|Any CPU.Build.0 = Release|Any CPU
{AA6BE23A-7813-4D2A-835E-B673631AE9F1}.Release|ARM.ActiveCfg = Release|Any CPU
{AA6BE23A-7813-4D2A-835E-B673631AE9F1}.Release|ARM.Build.0 = Release|Any CPU
{AA6BE23A-7813-4D2A-835E-B673631AE9F1}.Release|x64.ActiveCfg = Release|Any CPU
{AA6BE23A-7813-4D2A-835E-B673631AE9F1}.Release|x64.Build.0 = Release|Any CPU
{AA6BE23A-7813-4D2A-835E-B673631AE9F1}.Release|x86.ActiveCfg = Release|Any CPU
{AA6BE23A-7813-4D2A-835E-B673631AE9F1}.Release|x86.Build.0 = Release|Any CPU
{014F04C6-6099-4552-9A4F-D09C6E39D576}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{014F04C6-6099-4552-9A4F-D09C6E39D576}.Debug|Any CPU.Build.0 = Debug|Any CPU
{014F04C6-6099-4552-9A4F-D09C6E39D576}.Debug|ARM.ActiveCfg = Debug|Any CPU
{014F04C6-6099-4552-9A4F-D09C6E39D576}.Debug|ARM.Build.0 = Debug|Any CPU
{014F04C6-6099-4552-9A4F-D09C6E39D576}.Debug|x64.ActiveCfg = Debug|Any CPU
{014F04C6-6099-4552-9A4F-D09C6E39D576}.Debug|x64.Build.0 = Debug|Any CPU
{014F04C6-6099-4552-9A4F-D09C6E39D576}.Debug|x86.ActiveCfg = Debug|Any CPU
{014F04C6-6099-4552-9A4F-D09C6E39D576}.Debug|x86.Build.0 = Debug|Any CPU
{014F04C6-6099-4552-9A4F-D09C6E39D576}.Release|Any CPU.ActiveCfg = Release|Any CPU
{014F04C6-6099-4552-9A4F-D09C6E39D576}.Release|Any CPU.Build.0 = Release|Any CPU
{014F04C6-6099-4552-9A4F-D09C6E39D576}.Release|ARM.ActiveCfg = Release|Any CPU
{014F04C6-6099-4552-9A4F-D09C6E39D576}.Release|ARM.Build.0 = Release|Any CPU
{014F04C6-6099-4552-9A4F-D09C6E39D576}.Release|x64.ActiveCfg = Release|Any CPU
{014F04C6-6099-4552-9A4F-D09C6E39D576}.Release|x64.Build.0 = Release|Any CPU
{014F04C6-6099-4552-9A4F-D09C6E39D576}.Release|x86.ActiveCfg = Release|Any CPU
{014F04C6-6099-4552-9A4F-D09C6E39D576}.Release|x86.Build.0 = Release|Any CPU
{CA6DB0F5-DB6C-4DDD-8B5F-EF82FBB963E9}.Debug|Any CPU.ActiveCfg = Debug|x86
{CA6DB0F5-DB6C-4DDD-8B5F-EF82FBB963E9}.Debug|ARM.ActiveCfg = Debug|x86
{CA6DB0F5-DB6C-4DDD-8B5F-EF82FBB963E9}.Debug|x64.ActiveCfg = Debug|x86
{CA6DB0F5-DB6C-4DDD-8B5F-EF82FBB963E9}.Debug|x86.ActiveCfg = Debug|x86
{CA6DB0F5-DB6C-4DDD-8B5F-EF82FBB963E9}.Debug|x86.Build.0 = Debug|x86
{CA6DB0F5-DB6C-4DDD-8B5F-EF82FBB963E9}.Release|Any CPU.ActiveCfg = Release|x86
{CA6DB0F5-DB6C-4DDD-8B5F-EF82FBB963E9}.Release|ARM.ActiveCfg = Release|x86
{CA6DB0F5-DB6C-4DDD-8B5F-EF82FBB963E9}.Release|x64.ActiveCfg = Release|x86
{CA6DB0F5-DB6C-4DDD-8B5F-EF82FBB963E9}.Release|x86.ActiveCfg = Release|x86
{CA6DB0F5-DB6C-4DDD-8B5F-EF82FBB963E9}.Release|x86.Build.0 = Release|x86
{61933D20-DB1F-4EE8-AC8E-3A2316CDD20C}.Debug|Any CPU.ActiveCfg = Debug|x86
{61933D20-DB1F-4EE8-AC8E-3A2316CDD20C}.Debug|ARM.ActiveCfg = Debug|ARM
{61933D20-DB1F-4EE8-AC8E-3A2316CDD20C}.Debug|ARM.Build.0 = Debug|ARM
{61933D20-DB1F-4EE8-AC8E-3A2316CDD20C}.Debug|ARM.Deploy.0 = Debug|ARM
{61933D20-DB1F-4EE8-AC8E-3A2316CDD20C}.Debug|x64.ActiveCfg = Debug|x64
{61933D20-DB1F-4EE8-AC8E-3A2316CDD20C}.Debug|x64.Build.0 = Debug|x64
{61933D20-DB1F-4EE8-AC8E-3A2316CDD20C}.Debug|x64.Deploy.0 = Debug|x64
{61933D20-DB1F-4EE8-AC8E-3A2316CDD20C}.Debug|x86.ActiveCfg = Debug|x86
{61933D20-DB1F-4EE8-AC8E-3A2316CDD20C}.Debug|x86.Build.0 = Debug|x86
{61933D20-DB1F-4EE8-AC8E-3A2316CDD20C}.Debug|x86.Deploy.0 = Debug|x86
{61933D20-DB1F-4EE8-AC8E-3A2316CDD20C}.Release|Any CPU.ActiveCfg = Release|x86
{61933D20-DB1F-4EE8-AC8E-3A2316CDD20C}.Release|ARM.ActiveCfg = Release|ARM
{61933D20-DB1F-4EE8-AC8E-3A2316CDD20C}.Release|ARM.Build.0 = Release|ARM
{61933D20-DB1F-4EE8-AC8E-3A2316CDD20C}.Release|ARM.Deploy.0 = Release|ARM
{61933D20-DB1F-4EE8-AC8E-3A2316CDD20C}.Release|x64.ActiveCfg = Release|x64
{61933D20-DB1F-4EE8-AC8E-3A2316CDD20C}.Release|x64.Build.0 = Release|x64
{61933D20-DB1F-4EE8-AC8E-3A2316CDD20C}.Release|x64.Deploy.0 = Release|x64
{61933D20-DB1F-4EE8-AC8E-3A2316CDD20C}.Release|x86.ActiveCfg = Release|x86
{61933D20-DB1F-4EE8-AC8E-3A2316CDD20C}.Release|x86.Build.0 = Release|x86
{61933D20-DB1F-4EE8-AC8E-3A2316CDD20C}.Release|x86.Deploy.0 = Release|x86
{1B51624B-9915-4ED6-8FC1-1B7C472246E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1B51624B-9915-4ED6-8FC1-1B7C472246E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1B51624B-9915-4ED6-8FC1-1B7C472246E5}.Debug|ARM.ActiveCfg = Debug|Any CPU
{1B51624B-9915-4ED6-8FC1-1B7C472246E5}.Debug|ARM.Build.0 = Debug|Any CPU
{1B51624B-9915-4ED6-8FC1-1B7C472246E5}.Debug|x64.ActiveCfg = Debug|Any CPU
{1B51624B-9915-4ED6-8FC1-1B7C472246E5}.Debug|x64.Build.0 = Debug|Any CPU
{1B51624B-9915-4ED6-8FC1-1B7C472246E5}.Debug|x86.ActiveCfg = Debug|Any CPU
{1B51624B-9915-4ED6-8FC1-1B7C472246E5}.Debug|x86.Build.0 = Debug|Any CPU
{1B51624B-9915-4ED6-8FC1-1B7C472246E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1B51624B-9915-4ED6-8FC1-1B7C472246E5}.Release|Any CPU.Build.0 = Release|Any CPU
{1B51624B-9915-4ED6-8FC1-1B7C472246E5}.Release|ARM.ActiveCfg = Release|Any CPU
{1B51624B-9915-4ED6-8FC1-1B7C472246E5}.Release|ARM.Build.0 = Release|Any CPU
{1B51624B-9915-4ED6-8FC1-1B7C472246E5}.Release|x64.ActiveCfg = Release|Any CPU
{1B51624B-9915-4ED6-8FC1-1B7C472246E5}.Release|x64.Build.0 = Release|Any CPU
{1B51624B-9915-4ED6-8FC1-1B7C472246E5}.Release|x86.ActiveCfg = Release|Any CPU
{1B51624B-9915-4ED6-8FC1-1B7C472246E5}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F1845CDF-5EE5-456F-B6C8-717E4E2284F4}
EndGlobalSection
EndGlobal
5 changes: 4 additions & 1 deletion QRCoder/Base64QRCode.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
#if NETFRAMEWORK || NETSTANDARD2_0
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
Expand Down Expand Up @@ -104,3 +105,5 @@ public static string GetQRCode(string plainText, int pixelsPerModule, string dar
}
}
}

#endif
5 changes: 4 additions & 1 deletion QRCoder/PostscriptQRCode.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
#if NETFRAMEWORK || NETSTANDARD2_0
using System;
using System.Drawing;
using static QRCoder.QRCodeGenerator;

Expand Down Expand Up @@ -149,3 +150,5 @@ public static string GetQRCode(string plainText, int pointsPerModule, string dar
}
}
}

#endif
4 changes: 2 additions & 2 deletions QRCoder/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die mit einer Assembly verknüpft sind.
[assembly: AssemblyTitle("QRCoder")]
[assembly: AssemblyDescription("A free-to-use QR code library")]
[assembly: AssemblyDescription("QRCoder is a simple library, written in C#.NET, which enables you to create QR Codes. It's licensed under the MIT-license.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("www.code-bude.net")]
[assembly: AssemblyProduct("QRCoder")]
[assembly: AssemblyCopyright("Free to use (MIT license)")]
[assembly: AssemblyCopyright("Copyright © www.code-bude.net / Raffael Herrmann. All rights reserved.")]
[assembly: AssemblyTrademark("written by Raffael Herrmann")]
[assembly: AssemblyCulture("")]

Expand Down
3 changes: 3 additions & 0 deletions QRCoder/QRCode.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if NETFRAMEWORK || NETSTANDARD2_0
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
Expand Down Expand Up @@ -155,3 +156,5 @@ public static Bitmap GetQRCode(string plainText, int pixelsPerModule, Color dark
}
}
}

#endif
4 changes: 2 additions & 2 deletions QRCoder/QRCodeData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public QRCodeData(int version)
for (var i = 0; i < size; i++)
this.ModuleMatrix.Add(new BitArray(size));
}
#if !PCL
#if NETFRAMEWORK || NETSTANDARD2_0
public QRCodeData(string pathToRawData, Compression compressMode) : this(File.ReadAllBytes(pathToRawData), compressMode)
{
}
Expand Down Expand Up @@ -154,7 +154,7 @@ public byte[] GetRawData(Compression compressMode)
return rawData;
}

#if !PCL
#if NETFRAMEWORK || NETSTANDARD2_0
public void SaveRawData(string filePath, Compression compressMode)
{
File.WriteAllBytes(filePath, GetRawData(compressMode));
Expand Down
6 changes: 3 additions & 3 deletions QRCoder/QRCodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ public static int MaskCode(ref QRCodeData qrCode, int version, ref List<Rectangl
var size = qrCode.ModuleMatrix.Count;


#if NET40
#if NETFRAMEWORK
var methods = typeof (MaskPattern).GetMethods();
#else
var methods = typeof (MaskPattern).GetTypeInfo().DeclaredMethods;
Expand Down Expand Up @@ -453,7 +453,7 @@ public static int MaskCode(ref QRCodeData qrCode, int version, ref List<Rectangl



#if NET40
#if NETFRAMEWORK
var patterMethod = typeof(MaskPattern).GetMethods().First(x => x.Name == patternName);
#else
var patterMethod = typeof(MaskPattern).GetTypeInfo().GetDeclaredMethod(patternName);
Expand Down Expand Up @@ -1088,7 +1088,7 @@ private static string ConvertToIso8859(string value, string Iso = "ISO-8859-2")
Encoding utf8 = Encoding.UTF8;
byte[] utfBytes = utf8.GetBytes(value);
byte[] isoBytes = Encoding.Convert(utf8, iso, utfBytes);
#if !PCL
#if NETFRAMEWORK || NETSTANDARD2_0
return iso.GetString(isoBytes);
#else
return iso.GetString(isoBytes, 0, isoBytes.Length);
Expand Down
Loading

0 comments on commit 57e32d2

Please sign in to comment.