Skip to content

Commit 7893ccf

Browse files
authored
Merge pull request #37 from Aurora-RGB/dev
Dev -> master
2 parents 413d722 + c9b93f7 commit 7893ccf

123 files changed

Lines changed: 4723 additions & 2005 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 91 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,91 @@
1-
name: Aurora CD
2-
3-
on:
4-
push:
5-
branches: [ master ]
6-
7-
jobs:
8-
9-
build:
10-
11-
strategy:
12-
matrix:
13-
configuration: [Release]
14-
15-
runs-on: windows-2019 # For a list of available runner types, refer to
16-
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
17-
18-
env:
19-
Solution_Name: Project-Aurora/Project-Aurora.sln
20-
21-
steps:
22-
- name: Generate build number
23-
id: buildnumber
24-
uses: einaregilsson/build-number@v3
25-
with:
26-
token: ${{secrets.github_token}}
27-
28-
- uses: rishabhgupta/split-by@v1
29-
id: split
30-
with:
31-
string: ${{github.repository}}
32-
split-by: '/'
33-
34-
- name: Checkout
35-
uses: actions/checkout@v2
36-
with:
37-
fetch-depth: 0
38-
submodules: true
39-
40-
# Install the .NET Core workload
41-
- name: Install .NET Core
42-
uses: actions/setup-dotnet@v1
43-
with:
44-
dotnet-version: 5.0.x
45-
46-
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
47-
- name: Setup MSBuild.exe
48-
uses: microsoft/setup-msbuild@v1.0.2
49-
50-
# Restore the application to populate the obj folder with RuntimeIdentifiers
51-
- name: Restore the application
52-
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
53-
env:
54-
Configuration: ${{ matrix.configuration }}
55-
56-
- name: Build
57-
run: msbuild $env:Solution_Name /p:Configuration=$env:Configuration
58-
env:
59-
APPVEYOR_BUILD_VERSION: v${{steps.buildnumber.outputs.build_number}}
60-
OWNER: ${{ steps.split.outputs._0 }}
61-
REPOSITORY: ${{ steps.split.outputs._1 }}
62-
Configuration: ${{ matrix.configuration }}
63-
64-
# Decode the base 64 encoded pfx and save the Signing_Certificate
65-
#- name: Decode the pfx
66-
# run: |
67-
# $pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.Base64_Encoded_Pfx }}")
68-
# $certificatePath = Join-Path -Path $env:Wap_Project_Directory -ChildPath GitHubActionsWorkflow.pfx
69-
# [IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte)
70-
71-
# Create the app package by building and packaging the Windows Application Packaging project
72-
- name: Building the installer
73-
run: |
74-
"%programfiles(x86)%\Inno Setup 6\iscc.exe" /DEXTERNAL_VERSION=${{steps.buildnumber.outputs.build_number}} Installer\installer.iss
75-
shell: cmd
76-
77-
- name: Archive Build
78-
shell: pwsh
79-
run: |
80-
Compress-Archive .\Build\Release\* Aurora-v${{steps.buildnumber.outputs.build_number}}.zip
81-
82-
- name: Release
83-
uses: softprops/action-gh-release@v1
84-
with:
85-
token: ${{ secrets.GITHUB_TOKEN }}
86-
draft: true
87-
files: |
88-
Aurora-setup-v${{steps.buildnumber.outputs.build_number}}.exe
89-
Aurora-v${{steps.buildnumber.outputs.build_number}}.zip
90-
tag_name: v${{steps.buildnumber.outputs.build_number}}
91-
allow_override: true
1+
name: Aurora CD
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
9+
build:
10+
11+
strategy:
12+
matrix:
13+
configuration: [Release]
14+
15+
runs-on: windows-2019 # For a list of available runner types, refer to
16+
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
17+
18+
env:
19+
Solution_Name: Project-Aurora/Project-Aurora.sln
20+
21+
steps:
22+
- name: Generate build number
23+
id: buildnumber
24+
uses: einaregilsson/build-number@v3
25+
with:
26+
token: ${{secrets.github_token}}
27+
28+
- uses: rishabhgupta/split-by@v1
29+
id: split
30+
with:
31+
string: ${{github.repository}}
32+
split-by: '/'
33+
34+
- name: Checkout
35+
uses: actions/checkout@v2
36+
with:
37+
fetch-depth: 0
38+
submodules: true
39+
40+
# Install the .NET Core workload
41+
- name: Install .NET Core
42+
uses: actions/setup-dotnet@v1
43+
with:
44+
dotnet-version: 5.0.x
45+
46+
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
47+
- name: Setup MSBuild.exe
48+
uses: microsoft/setup-msbuild@v1.0.2
49+
50+
# Restore the application to populate the obj folder with RuntimeIdentifiers
51+
- name: Restore the application
52+
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
53+
env:
54+
Configuration: ${{ matrix.configuration }}
55+
56+
- name: Build
57+
run: msbuild $env:Solution_Name /p:Configuration=$env:Configuration
58+
env:
59+
APPVEYOR_BUILD_VERSION: v${{steps.buildnumber.outputs.build_number}}
60+
OWNER: ${{ steps.split.outputs._0 }}
61+
REPOSITORY: ${{ steps.split.outputs._1 }}
62+
Configuration: ${{ matrix.configuration }}
63+
64+
# Decode the base 64 encoded pfx and save the Signing_Certificate
65+
#- name: Decode the pfx
66+
# run: |
67+
# $pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.Base64_Encoded_Pfx }}")
68+
# $certificatePath = Join-Path -Path $env:Wap_Project_Directory -ChildPath GitHubActionsWorkflow.pfx
69+
# [IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte)
70+
71+
# Create the app package by building and packaging the Windows Application Packaging project
72+
- name: Building the installer
73+
run: |
74+
"%programfiles(x86)%\Inno Setup 6\iscc.exe" /DEXTERNAL_VERSION=${{steps.buildnumber.outputs.build_number}} Installer\installer.iss
75+
shell: cmd
76+
77+
- name: Archive Build
78+
shell: pwsh
79+
run: |
80+
Compress-Archive .\Build\Release\* Aurora-v${{steps.buildnumber.outputs.build_number}}.zip
81+
82+
- name: Release
83+
uses: softprops/action-gh-release@v1
84+
with:
85+
token: ${{ secrets.GITHUB_TOKEN }}
86+
draft: true
87+
files: |
88+
Aurora-setup-v${{steps.buildnumber.outputs.build_number}}.exe
89+
Aurora-v${{steps.buildnumber.outputs.build_number}}.zip
90+
tag_name: v${{steps.buildnumber.outputs.build_number}}
91+
allow_override: true

