Skip to content

Commit 3e4ada3

Browse files
committed
Build: Support referencing GirCore via project reference
To enable easy debugging of GirCore libraries, the msbuild property "GirCoreSource" can be set to a path where the GirCore source is located. If this property is set the GirCore package references will be replaced by project references which point to the local GirCore source.
1 parent 6fdf969 commit 3e4ada3

13 files changed

Lines changed: 58 additions & 18 deletions

Directory.Build.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@
1111
<Authors>PintaProject</Authors>
1212
<Company />
1313
<Product />
14+
15+
<GirCoreSource>/home/marcel/Programmieren/github/gir.core</GirCoreSource>
1416
</PropertyGroup>
1517
</Project>

Directory.Packages.props

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<Project>
22
<PropertyGroup>
33
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4+
<GirCoreVersion>0.6.3</GirCoreVersion>
45
</PropertyGroup>
56
<ItemGroup>
6-
<PackageVersion Include="GirCore.Adw-1" Version="0.6.3" />
7-
<PackageVersion Include="GirCore.GObject-2.0.Integration" Version="0.6.3" />
8-
<PackageVersion Include="GirCore.Gtk-4.0" Version="0.6.3" />
9-
<PackageVersion Include="GirCore.PangoCairo-1.0" Version="0.6.3" />
7+
<PackageVersion Include="GirCore.Adw-1" Version="$(GirCoreVersion)" />
8+
<PackageVersion Include="GirCore.GObject-2.0.Integration" Version="$(GirCoreVersion)" />
9+
<PackageVersion Include="GirCore.Gtk-4.0" Version="$(GirCoreVersion)" />
10+
<PackageVersion Include="GirCore.PangoCairo-1.0" Version="$(GirCoreVersion)" />
1011
<!-- Note: at least 1.4.2-alpha3 is required for fixes to uninstalling addins, from https://github.com/mono/mono-addins/pull/198 -->
1112
<PackageVersion Include="Mono.Addins" Version="1.4.2-alpha.4" />
1213
<PackageVersion Include="Mono.Addins.Setup" Version="1.4.2-alpha.4" />

Pinta.Core/Pinta.Core.csproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
<PropertyGroup>
33
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
44
</PropertyGroup>
5+
6+
<Import Project="../targets/AddReferenceGirCoreAdw1.target" />
7+
<Import Project="../targets/AddReferenceGirCorePangoCairo10.target" />
8+
59
<ItemGroup>
610
<PackageReference Include="NGettext" />
711
<PackageReference Include="ParagonClipper" />
8-
<PackageReference Include="GirCore.Adw-1" />
9-
<PackageReference Include="GirCore.PangoCairo-1.0" />
1012
<PackageReference Include="Mono.Addins" />
1113
</ItemGroup>
1214
<ItemGroup>

Pinta.Docking/Pinta.Docking.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="../targets/AddReferenceGirCoreAdw1.target" />
3+
24
<ItemGroup>
35
<ProjectReference Include="..\Pinta.Core\Pinta.Core.csproj" />
46
</ItemGroup>
5-
<ItemGroup>
6-
<PackageReference Include="GirCore.Adw-1" />
7-
</ItemGroup>
87
</Project>

Pinta.Gui.Addins/Pinta.Gui.Addins.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="../targets/AddReferenceGirCoreAdw1.target" />
3+
<Import Project="../targets/AddReferenceGirCoreGObject20Integration.target" />
4+
25
<ItemGroup>
3-
<PackageReference Include="GirCore.Adw-1" />
4-
<PackageReference Include="GirCore.GObject-2.0.Integration" />
56
<PackageReference Include="Mono.Addins" />
67
<PackageReference Include="Mono.Addins.Setup" />
78
</ItemGroup>

Pinta.Gui.Widgets/Pinta.Gui.Widgets.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<PropertyGroup>
33
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
44
</PropertyGroup>
5-
<ItemGroup>
6-
<PackageReference Include="GirCore.GObject-2.0.Integration" />
7-
</ItemGroup>
5+
6+
<Import Project="../targets/AddReferenceGirCoreGObject20Integration.target" />
7+
88
<ItemGroup>
99
<ProjectReference Include="..\Pinta.Core\Pinta.Core.csproj" />
1010
</ItemGroup>

