diff --git a/.github/workflows/build_supportcompanion.yml b/.github/workflows/build_supportcompanion.yml index 0c9bc13..19d51b0 100644 --- a/.github/workflows/build_supportcompanion.yml +++ b/.github/workflows/build_supportcompanion.yml @@ -42,13 +42,13 @@ jobs: p12-password: ${{ secrets.PKG_CERTIFICATES_P12_PASSWORD_MAOS }} - name: Run build package script - run: ./build.sh "$NOTARY_APP_PASSWORD" - + run: ./build.zsh "Release" "$NOTARY_APP_PASSWORD" + - name: get environment variables id: get_env_var run: | - echo "SC_VERSION=$(/bin/cat ./build_info.txt)" >> $GITHUB_ENV - echo "SC_MAIN_VERSION=$(/bin/cat ./build_info_main.txt)" >> $GITHUB_ENV + echo "SC_VERSION=$(/bin/cat ./build/build_info.txt)" >> $GITHUB_ENV + echo "SC_MAIN_VERSION=$(/bin/cat ./build/build_info_main.txt)" >> $GITHUB_ENV - name: Get Changelog Entry id: changelog_reader @@ -84,10 +84,10 @@ jobs: # Changes ${{ steps.changelog.outputs.changelog }} - files: ${{github.workspace}}/Build/build/*.pkg + files: ${{github.workspace}}/release/*.pkg - name: Upload packages uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 with: name: packages - path: Build/build/ \ No newline at end of file + path: release/ \ No newline at end of file diff --git a/.github/workflows/build_supportcompanion_manual.yml b/.github/workflows/build_supportcompanion_manual.yml index 9b25eef..3d3ca37 100644 --- a/.github/workflows/build_supportcompanion_manual.yml +++ b/.github/workflows/build_supportcompanion_manual.yml @@ -34,13 +34,13 @@ jobs: p12-password: ${{ secrets.PKG_CERTIFICATES_P12_PASSWORD_MAOS }} - name: Run build package script - run: ./build.sh "$NOTARY_APP_PASSWORD" - + run: ./build.zsh "Release" "$NOTARY_APP_PASSWORD" + - name: get environment variables id: get_env_var run: | - echo "SC_VERSION=$(/bin/cat ./build_info.txt)" >> $GITHUB_ENV - echo "SC_MAIN_VERSION=$(/bin/cat ./build_info_main.txt)" >> $GITHUB_ENV + echo "SC_VERSION=$(/bin/cat ./build/build_info.txt)" >> $GITHUB_ENV + echo "SC_MAIN_VERSION=$(/bin/cat ./build/build_info_main.txt)" >> $GITHUB_ENV - name: Get Changelog Entry id: changelog_reader @@ -76,10 +76,10 @@ jobs: # Changes ${{ steps.changelog.outputs.changelog }} - files: ${{github.workspace}}/Build/build/*.pkg + files: ${{github.workspace}}/release/*.pkg - name: Upload packages uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 with: name: packages - path: Build/build/ \ No newline at end of file + path: release/ \ No newline at end of file diff --git a/.github/workflows/build_supportcompanion_prerelease.yml b/.github/workflows/build_supportcompanion_prerelease.yml index b6d84bc..abb7402 100644 --- a/.github/workflows/build_supportcompanion_prerelease.yml +++ b/.github/workflows/build_supportcompanion_prerelease.yml @@ -34,13 +34,13 @@ jobs: p12-password: ${{ secrets.PKG_CERTIFICATES_P12_PASSWORD_MAOS }} - name: Run build package script - run: ./build.sh "$NOTARY_APP_PASSWORD" + run: ./build.zsh "Release" "$NOTARY_APP_PASSWORD" - name: get environment variables id: get_env_var run: | - echo "SC_VERSION=$(/bin/cat ./build_info.txt)" >> $GITHUB_ENV - echo "SC_MAIN_VERSION=$(/bin/cat ./build_info_main.txt)" >> $GITHUB_ENV + echo "SC_VERSION=$(/bin/cat ./build/build_info.txt)" >> $GITHUB_ENV + echo "SC_MAIN_VERSION=$(/bin/cat ./build/build_info_main.txt)" >> $GITHUB_ENV - name: Get Changelog Entry id: changelog_reader @@ -76,10 +76,10 @@ jobs: # Changes ${{ steps.changelog.outputs.changelog }} - files: ${{github.workspace}}/Build/build/*.pkg + files: ${{github.workspace}}/release/*.pkg - name: Upload packages uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 with: name: packages - path: Build/build/ + path: release/ diff --git a/.gitignore b/.gitignore index 53c8ccf..8f75ade 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,11 @@ # ignore vscode stuff .vscode +# ignore xcode stuff +**/xcuserdata/ +**/*.xcuserdatad/ +default.profraw + # ignore build output Build/build LaunchAgent/build @@ -35,4 +40,10 @@ __pycache__/ *.user *.userosscache *.sln.docstates -*.sln.DotSettings.user \ No newline at end of file +*.sln.DotSettings.user + +# ignore build and release files +build/ +release/ +.build/ +buildServer.json \ No newline at end of file diff --git a/App.axaml b/App.axaml deleted file mode 100644 index 970ad4b..0000000 --- a/App.axaml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/App.axaml.cs b/App.axaml.cs deleted file mode 100644 index 6432003..0000000 --- a/App.axaml.cs +++ /dev/null @@ -1,191 +0,0 @@ -using System.Globalization; -using Avalonia; -using Avalonia.Controls; -using Avalonia.Controls.ApplicationLifetimes; -using Avalonia.Markup.Xaml; -using CommunityToolkit.Mvvm.Input; -using Microsoft.Extensions.DependencyInjection; -using ObjCRuntime; -using SukiUI.Dialogs; -using SukiUI.Toasts; -using SupportCompanion.Helpers; -using SupportCompanion.Models; -using SupportCompanion.Services; -using SupportCompanion.ViewModels; -using SupportCompanion.Views; - -namespace SupportCompanion; - -public class App : Application -{ - public App() - { - RegisterAppServices(); - } - - public static AppConfiguration Config { get; private set; } - public IServiceProvider ServiceProvider { get; private set; } - - public override void Initialize() - { - AvaloniaXamlLoader.Load(this); - RegisterAppServices(); - var prefs = new AppConfigHelper(); - try - { - prefs.SetPrefs(); - } - catch (Exception e) - { - var logger = ServiceProvider.GetRequiredService(); - logger.Log("App initialization", "Error loading preferences: " + e.Message, 2); - } - - Config = AppConfigHelper.Config; - } - - private async Task InitializeCultureAsync() - { - var actionService = ServiceProvider.GetRequiredService(); - var mainViewModel = ServiceProvider.GetRequiredService(); - - try - { - var locale = await actionService.RunCommandWithOutput("defaults read NSGlobalDomain AppleLocale"); - locale = locale?.Trim().Replace("_", "-"); - if (locale.Contains("@")) locale = locale.Split('@')[0]; - - if (!string.IsNullOrEmpty(locale)) - { - var cultureInfo = new CultureInfo(locale); - Assets.Resources.Culture = cultureInfo; - } - else - { - Assets.Resources.Culture = CultureInfo.CurrentCulture; - } - } - catch (Exception ex) - { - Console.WriteLine($"Failed to set culture: {ex.Message}"); - Assets.Resources.Culture = CultureInfo.CurrentCulture; - } - - mainViewModel.NativeMenuOpenText = Assets.Resources.Open + " Support Companion"; - mainViewModel.NativeMenuSystemUpdatesText = Assets.Resources.NativeMenuSystemUpdates; - mainViewModel.NativeMenuActionsHeader = Assets.Resources.Actions; - mainViewModel.NativeMenuQuitAppText = Assets.Resources.Exit; - } - - public override async void OnFrameworkInitializationCompleted() - { - //RegisterAppServices(); - await InitializeCultureAsync(); - - if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) - { - desktop.ShutdownMode = ShutdownMode.OnExplicitShutdown; - - DataContext = ServiceProvider.GetRequiredService(); - if (Config.IntuneMode) - Config.MunkiMode = false; - if (Config.AppProfilerMode) - { - Config.MunkiMode = false; - Config.IntuneMode = false; - } - - var updateNotifications = ServiceProvider.GetRequiredService(); - - // Register the URL handler - var urlHandler = new UrlHandler(desktop); - NSAppleEventManager.SharedAppleEventManager.SetEventHandler(urlHandler, - new Selector("handleGetURLEvent:withReplyEvent:"), - AEEventClass.Internet, AEEventID.GetUrl); - - if (Config.ShowDesktopInfo) - { - var transparentWindow = new TransparentWindow(); - transparentWindow.Show(); - } - } - - if (Config.Actions != null && Config.Actions.Count > 0) - { - var mainViewModel = ServiceProvider.GetRequiredService(); - // Create the main "Actions" menu item - var actionsMenuItem = new NativeMenuItem { Header = mainViewModel.NativeMenuActionsHeader }; - actionsMenuItem.Menu = new NativeMenu(); - - // Iterate over the Config.Actions and add them as sub-items - foreach (var action in Config.Actions) - if (action.Value.TryGetValue("Name", out var name) && - action.Value.TryGetValue("Command", out var command)) - { - var subItem = new NativeMenuItem - { - Header = name, - Command = new RelayCommand(() => - { - var actionsService = ServiceProvider.GetRequiredService(); - actionsService.RunCommandWithoutOutput(command); - }) - }; - actionsMenuItem.Menu.Items.Add(subItem); - } - - // Insert the main "Actions" menu item at the third position (index 2) - var trayIcon = TrayIcon.GetIcons(this).First(); - if (trayIcon.Menu.Items.Count > 2) - trayIcon.Menu.Items.Insert(2, actionsMenuItem); - else - trayIcon.Menu.Items.Add(actionsMenuItem); - } - - base.OnFrameworkInitializationCompleted(); - } - - private void RegisterAppServices() - { - var serviceCollection = new ServiceCollection(); - - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - - ServiceProvider = serviceCollection.BuildServiceProvider(); - } -} \ No newline at end of file diff --git a/AppIcon.png b/AppIcon.png new file mode 100644 index 0000000..d861458 Binary files /dev/null and b/AppIcon.png differ diff --git a/Assets/Logger.dylib b/Assets/Logger.dylib deleted file mode 100644 index ccd334e..0000000 Binary files a/Assets/Logger.dylib and /dev/null differ diff --git a/Assets/Resources.Designer.cs b/Assets/Resources.Designer.cs deleted file mode 100644 index d44c9fe..0000000 --- a/Assets/Resources.Designer.cs +++ /dev/null @@ -1,465 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace SupportCompanion.Assets { - using System; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - public class Resources { - - private static System.Resources.ResourceManager resourceMan; - - private static System.Globalization.CultureInfo resourceCulture; - - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - public static System.Resources.ResourceManager ResourceManager { - get { - if (object.Equals(null, resourceMan)) { - System.Resources.ResourceManager temp = new System.Resources.ResourceManager("SupportCompanion.Assets.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - public static System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - public static string DeviceInfoHostName { - get { - return ResourceManager.GetString("DeviceInfoHostName", resourceCulture); - } - } - - public static string DeviceInfoSerialNumber { - get { - return ResourceManager.GetString("DeviceInfoSerialNumber", resourceCulture); - } - } - - public static string DeviceInfoModel { - get { - return ResourceManager.GetString("DeviceInfoModel", resourceCulture); - } - } - - public static string DeviceInfoProcessor { - get { - return ResourceManager.GetString("DeviceInfoProcessor", resourceCulture); - } - } - - public static string DeviceInfoMemory { - get { - return ResourceManager.GetString("DeviceInfoMemory", resourceCulture); - } - } - - public static string DeviceInfoOSVersion { - get { - return ResourceManager.GetString("DeviceInfoOSVersion", resourceCulture); - } - } - - public static string DeviceInfoOSBuild { - get { - return ResourceManager.GetString("DeviceInfoOSBuild", resourceCulture); - } - } - - public static string DeviceInfoIP { - get { - return ResourceManager.GetString("DeviceInfoIP", resourceCulture); - } - } - - public static string DeviceInfoLastReboot { - get { - return ResourceManager.GetString("DeviceInfoLastReboot", resourceCulture); - } - } - - public static string DeviceInfoLastRebootToolTip { - get { - return ResourceManager.GetString("DeviceInfoLastRebootToolTip", resourceCulture); - } - } - - public static string DeviceInfo { - get { - return ResourceManager.GetString("DeviceInfo", resourceCulture); - } - } - - public static string DeviceManagement { - get { - return ResourceManager.GetString("DeviceManagement", resourceCulture); - } - } - - public static string DeviceManagementEnrolled { - get { - return ResourceManager.GetString("DeviceManagementEnrolled", resourceCulture); - } - } - - public static string DeviceManagementEnrollmentDate { - get { - return ResourceManager.GetString("DeviceManagementEnrollmentDate", resourceCulture); - } - } - - public static string Storage { - get { - return ResourceManager.GetString("Storage", resourceCulture); - } - } - - public static string StorageName { - get { - return ResourceManager.GetString("StorageName", resourceCulture); - } - } - - public static string StorageUsage { - get { - return ResourceManager.GetString("StorageUsage", resourceCulture); - } - } - - public static string EvergreenCatalogs { - get { - return ResourceManager.GetString("EvergreenCatalogs", resourceCulture); - } - } - - public static string Battery { - get { - return ResourceManager.GetString("Battery", resourceCulture); - } - } - - public static string BatteryHealth { - get { - return ResourceManager.GetString("BatteryHealth", resourceCulture); - } - } - - public static string BatteryCycleCount { - get { - return ResourceManager.GetString("BatteryCycleCount", resourceCulture); - } - } - - public static string ApplicationInstallProgress { - get { - return ResourceManager.GetString("ApplicationInstallProgress", resourceCulture); - } - } - - public static string Actions { - get { - return ResourceManager.GetString("Actions", resourceCulture); - } - } - - public static string ActionsChangePassword { - get { - return ResourceManager.GetString("ActionsChangePassword", resourceCulture); - } - } - - public static string ActionsReboot { - get { - return ResourceManager.GetString("ActionsReboot", resourceCulture); - } - } - - public static string ActionsRestartIntuneAgent { - get { - return ResourceManager.GetString("ActionsRestartIntuneAgent", resourceCulture); - } - } - - public static string ActionsGetSupport { - get { - return ResourceManager.GetString("ActionsGetSupport", resourceCulture); - } - } - - public static string ActionsGatherLogs { - get { - return ResourceManager.GetString("ActionsGatherLogs", resourceCulture); - } - } - - public static string ActionsSupportInfo { - get { - return ResourceManager.GetString("ActionsSupportInfo", resourceCulture); - } - } - - public static string ActionsSoftwareUpdates { - get { - return ResourceManager.GetString("ActionsSoftwareUpdates", resourceCulture); - } - } - - public static string ActionsOpenMSC { - get { - return ResourceManager.GetString("ActionsOpenMSC", resourceCulture); - } - } - - public static string PendingUpdates { - get { - return ResourceManager.GetString("PendingUpdates", resourceCulture); - } - } - - public static string PendingUpdatesOpenMSC { - get { - return ResourceManager.GetString("PendingUpdatesOpenMSC", resourceCulture); - } - } - - public static string PendingUpdatesOpenCompanyPortal { - get { - return ResourceManager.GetString("PendingUpdatesOpenCompanyPortal", resourceCulture); - } - } - - public static string MenuHome { - get { - return ResourceManager.GetString("MenuHome", resourceCulture); - } - } - - public static string MenuApplications { - get { - return ResourceManager.GetString("MenuApplications", resourceCulture); - } - } - - public static string MenuIdentity { - get { - return ResourceManager.GetString("MenuIdentity", resourceCulture); - } - } - - public static string InstalledApps { - get { - return ResourceManager.GetString("InstalledApps", resourceCulture); - } - } - - public static string InstalledAppsManage { - get { - return ResourceManager.GetString("InstalledAppsManage", resourceCulture); - } - } - - public static string Name { - get { - return ResourceManager.GetString("Name", resourceCulture); - } - } - - public static string Version { - get { - return ResourceManager.GetString("Version", resourceCulture); - } - } - - public static string UserInformation { - get { - return ResourceManager.GetString("UserInformation", resourceCulture); - } - } - - public static string UserInformationLogin - { - get - { - return ResourceManager.GetString("UserInformationLogin", resourceCulture); - - } - } - - public static string UserInformationUsername { - get { - return ResourceManager.GetString("UserInformationUsername", resourceCulture); - } - } - - public static string UserInformationHomeDirectory { - get { - return ResourceManager.GetString("UserInformationHomeDirectory", resourceCulture); - } - } - - public static string KerberosSSORealm { - get { - return ResourceManager.GetString("KerberosSSORealm", resourceCulture); - } - } - - public static string KerberosSSOADUsername { - get { - return ResourceManager.GetString("KerberosSSOADUsername", resourceCulture); - } - } - - public static string KerberosSSOLastLocalPasswordChange { - get { - return ResourceManager.GetString("KerberosSSOLastLocalPasswordChange", resourceCulture); - } - } - - public static string KerberosSSOLastADPasswordChange { - get { - return ResourceManager.GetString("KerberosSSOLastADPasswordChange", resourceCulture); - } - } - - public static string KerberosSSOADPasswordExpiry { - get { - return ResourceManager.GetString("KerberosSSOADPasswordExpiry", resourceCulture); - } - } - - public static string Days { - get { - return ResourceManager.GetString("Days", resourceCulture); - } - } - - public static string DaysAgo { - get { - return ResourceManager.GetString("DaysAgo", resourceCulture); - } - } - - public static string PlatformSSOExtensionIdentifier { - get { - return ResourceManager.GetString("PlatformSSOExtensionIdentifier", resourceCulture); - } - } - - public static string PlatformSSOLoginFrequency { - get { - return ResourceManager.GetString("PlatformSSOLoginFrequency", resourceCulture); - } - } - - public static string PlatformSSOLoginType { - get { - return ResourceManager.GetString("PlatformSSOLoginType", resourceCulture); - } - } - - public static string PlatformSSONewUserAuthorizationMode { - get { - return ResourceManager.GetString("PlatformSSONewUserAuthorizationMode", resourceCulture); - } - } - - public static string PlatformSSOSDKVersion { - get { - return ResourceManager.GetString("PlatformSSOSDKVersion", resourceCulture); - } - } - - public static string PlatformSSOSharedDeviceKeys { - get { - return ResourceManager.GetString("PlatformSSOSharedDeviceKeys", resourceCulture); - } - } - - public static string PlatformSSOUserAuthorizationMode { - get { - return ResourceManager.GetString("PlatformSSOUserAuthorizationMode", resourceCulture); - } - } - - public static string PlatformSSORegistrationCompleted { - get { - return ResourceManager.GetString("PlatformSSORegistrationCompleted", resourceCulture); - } - } - - public static string Open { - get { - return ResourceManager.GetString("Open", resourceCulture); - } - } - - public static string NativeMenuSystemUpdates { - get { - return ResourceManager.GetString("NativeMenuSystemUpdates", resourceCulture); - } - } - - public static string Exit { - get { - return ResourceManager.GetString("Exit", resourceCulture); - } - } - - public static string Close { - get { - return ResourceManager.GetString("Close", resourceCulture); - } - } - - public static string SupportDialogEmail { - get { - return ResourceManager.GetString("SupportDialogEmail", resourceCulture); - } - } - - public static string SupportDialogPhone { - get { - return ResourceManager.GetString("SupportDialogPhone", resourceCulture); - } - } - - public static string DesktopInfoUsedOn { - get { - return ResourceManager.GetString("DesktopInfoUsedOn", resourceCulture); - } - } - - public static string MenuSelfService { - get { - return ResourceManager.GetString("MenuSelfService", resourceCulture); - } - } - - public static string BusyLoading { - get { - return ResourceManager.GetString("BusyLoading", resourceCulture); - } - } - } -} diff --git a/Assets/Resources.de-de.resx b/Assets/Resources.de-de.resx deleted file mode 100644 index eba3171..0000000 --- a/Assets/Resources.de-de.resx +++ /dev/null @@ -1,176 +0,0 @@ - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Aktionen - - - Passwort wechsel - - - Logs - - - Erhalte Support - - - Öffne Kiosk - - - Neustart - - - Neustart: Intune Agent - - - Installations Fortschritt - - - Batterie - - - Ladezyklen - - - Batterie Zustand - - - Schließen - - - Tage - - - Tage her - - - Benutz von - - - Geräteinformationen - - - IP Adresse - - - Letzter Neustart - - - Regelmäßige Neustarts können die Leistung und Langlebigkeit verbessern&#10, indem temporäre Dateien entfernt und Systemressourcen freigegeben werden. - - - Speicher - - - Modell - - - CPU - - - Seriennummer - - - Geräte Management - - - Enrollment Datum - - - Katalog - - - Verlassen - - - Installierte Programme - - - Verwalten - - - AD Passwort Ablaufdatum - - - AD Nutzername - - - Letzte AD Passwort Änderung - - - Letzte lokale Passwortänderung - - - Programme - - - Identität - - - Öffnen - - - Austehende Updates - - - Öffne Firmen Portal - - - Öffne MSC Updates - - - Login Frequenz - - - Login Typ - - - Autorisierungs Methode für neue Nutzer - - - Registrierung komplett - - - Geteilte Geräte Schlüssel - - - Nutzer Authorisierungs Modus - - - Speicher - - - Speichernutzung - - - E-Mail - - - Telefon - - - Nutzerinformationen - - - Heimverzeichnis - - - Nutzername - - - Selbstbedienung - - - Laden... - - \ No newline at end of file diff --git a/Assets/Resources.fr-fr.resx b/Assets/Resources.fr-fr.resx deleted file mode 100644 index 9f28224..0000000 --- a/Assets/Resources.fr-fr.resx +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Informations sur l'appareil - - - Nom - - - Adresse IP - - - Dernier redémarrage - - - MAJ logiciel - - - Récupérer les logs - - - Changer le mdp - - - Support - - - Ouvrir MSC - - - Redémarrer - - - Relancer l'agent intune - - - Information de support - - - Progression des installations d'applications - - - Batterie - - - Nombre de cylces - - - Santé - - - Jours - - - Jours avant - - - Un redémarrage régulier de votre appareil peut améliorer ses performances et sa durée de vie
en nettoyant les fichiers temporaires et en libérant les ressources système. - - - Mémoire - - - Modèle - - - Build Système - - - Version Système - - - Processeur - - - Numéro de série - - - Gestion de l'appareil - - - Enrôlement - - - Date d'enrôlement - - - Catalogues - - - Quitter - - - Applications installées - - - Gérer - - - Expiration du mot de passe AD - - - Nom d'utilisateur AD - - - Dernière modification du mot de passe AD - - - Dernière modification du mot de passe local - - - Domaine - - - Accueil - - - Identité - - - Nom - - - Mises à jour système - - - Ouvrir - - - Mises à jour en attente - - - Ouvrir le portail d'entreprise - - - Ouvrir la mise à jour MSC - - - Indentifiant d'extention - - - Fréquence de connexion - - - Type de connexion - - - Nouveau mode d’autorisation utilisateur - - - Enregistrement terminé - - - Version du Kit de développement - - - Clef d'appareils partagé - - - Mode d'autorisation Utilisateur - - - Stockage - - - Nom - - - Utilisation - - - Infos de l'utilisateur - - - Dossier maison - - - Identifiant - - - Nom d'utilisateur - - - Fermer - - - Téléphone - - - utilisé sur - - - Libre-service - - - Chargement... - - \ No newline at end of file diff --git a/Assets/Resources.nb-no.resx b/Assets/Resources.nb-no.resx deleted file mode 100644 index a25c7c3..0000000 --- a/Assets/Resources.nb-no.resx +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Operasjoner - - - Bytt passord - - - Samle loggfiler - - - Støtte - - - Åpne MSC - - - Omstart - - - Restarte Intune-agenten - - - Oppdateringer - - - Støtteinfo - - - Installasjonsstatus for programmer - - - Batteri - - - Sykluser - - - Helse - - - Lukk - - - dager - - - Dager siden - - - Enhetsinformasjon - - - Navn - - - IP-addresse - - - Sist omstart - - - Å restarte maskinen jevnlig kan forbedre ytelse og levetid
ved å slette midlertidige filer og frigjøre systemressurser. - - - Minne - - - Modell - - - OS-build - - - OS-versjon - - - Prosessor - - - Serielnummer - - - Enhetshåndtering - - - Registrert - - - Registreringsdato - - - Kataloger - - - Avslutt - - - Installerte applikasjoner - - - Håndtere - - - Utløp av AD-passord - - - AD-brukernavn - - - Siste AD-passordbytte - - - Siste lokale passordbytte - - - Domene - - - Applikasjoner - - - Hjem - - - Identitet - - - Navn - - - Systemoppdateringer - - - Åpne - - - Ventende oppdateringer - - - Åpne Firmaportal - - - Åpne MSC-oppdateringer - - - Utvidelsesidentifikator - - - Innloggingsfrekvens - - - Innloggingstype - - - Ny brukerautentiseringsmetode - - - Registrering ferdig - - - SDK-versjon - - - Delte enhetsnøkler - - - Brukertilgangsmetode - - - Lagring - - - Navn - - - Brukt - - - E-post - - - Telefon - - - Brukerinformasjon - - - Hjemmekatalog - - - Identifikator - - - Brukernavn - - - brukt på - - - Selvbetjening - - - Laster... - - \ No newline at end of file diff --git a/Assets/Resources.resx b/Assets/Resources.resx deleted file mode 100644 index 983525b..0000000 --- a/Assets/Resources.resx +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Host Name - - - Serial Number - - - Model - - - Processor - - - Memory - - - OS Version - - - OS Build - - - IP Address - - - Last Reboot - - - Device Information - - - Regularly rebooting your device can enhance its performance and longevity
by clearing temporary files and freeing up system resources. - - - Device Management - - - Enrolled - - - Enrollment Date - - - Storage - - - Name - - - Usage - - - Catalogs - - - Battery - - - Health - - - Cycle Count - - - Application Install Progress - - - Actions - - - Change Password - - - Restart Intune Agent - - - Reboot - - - Get Support - - - Gather Logs - - - Support Info - - - Software Updates - - - Open MSC - - - Pending Updates - - - Open MSC Updates - - - Open Company Portal - - - Home - - - Applications - - - Identity - - - Installed Apps - - - Manage - - - Name - - - Version - - - User Information - - - Login - - - Username - - - Home Directory - - - Realm - - - AD Username - - - Last Local Password Change - - - Last AD Password Change - - - AD Password Expiry - - - days - - - days ago - - - Extension Identifier - - - Login Frequency - - - Login Type - - - New User Authorization Mode - - - SDK Version - - - Shared Device Keys - - - User Authorization Mode - - - Registration Completed - - - Open - - - System Updates - - - Exit - - - Phone - - - Email - - - Close - - - used on - - - Self Service - - - Loading... - - \ No newline at end of file diff --git a/Assets/Resources.sv-se.resx b/Assets/Resources.sv-se.resx deleted file mode 100644 index f8e06e3..0000000 --- a/Assets/Resources.sv-se.resx +++ /dev/null @@ -1,207 +0,0 @@ - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Namn - - - Serienummer - - - Modell - - - Minne - - - Ipaddress - - - Senaste omstart - - - Enhetsinformation - - - Att regelbundet starta om din enhet kan förbättra dess prestanda och livslängd
genom att rensa tillfälliga filer och frigöra systemresurser. - - - Enhetshantering - - - Registrerad - - - Registreringsdatum - - - Lagring - - - Namn - - - Använt - - - Kataloger - - - Batteri - - - Cykler - - - Hälsa - - - Installationsstatus för applikationer - - - Åtgärder - - - Byt lösenord - - - Starta om Intune-agenten - - - Starta om - - - Support - - - Spara loggar - - - Uppdateringar - - - Öppna MSC - - - Väntande uppdateringar - - - Öppna MSC uppdateringar - - - Öppna Company Portal - - - Applikationer - - - Hem - - - Identitet - - - Installerade applikationer - - - Hantera - - - Namn - - - Användarinformation - - - Användarnamn - - - Hemkatalog - - - Utgång av AD-lösenord - - - AD-användarnamn - - - Senaste AD-lösenordsbyte - - - Senaste lokala lösenordsbyte - - - dagar - - - dagar sedan - - - Inloggningsfrekvens - - - Inloggingstyp - - - Ny användarbehörighetsläge - - - - Registrering slutförd - - - - SDK-version - - - Delade enhetsnycklar - - - - Användarbehörighetsläge - - - - OS-build - - - OS-version - - - Öppna - - - Systemuppdateringar - - - Supportinfo - - - Stäng - - - Epost - - - Telefon - - - använt på - - - Självbetjäning - - - Laddar... - - \ No newline at end of file diff --git a/Assets/Uninstall.sh b/Assets/Uninstall.sh deleted file mode 100755 index f708063..0000000 --- a/Assets/Uninstall.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# Script requires root so check for root access -if [ $(id -u) -ne 0 ]; then - echo "Please run this script as root or using sudo" - exit 1 -fi -# Use Apple Recommended Method to detect the user signed in to the desktop -current_user=$(echo "show State:/Users/ConsoleUser" | scutil | awk '/Name :/ && ! /loginwindow/ { print $3 }') -console_user_uid=$(echo "show State:/Users/ConsoleUser" | scutil | awk '/kCGSSessionUserIDKey/ {print $NF; exit}' ) -# Kill the process -echo "Killing the process..." -pkill -f SupportCompanion -# Unload launchctl job -echo "Unloading launchctl job..." -launchctl unload -w /Library/LaunchDaemons/com.almenscorner.supportcompanion.plist -# Remove launchctl job -echo "Removing launchctl job..." -rm /Library/LaunchDaemons/com.almenscorner.supportcompanion.plist -# Remove launch agent -if [ -f "/Library/LaunchAgents/com.almenscorner.supportcompanion.agent.plist" ]; then - echo "Unloading launch agent..." - /bin/launchctl asuser "${console_user_uid}" /bin/launchctl unload -w /Library/LaunchAgents/com.almenscorner.supportcompanion.agent.plist - echo "Removing launch agent..." - rm /Library/LaunchAgents/com.almenscorner.supportcompanion.agent.plist -fi -# Remove the app -echo "Removing the app..." -rm -rf /Applications/Utilities/SupportCompanion.app -# Remove app data -echo "Removing app data..." -rm -rf "/Users/$current_user/Library/Application Support/SupportCompanion" -rm -rf "/Library/Application Support/SupportCompanion" -# Forget the package -echo "Forgetting the package..." -pkgutil --forget com.almenscorner.supportcompanion > /dev/null 2>&1 -pkgutil --forget com.almenscorner.supportcompanion.LaunchAgent > /dev/null 2>&1 -pkgutil --forget com.almenscorner.supportcompanion.suite > /dev/null 2>&1 diff --git a/Assets/appicon.icns b/Assets/appicon.icns deleted file mode 100644 index 99c5b04..0000000 Binary files a/Assets/appicon.icns and /dev/null differ diff --git a/Assets/appicon.png b/Assets/appicon.png deleted file mode 100644 index aad6166..0000000 Binary files a/Assets/appicon.png and /dev/null differ diff --git a/Assets/avalonia-logo.ico b/Assets/avalonia-logo.ico deleted file mode 100644 index da8d49f..0000000 Binary files a/Assets/avalonia-logo.ico and /dev/null differ diff --git a/Assets/scripts/MDMStatus.py b/Assets/scripts/MDMStatus.py deleted file mode 100644 index bf138ac..0000000 --- a/Assets/scripts/MDMStatus.py +++ /dev/null @@ -1,86 +0,0 @@ -#!/Library/ManagedFrameworks/Python/Python3.framework/Versions/Current/bin/python3 - -import json -import subprocess -import re - - -def get_mdm_enrollment_time(): - date = "" - try: - command = "/usr/bin/profiles -P -v | grep -A 10 'Management Profile'" - profiles = subprocess.Popen( - command, - shell=True, - stdout=subprocess.PIPE, - ) - (profile_output, error) = profiles.communicate() - profile_output = profile_output.decode().split("\n") - - for val in profile_output: - if "installationDate" in val: - # Regular expression pattern to match the date - date_pattern = r"\d{4}-\d{2}-\d{2}" - # Search for the date pattern in the input string - date_match = re.search(date_pattern, val) - if date_match is not None: - date = date_match.group(0) - - except Exception as e: - print("Error: %s" % e) - exit(1) - - return date - - -def get_mdm_status(): - mdm_details = {"ABM": "", "enrolled": "", "enrollmentDate": ""} - try: - command = ["/usr/bin/profiles", "status", "-type", "enrollment"] - mdm_status = subprocess.Popen( - command, - shell=False, - stdout=subprocess.PIPE, - ) - (mdm_output, error) = mdm_status.communicate() - mdm_status = mdm_output.decode().split("\n") - abm = "" - enrolled = "" - - for val in mdm_status: - if "Enrolled via DEP" in val: - abm = val.split(":")[1].strip() - if abm == "Yes": - mdm_details["ABM"] = "Yes" - else: - mdm_details["ABM"] = "No" - if "MDM enrollment" in val: - enrolled = val.split(":")[1].strip() - if "Yes" in enrolled: - mdm_details["enrolled"] = enrolled - else: - mdm_details["enrolled"] = "No" - - mdm_details["enrollmentDate"] = get_mdm_enrollment_time() - except Exception as e: - print("Error: %s" % e) - exit(1) - - return mdm_details - - -def write_status(status): - with open( - "/Library/Application Support/SupportCompanion/mdm_status.json", - "w", - ) as f: - f.write(json.dumps(status)) - - -def main(): - mdm_status = get_mdm_status() - write_status(mdm_status) - - -if __name__ == "__main__": - main() diff --git a/Assets/trayiconTemplate.png b/Assets/trayiconTemplate.png deleted file mode 100644 index 3041b82..0000000 Binary files a/Assets/trayiconTemplate.png and /dev/null differ diff --git a/Build/payload/Library/Application Support/SupportCompanion/scripts/MDMStatus b/Build/payload/Library/Application Support/SupportCompanion/scripts/MDMStatus deleted file mode 100755 index bf138ac..0000000 --- a/Build/payload/Library/Application Support/SupportCompanion/scripts/MDMStatus +++ /dev/null @@ -1,86 +0,0 @@ -#!/Library/ManagedFrameworks/Python/Python3.framework/Versions/Current/bin/python3 - -import json -import subprocess -import re - - -def get_mdm_enrollment_time(): - date = "" - try: - command = "/usr/bin/profiles -P -v | grep -A 10 'Management Profile'" - profiles = subprocess.Popen( - command, - shell=True, - stdout=subprocess.PIPE, - ) - (profile_output, error) = profiles.communicate() - profile_output = profile_output.decode().split("\n") - - for val in profile_output: - if "installationDate" in val: - # Regular expression pattern to match the date - date_pattern = r"\d{4}-\d{2}-\d{2}" - # Search for the date pattern in the input string - date_match = re.search(date_pattern, val) - if date_match is not None: - date = date_match.group(0) - - except Exception as e: - print("Error: %s" % e) - exit(1) - - return date - - -def get_mdm_status(): - mdm_details = {"ABM": "", "enrolled": "", "enrollmentDate": ""} - try: - command = ["/usr/bin/profiles", "status", "-type", "enrollment"] - mdm_status = subprocess.Popen( - command, - shell=False, - stdout=subprocess.PIPE, - ) - (mdm_output, error) = mdm_status.communicate() - mdm_status = mdm_output.decode().split("\n") - abm = "" - enrolled = "" - - for val in mdm_status: - if "Enrolled via DEP" in val: - abm = val.split(":")[1].strip() - if abm == "Yes": - mdm_details["ABM"] = "Yes" - else: - mdm_details["ABM"] = "No" - if "MDM enrollment" in val: - enrolled = val.split(":")[1].strip() - if "Yes" in enrolled: - mdm_details["enrolled"] = enrolled - else: - mdm_details["enrolled"] = "No" - - mdm_details["enrollmentDate"] = get_mdm_enrollment_time() - except Exception as e: - print("Error: %s" % e) - exit(1) - - return mdm_details - - -def write_status(status): - with open( - "/Library/Application Support/SupportCompanion/mdm_status.json", - "w", - ) as f: - f.write(json.dumps(status)) - - -def main(): - mdm_status = get_mdm_status() - write_status(mdm_status) - - -if __name__ == "__main__": - main() diff --git a/Build/payload/Library/LaunchDaemons/com.almenscorner.supportcompanion.plist b/Build/payload/Library/LaunchDaemons/com.almenscorner.supportcompanion.plist deleted file mode 100755 index 9cd5979..0000000 --- a/Build/payload/Library/LaunchDaemons/com.almenscorner.supportcompanion.plist +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Label - com.almenscorner.supportcompanion.plist - ProgramArguments - - /Library/Application Support/SupportCompanion/scripts/MDMStatus - - RunAtLoad - - StartInterval - 3600 - - \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 28420b2..ff407ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,46 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.0.0] - 2024-12-02 +### AKA the Swift Update + +### Changed +- The entire project has been migrated from **C# and AvaloniaUI/SukiUI** to **Swift and SwiftUI**, bringing significant improvements: + - A more responsive and fluid user interface. + - A native macOS look and feel for a seamless experience. + - Superior memory management and overall performance enhancements. + +- The following configurations and identifiers have changed: + - **Bundle ID**: Updated, requiring the uninstallation of version 1.x before installing 2.0. + - **Icons**: Redesigned for better alignment with macOS standards. + - **Configuration Keys**: Some keys have been deprecated or updated. + +### Deprecated +The following configuration keys have been removed: +- `BrandColor` +- `HiddenWidgets` +- `CustomColors` +- `IntuneMode` +- `ShowMenuToggle` +- `DesktopInfoCustomItems` +- `DesktopInfoBackgroundColor` +- `DesktopInfoColorHighlight` +- `CustomWidgetsPath` +- `SystemProfilerApps` + +### Updated +- **`DesktopInfoLevel`**: + - Previously a `string`, now an `integer`. + - Removed string values: `Minimal`, `Hardware`, `Full`, `Custom`. + - Added numeric levels: `1-5`. + +### Notes +- A clean uninstall of version 1.x is required before installing 2.0. Use the script located at: + ```bash + /Applications/Utilities/SupportCompanion.app/Contents/Resources/Uninstall.sh + ``` + For additional migration information, refer to the [migration guide](https://github.com/macadmins/SupportCompanion/wiki/Migrating-from-version-1.X-to-2.0). + ## [1.4.0] - 2024-11-06 ### Changed - Avalonia and SukiUI has been updated. @@ -205,4 +245,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [1.0.0] - 2024-05-25 -This is the first production release of Support Companion! :tada: \ No newline at end of file +This is the first production release of Support Companion! :tada: diff --git a/Common/ViewLocator.cs b/Common/ViewLocator.cs deleted file mode 100644 index f26b09d..0000000 --- a/Common/ViewLocator.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System.ComponentModel; -using Avalonia.Controls; -using Avalonia.Controls.Templates; - -namespace SupportCompanion.Common; - -public class ViewLocator : IDataTemplate -{ - private readonly Dictionary _controlCache = new(); - - public Control Build(object? data) - { - if (data is null) - return new TextBlock { Text = "Data is null." }; - - var fullName = data.GetType().FullName; - - if (string.IsNullOrWhiteSpace(fullName)) - return new TextBlock { Text = "Type has no name, or name is empty." }; - - var name = fullName.Replace("ViewModel", "View"); - var type = Type.GetType(name); - if (type is null) - return new TextBlock { Text = $"No View For {name}." }; - - if (!_controlCache.TryGetValue(data, out var res)) - { - res ??= (Control)Activator.CreateInstance(type)!; - _controlCache[data] = res; - } - - res.DataContext = data; - return res; - } - - public bool Match(object? data) - { - return data is INotifyPropertyChanged; - } -} \ No newline at end of file diff --git a/CustomControls/BadgedButton.axaml b/CustomControls/BadgedButton.axaml deleted file mode 100644 index 984cc8e..0000000 --- a/CustomControls/BadgedButton.axaml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - -