Skip to content

Commit dac971d

Browse files
authored
Merge pull request #42 from cwensley/console-integration
Installer and build updates, include .msi
2 parents db26da8 + 3b498bb commit dac971d

File tree

8 files changed

+171
-146
lines changed

8 files changed

+171
-146
lines changed

.github/workflows/build.yml

+102-97
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
12
name: Build
23

34
on:
45
push:
5-
branches: [ main ]
6-
tags: [ '*' ]
6+
branches: [main]
7+
tags: ["*"]
78
pull_request:
8-
branches: [ main ]
9+
branches: [main]
910

1011
env:
1112
DotNetVersion: "6.0.x"
@@ -16,108 +17,114 @@ jobs:
1617
build-windows:
1718
runs-on: windows-latest
1819
steps:
19-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v2
2021

21-
- uses: actions/setup-dotnet@v1
22-
with:
23-
dotnet-version: ${{ env.DotNetVersion }}
22+
- uses: actions/setup-dotnet@v1
23+
with:
24+
dotnet-version: ${{ env.DotNetVersion }}
2425

25-
- name: Build PabloDraw
26-
run: dotnet publish Source/PabloDraw/PabloDraw.csproj ${{ env.BuildParameters }} /bl:artifacts/log/pablodraw-windows.binlog
26+
- uses: microsoft/[email protected]
2727

28-
- name: Build PabloDraw.Console
29-
run: dotnet publish Source/PabloDraw.Console/PabloDraw.Console.cxproj ${{ env.BuildParameters }} /bl:artifacts/log/pablodraw.console-windows.binlog
28+
- name: Build PabloDraw
29+
run: dotnet publish Source/PabloDraw/PabloDraw.csproj ${{ env.BuildParameters }} /bl:artifacts/log/pablodraw-windows.binlog
3030

31-
- uses: actions/upload-artifact@v2
32-
with:
33-
name: pablodraw-windows-x64
34-
path: artifacts/bin/PabloDraw/${{ env.BuildConfiguration }}/net6.0-windows/win-x64/publish/*
35-
36-
- uses: actions/upload-artifact@v2
37-
with:
38-
name: pablodraw-windows-x64
39-
path: artifacts/bin/PabloDraw.Console/x64/${{ env.BuildConfiguration }}/*
40-
41-
- name: Upload log files
42-
if: ${{ failure() }}
43-
uses: actions/upload-artifact@v2
44-
with:
45-
name: log
46-
path: artifacts/log/**/*
31+
- name: Build PabloDraw.Console
32+
run: dotnet publish Source/PabloDraw.Console/PabloDraw.Console.cxproj ${{ env.BuildParameters }} /bl:artifacts/log/pablodraw.console-windows.binlog
33+
34+
- name: Build msi
35+
run: msbuild ${{ env.BuildParameters }} Source/PabloDraw.WindowsInstaller/PabloDraw.WindowsInstaller.wixproj
36+
37+
- uses: actions/upload-artifact@v2
38+
with:
39+
name: pablodraw-windows-binaries-x64
40+
path: artifacts/publish/${{ env.BuildConfiguration }}/Windows/*
41+
42+
- uses: actions/upload-artifact@v2
43+
with:
44+
name: pablodraw-windows-installer-x64
45+
path: artifacts/installer/${{ env.BuildConfiguration }}/Windows/*.msi
46+
47+
- name: Upload log files
48+
if: ${{ failure() }}
49+
uses: actions/upload-artifact@v2
50+
with:
51+
name: log
52+
path: artifacts/log/**/*
4753

4854
build-linux:
4955
runs-on: ubuntu-latest
5056
steps:
51-
- uses: actions/checkout@v2
57+
- uses: actions/checkout@v2
5258

53-
- uses: actions/setup-dotnet@v1
54-
with:
55-
dotnet-version: ${{ env.DotNetVersion }}
59+
- uses: actions/setup-dotnet@v1
60+
with:
61+
dotnet-version: ${{ env.DotNetVersion }}
5662

57-
- name: Build PabloDraw
58-
run: dotnet publish Source/PabloDraw/PabloDraw.csproj ${{ env.BuildParameters }} /bl:artifacts/log/pablodraw-linux.binlog
63+
- name: Build PabloDraw
64+
run: dotnet publish Source/PabloDraw/PabloDraw.csproj ${{ env.BuildParameters }} /bl:artifacts/log/pablodraw-linux.binlog
65+
66+
- name: Create gzip
67+
run: tar -czvf pablodraw.tar.gz -C artifacts/publish/${{ env.BuildConfiguration }}/Linux .
5968

