Skip to content

Commit 83ebd51

Browse files
committed
Added ARM64 build support
1 parent 9729ebe commit 83ebd51

18 files changed

Lines changed: 259 additions & 185 deletions

File tree

Lib/arm64/hb.dll

40.4 MB
Binary file not shown.
File renamed without changes.

VidCoder.sln

Lines changed: 82 additions & 90 deletions
Large diffs are not rendered by default.

VidCoder/Model/Database.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -380,26 +380,26 @@ private static void UpgradeDatabaseTo51()
380380
string upgradedEncodeJobs;
381381
try
382382
{
383-
JsonNode? root = JsonNode.Parse(oldEncodeJobs);
383+
JsonNode root = JsonNode.Parse(oldEncodeJobs);
384384
if (root is JsonArray jobsArray)
385385
{
386-
foreach (JsonNode? jobNode in jobsArray)
386+
foreach (JsonNode jobNode in jobsArray)
387387
{
388388
if (jobNode is JsonObject jobObj)
389389
{
390390
if (jobObj["VideoSource"] is JsonObject videoSource)
391391
{
392392
if (videoSource["Titles"] is JsonArray titles)
393393
{
394-
foreach (JsonNode? titleNode in titles)
394+
foreach (JsonNode titleNode in titles)
395395
{
396396
if (titleNode is JsonObject titleObj && titleObj["AudioList"] is JsonArray audioList)
397397
{
398-
foreach (JsonNode? audioNode in audioList)
398+
foreach (JsonNode audioNode in audioList)
399399
{
400400
if (audioNode is JsonObject audioObj)
401401
{
402-
JsonNode? layoutNameNode = audioObj["ChannelLayoutName"];
402+
JsonNode layoutNameNode = audioObj["ChannelLayoutName"];
403403
if (layoutNameNode != null)
404404
{
405405
audioObj["ChannelLayout"] = JsonNode.Parse(layoutNameNode.ToJsonString());
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
https://go.microsoft.com/fwlink/?LinkID=208121.
4+
-->
5+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6+
<PropertyGroup>
7+
<Configuration>Release</Configuration>
8+
<Platform>ARM64</Platform>
9+
<PublishDir>bin\publish-installer-arm64</PublishDir>
10+
<PublishProtocol>FileSystem</PublishProtocol>
11+
<TargetFramework>net10.0-windows10.0.19041.0</TargetFramework>
12+
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
13+
<SelfContained>false</SelfContained>
14+
<PublishSingleFile>False</PublishSingleFile>
15+
<PublishReadyToRun>True</PublishReadyToRun>
16+
</PropertyGroup>
17+
</Project>

VidCoder/Properties/PublishProfiles/InstallerProfile.pubxml renamed to VidCoder/Properties/PublishProfiles/InstallerX64Profile.pubxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
66
<PropertyGroup>
77
<Configuration>Release</Configuration>
88
<Platform>x64</Platform>
9-
<PublishDir>bin\publish-installer</PublishDir>
9+
<PublishDir>bin\publish-installer-x64</PublishDir>
1010
<PublishProtocol>FileSystem</PublishProtocol>
1111
<TargetFramework>net10.0-windows10.0.19041.0</TargetFramework>
1212
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
https://go.microsoft.com/fwlink/?LinkID=208121.
4+
-->
5+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6+
<PropertyGroup>
7+
<Configuration>Release</Configuration>
8+
<Platform>ARM64</Platform>
9+
<PublishDir>bin\publish-portable-arm64</PublishDir>
10+
<PublishProtocol>FileSystem</PublishProtocol>
11+
<TargetFramework>net10.0-windows10.0.19041.0</TargetFramework>
12+
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
13+
<SelfContained>true</SelfContained>
14+
<PublishSingleFile>False</PublishSingleFile>
15+
<PublishReadyToRun>False</PublishReadyToRun>
16+
</PropertyGroup>
17+
</Project>

VidCoder/Properties/PublishProfiles/PortableProfile.pubxml renamed to VidCoder/Properties/PublishProfiles/PortableX64Profile.pubxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
66
<PropertyGroup>
77
<Configuration>Release</Configuration>
88
<Platform>x64</Platform>
9-
<PublishDir>bin\publish-portable</PublishDir>
9+
<PublishDir>bin\publish-portable-x64</PublishDir>
1010
<PublishProtocol>FileSystem</PublishProtocol>
1111
<TargetFramework>net10.0-windows10.0.19041.0</TargetFramework>
1212
<RuntimeIdentifier>win-x64</RuntimeIdentifier>

VidCoder/VidCoder.csproj

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,20 @@
1313
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
1414
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
1515
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
16-
<OutputPath>bin/$(Configuration)</OutputPath>
17-
<Platforms>x64</Platforms>
16+
<Platforms>x64;ARM64</Platforms>
1817
<ValidateExecutableReferencesMatchSelfContained>false</ValidateExecutableReferencesMatchSelfContained>
1918
<ApplicationManifest>app.manifest</ApplicationManifest>
2019
<StartupObject>VidCoder.Program</StartupObject>
2120
</PropertyGroup>
2221
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
2322
<DefineConstants>DEBUG</DefineConstants>
2423
</PropertyGroup>
24+
<PropertyGroup Condition="'$(Platform)' == 'ARM64'">
25+
<HbDllPath>..\Lib\arm64\hb.dll</HbDllPath>
26+
</PropertyGroup>
27+
<PropertyGroup Condition="'$(Platform)' == 'x64'">
28+
<HbDllPath>..\Lib\x64\hb.dll</HbDllPath>
29+
</PropertyGroup>
2530
<ItemGroup>
2631
<PackageReference Include="ControlzEx" />
2732
<PackageReference Include="Fluent.Ribbon" />
@@ -208,7 +213,7 @@
208213
</None>
209214
</ItemGroup>
210215
<ItemGroup>
211-
<Content Include="..\Lib\hb.dll">
216+
<Content Include="$(HbDllPath)">
212217
<Link>hb.dll</Link>
213218
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
214219
</Content>

VidCoder/View/LogWindow.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ private string[] GetLines(int chunkStartIndex, int chunkCount)
454454
byte[] buffer = new byte[totalBytes];
455455

456456
stream.Position = this.chunks[chunkStartIndex].BytePosition;
457-
stream.Read(buffer, 0, (int)totalBytes);
457+
stream.ReadExactly(buffer, 0, (int)totalBytes);
458458

459459
string logs = Encoding.UTF8.GetString(buffer);
460460
return logs.Split(

0 commit comments

Comments
 (0)