Skip to content

Commit 97ae3b7

Browse files
authored
Rebase on master (#106)
Update dotnet.yml
1 parent 79c69be commit 97ae3b7

9 files changed

Lines changed: 199 additions & 16 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: .NET
22

33
env:
44
PACK_ID: Sims1WidescreenPatcher
5-
PACK_VER: 3.9.0
5+
PACK_VER: 3.10.0
66

77
on:
88
push:
@@ -15,9 +15,9 @@ jobs:
1515
linux:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4.2.0
1919
- name: Setup .NET
20-
uses: actions/setup-dotnet@v2
20+
uses: actions/setup-dotnet@v4
2121
with:
2222
dotnet-version: 6.0.x
2323
- name: Restore dependencies
@@ -34,9 +34,9 @@ jobs:
3434
windows:
3535
runs-on: windows-latest
3636
steps:
37-
- uses: actions/checkout@v3
37+
- uses: actions/checkout@v4.2.0
3838
- name: Setup .NET
39-
uses: actions/setup-dotnet@v2
39+
uses: actions/setup-dotnet@v4
4040
with:
4141
dotnet-version: 6.0.x
4242
- name: Restore dependencies
@@ -53,9 +53,9 @@ jobs:
5353
macos:
5454
runs-on: macos-latest
5555
steps:
56-
- uses: actions/checkout@v3
56+
- uses: actions/checkout@v4.2.0
5757
- name: Setup .NET
58-
uses: actions/setup-dotnet@v2
58+
uses: actions/setup-dotnet@v4
5959
with:
6060
dotnet-version: 6.0.x
6161
- name: Restore dependencies

Sims1WidescreenPatcher.Core/Properties/Resources.Designer.cs

Lines changed: 63 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<root>
3+
<!--
4+
Microsoft ResX Schema
5+
6+
Version 1.3
7+
8+
The primary goals of this format is to allow a simple XML format
9+
that is mostly human readable. The generation and parsing of the
10+
various data types are done through the TypeConverter classes
11+
associated with the data types.
12+
13+
Example:
14+
15+
... ado.net/XML headers & schema ...
16+
<resheader name="resmimetype">text/microsoft-resx</resheader>
17+
<resheader name="version">1.3</resheader>
18+
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19+
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20+
<data name="Name1">this is my long string</data>
21+
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22+
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23+
[base64 mime encoded serialized .NET Framework object]
24+
</data>
25+
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26+
[base64 mime encoded string representing a byte array form of the .NET Framework object]
27+
</data>
28+
29+
There are any number of "resheader" rows that contain simple
30+
name/value pairs.
31+
32+
Each data row contains a name, and value. The row also contains a
33+
type or mimetype. Type corresponds to a .NET class that support
34+
text/value conversion through the TypeConverter architecture.
35+
Classes that don't support this are serialized and stored with the
36+
mimetype set.
37+
38+
The mimetype is used for serialized objects, and tells the
39+
ResXResourceReader how to depersist the object. This is currently not
40+
extensible. For a given mimetype the value must be set accordingly:
41+
42+
Note - application/x-microsoft.net.object.binary.base64 is the format
43+
that the ResXResourceWriter will generate, however the reader can
44+
read any of the formats listed below.
45+
46+
mimetype: application/x-microsoft.net.object.binary.base64
47+
value : The object must be serialized with
48+
: System.Serialization.Formatters.Binary.BinaryFormatter
49+
: and then encoded with base64 encoding.
50+
51+
mimetype: application/x-microsoft.net.object.soap.base64
52+
value : The object must be serialized with
53+
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
54+
: and then encoded with base64 encoding.
55+
56+
mimetype: application/x-microsoft.net.object.bytearray.base64
57+
value : The object must be serialized into a byte array
58+
: using a System.ComponentModel.TypeConverter
59+
: and then encoded with base64 encoding.
60+
-->
61+
62+
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63+
<xsd:element name="root" msdata:IsDataSet="true">
64+
<xsd:complexType>
65+
<xsd:choice maxOccurs="unbounded">
66+
<xsd:element name="data">
67+
<xsd:complexType>
68+
<xsd:sequence>
69+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
70+
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
71+
</xsd:sequence>
72+
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
73+
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
74+
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
75+
</xsd:complexType>
76+
</xsd:element>
77+
<xsd:element name="resheader">
78+
<xsd:complexType>
79+
<xsd:sequence>
80+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
81+
</xsd:sequence>
82+
<xsd:attribute name="name" type="xsd:string" use="required" />
83+
</xsd:complexType>
84+
</xsd:element>
85+
</xsd:choice>
86+
</xsd:complexType>
87+
</xsd:element>
88+
</xsd:schema>
89+
<resheader name="resmimetype">
90+
<value>text/microsoft-resx</value>
91+
</resheader>
92+
<resheader name="version">
93+
<value>1.3</value>
94+
</resheader>
95+
<resheader name="reader">
96+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
97+
</resheader>
98+
<resheader name="writer">
99+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
100+
</resheader>
101+
</root>
-2.64 MB
Binary file not shown.
Binary file not shown.

Sims1WidescreenPatcher.Core/Services/WrapperService.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public WrapperService(IAppState appState)
1313
_appState = appState;
1414
}
1515

16-
private static string[] _ddrawCompat051Resources = { @"DDrawCompat._0._5._1.ddraw.dll" };
16+
private static string[] _ddrawCompat054Resources = { @"DDrawCompat._0._5._4.ddraw.dll" };
1717
private static string[] _ddrawCompat032Resources = { @"DDrawCompat._0._3._2.ddraw.dll" };
1818