60-
- uses: actions/upload-artifact@v2
61-
with:
62-
name: pablodraw-linux-x64
63-
path: artifacts/bin/PabloDraw/${{ env.BuildConfiguration }}/net6.0/linux-x64/publish/*
69+
- uses: actions/upload-artifact@v2
70+
with:
71+
name: pablodraw-linux-binaries-x64
72+
path: pablodraw.tar.gz
6473

65-
- name: Upload log files
66-
if: ${{ failure() }}
67-
uses: actions/upload-artifact@v2
68-
with:
69-
name: log
70-
path: artifacts/log/**/*
74+
- name: Upload log files
75+
if: ${{ failure() }}
76+
uses: actions/upload-artifact@v2
77+
with:
78+
name: log
79+
path: artifacts/log/**/*
7180

7281
build-mac:
7382
runs-on: macos-11
7483
steps:
75-
- uses: actions/checkout@v2
76-
77-
- uses: actions/setup-dotnet@v1
78-
with:
79-
dotnet-version: ${{ env.DotNetVersion }}
80-
81-
- uses: maxim-lobanov/setup-xamarin@v1
82-
with:
83-
mono-version: latest
84-
xamarin-mac-version: latest
85-
xcode-version: 13.1
86-
87-
- name: Import code signing certificate
88-
if: github.event_name != 'pull_request'
89-
uses: apple-actions/import-codesign-certs@v1
90-
with:
91-
p12-file-base64: ${{ secrets.DEVID_CERTIFICATE_P12 }}
92-
p12-password: ${{ secrets.DEVID_CERTIFICATE_P12_PASSWORD }}
93-
94-
- name: Enable code signing
95-
if: github.event_name != 'pull_request'
96-
run: echo "BuildParameters=${{ env.BuildParameters }} /p:EnableCodeSigning=True" >> $GITHUB_ENV
97-
98-
- name: Set notarization credentials
99-
if: startsWith(github.ref, 'refs/tags/')
100-
run: |
101-
xcrun altool --store-password-in-keychain-item "AC_PASSWORD" -u "${{ secrets.AC_USERNAME }}" -p "${{ secrets.AC_PASSWORD }}"
102-
echo "BuildParameters=${{ env.BuildParameters }} /p:EnableNotarization=True" >> $GITHUB_ENV
103-
104-
- name: Build PabloDraw
105-
run: dotnet build Source/PabloDraw/PabloDraw.csproj ${{ env.BuildParameters }} /bl:artifacts/log/pablodraw-mac.binlog
106-
107-
- uses: actions/upload-artifact@v2
108-
with:
109-
name: pablodraw-mac
110-
path: artifacts/bin/PabloDraw/${{ env.BuildConfiguration }}/net6.0/PabloDraw.dmg
111-
112-
- name: Upload log files
113-
if: ${{ failure() }}
114-
uses: actions/upload-artifact@v2
115-
with:
116-
name: log
117-
path: artifacts/log/**/*
118-
84+
- uses: actions/checkout@v2
85+
86+
- uses: actions/setup-dotnet@v1
87+
with:
88+
dotnet-version: ${{ env.DotNetVersion }}
89+
90+
- uses: maxim-lobanov/setup-xcode@v1
91+
with:
92+
xcode-version: 13.1
93+
94+
- name: Import code signing certificate
95+
if: github.event_name != 'pull_request'
96+
uses: apple-actions/import-codesign-certs@v1
97+
with:
98+
p12-file-base64: ${{ secrets.DEVID_CERTIFICATE_P12 }}
99+
p12-password: ${{ secrets.DEVID_CERTIFICATE_P12_PASSWORD }}
100+
101+
- name: Enable code signing
102+
if: github.event_name != 'pull_request'
103+
run: echo "BuildParameters=${{ env.BuildParameters }} /p:EnableCodeSigning=True" >> $GITHUB_ENV
104+
105+
- name: Set notarization credentials
106+
if: startsWith(github.ref, 'refs/tags/')
107+
run: |
108+
xcrun altool --store-password-in-keychain-item "AC_PASSWORD" -u "${{ secrets.AC_USERNAME }}" -p "${{ secrets.AC_PASSWORD }}"
109+
echo "BuildParameters=${{ env.BuildParameters }} /p:EnableNotarization=True" >> $GITHUB_ENV
110+
111+
- name: Build PabloDraw
112+
run: dotnet build Source/PabloDraw/PabloDraw.csproj ${{ env.BuildParameters }} /bl:artifacts/log/pablodraw-mac.binlog
113+
114+
- uses: actions/upload-artifact@v2
115+
with:
116+
name: pablodraw-mac
117+
path: artifacts/bin/PabloDraw/${{ env.BuildConfiguration }}/net6.0/PabloDraw.dmg
118+
119+
- name: Upload log files
120+
if: ${{ failure() }}
121+
uses: actions/upload-artifact@v2
122+
with:
123+
name: log
124+
path: artifacts/log/**/*
125+
119126
update-release:
120-
needs: [ build-windows, build-mac, build-linux ]
127+
needs: [build-windows, build-mac, build-linux]
121128
runs-on: ubuntu-latest
122129
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
123130
steps:
@@ -128,14 +135,12 @@ jobs:
128135
uses: bruceadams/[email protected]
129136
env:
130137
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
131-
138+
132139
- uses: actions/download-artifact@v2
133140

