Skip to content

Commit 479d507

Browse files
committed
32bit exe parsing fixes #12 (but cannot have same unity version for 32bit and 64bit, 64bit will get launched)
1 parent 6ee2612 commit 479d507

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

UnityLauncherPro/MainWindow.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@
597597
<Button Style="{StaticResource CustomButton}" x:Name="btnOpenPlayerLogs" Margin="10,0,0,0" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" Click="BtnOpenPlayerLogs_Click" ToolTip="Open Player logs folder in Explorer">
598598
<Label Content="_Player Logs" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
599599
</Button>
600-
<Button Style="{StaticResource CustomButton}" x:Name="btnOpenCrashLogs" Margin="10,0,0,0" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" Click="BtnOpenCrashLogs_Click" ToolTip="Open Player logs folder in Explorer">
600+
<Button Style="{StaticResource CustomButton}" x:Name="btnOpenCrashLogs" Margin="10,0,0,0" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" Click="BtnOpenCrashLogs_Click" ToolTip="Open Crash logs folder in Explorer">
601601
<Label Content="_Crash Logs" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
602602
</Button>
603603
<Button Style="{StaticResource CustomButton}" x:Name="btnAssetPackages" Margin="10,0,0,0" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" ToolTip="Open assetstore downloads folder in Explorer" Click="BtnAssetPackages_Click">
@@ -678,7 +678,7 @@
678678

679679
<Grid Grid.Row="2" UseLayoutRounding="False">
680680
<StatusBar VerticalAlignment="Bottom" Margin="3,1,20,1" Background="{x:Null}" Foreground="#FF595959">
681-
<TextBlock Margin="6,1,3,0" VerticalAlignment="Center" Text="Ready"/>
681+
<TextBlock x:Name="txtStatus" Margin="6,1,3,0" VerticalAlignment="Center" Text="Ready"/>
682682
</StatusBar>
683683
</Grid>
684684
</Grid>

UnityLauncherPro/Tools.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ public static string GetProjectVersion(string path)
125125
public static string GetFileVersionData(string path)
126126
{
127127
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(path);
128-
return fvi.ProductName.Replace("(64-bit)", "").Replace("Unity", "").Trim();
128+
var res = fvi.ProductName.Replace("(64-bit)", "").Replace("(32-bit)", "").Replace("Unity", "").Trim();
129+
return res;
129130
}
130131

131132
public static void ExploreProjectFolder(Project proj)
@@ -481,8 +482,11 @@ public static int VersionAsInt(string version)
481482
int result = 0;
482483
if (string.IsNullOrEmpty(version)) return result;
483484

485+
// cleanup 32bit version name
486+
string cleanVersion = version.Replace("(32-bit)", "");
487+
484488
// remove a,b,f,p
485-
string cleanVersion = version.Replace("a", ".");
489+
cleanVersion = cleanVersion.Replace("a", ".");
486490
cleanVersion = cleanVersion.Replace("b", ".");
487491
cleanVersion = cleanVersion.Replace("f", ".");
488492
cleanVersion = cleanVersion.Replace("p", ".");

0 commit comments

Comments
 (0)