Project-Aurora/Aurora-Updater/Aurora-Updater.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,20 @@
5656
</ItemGroup>
5757

5858
<ItemGroup>
59-
<ProjectReference Include="..\Project-Aurora\Project-Aurora.csproj" >
59+
<ProjectReference Include="..\Project-Aurora\Project-Aurora.csproj">
6060
<Private>false</Private>
6161
</ProjectReference>
6262
</ItemGroup>
6363

6464
<ItemGroup>
6565
<PackageReference Include="Newtonsoft.Json">
66-
<Version>12.0.3</Version>
66+
<Version>13.0.1</Version>
6767
</PackageReference>
6868
<PackageReference Include="Octokit">
69-
<Version>0.47.0</Version>
69+
<Version>0.50.0</Version>
7070
</PackageReference>
7171
<PackageReference Include="SemanticVersioning">
72-
<Version>1.2.2</Version>
72+
<Version>1.3.0</Version>
7373
</PackageReference>
7474
</ItemGroup>
7575

Project-Aurora/Project-Aurora/App.xaml.cs

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -517,28 +517,33 @@ protected override void OnExit(ExitEventArgs e)
517517
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
518518
{
519519
Exception exc = (Exception)e.ExceptionObject;
520-
Global.logger.Fatal("Fatal Exception caught : " + exc);
520+
Global.logger.Fatal("Fatal Exception caught : " + exc, exc);
521521
Global.logger.Fatal(String.Format("Runtime terminating: {0}", e.IsTerminating));
522522
LogManager.Flush();
523-
524523

525-
System.Windows.MessageBox.Show("Aurora fatally crashed. Please report the follow to author: \r\n\r\n" + exc, "Aurora has stopped working");
526-
//Perform exit operations
527-
System.Windows.Application.Current.Shutdown();
524+
if (Global.Configuration.CloseProgramOnException)
525+
{
526+
System.Windows.MessageBox.Show("Aurora fatally crashed. Please report the follow to author: \r\n\r\n" + exc, "Aurora has stopped working");
527+
//Perform exit operations
528+
System.Windows.Application.Current.Shutdown();
529+
}
528530
}
529531