1919
private static string[] _dgvoodooResources =
@@ -27,11 +27,11 @@ public List<IWrapper> GetWrappers()
2727
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
2828
{
2929
/* Return different ddrawcompat versions depending on Windows version.
30-
Windows 10 and newer get ddrawcompat 0.5.1
30+
Windows 10 and newer get ddrawcompat 0.5.4
3131
Windows 8.1 and older get ddrawcompat 0.3.2
3232
*/
3333
return Environment.OSVersion.Version.Major >= 10
34-
? new List<IWrapper> { new DDrawCompatWrapper("0.5.1"), new DgVoodoo2Wrapper(), new NoneWrapper() }
34+
? new List<IWrapper> { new DDrawCompatWrapper("0.5.4"), new DgVoodoo2Wrapper(), new NoneWrapper() }
3535
: new List<IWrapper> { new DDrawCompatWrapper("0.3.2"), new DgVoodoo2Wrapper(), new NoneWrapper() };
3636
}
3737

@@ -52,7 +52,7 @@ public async Task Install(IWrapper wrapper)
5252
switch (wrapper)
5353
{
5454
case DDrawCompatWrapper w:
55-
resources = w.Version == "0.5.1" ? _ddrawCompat051Resources : _ddrawCompat032Resources;
55+
resources = w.Version == "0.5.4" ? _ddrawCompat054Resources : _ddrawCompat032Resources;
5656
break;
5757
case DgVoodoo2Wrapper:
5858
resources = _dgvoodooResources;
@@ -78,7 +78,7 @@ public async Task Install(IWrapper wrapper)
7878
public void Uninstall()
7979
{
8080
var simsInstallDir = GetSimsInstallDirectory();
81-
foreach (var item in _ddrawCompat051Resources.Concat(_ddrawCompat032Resources).Concat(_dgvoodooResources))
81+
foreach (var item in _ddrawCompat054Resources.Concat(_ddrawCompat032Resources).Concat(_dgvoodooResources))
8282
{
8383
var itemSplit = item.Split('.');
8484
var combined = itemSplit[^2] + "." + itemSplit[^1];

Sims1WidescreenPatcher.Core/Sims1WidescreenPatcher.Core.csproj

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1616
</PropertyGroup>
1717

18+
<ItemGroup>
19+
<None Remove="Resources\DDrawCompat\0.5.4\ddraw.dll" />
20+
</ItemGroup>
21+
1822
<ItemGroup>
1923
<PackageReference Include="Avalonia" Version="11.1.4" />
2024
<PackageReference Include="DynamicData" Version="9.0.4" />
@@ -26,12 +30,27 @@
2630

2731
<ItemGroup>
2832
<EmbeddedResource Include="Resources\DDrawCompat\0.3.2\ddraw.dll" />
29-
<EmbeddedResource Include="Resources\DDrawCompat\0.5.1\ddraw.dll" />
33+
<EmbeddedResource Include="Resources\DDrawCompat\0.5.4\ddraw.dll" />
3034
<EmbeddedResource Include="Resources\DgVoodoo2\D3D8.dll" />
3135
<EmbeddedResource Include="Resources\DgVoodoo2\D3DImm.dll" />
3236
<EmbeddedResource Include="Resources\DgVoodoo2\DDraw.dll" />
3337
<EmbeddedResource Include="Resources\DgVoodoo2\dgVoodoo.conf" />
3438
<EmbeddedResource Include="Resources\DgVoodoo2\dgVoodooCpl.exe" />
3539
</ItemGroup>
3640

41+
<ItemGroup>
42+
<Compile Update="Properties\Resources.Designer.cs">
43+
<DesignTime>True</DesignTime>
44+
<AutoGen>True</AutoGen>
45+
<DependentUpon>Resources.resx</DependentUpon>
46+
</Compile>
47+
</ItemGroup>
48+
49+
<ItemGroup>
50+
<EmbeddedResource Update="Properties\Resources.resx">
51+
<Generator>ResXFileCodeGenerator</Generator>
52+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
53+
</EmbeddedResource>
54+
</ItemGroup>
55+
3756
</Project>

Sims1WidescreenPatcher.Core/Tabs/MainTabViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ private async Task OnClickedPatch()
333333

334334
var selectedWrapper = Wrappers[SelectedWrapperIndex];
335335

336-
if (selectedWrapper is DDrawCompatWrapper { Version: "0.5.1" })
336+
if (selectedWrapper is DDrawCompatWrapper { Version: "0.5.4" })
337337
{
338338
var result = await OpenCustomYesNoDialogAsync("DDrawCompat Settings",
339339
"Enable borderless fullscreen mode?\n(Choosing \"no\" may cause issues on variable refresh rate displays.)");

Sims1WidescreenPatcher/Sims1WidescreenPatcher.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
<!-- Also defines .app file name -->
4141
<CFBundleDisplayName>Sims1WidescreenPatcher</CFBundleDisplayName>
4242
<CFBundleIdentifier>com.example</CFBundleIdentifier>
43-
<CFBundleVersion>3.9.0</CFBundleVersion>
44-
<CFBundleShortVersionString>3.9.0</CFBundleShortVersionString>
43+
<CFBundleVersion>3.10.0</CFBundleVersion>
44+
<CFBundleShortVersionString>3.10.0</CFBundleShortVersionString>
4545
<CFBundlePackageType>APPL</CFBundlePackageType>
4646
<CFBundleExecutable>Sims1WidescreenPatcher</CFBundleExecutable>
4747
<CFBundleIconFile>SimsICO.ico</CFBundleIconFile>

0 commit comments

Comments
 (0)