diff --git a/ChromaSDK/ChromaSDK.csproj b/ChromaSDK/ChromaSDK.csproj index 1a1da3a..505f2e9 100644 --- a/ChromaSDK/ChromaSDK.csproj +++ b/ChromaSDK/ChromaSDK.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 x64;ARM64 diff --git a/Compatible/Compatible.csproj b/Compatible/Compatible.csproj index 246ffe5..73359e2 100644 --- a/Compatible/Compatible.csproj +++ b/Compatible/Compatible.csproj @@ -1,6 +1,6 @@  - net7.0 + net8.0 x64;ARM64 enable embedded diff --git a/FMODCoreAPI/FMODCoreAPI.csproj b/FMODCoreAPI/FMODCoreAPI.csproj index 2ff45cf..cf867e7 100644 --- a/FMODCoreAPI/FMODCoreAPI.csproj +++ b/FMODCoreAPI/FMODCoreAPI.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 x64;ARM64 diff --git a/Language/Language.csproj b/Language/Language.csproj index 8f319a8..ec0fe85 100644 --- a/Language/Language.csproj +++ b/Language/Language.csproj @@ -1,7 +1,7 @@ Exe - net7.0 + net8.0 x64;ARM64 enable enable diff --git a/LedCSharp/LedCSharp.csproj b/LedCSharp/LedCSharp.csproj index 668d5d4..57101a2 100644 --- a/LedCSharp/LedCSharp.csproj +++ b/LedCSharp/LedCSharp.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 x64;ARM64 diff --git a/Protobuf/Protobuf.csproj b/Protobuf/Protobuf.csproj index c576f78..ee5d576 100644 --- a/Protobuf/Protobuf.csproj +++ b/Protobuf/Protobuf.csproj @@ -1,6 +1,6 @@  - net7.0 + net8.0 x64;ARM64 diff --git a/Qwilight.cmd b/Qwilight.cmd index e93957c..4670f9e 100644 --- a/Qwilight.cmd +++ b/Qwilight.cmd @@ -5,8 +5,8 @@ SET VS2022=%PROGRAMFILES%\Microsoft Visual Studio\2022\Community SET MSBUILD=%VS2022%\Msbuild\Current\Bin\MSBuild.exe SET BANDIZIP=%PROGRAMFILES%\Bandizip\bz.exe -SET WIN10X64=bin\x64\Release\net7.0-windows10.0.22621.0\win10-x64 -SET PUBLISH=Qwilight\%WIN10X64%\publish +SET WINX64=bin\x64\Release\net8.0-windows10.0.22621.0\win-x64 +SET PUBLISH=Qwilight\%WINX64%\publish DEL Qwilight.zip @@ -15,10 +15,10 @@ CHOICE /M TEST SET TEST=%ERRORLEVEL% IF %TEST% == 1 ( - RMDIR /S /Q Test\%WIN10X64% - Robocopy Test\qpdgo\Bundle Test\%WIN10X64%\qpdgo\Bundle /MIR - MKDIR Test\%WIN10X64%\qpdgo\UI - "%BANDIZIP%" x -target:auto Test\qpdgo\UI\*.zip Test\%WIN10X64%\qpdgo\UI + RMDIR /S /Q Test\%WINX64% + Robocopy Test\qpdgo\Bundle Test\%WINX64%\qpdgo\Bundle /MIR + MKDIR Test\%WINX64%\qpdgo\UI + "%BANDIZIP%" x -target:auto Test\qpdgo\UI\*.zip Test\%WINX64%\qpdgo\UI ) IF %TEST% == 1 ( dotnet test Test\Test.csproj -c Release -p:Platform=x64 diff --git a/Qwilight/Assets/ARM64/Microsoft.WindowsAppRuntime.Bootstrap.dll b/Qwilight/Assets/ARM64/Microsoft.WindowsAppRuntime.Bootstrap.dll new file mode 100644 index 0000000..b4a475a --- /dev/null +++ b/Qwilight/Assets/ARM64/Microsoft.WindowsAppRuntime.Bootstrap.dll @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ebbf4b33df00b5af1f60f82055909f261a659b327b148d837d552910abe1f429 +size 194480 diff --git a/Qwilight/Assets/x64/Microsoft.WindowsAppRuntime.Bootstrap.dll b/Qwilight/Assets/x64/Microsoft.WindowsAppRuntime.Bootstrap.dll new file mode 100644 index 0000000..beede3f --- /dev/null +++ b/Qwilight/Assets/x64/Microsoft.WindowsAppRuntime.Bootstrap.dll @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dca6c76137a21eb065333fbc5dbc554a0c0cd340823d3d8a96a4a7caa8680019 +size 193464 diff --git a/Qwilight/Qwilight.csproj b/Qwilight/Qwilight.csproj index aebe3dc..9ecbd23 100644 --- a/Qwilight/Qwilight.csproj +++ b/Qwilight/Qwilight.csproj @@ -1,9 +1,10 @@  WinExe - net7.0-windows10.0.22621.0 + net8.0-windows10.0.22621.0 10.0.17763.0 - True + true + true Debug;Release x64;ARM64 Qwilight.ico @@ -12,7 +13,7 @@ 1.16.10.568 1.16.10.568 1.16.10 - True + true enable true None @@ -22,16 +23,20 @@ true + + + + $(DefineConstants);X64 x64 - win10-x64 + win-x64 $(DefineConstants);ARM64 ARM64 - win10-arm64 + win-arm64 @@ -208,6 +213,9 @@ Always + + Always + Always @@ -268,6 +276,9 @@ Always + + Always + Always diff --git a/Qwilight/System/AudioSystem/AudioSystem.cs b/Qwilight/System/AudioSystem/AudioSystem.cs index 93ad2e0..fad3855 100644 --- a/Qwilight/System/AudioSystem/AudioSystem.cs +++ b/Qwilight/System/AudioSystem/AudioSystem.cs @@ -232,6 +232,8 @@ public AudioSystem() { + Utility.CopyFile(Path.Combine(QwilightComponent.CPUAssetsEntryPath, "fmod.dll"), Path.Combine(AppContext.BaseDirectory, "fmod.dll")); + _onModified = (system, type, commanddata1, commanddata2, userdata) => { _targetSystem.getNumDrivers(out var audioValueCount); diff --git a/Qwilight/System/DrawingSystem/DrawingSystem.cs b/Qwilight/System/DrawingSystem/DrawingSystem.cs index 50be5e6..f56ff38 100644 --- a/Qwilight/System/DrawingSystem/DrawingSystem.cs +++ b/Qwilight/System/DrawingSystem/DrawingSystem.cs @@ -122,6 +122,11 @@ public DrawingSystem() { + Utility.CopyFile(Path.Combine(QwilightComponent.CPUAssetsEntryPath, "sl.common.dll"), Path.Combine(AppContext.BaseDirectory, "sl.common.dll")); + Utility.CopyFile(Path.Combine(QwilightComponent.CPUAssetsEntryPath, "sl.interposer.dll"), Path.Combine(AppContext.BaseDirectory, "sl.interposer.dll")); + Utility.CopyFile(Path.Combine(QwilightComponent.CPUAssetsEntryPath, "sl.reflex.dll"), Path.Combine(AppContext.BaseDirectory, "sl.reflex.dll")); + Utility.CopyFile(Path.Combine(QwilightComponent.CPUAssetsEntryPath, "NVIDIA.dll"), Path.Combine(AppContext.BaseDirectory, "NVIDIA.dll")); + CanvasDevice.GetSharedDevice().DeviceLost += (sender, args) => { StrongReferenceMessenger.Default.Send(new ViewAllowWindow diff --git a/Qwilight/System/IlluminationSystem/BWSystem.cs b/Qwilight/System/IlluminationSystem/BWSystem.cs index 7ad8fc4..1d36301 100644 --- a/Qwilight/System/IlluminationSystem/BWSystem.cs +++ b/Qwilight/System/IlluminationSystem/BWSystem.cs @@ -1,6 +1,7 @@ using ChromaSDK; using Microsoft.UI; using Qwilight.Utilities; +using System.IO; using Windows.System; using Windows.UI; @@ -117,6 +118,11 @@ int[] _dataAudio; int[] _dataPanel; + BWSystem() + { + Utility.CopyFile(Path.Combine(QwilightComponent.CPUAssetsEntryPath, "LogitechLedEnginesWrapper.dll"), Path.Combine(AppContext.BaseDirectory, "LogitechLedEnginesWrapper.dll")); + } + public override bool IsAvailable => Configure.Instance.BW; public override bool Init() diff --git a/Qwilight/System/IlluminationSystem/LSSystem.cs b/Qwilight/System/IlluminationSystem/LSSystem.cs index 5a05f7d..bfd2300 100644 --- a/Qwilight/System/IlluminationSystem/LSSystem.cs +++ b/Qwilight/System/IlluminationSystem/LSSystem.cs @@ -1,5 +1,7 @@ using LedCSharp; using Microsoft.UI; +using Qwilight.Utilities; +using System.IO; using Windows.System; using Windows.UI; @@ -110,15 +112,14 @@ _ => 0 }; - readonly keyboardNames[] _inputs; + readonly keyboardNames[] _inputs = (Enum.GetValues(typeof(keyboardNames)) as keyboardNames[]); readonly Dictionary _illuminatedIDs = new(); LSSystem() { - _inputs = (Enum.GetValues(typeof(keyboardNames)) as keyboardNames[]); + Utility.CopyFile(Path.Combine(QwilightComponent.CPUAssetsEntryPath, "LogitechLedEnginesWrapper.dll"), Path.Combine(AppContext.BaseDirectory, "LogitechLedEnginesWrapper.dll")); } - public override bool IsAvailable => Configure.Instance.LS; public override bool Init() diff --git a/Qwilight/System/TVSystem.cs b/Qwilight/System/TVSystem.cs index cbdacd7..912bf0c 100644 --- a/Qwilight/System/TVSystem.cs +++ b/Qwilight/System/TVSystem.cs @@ -42,7 +42,7 @@ public bool TVAssists => TVAssist0 || TVAssist1; - bool IsAvailable => !ViewModels.Instance.MainValue.IsHPCMode; + bool IsAvailable => !ViewModels.Instance.MainValue.IsCaffeine; public void HandleSystemIfAvailable() { diff --git a/Qwilight/System/TelnetSystem/TelnetSystem.cs b/Qwilight/System/TelnetSystem/TelnetSystem.cs index fa592d9..c8895c4 100644 --- a/Qwilight/System/TelnetSystem/TelnetSystem.cs +++ b/Qwilight/System/TelnetSystem/TelnetSystem.cs @@ -3,11 +3,12 @@ namespace Qwilight { - public sealed class TelnetSystem : IHandleTelnet + public sealed class TelnetSystem : Model, IHandleTelnet { - public static readonly TelnetSystem Instance = new(); + public static readonly TelnetSystem Instance = QwilightComponent.GetBuiltInData(nameof(TelnetSystem)); bool _isAlwaysNewStand; + bool _isAvailable; public bool IsAlwaysNewStand { @@ -16,7 +17,12 @@ set => _isAlwaysNewStand = value; } - public bool IsAvailable { get; set; } + public bool IsAvailable + { + get => _isAvailable; + + set => SetProperty(ref _isAvailable, value, nameof(IsAvailable)); + } DefaultTelnetSystem _defaultTelnetSystem; diff --git a/Qwilight/System/TwilightSystem.cs b/Qwilight/System/TwilightSystem.cs index 3242183..e30246a 100644 --- a/Qwilight/System/TwilightSystem.cs +++ b/Qwilight/System/TwilightSystem.cs @@ -1573,7 +1573,7 @@ public async Task GetDefaultUIDate(long defaultUIDate, bool isSilent) { var twilightWwwDefaultDate = await GetWwwParallel($"{QwilightComponent.QwilightAPI}/defaultUIDate?date={defaultUIDate}").ConfigureAwait(false); - if (twilightWwwDefaultDate.HasValue && !ViewModels.Instance.MainValue.IsHPCMode) + if (twilightWwwDefaultDate.HasValue && !ViewModels.Instance.MainValue.IsCaffeine) { var date = twilightWwwDefaultDate.Value.date; Configure.Instance.DefaultUIDate = date; diff --git a/Qwilight/System/ValveSystem.cs b/Qwilight/System/ValveSystem.cs index 7550f2a..d7417dc 100644 --- a/Qwilight/System/ValveSystem.cs +++ b/Qwilight/System/ValveSystem.cs @@ -5,6 +5,7 @@ using System.Buffers; using System.IO; using Windows.Graphics.DirectX; +using Utility = Qwilight.Utilities.Utility; namespace Qwilight { @@ -22,6 +23,7 @@ { if (QwilightComponent.IsValve) { + Utility.CopyFile(Path.Combine(QwilightComponent.CPUAssetsEntryPath, "steam_api64.dll"), Path.Combine(AppContext.BaseDirectory, "steam_api64.dll")); try { SteamClient.Init(QwilightComponent.AssetsClientJSON.valve); diff --git a/Qwilight/View/Assets/Assets.xaml b/Qwilight/View/Assets/Assets.xaml index c600d99..18b1510 100644 --- a/Qwilight/View/Assets/Assets.xaml +++ b/Qwilight/View/Assets/Assets.xaml @@ -19,6 +19,7 @@ + 0 diff --git a/Qwilight/View/QwilightClass.xaml.cs b/Qwilight/View/QwilightClass.xaml.cs index 399448a..fbcee48 100644 --- a/Qwilight/View/QwilightClass.xaml.cs +++ b/Qwilight/View/QwilightClass.xaml.cs @@ -53,6 +53,7 @@ ProfileOptimization.SetProfileRoot(QwilightComponent.QwilightEntryPath); ProfileOptimization.StartProfile("Qwilight.$"); + Utility.CopyFile(Path.Combine(QwilightComponent.CPUAssetsEntryPath, "Microsoft.WindowsAppRuntime.Bootstrap.dll"), Path.Combine(AppContext.BaseDirectory, "Microsoft.WindowsAppRuntime.Bootstrap.dll")); if (!Bootstrap.TryInitialize(65540U, out _)) { #if X64 @@ -151,19 +152,6 @@ Utility.CopyEntry(Path.Combine(QwilightComponent.AssetsEntryPath, "UI"), Path.Combine(QwilightComponent.UIEntryPath)); - Utility.CopyFile(Path.Combine(QwilightComponent.CPUAssetsEntryPath, "Igniter.exe"), Path.Combine(QwilightComponent.UtilityEntryPath, "Igniter.exe")); - - Utility.CopyFile(Path.Combine(QwilightComponent.CPUAssetsEntryPath, "sl.common.dll"), Path.Combine(AppContext.BaseDirectory, "sl.common.dll")); - Utility.CopyFile(Path.Combine(QwilightComponent.CPUAssetsEntryPath, "sl.interposer.dll"), Path.Combine(AppContext.BaseDirectory, "sl.interposer.dll")); - Utility.CopyFile(Path.Combine(QwilightComponent.CPUAssetsEntryPath, "sl.reflex.dll"), Path.Combine(AppContext.BaseDirectory, "sl.reflex.dll")); - Utility.CopyFile(Path.Combine(QwilightComponent.CPUAssetsEntryPath, "NVIDIA.dll"), Path.Combine(AppContext.BaseDirectory, "NVIDIA.dll")); - - Utility.CopyFile(Path.Combine(QwilightComponent.CPUAssetsEntryPath, "CChromaEditorLibrary64.dll"), Path.Combine(AppContext.BaseDirectory, "CChromaEditorLibrary64.dll")); - - Utility.CopyFile(Path.Combine(QwilightComponent.CPUAssetsEntryPath, "fmod.dll"), Path.Combine(AppContext.BaseDirectory, "fmod.dll")); - - Utility.CopyFile(Path.Combine(QwilightComponent.CPUAssetsEntryPath, "LogitechLedEnginesWrapper.dll"), Path.Combine(AppContext.BaseDirectory, "LogitechLedEnginesWrapper.dll")); - Utility.CopyFile(Path.Combine(QwilightComponent.CPUAssetsEntryPath, "concrt140_app.dll"), Path.Combine(AppContext.BaseDirectory, "concrt140_app.dll")); Utility.CopyFile(Path.Combine(QwilightComponent.CPUAssetsEntryPath, "msvcp140_1_app.dll"), Path.Combine(AppContext.BaseDirectory, "msvcp140_1_app.dll")); Utility.CopyFile(Path.Combine(QwilightComponent.CPUAssetsEntryPath, "msvcp140_2_app.dll"), Path.Combine(AppContext.BaseDirectory, "msvcp140_2_app.dll")); @@ -176,11 +164,6 @@ #endif Utility.CopyFile(Path.Combine(QwilightComponent.CPUAssetsEntryPath, "vcruntime140_app.dll"), Path.Combine(AppContext.BaseDirectory, "vcruntime140_app.dll")); - if (QwilightComponent.IsValve) - { - Utility.CopyFile(Path.Combine(QwilightComponent.CPUAssetsEntryPath, "steam_api64.dll"), Path.Combine(AppContext.BaseDirectory, "steam_api64.dll")); - } - var qwilightBundleFilePath = Path.Combine(QwilightComponent.QwilightEntryPath, "Qwilight.zip"); if (File.Exists(qwilightBundleFilePath)) { diff --git a/Qwilight/View/WwwLevelWindow.xaml b/Qwilight/View/WwwLevelWindow.xaml index f3b81ba..163319c 100644 --- a/Qwilight/View/WwwLevelWindow.xaml +++ b/Qwilight/View/WwwLevelWindow.xaml @@ -83,8 +83,10 @@ + + diff --git a/Qwilight/ViewModel/MainViewModel.cs b/Qwilight/ViewModel/MainViewModel.cs index 86b7737..e03d51f 100644 --- a/Qwilight/ViewModel/MainViewModel.cs +++ b/Qwilight/ViewModel/MainViewModel.cs @@ -239,7 +239,7 @@ { IsVisible = !value }); - IsHPCMode = IsComputingMode && !value; + IsCaffeine = IsComputingMode && !value; ViewModels.Instance.NotifyWindowViewModels(); var handlingComputer = GetHandlingComputer(); if (handlingComputer != null) @@ -252,7 +252,7 @@ } } - public bool IsHPCMode { get; set; } + public bool IsCaffeine { get; set; } public bool HasPoint { get; set; } @@ -1627,6 +1627,7 @@ { if (_qwilightFileName.IsTailCaselsss(".zip")) { + Utility.CopyFile(Path.Combine(QwilightComponent.CPUAssetsEntryPath, "Igniter.exe"), Path.Combine(QwilightComponent.UtilityEntryPath, "Igniter.exe")); try { Process.Start(new ProcessStartInfo(Path.Combine(QwilightComponent.UtilityEntryPath, "Igniter.exe"), $"\"{_qwilightFileName}\"") @@ -2006,11 +2007,11 @@ try { noteFile.SetNoteIDs(noteID128, noteID256, noteID512); - noteFile.SetData(); if (!FastDB.Instance.GetNoteFile(noteFile)) { noteFile.Compile(Environment.TickCount, setCancelDefaultEntryItem); } + noteFile.SetData(); targetNoteFiles.Add(noteFile); } catch (OperationCanceledException) @@ -2042,6 +2043,7 @@ { noteFile.Compile(Environment.TickCount, setCancelDefaultEntryItem); } + noteFile.SetData(); targetNoteFiles.Add(noteFile); } catch (OperationCanceledException) diff --git a/Qwilight/ViewModel/WwwLevelViewModel.cs b/Qwilight/ViewModel/WwwLevelViewModel.cs index 2227f7f..20a0dce 100644 --- a/Qwilight/ViewModel/WwwLevelViewModel.cs +++ b/Qwilight/ViewModel/WwwLevelViewModel.cs @@ -66,6 +66,21 @@ } } + readonly WwwLevelData _wwwLevelDataValue = new WwwLevelData(); + readonly double[] _audioMultipliers = new double[2]; + WwwLevelAvatar _wwwLevelAvatarValue; + string _wwwLevelName; + bool _isAvatarIDsLoading; + bool _isLevelNamesLoading; + bool _isLevelNameLoading; + WwwLevelItem _wwwLevelItem; + string _levelID; + string _title; + string _comment; + string _drawing; + bool _allowPause; + bool _isLevelItemLoading; + [RelayCommand] void OnWwwLevelTest() => WwwLevelAvatarValue = null; @@ -192,11 +207,40 @@ public bool HasClearedTitleItem => ClearedTitleItemCollection.Count > 0; - public string Title { get; set; } + public string LevelID + { + get => _levelID; - public string Comment { get; set; } + set => SetProperty(ref _levelID, value, nameof(LevelID)); + } - public bool AllowPause { get; set; } + public string Title + { + get => _title; + + set => SetProperty(ref _title, value, nameof(Title)); + } + + public string Comment + { + get => _comment; + + set => SetProperty(ref _comment, value, nameof(Comment)); + } + + public string Drawing + { + get => _drawing; + + set => SetProperty(ref _drawing, value, nameof(Drawing)); + } + + public bool AllowPause + { + get => _allowPause; + + set => SetProperty(ref _allowPause, value, nameof(AllowPause)); + } public string[] StandContents { get; } = new string[2]; @@ -278,11 +322,10 @@ { var twilightWwwLevelValue = twilightWwwLevel.Value; + LevelID = value.LevelID; Title = value.Title; - OnPropertyChanged(nameof(Title)); - Comment = value.Comment; - OnPropertyChanged(nameof(Comment)); + Drawing = $"{QwilightComponent.QwilightAPI}/drawing?levelID={LevelID}"; Array.Fill(StandContents, null); if (twilightWwwLevelValue.stand != null) @@ -387,7 +430,6 @@ _wwwLevelDataValue.JudgmentContents[(int)Component.Judged.Lowest] = JudgmentContents[(int)Component.Judged.Lowest] != null ? $"Failed {string.Join(" ", JudgmentContents[(int)Component.Judged.Lowest]).Trim()}" : null; AllowPause = twilightWwwLevelValue.allowPause; - OnPropertyChanged(nameof(AllowPause)); _wwwLevelDataValue.AllowPause = twilightWwwLevelValue.allowPause; var mainViewModel = ViewModels.Instance.MainValue; @@ -683,16 +725,6 @@ OnPropertyChanged(nameof(HasEventNote)); } - readonly WwwLevelData _wwwLevelDataValue = new WwwLevelData(); - readonly double[] _audioMultipliers = new double[2]; - WwwLevelAvatar _wwwLevelAvatarValue; - string _wwwLevelName; - bool _isAvatarIDsLoading; - bool _isLevelNamesLoading; - bool _isLevelNameLoading; - WwwLevelItem _wwwLevelItem; - bool _isLevelItemLoading; - public bool IsLevelNameLoading { get => _isLevelNameLoading; diff --git a/Qwilight/sdk/tools/ContentBuilder/scripts/simple_app_build.vdf b/Qwilight/sdk/tools/ContentBuilder/scripts/simple_app_build.vdf index 7b4d5f4..eef3ffc 100644 --- a/Qwilight/sdk/tools/ContentBuilder/scripts/simple_app_build.vdf +++ b/Qwilight/sdk/tools/ContentBuilder/scripts/simple_app_build.vdf @@ -3,7 +3,7 @@ "AppID" "1910130" // your AppID "Desc" "This is a simple build script" // internal description for this build - "ContentRoot" "..\..\..\..\bin\x64\Release\net7.0-windows10.0.22621.0\win10-x64\publish\" // root content folder, relative to location of this file + "ContentRoot" "..\..\..\..\bin\x64\Release\net8.0-windows10.0.22621.0\win-x64\publish\" // root content folder, relative to location of this file "BuildOutput" "..\output\" // build output folder for build logs and build cache files "Depots" diff --git a/Test/Test.csproj b/Test/Test.csproj index 4618684..2b55987 100644 --- a/Test/Test.csproj +++ b/Test/Test.csproj @@ -1,6 +1,6 @@  - net7.0-windows10.0.22621.0 + net8.0-windows10.0.22621.0 enable enable false @@ -13,13 +13,13 @@ $(DefineConstants);X64 x64 - win10-x64 + win-x64 $(DefineConstants);ARM64 ARM64 - win10-arm64 + win-arm64