Skip to content

Commit

Permalink
Bug Fixes
Browse files Browse the repository at this point in the history
- Change MacOS builds storage location
- Fix Android Setting Loader
- Fix Android Persistent Notification on Exit
- Fix Standalone Installation with Direct Links
- Avalonia Upgraded
- SharpZipLib Upgraded
- HtmlAgilityPack Upgraded
  • Loading branch information
marcussacana committed May 19, 2024
1 parent d933d0f commit 35915ae
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,17 @@
<DebugType>portable</DebugType>
<AndroidLinkMode>none</AndroidLinkMode>
<RunAOTCompilation>False</RunAOTCompilation>
<EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk>
<EmbedAssembliesIntoApk>False</EmbedAssembliesIntoApk>
<AndroidEnableProfiledAot>True</AndroidEnableProfiledAot>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Avalonia.Android" Version="11.0.9" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.9" />
<PackageReference Include="Avalonia.Android" Version="11.0.10" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.10" />
<PackageReference Include="Xamarin.AndroidX.Core.SplashScreen" Version="1.0.1.5" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Android.App;
using Android.Content;
using Android.OS;
using Microsoft.VisualBasic;
using Exception = Java.Lang.Exception;

namespace DirectPackageInstaller.Android;
Expand All @@ -19,14 +20,19 @@ public class ForegroundService : Service
private NotificationChannel _channel;

