Skip to content

Commit

Permalink
Merge pull request #290 from MediaPortal/MP1-5207-MPEUpdater_Tools_fo…
Browse files Browse the repository at this point in the history
…r_Update_KnownExtensions_from_command_line

MP1-5207: MPEUpdater - Tools for Update KnownExtensions from command line
  • Loading branch information
andrewjswan authored Mar 24, 2024
2 parents ea0225a + 5e5f004 commit 134987f
Show file tree
Hide file tree
Showing 6 changed files with 226 additions and 2 deletions.
96 changes: 96 additions & 0 deletions mediaportal/MPE/MPEUpdater/MPEUpdater.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{23B79768-F683-401E-B19A-11B743F01FCC}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>MPEUpdater</RootNamespace>
<AssemblyName>MPEUpdater</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>MPI MediaPortal Updater.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MpeCore\MpeCore.csproj">
<Project>{4458F642-6022-4A3F-996F-E8AA510FB7E8}</Project>
<Name>MpeCore</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="MPI MediaPortal Updater.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Binary file not shown.
44 changes: 44 additions & 0 deletions mediaportal/MPE/MPEUpdater/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#region Copyright (C) 2024 Team MediaPortal

// Copyright (C) 2024 Team MediaPortal
// http://www.team-mediaportal.com
//
// MediaPortal is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 2 of the License, or
// (at your option) any later version.
//
// MediaPortal is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with MediaPortal. If not, see <http://www.gnu.org/licenses/>.

#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;

using MpeCore.Classes;

namespace MPEUpdater
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("MPE Updater version: {0}{1}", Assembly.GetExecutingAssembly().GetName().Version, (IntPtr.Size == 8) ? " | x64" : string.Empty);
Console.WriteLine("Update started at {0}", DateTime.Now.ToLongTimeString());

MpeCore.MpeInstaller.Init();
ExtensionUpdateDownloader.UpdateList(true, false, null, null);

Console.WriteLine("Update complete at {0}", DateTime.Now.ToLongTimeString());
}
}
}
56 changes: 56 additions & 0 deletions mediaportal/MPE/MPEUpdater/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#region Copyright (C) 2024 Team MediaPortal

// Copyright (C) 2024 Team MediaPortal
// http://www.team-mediaportal.com
//
// MediaPortal is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 2 of the License, or
// (at your option) any later version.
//
// MediaPortal is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with MediaPortal. If not, see <http://www.gnu.org/licenses/>.