134-
# - uses: actions/upload-release-asset@v1
135-
# env:
136-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
137-
# with:
138-
# upload_url: ${{ steps.get_release.outputs.upload_url }}
139-
# asset_path:
140-
# asset_name:
141-
# asset_content_type: application/octet-stream
141+
- uses: softprops/action-gh-release@v1
142+
with:
143+
files: |
144+
**/*.msi
145+
**/*.dmg
146+
**/*.tar.gz

.vscode/settings.json

+1-6
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,5 @@
55
"var": {
66
"BuildConfiguration": "Debug"
77
},
8-
"files.associations": {
9-
"chrono": "cpp",
10-
"filesystem": "cpp",
11-
"string": "cpp"
12-
},
13-
"clangd.path": "clangd"
8+
// "clangd.path": "clangd"
149
}

.vscode/tasks.json

+18-6
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"tasks": [
66
{
77
"label": "build",
8-
"command": "dotnet",
98
"type": "shell",
9+
"command": "dotnet",
1010
"args": [
1111
"build",
1212
"${workspaceFolder}/Source/Pablo Desktop.sln",
@@ -22,10 +22,10 @@
2222
},
2323
{
2424
"label": "build-pablodraw-console",
25-
"command": "dotnet",
2625
"type": "shell",
26+
"command": "dotnet",
2727
"args": [
28-
"build",
28+
"publish",
2929
"${workspaceFolder}/Source/PabloDraw.Console/PabloDraw.Console.cxproj",
3030
// "/p:BuildTarget=Linux",
3131
"/p:Configuration=${config:var.BuildConfiguration}",
@@ -40,8 +40,8 @@
4040
},
4141
{
4242
"label": "build-pablodraw",
43-
"command": "dotnet",
4443
"type": "shell",
44+
"command": "dotnet",
4545
"args": [
4646
"build",
4747
"${workspaceFolder}/Source/PabloDraw/PabloDraw.csproj",
@@ -58,8 +58,8 @@
5858
},
5959
{
6060
"label": "publish-pablodraw",
61-
"command": "dotnet",
6261
"type": "shell",
62+
"command": "dotnet",
6363
"args": [
6464
"publish",
6565
"${workspaceFolder}/Source/PabloDraw/PabloDraw.csproj",
@@ -91,13 +91,14 @@
9191
},
9292
{
9393
"label": "build-windows-installer",
94-
"command": "msbuild",
9594
"type": "shell",
95+
"command": "${input:msbuild}",
9696
"args": [
9797
"/t:Build",
9898
"${workspaceFolder}/Source/PabloDraw.WindowsInstaller/PabloDraw.WindowsInstaller.wixproj",
9999
"/p:Configuration=${config:var.BuildConfiguration}",
100100
"/p:GenerateFullPaths=true",
101+
"/v:Minimal",
101102
"/consoleloggerparameters:NoSummary"
102103
],
103104
"group": "build",
@@ -106,5 +107,16 @@
106107
},
107108
"problemMatcher": "$msCompile"
108109
}
110+
],
111+
"inputs": [
112+
{
113+
"id": "msbuild",
114+
"type": "command",
115+
"command": "shellCommand.execute",
116+
"args": {
117+
"command": "\"%ProgramFiles(x86)%\\Microsoft Visual Studio\\Installer\\vswhere.exe\" -version \"[16,18)\" -latest -products * -requires Microsoft.Component.MSBuild -find MSBuild\\**\\Bin\\MSBuild.exe",
118+
"useFirstResult": "true"
119+
}
120+
}
109121
]
110122
}

Source/Directory.Build.props

+13-10
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
11
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
3+
<PropertyGroup Condition="$(BuildTarget) == ''">
4+
<BuildTarget Condition="$([MSBuild]::IsOSPlatform(Windows))">Windows</BuildTarget>
5+
<BuildTarget Condition="$([MSBuild]::IsOSPlatform(OSX))">Mac</BuildTarget>
6+
<BuildTarget Condition="$([MSBuild]::IsOSPlatform(Linux))">Linux</BuildTarget>
7+
</PropertyGroup>
8+
29
<PropertyGroup>
310
<Company>Picoe Software Solutions</Company>
411
<Copyright>(c) 2006-2021 by Curtis Wensley aka Eto</Copyright>
5-
<Version>3.3.0-dev</Version>
12+
<Version Condition="$(Version) == ''">3.3.11-dev</Version>
613

7-
<BasePath>$(MSBuildThisFileDirectory)..\</BasePath>
14+
<BasePath>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\'))</BasePath>
815
<ArtifactsDir>$(BasePath)artifacts\</ArtifactsDir>
916

1017
<DebugType>embedded</DebugType>
18+
<NoWarn>NU1701</NoWarn>
1119

12-
<BaseIntermediateOutputPath Condition="$(BaseIntermediateOutputPath) == ''">$(ArtifactsDir)obj\$(OS)\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
13-
<OutputArtifactName Condition="$(OutputArtifactName) == ''">bin</OutputArtifactName>
14-
<BaseOutputPath Condition="$(BaseOutputPath) == ''">$(ArtifactsDir)$(OutputArtifactName)\$(MSBuildProjectName)\</BaseOutputPath>
20+
<BaseIntermediateOutputPath Condition="$(BaseIntermediateOutputPath) == ''">$(ArtifactsDir)obj\$(BuildTarget)\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
21+
<BaseOutputPath Condition="$(BaseOutputPath) == ''">$(ArtifactsDir)bin\$(MSBuildProjectName)\</BaseOutputPath>
1522
<PackageOutputPath Condition="$(PackageOutputPath) == ''">$(ArtifactsDir)nuget\$(Configuration)\</PackageOutputPath>
1623
<RestoreProjectStyle Condition="'$(RestoreProjectStyle)' == ''">PackageReference</RestoreProjectStyle>
24+
<PublishDir Condition="$(PublishDir) == ''">$(ArtifactsDir)publish\$(Configuration)\$(BuildTarget)\</PublishDir>
1725

1826
<!-- Uncomment to use Eto from source -->
1927
<!-- <EtoBasePath>..\..\..\Eto\</EtoBasePath> -->
2028

2129
</PropertyGroup>
2230

23-
<PropertyGroup Condition="$(BuildTarget) == ''">
24-
<BuildTarget Condition="$([MSBuild]::IsOSPlatform(Windows))">Windows</BuildTarget>
25-
<BuildTarget Condition="$([MSBuild]::IsOSPlatform(OSX))">Mac</BuildTarget>
26-
<BuildTarget Condition="$([MSBuild]::IsOSPlatform(Linux))">Linux</BuildTarget>
27-
</PropertyGroup>
2831

2932
</Project>

Source/Pablo/BGI/BGICanvas.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -2310,7 +2310,7 @@ public void UpdateRegion(IList<Rectangle> rects, Graphics graphics = null)
23102310
return;
23112311

23122312
var platform = Platform.Instance;
2313-
if (true) //platform.IsWpf || platform.IsIos || platform.IsMac || platform.IsWinForms)
2313+
// if (platform.IsWpf || platform.IsIos || platform.IsMac || platform.IsWinForms)
23142314
{
23152315
Application.Instance.AsyncInvoke(delegate
23162316
{
@@ -2332,6 +2332,7 @@ public void UpdateRegion(IList<Rectangle> rects, Graphics graphics = null)
23322332
}
23332333
});
23342334
}
2335+
#if disabled
23352336
else
23362337
{
23372338
/**/
@@ -2539,6 +2540,7 @@ public void UpdateRegion(IList<Rectangle> rects, Graphics graphics = null)
25392540
}
25402541
});
25412542
}
2543+
#endif
25422544
}
25432545
}
25442546

0 commit comments

Comments
 (0)