Skip to content

Commit bcdee94

Browse files
Codectoryres2k
authored andcommitted
1.9.19
[Bug fixes] - UWP cannot be found after update
1 parent 3aed6fc commit bcdee94

File tree

10 files changed

+95
-27
lines changed

10 files changed

+95
-27
lines changed

Source/AutoActions.ProjectResources/AutoActions.ProjectResources.csproj

+1-9
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,6 @@
6666
<AutoGen>True</AutoGen>
6767
<DesignTime>True</DesignTime>
6868
</Compile>
69-
<Compile Include="ProjectLocales.de.Designer.cs">
70-
<DependentUpon>ProjectLocales.de.resx</DependentUpon>
71-
<AutoGen>True</AutoGen>
72-
<DesignTime>True</DesignTime>
73-
</Compile>
7469
<Compile Include="ProjectLocales.Designer.cs">
7570
<DependentUpon>ProjectLocales.resx</DependentUpon>
7671
<AutoGen>True</AutoGen>
@@ -84,10 +79,7 @@
8479
<LastGenOutput>Locale_Enums.Designer.cs</LastGenOutput>
8580
<SubType>Designer</SubType>
8681
</EmbeddedResource>
87-
<EmbeddedResource Include="ProjectLocales.de.resx">
88-
<Generator>PublicResXFileCodeGenerator</Generator>
89-
<LastGenOutput>ProjectLocales.de.Designer.cs</LastGenOutput>
90-
</EmbeddedResource>
82+
<EmbeddedResource Include="ProjectLocales.de.resx" />
9183
<EmbeddedResource Include="ProjectLocales.resx">
9284
<Generator>PublicResXFileCodeGenerator</Generator>
9385
<LastGenOutput>ProjectLocales.Designer.cs</LastGenOutput>

Source/AutoActions.ProjectResources/ProjectLocales.de.Designer.cs

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
6+
<ProductVersion>3.10</ProductVersion>
7+
<ProjectGuid>30b814f3-b6dd-42c6-bc50-e06a54cb6c51</ProjectGuid>
8+
<SchemaVersion>2.0</SchemaVersion>
9+
<OutputName>AutoActions.Setup</OutputName>
10+
<OutputType>Package</OutputType>
11+
</PropertyGroup>
12+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
13+
<OutputPath>bin\$(Configuration)\</OutputPath>
14+
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
15+
<DefineConstants>Debug</DefineConstants>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
18+
<OutputPath>bin\$(Configuration)\</OutputPath>
19+
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
20+
</PropertyGroup>
21+
<ItemGroup>
22+
<Compile Include="Product.wxs" />
23+
</ItemGroup>
24+
<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " />
25+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " />
26+
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
27+
<Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
28+
</Target>
29+
<!--
30+
To modify your build process, add your task inside one of the targets below and uncomment it.
31+
Other similar extension points exist, see Wix.targets.
32+
<Target Name="BeforeBuild">
33+
</Target>
34+
<Target Name="AfterBuild">
35+
</Target>
36+
-->
37+
</Project>

Source/AutoActions.Setup/Product.wxs

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
3+
<Product Id="*" Name="AutoActions.Setup" Language="1033" Version="1.0.0.0" Manufacturer="" UpgradeCode="c76ecc9c-3eef-40f4-81b2-4ad031bcec23">
4+
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
5+
6+
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
7+
<MediaTemplate />
8+
9+
<Feature Id="ProductFeature" Title="AutoActions.Setup" Level="1">
10+
<ComponentGroupRef Id="ProductComponents" />
11+
</Feature>
12+
</Product>
13+
14+
<Fragment>
15+
<Directory Id="TARGETDIR" Name="SourceDir">
16+
<Directory Id="ProgramFilesFolder">
17+
<Directory Id="INSTALLFOLDER" Name="AutoActions.Setup" />
18+
</Directory>
19+
</Directory>
20+
</Fragment>
21+
22+
<Fragment>
23+
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
24+
<!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
25+
<!-- <Component Id="ProductComponent"> -->
26+
<!-- TODO: Insert files, registry keys, and other resources here. -->
27+
<!-- </Component> -->
28+
</ComponentGroup>
29+
</Fragment>
30+
</Wix>

Source/AutoActions.sln