public override void OnCreate()
{

{
BindChannel();
BindForeground();

base.OnCreate();
}

public override void OnDestroy()
{
UnbindForeground();
base.OnDestroy();
}

public override StartCommandResult OnStartCommand(Intent? intent, StartCommandFlags flags, int startId)
{
BindChannel();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Android.Net;
using Android.Net.Wifi;
using Android.OS;
using AndroidX.Core.App;
using AndroidX.Core.Content;
using Avalonia.Android;
using Avalonia;
Expand All @@ -17,7 +16,6 @@
using Application = Android.App.Application;
using File = Java.IO.File;
using System.Linq;
using Android.Runtime;

[assembly: Application(UsesCleartextTraffic = true)]

Expand All @@ -29,11 +27,13 @@ public class MainActivity : AvaloniaMainActivity<App>
public static int Instances = 0;
public ClipboardManager? ClipboardManager;

protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
{
return base.CustomizeAppBuilder(builder)
.WithInterFont()
.UseReactiveUI();
protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
{
SetupEnv();

return base.CustomizeAppBuilder(builder)
.WithInterFont()
.UseReactiveUI();
}

protected override async void OnCreate(Bundle savedInstanceState)
Expand Down Expand Up @@ -72,6 +72,9 @@ protected override async void OnCreate(Bundle savedInstanceState)

private void SetupEnv()
{
if (ClipboardManager != null)
return;

ClipboardManager = (ClipboardManager)GetSystemService(ClipboardService);

App.GetClipboardText = () =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<TrimmableAssembly Include="Avalonia.Themes.Default" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="11.0.9" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.10" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.9" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.10" />
<PackageReference Condition="'$(Configuration)' != 'Debug'" Include="Costura.Fody" Version="5.7.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
17 changes: 14 additions & 3 deletions DirectPackageInstaller/DirectPackageInstaller/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,20 @@ public enum OS
public static string WorkingDirectory
{
get
{
var Result = _WorkingDir ??= Environment.GetEnvironmentVariable("CD") ?? Directory.GetCurrentDirectory();

{
var Result = _WorkingDir;

if (_WorkingDir == null)
{
if (IsOSX)
{
_WorkingDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
_WorkingDir = Path.Combine(_WorkingDir, "DirectPackageInstaller");
}

Result = _WorkingDir ??= Environment.GetEnvironmentVariable("CD") ?? Directory.GetCurrentDirectory();
}

if (string.IsNullOrWhiteSpace(Result.Trim('/', '\\')) && CurrentPlatform != OS.Android)
throw new Exception("FAILED TO GET THE WORKING DIRECTORY PATH");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
<AvaloniaResource Include="Assets\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.9" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.9" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.9" />
<PackageReference Include="Avalonia" Version="11.0.10" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.10" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.10" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.9" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.9" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.9" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.59" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.10" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.10" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.10" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.61" />
<PackageReference Include="Jint" Version="3.0.0" />
<PackageReference Include="SharpCompress" Version="0.36.0" />
<PackageReference Include="SharpCompress" Version="0.37.2" />
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="6.0.1" />
<PackageReference Include="System.Management" Version="6.0.0" />
<PackageReference Include="XamlNameReferenceGenerator" Version="1.4.2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static string? MainExecutable

const string UpdateList = "Update.ini";

public static Version CurrentVersion = new Version("6.2.7");
public static Version CurrentVersion = new Version("6.2.8");

public static Version? LastVersion = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ public static async Task<bool> PushPackage(Settings Config, Source InputType, St
break;

case Source.URL:
CanSplit = false;
break;

default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ public async Task OnShown(MainWindow? Parent)
Model.PCIP = NewPCIP;

RestartServer_OnClick(null, null);

if (App.IsAndroid)
App.SaveSettings();
});
});
}
Expand Down Expand Up @@ -630,8 +633,11 @@ private async void ModelOnPropertyChanged(object? sender, PropertyChangedEventAr
break;
case "CurrentURL":
UrlChanged(Model.CurrentURL);
break;
return;
}

if (App.IsAndroid)
App.SaveSettings();
}

private void BtnCNLServiceOnClick(object? sender, RoutedEventArgs e)
Expand Down
13 changes: 6 additions & 7 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ Or alternatively the RemotePackageInstaller Homebrew.
- Download and Install the [.NET 6 Runtime](https://dotnet.microsoft.com/en-us/download/dotnet/6.0/runtime)
- Download one of those builds:
- Windows: [ARM](https://raw.githubusercontent.com/marcussacana/DirectPackageInstaller/Updater/Windows-ARM.zip), [ARM64](https://raw.githubusercontent.com/marcussacana/DirectPackageInstaller/Updater/Windows-ARM64.zip), [x64](https://raw.githubusercontent.com/marcussacana/DirectPackageInstaller/Updater/Windows-X64.zip), [x86](https://raw.githubusercontent.com/marcussacana/DirectPackageInstaller/Updater/Windows-X86.zip)
- Android: [ARM](https://raw.githubusercontent.com/marcussacana/DirectPackageInstaller/Updater/Android-ARM.zip), [ARM64](https://raw.githubusercontent.com/marcussacana/DirectPackageInstaller/Updater/Android-ARM64.zip), [x64](https://raw.githubusercontent.com/marcussacana/DirectPackageInstaller/Updater/Android-X64.zip), [x86](https://raw.githubusercontent.com/marcussacana/DirectPackageInstaller/Updater/Android-X86.zip) (BETA)
- Android: [ARM](https://raw.githubusercontent.com/marcussacana/DirectPackageInstaller/Updater/Android-ARM.zip), [ARM64](https://raw.githubusercontent.com/marcussacana/DirectPackageInstaller/Updater/Android-ARM64.zip), [x64](https://raw.githubusercontent.com/marcussacana/DirectPackageInstaller/Updater/Android-X64.zip), [x86](https://raw.githubusercontent.com/marcussacana/DirectPackageInstaller/Updater/Android-X86.zip)
- Linux: [ARM](https://raw.githubusercontent.com/marcussacana/DirectPackageInstaller/Updater/Linux-ARM.zip), [ARM64](https://raw.githubusercontent.com/marcussacana/DirectPackageInstaller/Updater/Linux-ARM64.zip), [x64](https://raw.githubusercontent.com/marcussacana/DirectPackageInstaller/Updater/Linux-X64.zip)
- OSX: [ARM64](https://raw.githubusercontent.com/marcussacana/DirectPackageInstaller/Updater/OSX-ARM64.zip), [x64](https://raw.githubusercontent.com/marcussacana/DirectPackageInstaller/Updater/OSX-X64.zip)

- OSX CLI: [ARM64](https://raw.githubusercontent.com/marcussacana/DirectPackageInstaller/Updater/OSX-ARM64.zip), [x64](https://raw.githubusercontent.com/marcussacana/DirectPackageInstaller/Updater/OSX-X64.zip)
- OSX App: [ARM64](https://raw.githubusercontent.com/marcussacana/DirectPackageInstaller/Updater/OSX-ARM64-APP.zip), [x64](https://raw.githubusercontent.com/marcussacana/DirectPackageInstaller/Updater/OSX-X64-APP.zip)

### How to Use
- Direct Download Mode
Expand Down Expand Up @@ -72,10 +72,9 @@ Or alternatively the RemotePackageInstaller Homebrew.
- Click at "Install" and wait again.
- It's done, you can't close the DirectPackageInstaller or turn off your computer.

### For OSX Users
You must run the `./DirectPackageInstaller.Desktop` file with help of the terminal
We have App builds as well, but isn't working very well right now, you can try: [OSX x64 App](https://raw.githubusercontent.com/marcussacana/DirectPackageInstaller/Updater/OSX-X64-APP.zip) or [OSX ARM64 App](https://raw.githubusercontent.com/marcussacana/DirectPackageInstaller/Updater/OSX-ARM64-APP.zip).
The App Builds aren't working too well because of permissions problems, that can be easy solved by changing the paths of where the DirectPackageInstaller store his data, but the Auto-Update with the App container not works because the app can't modify himself.
### For OSX CLI Users
You should run the `./DirectPackageInstaller.Desktop` file with help of the terminal
Some cases run with `dotnet DirectPackageInstaller.Desktop.dll` might be necessary.

### How It Works
The tool it self is very simple, the Remote Package Installer have an API that allow you put packages from URLs into your PS4 download queue, the DirectPackageInstaller just use that API to push to your PS4 the download URL, helping only to you preview the PKG that you're installing.
Expand Down

0 comments on commit 35915ae

Please sign in to comment.