Skip to content

Commit ce1b9fb

Browse files
authored
Merge pull request #59 from fluffynuts/update-build-system
Update build system
2 parents 918aed6 + 3fe5131 commit ce1b9fb

File tree

335 files changed

+36564
-9830
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

335 files changed

+36564
-9830
lines changed

.circleci/config.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: 2.1
2+
3+
orbs:
4+
win: circleci/[email protected]
5+
6+
jobs:
7+
build:
8+
executor: win/default
9+
10+
steps:
11+
- checkout
12+
- run: npm ci --no-progress
13+
- run: npm run dump-env
14+
- run: npm test
15+
- run: npm run release
16+
- store_artifacts:
17+
path: build/package/log4net.2.0.9.nupkg

.gitignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ publish/
137137
# Publish Web Output
138138
*.[Pp]ublish.xml
139139
*.azurePubxml
140-
# TODO: Comment the next line if you want to checkin your web deploy settings
140+
# TODO: Comment the next line if you want to checkin your web deploy settings
141141
# but database connection strings (with potential passwords) will be unencrypted
142142
*.pubxml
143143
*.publishproj
@@ -235,3 +235,11 @@ target
235235
# other files to ignore
236236
old-log4net.snk
237237
src/GeneratedAssemblyInfo.cs
238+
.idea
239+
*.orig
240+
*.old
241+
*.swp
242+
build-tools
243+
buildreports
244+
vs_buildtools.exe
245+
dotnetfx35.exe

BUILDING.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## Building log4net
2+
3+
Log4net provides support for a wide array of targets, including
4+
- older .net 2 and 3.5 (including client profiles)
5+
- more modern net40/net45
6+
- netstandard1.3/2.0
7+
8+
As such, it does require a relatively full .net environment on Windows to build.
9+
10+
Options:
11+
- build locally. Suggested environment:
12+
- Pre-requisites:
13+
- Visual Studio 2019 Build Tools
14+
- include desktop targets at least
15+
- include dotnet core targets or download and install
16+
the latest dotnet sdk (you will need at least v2.1)
17+
- Ensure you have .NET Framework 3.5 SP1 installed
18+
- on Win10+, this can only be installed via Add/Remove Windows Components
19+
- on other platforms, see https://dotnet.microsoft.com/download/dotnet-framework/net35-sp1
20+
- Building against .net 2/3.5, especially Client Profile, is not supported on Mono
21+
- Binaries can be built with a Visual Studio or Rider installation
22+
- Binaries, packages and a release zip can be built via commandline
23+
- Ensure that you have a reasonably modern NodeJS installed (at least version 8+)
24+
- `npm ci`
25+
- `npm run build`
26+
- optionally `npm test` to run all tests
27+
- optionally `npm run release` to generate release artifacts
28+
- build via the vs2019 Windows AppVeyer image. There is an appveyer.yml file
29+
included which (should) build if you set up AppVeyer to track
30+
your fork. AppVeyer is free for open-source projects.
31+
(TODO: should have a link to the official AppVeyer build)
32+
- build via the CircleCI Windows image. There is included configuration for CircleCI.
33+
CicleCI is free (with usage limitations) for open-source projects.

appveyer.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 1.0.{build}
2+
image: Visual Studio 2019
3+
build_script:
4+
- cmd: >-
5+
npm ci
6+
npm test
7+
npm run release
8+
9+
artifacts:
10+
- path: build/artifacts/*

build-with-docker-for-windows.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docker run -v %~dp0%:C:\dev -v %USERPROFILE%\.nuget\packages:C:\packages -t davydm/net-build-tools:vs2019 "npm ci; npm run build"

install-net-framework-3.5.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Write-Host "Downloading dotnetfx35.exe"
2+
Invoke-WebRequest -Uri "https://download.microsoft.com/download/2/0/E/20E90413-712F-438C-988E-FDAA79A8AC3D/dotnetfx35.exe" -OutFile dotnetfx35.exe
3+
Write-Host "Running dotnetfx35.exe"
4+
Start-Process -FilePath dotnetfx35.exe -ArgumentList "/wait","/passive" -Wait
5+
Write-Host "dotnetfx35 installed"
6+

local-tasks/zip.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const
2+
gulp = requireModule("gulp-with-help"),
3+
promisify = requireModule("promisify-stream"),
4+
readNuspecVersion = requireModule("read-nuspec-version"),
5+
zip = require("gulp-zip");
6+
7+
gulp.task("zip", async () => {
8+
const version = await readNuspecVersion("log4net.nuspec");
9+
return promisify(
10+
gulp.src("build/Release/**/*")
11+
.pipe(zip(`log4net-binaries-${version}.zip`))
12+
.pipe(gulp.dest("build/artifacts"))
13+
);
14+
});

log4net.nuspec