#endregion

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("MPEUpdater")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MPEUpdater")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("23b79768-f683-401e-b19a-11b743f01fcc")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
27 changes: 27 additions & 0 deletions mediaportal/MediaPortal.sln
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WatchDogService.Interface", "..\Common-MP-TVE3\WatchDogService.Interface\WatchDogService.Interface.csproj", "{837CE7EA-60D4-4217-8D38-A8B5E6E1DB22}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MPEUpdater", "MPE\MPEUpdater\MPEUpdater.csproj", "{23B79768-F683-401E-B19A-11B743F01FCC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -1212,6 +1214,30 @@ Global
{837CE7EA-60D4-4217-8D38-A8B5E6E1DB22}.UseCaptureDefintionsRelease|x64.Build.0 = Release|x64
{837CE7EA-60D4-4217-8D38-A8B5E6E1DB22}.UseCaptureDefintionsRelease|x86.ActiveCfg = Release|x86
{837CE7EA-60D4-4217-8D38-A8B5E6E1DB22}.UseCaptureDefintionsRelease|x86.Build.0 = Release|x86
{23B79768-F683-401E-B19A-11B743F01FCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{23B79768-F683-401E-B19A-11B743F01FCC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{23B79768-F683-401E-B19A-11B743F01FCC}.Debug|x64.ActiveCfg = Debug|x64
{23B79768-F683-401E-B19A-11B743F01FCC}.Debug|x64.Build.0 = Debug|x64
{23B79768-F683-401E-B19A-11B743F01FCC}.Debug|x86.ActiveCfg = Debug|x86
{23B79768-F683-401E-B19A-11B743F01FCC}.Debug|x86.Build.0 = Debug|x86
{23B79768-F683-401E-B19A-11B743F01FCC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{23B79768-F683-401E-B19A-11B743F01FCC}.Release|Any CPU.Build.0 = Release|Any CPU
{23B79768-F683-401E-B19A-11B743F01FCC}.Release|x64.ActiveCfg = Release|x64
{23B79768-F683-401E-B19A-11B743F01FCC}.Release|x64.Build.0 = Release|x64
{23B79768-F683-401E-B19A-11B743F01FCC}.Release|x86.ActiveCfg = Release|x86
{23B79768-F683-401E-B19A-11B743F01FCC}.Release|x86.Build.0 = Release|x86
{23B79768-F683-401E-B19A-11B743F01FCC}.UseCaptureCardDefinitions|Any CPU.ActiveCfg = Debug|Any CPU
{23B79768-F683-401E-B19A-11B743F01FCC}.UseCaptureCardDefinitions|Any CPU.Build.0 = Debug|Any CPU
{23B79768-F683-401E-B19A-11B743F01FCC}.UseCaptureCardDefinitions|x64.ActiveCfg = Debug|Any CPU
{23B79768-F683-401E-B19A-11B743F01FCC}.UseCaptureCardDefinitions|x64.Build.0 = Debug|Any CPU
{23B79768-F683-401E-B19A-11B743F01FCC}.UseCaptureCardDefinitions|x86.ActiveCfg = Debug|Any CPU
{23B79768-F683-401E-B19A-11B743F01FCC}.UseCaptureCardDefinitions|x86.Build.0 = Debug|Any CPU
{23B79768-F683-401E-B19A-11B743F01FCC}.UseCaptureDefintionsRelease|Any CPU.ActiveCfg = Release|Any CPU
{23B79768-F683-401E-B19A-11B743F01FCC}.UseCaptureDefintionsRelease|Any CPU.Build.0 = Release|Any CPU
{23B79768-F683-401E-B19A-11B743F01FCC}.UseCaptureDefintionsRelease|x64.ActiveCfg = Release|Any CPU
{23B79768-F683-401E-B19A-11B743F01FCC}.UseCaptureDefintionsRelease|x64.Build.0 = Release|Any CPU
{23B79768-F683-401E-B19A-11B743F01FCC}.UseCaptureDefintionsRelease|x86.ActiveCfg = Release|Any CPU
{23B79768-F683-401E-B19A-11B743F01FCC}.UseCaptureDefintionsRelease|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1248,6 +1274,7 @@ Global
{03FEC69F-6D10-46FB-A0CA-4D266E4A21E2} = {40801059-099F-44C5-9802-3A926EF0FE87}
{06741964-B339-4FCF-B6E5-E0D32A434DA2} = {D214B2BD-4CA7-45CD-9EC5-CF7CC244C03A}
{C430B2F0-CD3A-4BD5-B6C2-1DE2BDC68C86} = {06741964-B339-4FCF-B6E5-E0D32A434DA2}
{23B79768-F683-401E-B19A-11B743F01FCC} = {7E1AA929-F9B8-42E6-A6AD-6759CE43521F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E93BA3D6-C1CC-458C-8F51-4E4B1D8856CB}
Expand Down
5 changes: 3 additions & 2 deletions mediaportal/Setup/setup.nsi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region Copyright (C) 2005-2023 Team MediaPortal
#region Copyright (C) 2005-2024 Team MediaPortal
/*
// Copyright (C) 2005-2023 Team MediaPortal
// Copyright (C) 2005-2024 Team MediaPortal
// http://www.team-mediaportal.com
//
// MediaPortal is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -1060,6 +1060,7 @@ Section "-MediaPortal Extension Manager" SecMpeInstaller
File "${git_MP}\MPE\MpeCore\bin\${BUILD_TYPE}\MpeCore.dll"
File "${git_MP}\MPE\MpeInstaller\bin\${BUILD_TYPE}\MpeInstaller.exe"
File "${git_MP}\MPE\MpeMaker\bin\${BUILD_TYPE}\MpeMaker.exe"
File "${git_MP}\MPE\MPEUpdater\bin\${BUILD_TYPE}\MPEUpdater.exe"

; remove shortcuts on upgrade (MP1-4540 / MP1-4544)
Delete "$DESKTOP\MediaPortal Extension Installer.lnk"
Expand Down

0 comments on commit 134987f

Please sign in to comment.