+8
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoActions.Audio", "AutoAc
1717
EndProject
1818
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoActions.Updater", "AutoActions.Updater\AutoActions.Updater.csproj", "{5DF058E2-C5AB-42DE-8EED-D22FF39960AD}"
1919
EndProject
20+
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "AutoActions.Setup", "AutoActions.Setup\AutoActions.Setup.wixproj", "{30B814F3-B6DD-42C6-BC50-E06A54CB6C51}"
21+
EndProject
2022
Global
2123
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2224
Debug|x64 = Debug|x64
@@ -81,6 +83,12 @@ Global
8183
{5DF058E2-C5AB-42DE-8EED-D22FF39960AD}.Release|x64.Build.0 = Release|x64
8284
{5DF058E2-C5AB-42DE-8EED-D22FF39960AD}.Release|x86.ActiveCfg = Release|x86
8385
{5DF058E2-C5AB-42DE-8EED-D22FF39960AD}.Release|x86.Build.0 = Release|x86
86+
{30B814F3-B6DD-42C6-BC50-E06A54CB6C51}.Debug|x64.ActiveCfg = Debug|x86
87+
{30B814F3-B6DD-42C6-BC50-E06A54CB6C51}.Debug|x86.ActiveCfg = Debug|x86
88+
{30B814F3-B6DD-42C6-BC50-E06A54CB6C51}.Debug|x86.Build.0 = Debug|x86
89+
{30B814F3-B6DD-42C6-BC50-E06A54CB6C51}.Release|x64.ActiveCfg = Release|x86
90+
{30B814F3-B6DD-42C6-BC50-E06A54CB6C51}.Release|x86.ActiveCfg = Release|x86
91+
{30B814F3-B6DD-42C6-BC50-E06A54CB6C51}.Release|x86.Build.0 = Release|x86
8492
EndGlobalSection
8593
GlobalSection(SolutionProperties) = preSolution
8694
HideSolutionNode = FALSE

Source/AutoActions/Applications/ApplicationItem.cs

+5-9
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ public string UWPApplicationID {
7272
public string UWPIconPath {
7373
get => _uwpIconPath;
7474
set { _uwpIconPath = value; try { if (IsUWP ||IsUWPWepApp) Icon = new Bitmap(Bitmap.FromFile(value)); } catch { }OnPropertyChanged(); } }
75-
75+
76+
[JsonProperty(Order = 0)]
7677
public string UWPIdentity { get => _uwpIdentity; set { _uwpIdentity = value; OnPropertyChanged(); } }
7778

7879
private ApplicationItem()
@@ -92,23 +93,19 @@ public ApplicationItem(UWPApp uwpApp) : this(uwpApp.Name, uwpApp.ExecutablePath)
9293
IsUWPWepApp = true;
9394
UWPFamilyPackageName = uwpApp.FamilyPackageName;
9495
_uwpFullPackageName = uwpApp.FullPackageName;
95-
_uwpApplicationID = uwpApp.ApplicationID;
9696
UWPIconPath = uwpApp.IconPath;
97+
UWPApplicationID = uwpApp.ApplicationID;
9798
UWPIdentity = uwpApp.Identity;
9899
}
99100