Lines changed: 68 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -32,62 +32,96 @@ At the same time, log output can be so voluminous that it quickly becomes overwh
3232
log4net is designed with two distinct goals in mind: speed and flexibility</description>
3333
<authors>The Apache Software Foundation</authors>
3434
<owners>Apache Logging Project, Jiří Činčura</owners>
35-
<licenseUrl>http://logging.apache.org/log4net/license.html</licenseUrl>
35+
<license type="expression">Apache-2.0</license>
3636
<projectUrl>http://logging.apache.org/log4net/</projectUrl>
37-
<iconUrl>https://www.apache.org/images/feather.png</iconUrl>
37+
<icon>package-icon.png</icon>
3838
<copyright>Copyright 2004-2017 The Apache Software Foundation</copyright>
3939
<requireLicenseAcceptance>false</requireLicenseAcceptance>
4040
<tags>logging log tracing logfiles</tags>
4141
<dependencies>
42-
<group targetFramework="net20-full" />
43-
<group targetFramework="net35-full" />
44-
<group targetFramework="net40-full" />
45-
<group targetFramework="net45-full" />
42+
<group targetFramework="net20" />
43+
<group targetFramework="net35" />
44+
<group targetFramework="net40" />
45+
<group targetFramework="net45" />
4646
<group targetFramework="net35-client" />
4747
<group targetFramework="net40-client" />
48-
<group targetFramework=".NETStandard1.3">
49-
<dependency id="System.AppContext" version="[4.1.0, )" />
48+
<group targetFramework="netstandard1.3">
49+
<dependency id="System.AppContext" version="[4.3.0, )" />
5050
<dependency id="System.Collections.NonGeneric" version="[4.0.1, )" />
51-
<dependency id="System.Console" version="[4.0.0, )" />
52-
<dependency id="System.Diagnostics.Debug" version="[4.0.11, )" />
51+
<dependency id="System.Console" version="[4.3.0, )" />
52+
<dependency id="System.Diagnostics.Debug" version="[4.3.0, )" />
5353
<dependency id="System.Diagnostics.Process" version="[4.1.0, )" />
5454
<dependency id="System.Diagnostics.StackTrace" version="[4.0.1, )" />
5555
<dependency id="System.Diagnostics.TraceSource" version="[4.0.0, )" />
56-
<dependency id="System.IO.FileSystem" version="[4.0.1, )" />
56+
<dependency id="System.IO.FileSystem" version="[4.3.0, )" />
5757
<dependency id="System.IO.FileSystem.Watcher" version="[4.0.0, )" />
58-
<dependency id="System.Linq" version="[4.1.0, )" />
58+
<dependency id="System.Linq" version="[4.3.0, )" />
5959
<dependency id="System.Net.NameResolution" version="[4.0.0, )" />
6060
<dependency id="System.Net.Requests" version="[4.0.11, )" />
61-
<dependency id="System.Net.Sockets" version="[4.1.0, )" />
61+
<dependency id="System.Net.Sockets" version="[4.3.0, )" />
6262
<dependency id="System.Reflection" version="[4.3.0, )" />
63-
<dependency id="System.Reflection.Extensions" version="[4.0.1, )" />
63+
<dependency id="System.Reflection.Extensions" version="[4.3.0, )" />
6464
<dependency id="System.Reflection.TypeExtensions" version="[4.1.0, )" />
65-
<dependency id="System.Runtime.Extensions" version="[4.1.0, )" />
66-
<dependency id="System.Runtime.InteropServices" version="[4.1.0, )" />
67-
<dependency id="System.Runtime.InteropServices.RuntimeInformation" version="[4.0.0, )" />
65+
<dependency id="System.Runtime.Extensions" version="[4.3.0, )" />
66+
<dependency id="System.Runtime.InteropServices" version="[4.3.0, )" />
67+
<dependency id="System.Runtime.InteropServices.RuntimeInformation" version="[4.3.0, )" />
6868
<dependency id="System.Runtime.Serialization.Formatters" version="[4.3.0, )" />
69-
<dependency id="System.Text.RegularExpressions" version="[4.1.0, )" />
70-
<dependency id="System.Threading" version="[4.0.11, )" />
69+
<dependency id="System.Text.RegularExpressions" version="[4.3.0, )" />
70+
<dependency id="System.Text.Encoding" version="[4.3.0, )" />
71+
<dependency id="System.Threading" version="[4.3.0, )" />
7172
<dependency id="System.Threading.Thread" version="[4.0.0, )" />
72-
<dependency id="System.Threading.Timer" version="[4.0.1, )" />
73-
<dependency id="System.Xml.ReaderWriter" version="[4.0.11, )" />
73+
<dependency id="System.Threading.Timer" version="[4.3.0, )" />
74+
<dependency id="System.Xml.ReaderWriter" version="[4.3.0, )" />
75+
<dependency id="System.Xml.XmlDocument" version="[4.0.1, )" />
76+
</group>
77+
<group targetFramework="netstandard2.0">
78+
<dependency id="System.AppContext" version="[4.3.0, )" />
79+
<dependency id="System.Collections.NonGeneric" version="[4.0.1, )" />
80+
<dependency id="System.Console" version="[4.3.0, )" />
81+
<dependency id="System.Diagnostics.Debug" version="[4.3.0, )" />
82+
<dependency id="System.Diagnostics.Process" version="[4.1.0, )" />
83+
<dependency id="System.Diagnostics.StackTrace" version="[4.0.1, )" />
84+
<dependency id="System.Diagnostics.TraceSource" version="[4.0.0, )" />
85+
<dependency id="System.IO.FileSystem" version="[4.3.0, )" />
86+
<dependency id="System.IO.FileSystem.Watcher" version="[4.0.0, )" />
87+
<dependency id="System.Linq" version="[4.3.0, )" />
88+
<dependency id="System.Net.NameResolution" version="[4.0.0, )" />
89+
<dependency id="System.Net.Requests" version="[4.0.11, )" />
90+
<dependency id="System.Net.Sockets" version="[4.3.0, )" />
91+
<dependency id="System.Reflection" version="[4.3.0, )" />
92+
<dependency id="System.Reflection.Extensions" version="[4.3.0, )" />
93+
<dependency id="System.Reflection.TypeExtensions" version="[4.1.0, )" />
94+
<dependency id="System.Runtime.Extensions" version="[4.3.0, )" />
95+
<dependency id="System.Runtime.InteropServices" version="[4.3.0, )" />
96+
<dependency id="System.Runtime.InteropServices.RuntimeInformation" version="[4.3.0, )" />
97+
<dependency id="System.Runtime.Serialization.Formatters" version="[4.3.0, )" />
98+
<dependency id="System.Text.RegularExpressions" version="[4.3.0, )" />
99+
<dependency id="System.Text.Encoding" version="[4.3.0, )" />
100+
<dependency id="System.Threading" version="[4.3.0, )" />
101+
<dependency id="System.Threading.Thread" version="[4.0.0, )" />
102+
<dependency id="System.Threading.Timer" version="[4.3.0, )" />
103+
<dependency id="System.Xml.ReaderWriter" version="[4.3.0, )" />
74104
<dependency id="System.Xml.XmlDocument" version="[4.0.1, )" />
75105
</group>
76106
</dependencies>
77107
</metadata>
78108
<files>
79-
<file src="bin\net\2.0\release\log4net.dll" target="lib\net20-full" />
80-
<file src="bin\net\2.0\release\log4net.xml" target="lib\net20-full" />
81-
<file src="bin\net\3.5\release\log4net.dll" target="lib\net35-full" />
82-
<file src="bin\net\3.5\release\log4net.xml" target="lib\net35-full" />
83-
<file src="bin\net\4.0\release\log4net.dll" target="lib\net40-full" />
84-
<file src="bin\net\4.0\release\log4net.xml" target="lib\net40-full" />
85-
<file src="bin\net\4.5\release\log4net.dll" target="lib\net45-full" />
86-
<file src="bin\net\4.5\release\log4net.xml" target="lib\net45-full" />
87-
<file src="bin\net-cp\3.5\release\log4net.dll" target="lib\net35-client" />
88-
<file src="bin\net-cp\3.5\release\log4net.xml" target="lib\net35-client" />
89-
<file src="bin\net-cp\4.0\release\log4net.dll" target="lib\net40-client" />
90-
<file src="bin\net-cp\4.0\release\log4net.xml" target="lib\net40-client" />
91-
<file src="bin\netstandard\1.3\Release\log4net.dll" target="lib\netstandard1.3" />
109+
<file src="package-icon.png" target="" />
110+
<file src="build\Release\net20\log4net.dll" target="lib\net20" />
111+
<file src="build\Release\net20\log4net.xml" target="lib\net20" />
112+
<file src="build\Release\net35\log4net.dll" target="lib\net35" />
113+
<file src="build\Release\net35\log4net.xml" target="lib\net35" />
114+
<file src="build\Release\net40\log4net.dll" target="lib\net40" />
115+
<file src="build\Release\net40\log4net.xml" target="lib\net40" />
116+
<file src="build\Release\net45\log4net.dll" target="lib\net45" />
117+
<file src="build\Release\net45\log4net.xml" target="lib\net45" />
118+
<file src="build\Release\net35-client\log4net.dll" target="lib\net35-client" />
119+
<file src="build\Release\net35-client\log4net.xml" target="lib\net35-client" />
120+
<file src="build\Release\net40-client\log4net.dll" target="lib\net40-client" />
121+
<file src="build\Release\net40-client\log4net.xml" target="lib\net40-client" />
122+
<file src="build\Release\netstandard1.3\log4net.dll" target="lib\netstandard1.3" />
123+
<file src="build\Release\netstandard1.3\log4net.xml" target="lib\netstandard1.3" />
124+
<file src="build\Release\netstandard2.0\log4net.dll" target="lib\netstandard2.0" />
125+
<file src="build\Release\netstandard2.0\log4net.xml" target="lib\netstandard2.0" />
92126
</files>
93127
</package>

package-icon.png

39.1 KB
Loading

0 commit comments

Comments
 (0)