Skip to content

Commit f2a67ff

Browse files
committed
Merge branch 'master' into dev
* master: theme editor: allow writing into color text fields, escape = undo current textfield edit projects: if press up/down key in searchbox, selection moves in grid, if no items selected from search then select first as default, updates: clear search field on refresh, #BUILD Disable "Remove project from list" for now (causes sorting issues if registry not in order), Tools: add buttons for browsing CrashDumps, Unity\cache, GiCache add codeql badge Update codeql.yml Create codeql.yml Update screenshots test #BUILD Add custom ProjectName.txt support, Add rename project title (saves into ProjectSettings/ProjectName.txt file), Add setting for taking projectname from Folder or ProjectName.txt override, or from Player settings ProductName field, REMOVED: Project folder rename (it was too dangerous, rather rename folder from Explorer if needed), fixed nullref if pressed F2 (rename) when recent grid was not selected, #BUILD disable horizontal scroll from upgrade window datagrid (otherwise it autoscrolls when click editor path column) fix double click to launch, after cell edit #32 #BUILD add virustotal scan link banner
2 parents a4b8b39 + 8b70199 commit f2a67ff

File tree

8 files changed

+185
-40
lines changed

8 files changed

+185
-40
lines changed

.github/workflows/codeql.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ master ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ master ]
20+
schedule:
21+
- cron: '19 2 * * 5'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: windows-2019
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: [ 'csharp' ]
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
38+
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v2
42+
43+
# Initializes the CodeQL tools for scanning.
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@v1
46+
with:
47+
languages: ${{ matrix.language }}
48+
# If you wish to specify custom queries, you can do so here or in a config file.
49+
# By default, queries listed here will override any specified in a config file.
50+
# Prefix the list here with "+" to use these queries and those in the config file.
51+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
52+
53+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54+
# If this step fails, then you should remove it and run the build manually (see below)
55+
- name: Autobuild
56+
uses: github/codeql-action/autobuild@v1
57+
58+
# ℹ️ Command-line programs to run using the OS shell.
59+
# 📚 https://git.io/JvXDl
60+
61+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62+
# and modify them (or add more) to build your code if your project
63+
# uses a compiled language
64+
65+
#- run: |
66+
# make bootstrap
67+
# make release
68+
69+
- name: Perform CodeQL Analysis
70+
uses: github/codeql-action/analyze@v1

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# UnityLauncherPro
2-
[![Build Status](https://ci.appveyor.com/api/projects/status/hajcaavcsg7904rx?svg=true)](https://github.com/unitycoder/UnityLauncherPro/releases/latest/download/UnityLauncherPro.zip) [![Downloads](https://img.shields.io/github/downloads/unitycoder/unitylauncherpro/total)](https://github.com/unitycoder/UnityLauncherPro/releases/latest/download/UnityLauncherPro.zip) [![GitHub license](https://img.shields.io/github/license/unitycoder/UnityLauncherPro)](https://github.com/unitycoder/UnityLauncherPro/blob/master/LICENSE) [](https://discord.gg/cXT97hU)<a href="https://discord.gg/cXT97hU"><img src="https://img.shields.io/discord/337579253866692608.svg"></a>
2+
[![Build Status](https://ci.appveyor.com/api/projects/status/hajcaavcsg7904rx?svg=true)](https://github.com/unitycoder/UnityLauncherPro/releases/latest/download/UnityLauncherPro.zip) [![Downloads](https://img.shields.io/github/downloads/unitycoder/unitylauncherpro/total)](https://github.com/unitycoder/UnityLauncherPro/releases/latest/download/UnityLauncherPro.zip) [![GitHub license](https://img.shields.io/github/license/unitycoder/UnityLauncherPro)](https://github.com/unitycoder/UnityLauncherPro/blob/master/LICENSE) [](https://discord.gg/cXT97hU)<a href="https://discord.gg/cXT97hU"><img src="https://img.shields.io/discord/337579253866692608.svg"></a> [![VirusTotal scan now](https://img.shields.io/static/v1?label=VirusTotal&message=Scan)](https://www.virustotal.com/gui/url/e123b616cf4cbe3d3f7ba13b0d88cf5fff4638f72d5b9461088d0b11e9a41de3?nocache=1) [![CodeQL](https://github.com/unitycoder/UnityLauncherPro/actions/workflows/codeql.yml/badge.svg)](https://github.com/unitycoder/UnityLauncherPro/actions/workflows/codeql.yml)
3+
34

45
Handle all your Unity versions and Projects easily!
56

@@ -42,9 +43,9 @@ See DEV branch for latest commits https://github.com/unitycoder/UnityLauncherPro
4243

4344
![image](https://user-images.githubusercontent.com/5438317/120828338-17681d00-c565-11eb-972a-49055070427a.png)
4445

45-
![image](https://user-images.githubusercontent.com/5438317/120828346-19ca7700-c565-11eb-9430-89420cf15caa.png)
46+
![image](https://user-images.githubusercontent.com/5438317/154346224-8aa8d547-8495-47cf-baca-4cb31639344b.png)
4647

47-
![image](https://user-images.githubusercontent.com/5438317/120828355-1c2cd100-c565-11eb-9fee-bc77112b8d16.png)
48+
![image](https://user-images.githubusercontent.com/5438317/154346049-4426f504-a437-4119-8d1c-f3d4d3fa434c.png)
4849

4950
### Perform tasks on selected project
5051
![image](https://user-images.githubusercontent.com/5438317/120828528-4da59c80-c565-11eb-8b11-9cf739cde306.png)
@@ -64,3 +65,4 @@ See DEV branch for latest commits https://github.com/unitycoder/UnityLauncherPro
6465

6566
<br>
6667
Old (winforms) version is here: https://github.com/unitycoder/UnityLauncher
68+

UnityLauncherPro/MainWindow.xaml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,8 @@
585585
<MenuItem x:Name="menuItemKillProcess" Header="Kill Process" Click="MenuItemKillProcess_Click" />
586586
<Separator/>
587587
<MenuItem x:Name="menuStartWebGLServer" Header="Start WebGL server" Click="MenuStartWebGLServer_Click" />
588-
<Separator/>
589-
<MenuItem x:Name="menuRemoveProject" Header="Remove from recent list" Click="MenuRemoveProject_Click" />
588+
<!--<Separator/>
589+
<MenuItem x:Name="menuRemoveProject" Header="Remove from recent list" Click="MenuRemoveProject_Click" />-->
590590
</ContextMenu>
591591
</DataGrid.ContextMenu>
592592

@@ -852,12 +852,12 @@
852852
<RowDefinition Height="50*" />
853853
</Grid.RowDefinitions>
854854
<!-- 1st part -->
855-
<Grid Grid.Row="0" VerticalAlignment="Top" HorizontalAlignment="Left">
856-
<StackPanel Orientation="Vertical" Margin="10" VerticalAlignment="Top">
855+
<Grid Grid.Row="0" VerticalAlignment="Top">
856+
<StackPanel Orientation="Vertical" Margin="10" VerticalAlignment="Top" HorizontalAlignment="Left">
857857
<!--border to avoid next row moving when button is selected-->
858-
<Border VerticalAlignment="Top" Height="40" HorizontalAlignment="Left" Margin="0,0,0,2">
858+
<Border VerticalAlignment="Top" Height="40" Margin="0,0,0,2" HorizontalAlignment="Left">
859859
<!-- folders -->
860-
<StackPanel Orientation="Horizontal" Margin="0,4,10,4" VerticalAlignment="Top" Width="560">
860+
<StackPanel Orientation="Horizontal" Margin="0,4,10,4" VerticalAlignment="Top">
861861
<Label Content="Folders" Foreground="{DynamicResource ThemeButtonForeground}" />
862862
<Button Style="{StaticResource CustomButton}" x:Name="btnOpenEditorLogsFolder" Margin="0" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" Click="BtnOpenEditorLogsFolder_Click" ToolTip="Browse Editor logs folder">
863863
<Label Content="_Editor Logs" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
@@ -871,6 +871,15 @@
871871
<Button Style="{StaticResource CustomButton}" x:Name="btnAssetPackages" Margin="10,0,0,0" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" ToolTip="Browse AssetStore downloads folder" Click="BtnAssetPackages_Click">
872872
<Label Content="A_sset packages" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
873873
</Button>
874+
<Button Style="{StaticResource CustomButton}" x:Name="btnCrashDumps" Margin="10,0,0,0" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" ToolTip="Browse Crash dumps folder" Click="BtnCrashDumps_Click">
875+
<Label Content="Crash _Dumps" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
876+
</Button>
877+
<Button Style="{StaticResource CustomButton}" x:Name="btnUnityCache" Margin="10,0,0,0" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" ToolTip="Browse Unity Cache folder" Click="BtnUnityCache_Click">
878+
<Label Content="_Unity Cache" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
879+
</Button>
880+
<Button Style="{StaticResource CustomButton}" x:Name="btnGICache" Margin="10,0,0,0" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" ToolTip="Browse Unity GI Cache folder" Click="BtnGICache_Click">
881+
<Label Content="_GI Cache" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
882+
</Button>
874883
</StackPanel>
875884
</Border>
876885
<!-- tools -->

UnityLauncherPro/MainWindow.xaml.cs

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,9 @@ private void OnRectangleMouseDown(object sender, MouseButtonEventArgs e)
624624
private void OnSearchTextChanged(object sender, TextChangedEventArgs e)
625625
{
626626
FilterRecentProjects();
627+
628+
// if nothing selected, select first item
629+
if (gridRecent.SelectedIndex < 0) gridRecent.SelectedIndex = 0;
627630
}
628631

629632
private void BtnAddProjectFolder_Click(object sender, RoutedEventArgs e)
@@ -687,7 +690,7 @@ private void OnGetUnityUpdatesClick(object sender, RoutedEventArgs e)
687690

688691
// refresh installations, if already added some new ones
689692
UpdateUnityInstallationsList();
690-
693+
txtSearchBoxUpdates.Text = "";
691694
CallGetUnityUpdates();
692695

693696
button.IsEnabled = true;
@@ -727,9 +730,9 @@ private void OnWindowKeyDown(object sender, KeyEventArgs e)
727730
txtSearchBox.Text = "";
728731
break;
729732
case Key.Up:
733+
case Key.Down:
730734
case Key.Left:
731735
case Key.Right:
732-
case Key.Down:
733736
break;
734737
case Key.F2: // edit arguments or project name
735738
if (chkEnableProjectRename.IsChecked == false) return; //if rename not enabled
@@ -991,7 +994,11 @@ private void TxtSearchBox_PreviewKeyDown(object sender, KeyEventArgs e)
991994
break;
992995
case Key.Tab:
993996
case Key.Up:
994-
Tools.SetFocusToGrid(gridRecent);
997+
//Tools.SetFocusToGrid(gridRecent);
998+
var currentIndex = gridRecent.SelectedIndex - 1;
999+
//Console.WriteLine(currentIndex);
1000+
if (currentIndex < 0) currentIndex = gridRecent.Items.Count - 1;
1001+
gridRecent.SelectedIndex = currentIndex;
9951002
e.Handled = true;
9961003
break;
9971004
case Key.Down:
@@ -1002,8 +1009,11 @@ private void TxtSearchBox_PreviewKeyDown(object sender, KeyEventArgs e)
10021009
//}
10031010
//else
10041011
//{
1005-
Tools.SetFocusToGrid(gridRecent);
1012+
//Tools.SetFocusToGrid(gridRecent);
10061013
// }
1014+
1015+
// if in searchbox, then move selected index up or down
1016+
gridRecent.SelectedIndex = ++gridRecent.SelectedIndex % gridRecent.Items.Count;
10071017
e.Handled = true; // to stay in first row
10081018
break;
10091019
default:
@@ -1139,14 +1149,7 @@ private void BtnOpenEditorLogsFolder_Click(object sender, RoutedEventArgs e)
11391149

11401150
private void BtnOpenPlayerLogs_Click(object sender, RoutedEventArgs e)
11411151
{
1142-
var logfolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "/../LocalLow");
1143-
if (Directory.Exists(logfolder) == true)
1144-
{
1145-
if (Tools.LaunchExplorer(logfolder) == false)
1146-
{
1147-
Console.WriteLine("Error> Directory not found: " + logfolder);
1148-
}
1149-
}
1152+
Tools.OpenAppdataSpecialFolder("../LocalLow");
11501153
}
11511154

11521155
private void BtnOpenADBLogCat_Click(object sender, RoutedEventArgs e)
@@ -1514,12 +1517,7 @@ private void ChkAllowSingleInstanceOnly_CheckedChanged(object sender, RoutedEven
15141517

15151518
private void BtnAssetPackages_Click(object sender, RoutedEventArgs e)
15161519
{
1517-
var folder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Unity", "Asset Store-5.x");
1518-
if (Directory.Exists(folder) == false) return;
1519-
if (Tools.LaunchExplorer(folder) == false)
1520-
{
1521-
Console.WriteLine("Cannot open folder.." + folder);
1522-
}
1520+
Tools.OpenAppdataSpecialFolder("../Roaming/Unity/Asset Store-5.x");
15231521
}
15241522

15251523
// sets selected unity version as preferred main unity version (to be preselected in case of unknown version projects, when creating new empty project, etc)
@@ -1739,14 +1737,7 @@ private void GridRecent_BeginningEdit(object sender, DataGridBeginningEditEventA
17391737

17401738
private void BtnOpenCrashLogs_Click(object sender, RoutedEventArgs e)
17411739
{
1742-
var logfolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Temp", "Unity", "Editor", "Crashes");
1743-
if (Directory.Exists(logfolder) == true)
1744-
{
1745-
if (Tools.LaunchExplorer(logfolder) == false)
1746-
{
1747-
Console.WriteLine("Cannot open folder.." + logfolder);
1748-
}
1749-
}
1740+
Tools.OpenAppdataSpecialFolder("Temp/Unity/Editor/Crashes/");
17501741
}
17511742

17521743
// reorder grid item by index
@@ -2410,6 +2401,21 @@ private void ChkSearchProjectPath_Checked(object sender, RoutedEventArgs e)
24102401
Properties.Settings.Default.Save();
24112402
}
24122403

2404+
private void BtnCrashDumps_Click(object sender, RoutedEventArgs e)
2405+
{
2406+
Tools.OpenAppdataSpecialFolder("CrashDumps");
2407+
}
2408+
2409+
private void BtnGICache_Click(object sender, RoutedEventArgs e)
2410+
{
2411+
Tools.OpenAppdataSpecialFolder("../LocalLow/Unity/Caches/GiCache");
2412+
}
2413+
2414+
private void BtnUnityCache_Click(object sender, RoutedEventArgs e)
2415+
{
2416+
Tools.OpenAppdataSpecialFolder("Unity/cache");
2417+
}
2418+
24132419
//private void BtnBrowseTemplateUnityPackagesFolder_Click(object sender, RoutedEventArgs e)
24142420
//{
24152421
// var folder = Tools.BrowseForOutputFolder("Select unitypackage Templates folder");

UnityLauncherPro/ThemeEditor.xaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,22 +238,22 @@
238238
<StackPanel Orientation="Horizontal">
239239
<Label Foreground="#FFC1C1C1" Width="44">Red</Label>
240240
<Slider x:Name="sliderRed" AutoToolTipPlacement="TopLeft" AutoToolTipPrecision="0" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Top" Width="200" Height="28" Value="255" Maximum="255" LargeChange="0" SmallChange="1" ValueChanged="SliderRed_ValueChanged" PreviewMouseLeftButtonDown="SliderRed_PreviewMouseLeftButtonDown" IsSnapToTickEnabled="True"/>
241-
<TextBox x:Name="txtRed" Text="{Binding ElementName=sliderRed,Path=Value}" Background="#FFAAAAAA" VerticalAlignment="Center" IsUndoEnabled="True" Width="32" Margin="5,0,0,8" IsReadOnly="True" />
241+
<TextBox x:Name="txtRed" Text="{Binding ElementName=sliderRed,Path=Value}" Background="#FFAAAAAA" VerticalAlignment="Center" IsUndoEnabled="True" Width="32" Margin="5,0,0,8" KeyUp="TxtRed_KeyUp" PreviewKeyDown="TxtColorField_PreviewKeyDown" />
242242
</StackPanel>
243243
<StackPanel Orientation="Horizontal">
244244
<Label Foreground="#FFC1C1C1" Width="44">Green</Label>
245245
<Slider x:Name="sliderGreen" AutoToolTipPlacement="TopLeft" AutoToolTipPrecision="0" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Top" Width="200" Height="28" Value="255" Maximum="255" LargeChange="0" SmallChange="1" ValueChanged="SliderGreen_ValueChanged" PreviewMouseLeftButtonDown="SliderGreen_PreviewMouseLeftButtonDown" IsSnapToTickEnabled="True"/>
246-
<TextBox x:Name="txtGreen" Text="{Binding ElementName=sliderGreen,Path=Value}" VerticalAlignment="Center" IsUndoEnabled="True" Width="32" Background="#FFAAAAAA" Margin="5,0,0,8" IsReadOnly="True" />
246+
<TextBox x:Name="txtGreen" Text="{Binding ElementName=sliderGreen,Path=Value}" VerticalAlignment="Center" IsUndoEnabled="True" Width="32" Background="#FFAAAAAA" Margin="5,0,0,8" KeyUp="TxtGreen_KeyUp" PreviewKeyDown="TxtColorField_PreviewKeyDown" />
247247
</StackPanel>
248248
<StackPanel Orientation="Horizontal">
249249
<Label Foreground="#FFC1C1C1" Width="44">Blue</Label>
250250
<Slider x:Name="sliderBlue" AutoToolTipPlacement="TopLeft" AutoToolTipPrecision="0" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Top" Width="200" Height="28" Value="255" Maximum="255" LargeChange="0" SmallChange="1" ValueChanged="SliderBlue_ValueChanged" PreviewMouseLeftButtonDown="SliderBlue_PreviewMouseLeftButtonDown" IsSnapToTickEnabled="True"/>
251-
<TextBox x:Name="txtBlue" Text="{Binding ElementName=sliderBlue,Path=Value}" VerticalAlignment="Center" IsUndoEnabled="True" Width="32" Background="#FFAAAAAA" Margin="5,0,0,8" IsReadOnly="True" />
251+
<TextBox x:Name="txtBlue" Text="{Binding ElementName=sliderBlue,Path=Value}" VerticalAlignment="Center" IsUndoEnabled="True" Width="32" Background="#FFAAAAAA" Margin="5,0,0,8" KeyUp="TxtBlue_KeyUp" PreviewKeyDown="TxtColorField_PreviewKeyDown" />
252252
</StackPanel>
253253
<StackPanel Orientation="Horizontal">
254254
<Label Foreground="#FFC1C1C1" Width="44">Alpha</Label>
255255
<Slider x:Name="sliderAlpha" AutoToolTipPlacement="TopLeft" AutoToolTipPrecision="0" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Top" Width="200" Height="28" Value="255" Maximum="255" LargeChange="0" SmallChange="1" ValueChanged="SliderAlpha_ValueChanged" PreviewMouseLeftButtonDown="SliderAlpha_PreviewMouseLeftButtonDown" IsSnapToTickEnabled="True"/>
256-
<TextBox x:Name="txtAlpha" Text="{Binding ElementName=sliderAlpha,Path=Value}" VerticalAlignment="Center" IsUndoEnabled="True" Width="32" Background="#FFAAAAAA" Margin="5,0,0,8" IsReadOnly="True" />
256+
<TextBox x:Name="txtAlpha" Text="{Binding ElementName=sliderAlpha,Path=Value}" VerticalAlignment="Center" IsUndoEnabled="True" Width="32" Background="#FFAAAAAA" Margin="5,0,0,8" KeyUp="TxtAlpha_KeyUp" PreviewKeyDown="TxtColorField_PreviewKeyDown" />
257257
</StackPanel>
258258
</StackPanel>
259259
<StackPanel Orientation="Vertical" Margin="25,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center">

0 commit comments

Comments
 (0)