100-
private void LoadUWPData()
101+
private void LoadUWPData()
101102
{
102103
string packageNotFound = "[PackageNotFound]_";
103104

104105
if (!IsUWP && !IsUWPWepApp)
105106
return;
106107
UWPApp uwpApp;
107-
//Compatibility for old UWP handling
108-
if (string.IsNullOrEmpty(UWPFullPackageName))
109-
uwpApp = UWPAppsManager.GetUWPApp(UWPFamilyPackageName, UWPApplicationID);
110-
else
111-
uwpApp = UWPAppsManager.GetUWPApp(UWPFullPackageName);
108+
uwpApp = UWPAppsManager.GetUWPApp(UWPFamilyPackageName, UWPIdentity);
112109
if (uwpApp == null)
113110
{
114111
if (PackageError)
@@ -124,7 +121,6 @@ private void LoadUWPData()
124121
DisplayName = DisplayName.Substring(packageNotFound.Length, DisplayName.Length - packageNotFound.Length);
125122
UWPFamilyPackageName = uwpApp.FamilyPackageName;
126123
_uwpFullPackageName = uwpApp.FullPackageName;
127-
_uwpApplicationID = uwpApp.ApplicationID;
128124
UWPIconPath = uwpApp.IconPath;
129125
UWPIdentity = uwpApp.Identity;
130126
}

Source/AutoActions/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@
5252
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
5353
// indem Sie "*" wie unten gezeigt eingeben:
5454
// [assembly: AssemblyVersion("1.0.*")]
55-
[assembly: AssemblyVersion("1.9.18.0")]
56-
[assembly: AssemblyFileVersion("1.9.18.0")]
55+
[assembly: AssemblyVersion("1.9.19.0")]
56+
[assembly: AssemblyFileVersion("1.9.19.0")]

Source/AutoActions/UWP/UWPApp.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public string ExecutablePath
3737
public string FullPackageName { get; private set; } = string.Empty;
3838

3939
public string ApplicationID { get; private set; } = string.Empty;
40+
4041
public string Identity { get; private set; } = string.Empty;
4142
public string IconPath { get; private set; } = string.Empty;
4243

@@ -71,7 +72,8 @@ private void ReadAppxManifest(Package package)
7172
{
7273
XmlSerializer serializer = new XmlSerializer(typeof(AppxManifest));
7374
AppxManifest appxManifest = (AppxManifest)serializer.Deserialize(reader);
74-
Name = ((XmlNode[])appxManifest.Properties.DisplayName)[0].Value;
75+
Name = package.DisplayName;
76+
//Name = ((XmlNode[])appxManifest.Properties.DisplayName)[0].Value;
7577
if (Name.Contains("ms-resource:"))
7678
{
7779
Name = GetNameOfStrangeMicrosoftAppxManifest(appxManifest);
@@ -83,6 +85,7 @@ private void ReadAppxManifest(Package package)
8385
IsWebApp = true;
8486
FamilyPackageName = package.Id.FamilyName;
8587
FullPackageName = package.Id.FullName;
88+
var a = package.Id.ResourceId;
8689
ApplicationID = appxManifest.Applications?.Application.Id;
8790
Identity = appxManifest.Identity.Name;
8891
IconPath = GetIconPath(Path.Combine(InstallLocation, ((XmlNode[])(appxManifest.Properties.Logo))[0].Value));

Source/AutoActions/UWP/UWPAppsManager.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,22 @@ public static class UWPAppsManager
2121
private const string xboxPassAppFN = "Microsoft.GamingApp_8wekyb3d8bbwe";
2222

2323

24-
public static UWPApp GetUWPApp(string packageNameOrFamilyPackageName, string applicationID = "")
24+
public static UWPApp GetUWPApp(string packageNameOrFamilyPackageName, string identity = "")
2525
{
2626
var package = manager.FindPackageForUser(WindowsIdentity.GetCurrent().User.Value, packageNameOrFamilyPackageName);
2727
if (package == null)
28-
return GetUWPAppCompatible(packageNameOrFamilyPackageName, applicationID);
28+
return GetUWPAppCompatible(packageNameOrFamilyPackageName, identity);
2929
return new UWPApp(package);
3030
}
3131

32-
private static UWPApp GetUWPAppCompatible(string familyPackageName, string applicationID)
32+
private static UWPApp GetUWPAppCompatible(string familyPackageName, string identity)
3333
{
3434
foreach (var package in manager.FindPackagesForUser(WindowsIdentity.GetCurrent().User.Value))
3535
{
3636
try
3737
{
3838
UWPApp uwpApp = new UWPApp(package);
39-
if (uwpApp.FamilyPackageName.Equals(familyPackageName) && uwpApp.ApplicationID.Equals(applicationID))
39+
if (uwpApp.FamilyPackageName.Equals(familyPackageName) && (string.IsNullOrEmpty(identity) || uwpApp.Identity.Equals(identity)))
4040
return uwpApp;
4141
}
4242
catch {}
@@ -78,7 +78,7 @@ public static List<ApplicationItem> GetUWPApps()
7878
{
7979
UWPApp uwpApp = new UWPApp(package);
8080
if (!string.IsNullOrEmpty(uwpApp.ApplicationID))
81-
uwpApps.Add(new ApplicationItem(uwpApp));
81+
uwpApps.Add(new ApplicationItem(uwpApp));
8282
}
8383
catch
8484
{

Source/AutoActions/Views/AutoActionsLogsView.xaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@
5151
<Image Grid.Row="0" Grid.ColumnSpan="3" Source="{Binding Converter={StaticResource BitmapToBitmapImageConverter}, Source={x:Static pres:ProjectLocales.Logo}}" />
5252
</Grid>
5353
<Border Style="{StaticResource DefaultBorder}" Grid.Row="2" Margin="5" />
54-
<ItemsControl Grid.Row="2" ItemsSource="{Binding Entries}" ItemTemplate="{StaticResource LogEntryTemplate }" Margin="15" BorderBrush="{x:Null}" BorderThickness="0" />
54+
<ScrollViewer Grid.Row="2" Margin="15">
55+
<ItemsControl ItemsSource="{Binding Entries}" ItemTemplate="{StaticResource LogEntryTemplate }" Margin="5" BorderBrush="{x:Null}" BorderThickness="0" />
56+
</ScrollViewer>
5557

5658

5759

0 commit comments

Comments
 (0)