Skip to content

Commit

Permalink
Add PostBuild action to restore Version.cs as empty string (so that i…
Browse files Browse the repository at this point in the history
…t doesnt pollute version control with current build time stamp). #GITBUILD test

merged code from @SixParQuatre:
- Add option in settings/general to use alpha release note sites and use it in Tools.OpenReleaseNotes. As 6000 version changelog don't appear on the alpha site always use GetUnityReleaseNotes in that case.
- When using the alpha sites, we use it in comparison mode with the closest previous installed version. if none is found, use the same version as queried
- Added an extra parameter in Tools.FindNearestVersion to find the nearest below rather than above. Default value is false to maintain existing behaviour in existing calls.
  • Loading branch information
unitycoder committed Apr 20, 2024
1 parent f28d954 commit b27607f
Show file tree
Hide file tree
Showing 5 changed files with 373 additions and 190 deletions.
4 changes: 1 addition & 3 deletions UnityLauncherPro/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -790,16 +790,14 @@
<CheckBox x:Name="chkQuitAfterOpen" Content="Close after opening project" Checked="ChkQuitAfterOpen_CheckedChanged" Unchecked="ChkQuitAfterOpen_CheckedChanged" ToolTip="Closes launcher after running project (not really useful)" HorizontalAlignment="Left"/>
<CheckBox x:Name="chkQuitAfterCommandline" Content="Close after launching from Explorer" Unchecked="ChkQuitAfterCommandline_CheckedChanged" Checked="ChkQuitAfterCommandline_CheckedChanged" ToolTip="Close launcher after running from commandline or Explorer (recommended)" HorizontalAlignment="Left"/>
<CheckBox x:Name="chkAllowSingleInstanceOnly" Content="Allow single instance only" Checked="ChkAllowSingleInstanceOnly_CheckedChanged" Unchecked="ChkAllowSingleInstanceOnly_CheckedChanged" ToolTip="Activates already running instance, instead of starting new exe (not working if app is minized to taskbar)" HorizontalAlignment="Left"/>
<CheckBox x:Name="useAlphaReleaseNotesSite" Content="Use Unity Alpha Release Notes Site (Unity 6 not supported)" ToolTip="Use the superior (but alpha) Unity Release Notes (https://alpha.release-notes.ds.unity3d.com/) site when clicking on the ReleaseNotes button. Otherwise will default to the normal build page." Checked="UseAlphaReleaseNotes_Checked" Unchecked="UseAlphaReleaseNotes_Checked"/>
<CheckBox x:Name="chkStreamerMode" Content="Streamer Mode (hide project names and folders)" ToolTip="Hide project names and folders in main view" Checked="ChkStreamerMode_Checked" Unchecked="ChkStreamerMode_Checked" HorizontalAlignment="Left"/>

<!--<StackPanel Orientation="Horizontal" Margin="0,0,0,4">
<TextBox x:Name="txtTemplatePackagesFolder" BorderBrush="Transparent" CaretBrush="{DynamicResource ThemeSearchCaret}" Background="{DynamicResource ThemeTextBoxBackground}" SelectionBrush="{DynamicResource ThemeSearchSelection}" Foreground="{DynamicResource ThemeSearchForeground}" ToolTip="Folder for your custom unitypackage templates (for new project)" Padding="0,3,0,0" Width="110" TextChanged="TxtTemplatePackagesFolder_TextChanged" />
<Button Style="{StaticResource CustomButton}" x:Name="btnBrowseTemplateUnityPackagesFolder" Content="..." Margin="6,0,0,0" MinWidth="22" MinHeight="22" FontSize="16" ToolTip="Browse for new projects root folder.." Click="BtnBrowseTemplateUnityPackagesFolder_Click" />
<Label Content="UnityPackage Templates Folder" Foreground="{DynamicResource ThemeButtonForeground}" />
</StackPanel>-->



</StackPanel>
</GroupBox>

Expand Down
9 changes: 9 additions & 0 deletions UnityLauncherPro/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ void LoadSettings()
txtRootFolderForNewProjects.Text = Properties.Settings.Default.newProjectsRoot;
txtWebglRelativePath.Text = Properties.Settings.Default.webglBuildPath;
txtCustomThemeFile.Text = Properties.Settings.Default.themeFile;
useAlphaReleaseNotesSite.IsChecked = Properties.Settings.Default.useAlphaReleaseNotes;

chkEnablePlatformSelection.IsChecked = Properties.Settings.Default.enablePlatformSelection;
chkRunAutomatically.IsChecked = Properties.Settings.Default.runAutomatically;
Expand Down Expand Up @@ -3623,6 +3624,14 @@ private void btnOpenEditorLogsFolder_PreviewMouseDown(object sender, MouseButton
}
}

private void UseAlphaReleaseNotes_Checked(object sender, RoutedEventArgs e)
{
var isChecked = (bool)((CheckBox)sender).IsChecked;

Settings.Default.useAlphaReleaseNotes = isChecked;
Settings.Default.Save();
}

//private void menuProjectProperties_Click(object sender, RoutedEventArgs e)
//{
// var proj = GetSelectedProject();
Expand Down
Loading

0 comments on commit b27607f

Please sign in to comment.