Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The UI + various other fixes and reworks #25

Merged
merged 95 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
a09931b
OSCQuery auto discover send port
Natsumi-sama Feb 26, 2024
49db53b
OSCQuery Quest standalone support
Natsumi-sama Mar 3, 2024
fc1c27d
Ui init
Natsumi-sama Mar 6, 2024
2be9f63
Ui init 1
Natsumi-sama Mar 8, 2024
4b44628
Create NSIS installer
Natsumi-sama Mar 9, 2024
b4ade96
Auto fetch shockers, debug all avatar parameters
Natsumi-sama Mar 11, 2024
70a89fe
Cleanup auth state handling
Natsumi-sama Mar 11, 2024
62f8306
Add updater
Natsumi-sama Mar 13, 2024
fdea2ba
Update .NET deps
Natsumi-sama Mar 13, 2024
d2d3c0d
Rework log sink and log page
LucHeart Mar 15, 2024
4b64da6
Shocker nicknames
Natsumi-sama Mar 15, 2024
f8f78b7
Minimum window size
Natsumi-sama Mar 15, 2024
d36249f
Refactor namespae, limit update rate in params
LucHeart Mar 16, 2024
613702f
Impl enable/disable shockers
LucHeart Mar 16, 2024
2ff4af1
Yes
LucHeart Apr 4, 2024
3d23720
Fix activePageIndex, Add AnyIntensity & AnyCooldownPercentage
Natsumi-sama Apr 4, 2024
66a7486
Fix ms logger spam :)
LucHeart Apr 4, 2024
d104c9f
Build out UnderscoreConfig
Natsumi-sama Apr 4, 2024
5ded87f
Split off parts, and rework backend logic
LucHeart Apr 5, 2024
942a8b8
More layout split
LucHeart Apr 6, 2024
e2f5ed9
More groups rework
LucHeart Apr 6, 2024
7f8d46a
yes
LucHeart Apr 7, 2024
a3256fb
fix config debounce
LucHeart Apr 7, 2024
1342fdb
OscQuery toggle, remove relative %, fix debug param list
Natsumi-sama Apr 7, 2024
3354cf6
Rework all of the config stuff and parts of the osc query server
LucHeart Apr 8, 2024
5d93214
Fix avatar change not being handled properly
LucHeart Apr 9, 2024
70a8fff
Split off more logic from ShockOsc.cs
LucHeart Apr 9, 2024
94e0cb3
Move stuff around
LucHeart Apr 9, 2024
9210109
remove useless exception, if this fails we are in the shits anyways
LucHeart Apr 9, 2024
ad355a1
Nav rework lol
LucHeart Apr 9, 2024
055d3b3
connection state display, live control impl
LucHeart Apr 14, 2024
62d1a9a
auth page improvements
LucHeart Apr 15, 2024
703f636
Add le sys tray
LucHeart Apr 18, 2024
56acf30
Debounced slider
LucHeart Apr 18, 2024
552f647
Group options
LucHeart Apr 19, 2024
3430ee4
Close to tray & build ci
LucHeart Apr 20, 2024
3327bc4
fix publish path
LucHeart Apr 20, 2024
701d424
Dont need workload?
LucHeart Apr 20, 2024
bb8da92
cache nuget
LucHeart Apr 20, 2024
272a2e8
Try ceeate installer
LucHeart Apr 20, 2024
595b8b3
remove docker build step
LucHeart Apr 20, 2024
a88483c
correct installer path
LucHeart Apr 20, 2024
15925e8
path?
LucHeart Apr 20, 2024
2ce6070
debug
LucHeart Apr 20, 2024
91e9ee5
debug
LucHeart Apr 20, 2024
9c6b92a
installer script for github actions
LucHeart Apr 20, 2024
55453f9
correct license path
LucHeart Apr 20, 2024
0a85257
fix script file
LucHeart Apr 20, 2024
93791c9
Publish setup exe
LucHeart Apr 20, 2024
e04e14e
Failing at hiding titlebar
LucHeart Apr 20, 2024
933159c
Sidebar refactor
LucHeart Apr 22, 2024
8ac0577
Login custom server
LucHeart Apr 23, 2024
7e2d3e7
Fix import
LucHeart Apr 23, 2024
ba28093
Exclusive control for physbone release
LucHeart Apr 23, 2024
716eae4
Check cooldown for IShock
LucHeart Apr 24, 2024
142a935
requires restart notice on osc options
LucHeart Apr 24, 2024
aa6fb7a
Updater refactor and update variable standard?! ayo?
LucHeart Apr 25, 2024
82cf4b5
Simplify build, and no need for tests for now, surely...
LucHeart Apr 25, 2024
a3154d5
State part rework, error handling on blazor exceptions
LucHeart Apr 26, 2024
d2bfc31
Updater semver support
LucHeart Apr 26, 2024
e1f03d5
Use version attribute in side bar
LucHeart Apr 26, 2024
559d29b
Change config folder to be under openshock
LucHeart Apr 26, 2024
3b94dfa
Change updater temp file location
LucHeart Apr 26, 2024
7db7e2d
Remove the error button xD
LucHeart Apr 26, 2024
3ca8cb3
fix updater url, ffs
LucHeart Apr 26, 2024
1442da7
Fix groups tab not refreshing shockers properly
LucHeart Apr 27, 2024
15e6cb3
Dashboard tab stuff
LucHeart Apr 30, 2024
880d2d3
Window schenanigans
LucHeart May 1, 2024
319ad0d
Router rework
LucHeart May 1, 2024
649cda5
Add search to parameter list
LucHeart May 3, 2024
b691017
Add _All/Paused
LucHeart May 3, 2024
d864310
Refactor
LucHeart May 3, 2024
9ee6eda
Update ci-windows.yml
LucHeart May 3, 2024
8e9ae1f
Paused fix, and send updates to game on config update
LucHeart May 3, 2024
a9c2b06
run on any branch
LucHeart May 3, 2024
ccfba62
debounce input for search
LucHeart May 4, 2024
b6138c6
Download channel selection
LucHeart May 4, 2024
59b72b4
refactor
LucHeart May 4, 2024
5d3c2cb
add widget bot, add level
LucHeart May 4, 2024
864ac73
Fix intensity float and force unmute
Natsumi-sama May 5, 2024
a17d4c4
Remove unused envs, and get msbuild for linux to work
LucHeart May 6, 2024
2a8cbd7
Headless mode
LucHeart May 6, 2024
2b97528
Installer update
LucHeart May 6, 2024
f8a6df3
Named pipes for. custom uri handling
LucHeart May 7, 2024
1dbc7a1
Token logic for auth
LucHeart May 9, 2024
f62708d
Fix underscore config loop
LucHeart May 10, 2024
a3cc61f
Login Get Token Button
LucHeart May 10, 2024
9d8402f
RC 4
LucHeart May 10, 2024
fa647e5
Show window on single instance kill
LucHeart May 10, 2024
a22af46
Fix URI parser
LucHeart May 10, 2024
c0c2a1a
Fix physbone pull fixed intensity
LucHeart May 10, 2024
e9070a0
RC 5
LucHeart May 10, 2024
9c3a156
Updater handle latest release being able to be newer than pre release
LucHeart May 10, 2024
e1d377e
Disable discord preview by default
LucHeart May 10, 2024
4095507
Version 2.0.0 Release
LucHeart May 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
types: [opened, reopened, synchronize]
workflow_call:
workflow_dispatch:

name: ci-windows

env:
DOTNET_VERSION: 8.0.x
REGISTRY: ghcr.io

jobs:

build:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET SDK ${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Cache NuGet packages
uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-

- name: Publish ShockOSC Windows
run: dotnet publish ShockOsc/ShockOsc.csproj -c Release -f net8.0-windows10.0.19041.0 -o ./publish/ShockOsc

- name: Upload ShockOSC Windows artifacts
uses: actions/upload-artifact@v4
with:
name: ShockOsc
path: publish/ShockOsc/*
retention-days: 1
if-no-files-found: error

instller:
runs-on: windows-latest
needs: build

steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
Installer

- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: ShockOsc
path: publish/


- name: Create nsis installer
uses: joncloud/makensis-action@publish
with:
script-file: ${{ github.workspace }}/Installer/installer.nsi
additional-plugin-paths: ${{ github.workspace }}/Installer/Plugins

- name: Upload ShockOSC Windows Setup
uses: actions/upload-artifact@v4
with:
name: ShockOsc_Setup
path: Installer/ShockOsc_Setup.exe
retention-days: 7
if-no-files-found: error
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ bin/
obj/
.idea
*.DotSettings.user
.vs
.vs
ShockOsc_Setup.exe
Binary file added Installer/Plugins/x86-unicode/ApplicationID.dll
Binary file not shown.
Binary file added Installer/Plugins/x86-unicode/INetC.dll
Binary file not shown.
Binary file not shown.
Binary file added Installer/Plugins/x86-unicode/nsProcess.dll
Binary file not shown.
2 changes: 2 additions & 0 deletions Installer/build-installer.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"C:\Program Files (x86)\NSIS\makensis.exe" installer.nsi
pause
208 changes: 208 additions & 0 deletions Installer/installer.nsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
;--------------------------------
;Plugins
;https://nsis.sourceforge.io/ApplicationID_plug-in
;https://nsis.sourceforge.io/ShellExecAsUser_plug-in
;https://nsis.sourceforge.io/NsProcess_plugin
;https://nsis.sourceforge.io/Inetc_plug-in

;--------------------------------
;Version

!define PRODUCT_VERSION "1.0.0.0"
!define VERSION "1.0.0.0"
VIProductVersion "${PRODUCT_VERSION}"
VIFileVersion "${VERSION}"
VIAddVersionKey "FileVersion" "${VERSION}"
VIAddVersionKey "ProductName" "ShockOSC"
VIAddVersionKey "ProductVersion" "${PRODUCT_VERSION}"
VIAddVersionKey "LegalCopyright" "Copyright OpenShock"
VIAddVersionKey "FileDescription" ""

;--------------------------------
;Include Modern UI

!include "MUI2.nsh"
!include "FileFunc.nsh"
!include "LogicLib.nsh"

;--------------------------------
;General

Unicode True
Name "ShockOSC"
OutFile "ShockOSC_Setup.exe"
InstallDir "$LocalAppdata\ShockOSC"
InstallDirRegKey HKLM "Software\ShockOSC" "InstallDir"
RequestExecutionLevel admin
ShowInstDetails show

;--------------------------------
;Variables

VAR upgradeInstallation

;--------------------------------
;Interface Settings

!define MUI_ABORTWARNING

;--------------------------------
;Icons

!define MUI_ICON "..\publish\Resources\openshock-icon.ico"
!define MUI_UNICON "..\publish\Resources\openshock-icon.ico"

;--------------------------------
;Pages

!insertmacro MUI_PAGE_LICENSE "..\LICENSE"
!define MUI_PAGE_CUSTOMFUNCTION_PRE dirPre
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES

;------------------------------
; Finish Page

; Checkbox to launch ShockOSC.
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_TEXT "Launch ShockOSC"
!define MUI_FINISHPAGE_RUN_FUNCTION launchShockOSC

; Checkbox to create desktop shortcut.
!define MUI_FINISHPAGE_SHOWREADME
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Create desktop shortcut"
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION createDesktopShortcut
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH

;--------------------------------
;Languages

!insertmacro MUI_LANGUAGE "English"

;--------------------------------
;Macros

;--------------------------------
;Functions

Function dirPre
StrCmp $upgradeInstallation "true" 0 +2
Abort
FunctionEnd

Function .onInit
StrCpy $upgradeInstallation "false"

ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ShockOSC" "UninstallString"
StrCmp $R0 "" done

; If ShockOSC is already running, display a warning message
StrCpy $1 "OpenShock.ShockOsc.exe"
nsProcess::_FindProcess "$1"
Pop $R1
${If} $R1 = 0
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "ShockOSC is still running. $\n$\nClick `OK` to kill the running process or `Cancel` to cancel this installer." /SD IDOK IDCANCEL cancel
nsExec::ExecToStack "taskkill /IM OpenShock.ShockOsc.exe"
${EndIf}

MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "ShockOSC is already installed. $\n$\nClick `OK` to upgrade the existing installation or `Cancel` to cancel this upgrade." /SD IDOK IDCANCEL cancel
Goto next
cancel:
Abort
next:
StrCpy $upgradeInstallation "true"
done:
FunctionEnd

Function createDesktopShortcut
CreateShortcut "$DESKTOP\ShockOSC.lnk" "$INSTDIR\OpenShock.ShockOsc.exe"
FunctionEnd

Function launchShockOSC
SetOutPath $INSTDIR
ShellExecAsUser::ShellExecAsUser "" "$INSTDIR\OpenShock.ShockOsc.exe" ""
FunctionEnd

;--------------------------------
;Installer Sections

Section "Install" SecInstall

StrCmp $upgradeInstallation "true" 0 noupgrade
DetailPrint "Uninstall previous version..."
ExecWait '"$INSTDIR\Uninstall.exe" /S _?=$INSTDIR'
Delete $INSTDIR\Uninstall.exe
Goto afterupgrade

noupgrade:

afterupgrade:

ReadRegStr $R0 HKLM "SOFTWARE\Classes\Installer\Dependencies\Microsoft.VS.VC_RuntimeMinimumVSU_amd64,v14" "Version"
IfErrors 0 VSRedistInstalled

inetc::get "https://aka.ms/vs/17/release/vc_redist.x64.exe" $TEMP\vcredist_x64.exe
ExecWait "$TEMP\vcredist_x64.exe /install /quiet /norestart"
Delete "$TEMP\vcredist_x64.exe"
VSRedistInstalled:

SetOutPath "$INSTDIR"

File /r /x *.log /x *.pdb /x *.mui "..\publish\*.*"

WriteRegStr HKLM "Software\ShockOSC" "InstallDir" $INSTDIR
WriteUninstaller "$INSTDIR\Uninstall.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ShockOSC" "DisplayName" "ShockOSC"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ShockOSC" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ShockOSC" "DisplayIcon" "$\"$INSTDIR\Resources\openshock-icon.ico$\""

${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
IntFmt $0 "0x%08X" $0
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ShockOSC" "EstimatedSize" "$0"

CreateShortCut "$SMPROGRAMS\ShockOSC.lnk" "$INSTDIR\OpenShock.ShockOsc.exe"
ApplicationID::Set "$SMPROGRAMS\ShockOSC.lnk" "ShockOSC"

WriteRegStr HKCU "Software\Classes\ShockOSC" "" "URL:ShockOSC"
WriteRegStr HKCU "Software\Classes\ShockOSC" "FriendlyTypeName" "ShockOSC"
WriteRegStr HKCU "Software\Classes\ShockOSC" "URL Protocol" ""
WriteRegExpandStr HKCU "Software\Classes\ShockOSC\DefaultIcon" "" "$INSTDIR\Resources\openshock-icon.ico"
WriteRegStr HKCU "Software\Classes\ShockOSC\shell" "" "open"
WriteRegStr HKCU "Software\Classes\ShockOSC\shell\open" "FriendlyAppName" "ShockOSC"
WriteRegStr HKCU "Software\Classes\ShockOSC\shell\open\command" "" '"$INSTDIR\OpenShock.ShockOsc.exe" --uri="%1"'

${If} ${Silent}
SetOutPath $INSTDIR
ShellExecAsUser::ShellExecAsUser "" "$INSTDIR\OpenShock.ShockOsc.exe" ""
${EndIf}

SectionEnd

;--------------------------------
;Uninstaller Section

Section "Uninstall"
; If ShockOSC is already running, display a warning message and exit
StrCpy $1 "OpenShock.ShockOsc.exe"
nsProcess::_FindProcess "$1"
Pop $R1
${If} $R1 = 0
MessageBox MB_OK|MB_ICONEXCLAMATION "ShockOSC is still running. Cannot uninstall this software.$\nPlease close ShockOSC and try again." /SD IDOK
Abort
${EndIf}

RMDir /r "$INSTDIR"

DeleteRegKey HKLM "Software\ShockOSC"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ShockOSC"
DeleteRegKey HKCU "Software\Classes\ShockOSC"

${IfNot} ${Silent}
Delete "$SMPROGRAMS\ShockOSC.lnk"
Delete "$DESKTOP\ShockOSC.lnk"
${EndIf}
SectionEnd
9 changes: 8 additions & 1 deletion ShockOsc.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShockOsc", "ShockOsc\ShockOsc.csproj", "{D3C13FCF-0FF6-45E1-AA57-0EDF1AB8C48B}"
# Visual Studio Version 17
VisualStudioVersion = 17.9.34622.214
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShockOsc", "ShockOsc\ShockOsc.csproj", "{D3C13FCF-0FF6-45E1-AA57-0EDF1AB8C48B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -10,7 +13,11 @@ Global
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D3C13FCF-0FF6-45E1-AA57-0EDF1AB8C48B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D3C13FCF-0FF6-45E1-AA57-0EDF1AB8C48B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D3C13FCF-0FF6-45E1-AA57-0EDF1AB8C48B}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{D3C13FCF-0FF6-45E1-AA57-0EDF1AB8C48B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D3C13FCF-0FF6-45E1-AA57-0EDF1AB8C48B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
8 changes: 8 additions & 0 deletions ShockOsc/Backend/AuthState.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace OpenShock.ShockOsc.Backend;

public enum AuthState
{
NotAuthenticated,
Authenticating,
Authenticated
}
Loading
Loading