Skip to content

Commit

Permalink
add installer manifest;
Browse files Browse the repository at this point in the history
  • Loading branch information
iSplasher committed Jan 5, 2024
1 parent 2a6a00f commit 4f96e1e
Show file tree
Hide file tree
Showing 15 changed files with 66 additions and 38 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
release:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
plugindir:
- "plugins/detect-running-game"
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ This repository contains the source code for the following Playnite extensions:
# Contributing

See the respective extension's README for more information.

## Building

1. Clone the repository
2. CD into the extension's directory
3. Run `dotnet build`
33 changes: 33 additions & 0 deletions common/common/common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<EnableDefaultApplicationDefinition>false</EnableDefaultApplicationDefinition>
<EnableDefaultPageItems>false</EnableDefaultPageItems>
<PublishDir>../../out/$(AssemblyName)</PublishDir>
</PropertyGroup>
<PropertyGroup Label="CI" Condition="'$(CI)' == ''">
Expand All @@ -39,6 +40,19 @@

<ItemGroup>
<PackageReference Include="PlayniteSDK" Version="6.11.0" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Management" />
<Reference Include="System.Web" />
<Reference Include="System.Net.Http" />
Expand All @@ -63,6 +77,7 @@
</PropertyGroup>

<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)/partials/Base/**/*.cs" />
<Compile Include="$(MSBuildThisFileDirectory)/src/**/*.cs" />
<Compile Include="$(MSBuildProjectDirectory)/src/**/*.cs" />
</ItemGroup>
Expand All @@ -80,6 +95,24 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

<ItemGroup>
<Page Include="$(MSBuildProjectDirectory)/src/**/*.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Update="$(MSBuildProjectDirectory)/**/*.xaml.cs" SubType="Code">
<DependentUpon>%(RecursiveDir)\%(Filename)</DependentUpon>
</Compile>
<!-- <Compile Update="$(MSBuildThisFileDirectory)/partials/Base/**/*.xaml.cs" SubType="Code"
DependentUpon="%(Filename)" /> -->
<!-- <Page Include="$(MSBuildThisFileDirectory)/partials/Base/**/*.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</Page> -->
</ItemGroup>


<ItemGroup>
<None Include="$(MSBuildProjectDirectory)/icon.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
1 change: 0 additions & 1 deletion common/common/genericplugin.targets
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
</PropertyGroup>

<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)/partials/Base/**/*.cs" />
<Compile Include="$(MSBuildThisFileDirectory)/partials/GenericPlugin/**/*.cs" />
</ItemGroup>
</Project>
1 change: 0 additions & 1 deletion common/common/libraryplugin.targets
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
</PropertyGroup>

<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)/partials/Base/**/*.cs" />
<Compile Include="$(MSBuildThisFileDirectory)/partials/LibraryPlugin/**/*.cs" />
</ItemGroup>
</Project>
25 changes: 0 additions & 25 deletions common/common/partials/Base/GameSettingsView.xaml.cs

This file was deleted.

2 changes: 2 additions & 0 deletions common/common/partials/Base/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ public override UserControl GetSettingsView(bool firstRunSettings)
GetSettingsViewPartial(view, firstRunSettings);
})) { }

log.Warn("GetSettingsView: " + view.ToString());

if (view == null)
{
return base.GetSettingsView(firstRunSettings);
Expand Down
2 changes: 1 addition & 1 deletion plugins/virtual-library/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The add-on currently fullfills my needs, so I can't guarantee I'll implement any

Adding a new source resolver is easy.

If you want to add support for a new source, you can do so by adding a new class in [`src/resolvers`](src/resolvers/) that implements the [`IResolver`](/src/Resolver.cs) interface.
If you want to add support for a new source, you can do so by adding a new class in [`src/resolvers`](src/resolvers/) that implements the [`IResolver`](src/Resolver.cs) interface.
The class will be instantiated and used through reflection, so you don't need to register it anywhere.

See how the existing resolvers are implemented for reference.
2 changes: 1 addition & 1 deletion plugins/virtual-library/VirtualLibrary.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="../../common/common/libraryplugin.targets" />

<PropertyGroup>
<AssemblyVersion>1.0.0</AssemblyVersion>
<AssemblyVersion>0.0.1</AssemblyVersion>
<AssemblyName>VirtualLibrary</AssemblyName>
<AssemblyTitle>Virtual Library</AssemblyTitle>

Expand Down
8 changes: 8 additions & 0 deletions plugins/virtual-library/installer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
AddonId: VirtualLibrary
Packages:
- Version: 0.0.1
RequiredApiVersion: 6.11.0
ReleaseDate: 2024-01-05
PackageUrl: https://github.com/iSplasher/PlayniteExtensions/releases/download/VirtualLibrary-v0.0.1/VirtualLibrary_0_0_1.pext
Changelog:
- See release notes on GitHub: https://github.com/iSplasher/PlayniteExtensions/releases
3 changes: 1 addition & 2 deletions plugins/virtual-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"build": "dotnet publish -c Debug",
"restore": "dotnet restore",
"release": "dotnet publish -c Release",
"clean": "dotnet clean",
"changelog": "git-cliff --config cliff.toml --repository ../../ --output CHANGELOG.md"
"clean": "dotnet clean"
}
}
6 changes: 3 additions & 3 deletions plugins/virtual-library/src/App.xaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Application.Resources>
<ResourceDictionary>
<Style x:Key="BaseTextBlockStyle" TargetType="TextBlock" />
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Localization/en_US.xaml" />
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Localization/en_US.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
Expand Down
6 changes: 4 additions & 2 deletions plugins/virtual-library/src/GameSettingsView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:p="clr-namespace:Plugin"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=p:GameSettingsViewModel}"
d:DesignHeight="400" d:DesignWidth="600">
<StackPanel>
<TextBlock Text="Description for Option1:" />
<TextBox Text="{Binding Settings.Option1}" />
<!-- <TextBox Text="{Binding Settings.Option1}" /> -->
<TextBlock Text="Description for Option2:" />
<CheckBox IsChecked="{Binding Settings.Option2}" />
<!-- <CheckBox IsChecked="{Binding Settings.Option2}" /> -->
</StackPanel>
</UserControl>
6 changes: 5 additions & 1 deletion plugins/virtual-library/src/GameSettingsView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@

namespace Plugin
{
public partial class GameSettingsView
public partial class GameSettingsView : UserControl
{
public GameSettingsView()
{
InitializeComponent();
}
}
}
2 changes: 1 addition & 1 deletion plugins/virtual-library/src/VirtualLibrary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ public partial class Plugin

static partial void ApplyPartialProps()
{
PartialProperties.HasSettings = false;
PartialProperties.HasSettings = true;
}

partial void Setup(IPlayniteAPI API)
Expand Down

0 comments on commit 4f96e1e

Please sign in to comment.