[READ-ONLY] Mirror of https://github.com/jackmawer/BlueRoseClassic.
0

Configure Feed

Select the types of activity you want to include in your feed.

Support for launching FSO IDE by pressing the "Develop" button.

Primitive OpenAL detection, and turned the launch FreeSO task into it's
independent method that takes one argument.

Zack Casey (Jan 2, 2016, 6:50 AM EST) d44dee13 25e68638

+44 -7
+5
.gitignore
··· 1 + ## Global 2 + 3 + *.exe 4 + *.zip 5 + 1 6 ## Ignore Visual Studio temporary files, build results, and 2 7 ## files generated by popular Visual Studio add-ons. 3 8
+4 -2
FreeSOLauncherZ/MainWindow.xaml
··· 6 6 xmlns:local="clr-namespace:FreeSOLauncher" 7 7 mc:Ignorable="d" 8 8 Title="FreeSO" Height="583.702" Width="806.268" 9 - Background="#3263a8"> 9 + Background="#3263a8" 10 + ResizeMode="CanMinimize"> 10 11 <Grid> 11 - <Button x:Name="Start" HorizontalAlignment="Left" Margin="10,511,0,0" VerticalAlignment="Top" Width="75" Height="20" Content="Start" Click="Start_Click"> 12 + <Button x:Name="Start" HorizontalAlignment="Left" Margin="10,511,0,0" VerticalAlignment="Top" Width="75" Height="20" Content="Play" Click="Start_Click"> 12 13 </Button> 13 14 <WebBrowser x:Name="WebMain" HorizontalAlignment="Left" Height="496" Margin="10,10,0,0" VerticalAlignment="Top" Width="770"/> 14 15 <Button x:Name="FSONEws" Content="FreeSO News" HorizontalAlignment="Left" Margin="682,511,0,0" VerticalAlignment="Top" Width="98" Click="FSONews_Click"/> 15 16 <Button x:Name="LauncherNews" Content="Launcher News" HorizontalAlignment="Left" Margin="576,511,0,0" VerticalAlignment="Top" Width="101" Click="LauncherNews_Click"/> 17 + <Button x:Name="StartIDE" Content="Develop" HorizontalAlignment="Left" Margin="90,511,0,0" VerticalAlignment="Top" Width="75" Click="StartIDE_Click"/> 16 18 17 19 </Grid> 18 20 </Window>
+34 -4
FreeSOLauncherZ/MainWindow.xaml.cs
··· 18 18 using System.Windows; 19 19 using System.Diagnostics; 20 20 using System.Threading; 21 + using SysIO = System.IO; 22 + using System.Text; 21 23 22 24 namespace FreeSOLauncher 23 25 { ··· 35 37 36 38 } 37 39 40 + private void StartIDE_Click(object sender, RoutedEventArgs e) 41 + { 42 + StartFSO("FSO.IDE.exe"); 43 + } 38 44 39 45 private void Start_Click(object sender, RoutedEventArgs e) 40 46 { 47 + StartFSO("FreeSO.exe"); 48 + } 49 + 50 + /// <summary> 51 + /// If FreeSO isn't found, alert 52 + /// </summary> 53 + /// <param name="fso"></param> 54 + private void StartFSO(string fso) 55 + { 56 + string notFoundTitle = "Not found"; 57 + string openAL3264 = @"C:\Program Files (x86)\OpenAL"; 58 + string openAL = @"C:\Program Files\OpenAL"; 59 + 60 + bool openALDir = SysIO.Directory.Exists(openAL3264) || SysIO.Directory.Exists(openAL); 61 + 41 62 try 42 63 { 43 - Process.Start("FreeSO.exe"); 44 - Thread.Sleep(5000); // Wait 5 seconds before closing 45 - Application.Current.Shutdown(); 64 + if (!openALDir) 65 + { 66 + MessageBox.Show("OpenAL not found!\nGo to openal.org/downloads and get the Windows installer...", notFoundTitle); 67 + } 68 + else 69 + { 70 + Process.Start(fso); 71 + Thread.Sleep(5000); // Wait 5 seconds before closing 72 + Application.Current.Shutdown(); 73 + } 74 + 46 75 } 47 76 catch 48 77 { 49 - MessageBox.Show("Place the launcher into the same directory as FreeSO.", appTitle + " not found"); 78 + MessageBox.Show("Could not detect FreeSO in this folder.", notFoundTitle); 50 79 } 51 80 } 52 81 ··· 66 95 { 67 96 WebMain.Navigate(new Uri("http://forum.freeso.org/threads/road-to-live-release.801/", UriKind.RelativeOrAbsolute)); 68 97 } 98 + 69 99 } 70 100 }
+1 -1
Installer.nsi
··· 1 1 Name "FreeSOLauncherZ" 2 2 3 - Outfile "FreeSOLauncherZInst.exe" 3 + Outfile "FreeSOLauncherZ.exe" 4 4 5 5 RequestExecutionLevel admin 6 6