Pinta.Resources/Pinta.Resources.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
<LogicalName>style.css</LogicalName>
6464
</EmbeddedResource>
6565
</ItemGroup>
66-
<ItemGroup>
67-
<PackageReference Include="GirCore.Gtk-4.0" />
68-
</ItemGroup>
66+
67+
<Import Project="../targets/AddReferenceGirCoreGtk40.target" />
6968
</Project>

Pinta.sln

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ EndProject
2929
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6DE60B92-C365-4DB5-9D5F-956317DD2E19}"
3030
ProjectSection(SolutionItems) = preProject
3131
.editorconfig = .editorconfig
32+
Directory.Build.props = Directory.Build.props
33+
Directory.Packages.props = Directory.Packages.props
3234
EndProjectSection
3335
EndProject
3436
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pinta.Gui.Addins", "Pinta.Gui.Addins\Pinta.Gui.Addins.csproj", "{2460CAAF-37BA-4795-8C86-7DFCB57F94A5}"
@@ -39,6 +41,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "installer", "installer", "{
3941
EndProject
4042
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pinta.AddinUtils", "installer\addins\Pinta.AddinUtils.csproj", "{90F56F18-1720-4F89-A5F9-6CA710CC9694}"
4143
EndProject
44+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "targets", "targets", "{38B8CD22-1CA6-4176-A4DE-ED43A1B6557F}"
45+
ProjectSection(SolutionItems) = preProject
46+
targets\AddReferenceGirCoreAdw1.target = targets\AddReferenceGirCoreAdw1.target
47+
targets\AddReferenceGirCorePangoCairo10.target = targets\AddReferenceGirCorePangoCairo10.target
48+
targets\AddReferenceGirCoreGObject20Integration.target = targets\AddReferenceGirCoreGObject20Integration.target
49+
targets\AddReferenceGirCoreGtk40.target = targets\AddReferenceGirCoreGtk40.target
50+
EndProjectSection
51+
EndProject
4252
Global
4353
GlobalSection(SolutionConfigurationPlatforms) = preSolution
4454
Debug|Any CPU = Debug|Any CPU
@@ -102,6 +112,7 @@ Global
102112
{8A8B7C9F-4AE0-4E2B-A4DF-CBABCD0DE864} = {8D23D7B9-C97E-498C-A1C5-6159E305D9BA}
103113
{3062EBB6-E84B-4EFF-BAB2-E0EAFF7EF755} = {8D23D7B9-C97E-498C-A1C5-6159E305D9BA}
104114
{90F56F18-1720-4F89-A5F9-6CA710CC9694} = {ADED7547-5FA7-4157-951F-1CA5C933B4F7}
115+
{38B8CD22-1CA6-4176-A4DE-ED43A1B6557F} = {6DE60B92-C365-4DB5-9D5F-956317DD2E19}
105116
EndGlobalSection
106117
GlobalSection(ExtensibilityGlobals) = postSolution
107118
SolutionGuid = {4985F1D9-0ABE-4E83-98D2-8D119EA4075D}

Pinta/Pinta.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
<BuildTranslations>false</BuildTranslations>
1111
</PropertyGroup>
1212

13+
<Import Project="../targets/AddReferenceGirCoreAdw1.target" />
14+
1315
<ItemGroup>
1416
<PackageReference Include="Tmds.DBus" />
15-
<PackageReference Include="GirCore.Adw-1" />
1617
<PackageReference Include="Mono.Addins" />
1718
<PackageReference Include="Mono.Addins.Setup" />
1819
<PackageReference Include="Mono.Addins.CecilReflector" />
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Project>
2+
<ItemGroup>
3+
<ProjectReference Condition="'$(GirCoreSource)' != ''" Include="$(GirCoreSource)/src/Libs/Adw-1/Adw-1.csproj" />
4+
<PackageReference Condition="'$(GirCoreSource)' == ''" Include="GirCore.Adw-1" />
5+
</ItemGroup>
6+
</Project>

0 commit comments

Comments
 (0)