530532
private void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
531533
{
532534
Exception exc = (Exception)e.Exception;
533-
Global.logger.Fatal("Fatal Exception caught : " + exc);
535+
Global.logger.Fatal("Fatal Exception caught : " + exc, exc);
534536
LogManager.Flush();
535537
if (!Global.isDebug)
536538
e.Handled = true;
537539
else
538540
throw exc;
539-
System.Windows.MessageBox.Show("Aurora fatally crashed. Please report the follow to author: \r\n\r\n" + exc, "Aurora has stopped working");
540-
//Perform exit operations
541-
System.Windows.Application.Current.Shutdown();
541+
if (Global.Configuration.CloseProgramOnException)
542+
{
543+
System.Windows.MessageBox.Show("Aurora fatally crashed. Please report the follow to author: \r\n\r\n" + exc, "Aurora has stopped working");
544+
//Perform exit operations
545+
System.Windows.Application.Current.Shutdown();
546+
}
542547
}
543548

544549
public static void InstallLogitech()

Project-Aurora/Project-Aurora/ConfigUI.xaml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ private void Window_Loaded(object sender, RoutedEventArgs e)
170170

171171
if (!settingsloaded)
172172
{
173-
virtual_keyboard_timer = new Timer(33);
173+
virtual_keyboard_timer = new Timer(8);
174174
virtual_keyboard_timer.Elapsed += new ElapsedEventHandler(virtual_keyboard_timer_Tick);
175175
virtual_keyboard_timer.Start();
176176

@@ -254,9 +254,9 @@ private void virtual_keyboard_timer_Tick(object sender, EventArgs e)
254254

255255
if (IsActive)
256256
{
257-
keylights = Global.effengine.GetKeyboardLights();
258-
Global.kbLayout.SetKeyboardColors(keylights);
259257
}
258+
keylights = Global.effengine.GetKeyboardLights();
259+
Global.kbLayout.SetKeyboardColors(keylights);
260260

261261
if (Global.key_recorder.IsRecording())
262262
this.keyboard_record_message.Visibility = Visibility.Visible;

Project-Aurora/Project-Aurora/Controls/Control_AnimationEditor.xaml.cs

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public Control_AnimationEditor()
5858
InitializeComponent();
5959

6060
UpdateVirtualKeyboard();
61+
UpdateScale(keyboard_overlayPreview.ActualWidth);
6162

6263
Global.kbLayout.KeyboardLayoutUpdated += KbLayout_KeyboardLayoutUpdated;
6364
}
@@ -136,7 +137,9 @@ private void animMixer_AnimationMixRendered(object sender)
136137
{
137138
using (MemoryStream memory = new MemoryStream())
138139
{
139-
(sender as Control_AnimationMixPresenter).RenderedBitmap.Save(memory, System.Drawing.Imaging.ImageFormat.Bmp);
140+
Bitmap renderedBitmap = (sender as Control_AnimationMixPresenter).RenderedBitmap;
141+
renderedBitmap.Save(memory, System.Drawing.Imaging.ImageFormat.Bmp);
142+
140143
memory.Position = 0;
141144
BitmapImage bitmapimage = new BitmapImage();
142145
bitmapimage.BeginInit();
@@ -158,17 +161,28 @@ private void keyboard_overlayPreview_SizeChanged(object sender, SizeChangedEvent
158161
UpdateScale(e.NewSize.Width);
159162
}
160163

164+
private float _prevScale = 0;
161165
private void UpdateScale(double width)
162166
{
163167
float scale = (float)(width / Effects.canvas_width);
164-
165168
if (scale < 1.0f)
166169
scale = 1.0f;
170+
if(_prevScale == 0)
171+
{
172+
animMixer.AnimationScale = scale;
173+
174+
_prevScale = scale;
175+
}
176+
else if (_prevScale != scale)
177+
{
167178

168-
animMixer.AnimationScale = scale;
179+
animMixer.AnimationScale = scale;
169180

170-
rulerHorizontalPixels.MarkSize = scale;
171-
rulerVerticalPixels.MarkSize = scale;
181+
rulerHorizontalPixels.MarkSize = scale;
182+
rulerVerticalPixels.MarkSize = scale;
183+
184+
_prevScale = scale;
185+
}
172186
}
173187

174188
private void animMixer_AnimationFrameItemSelected(object sender, AnimationFrame frame)

0 commit comments

Comments
 (0)