Repository navigation
Expand file tree
/
Copy pathBuildOptionsWindow.xaml
More file actions
287 lines (257 loc) · 17.1 KB
/
Copy pathBuildOptionsWindow.xaml
File metadata and controls
287 lines (257 loc) · 17.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
<Window x:Class="Sm64DecompLevelViewer.BuildOptionsWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Build Configuration" Height="580" Width="480"
Background="#1E1E1E" Foreground="#CCCCCC"
WindowStartupLocation="CenterOwner" ResizeMode="NoResize">
<Window.Resources>
<SolidColorBrush x:Key="BackgroundBrush" Color="#1E1E1E"/>
<SolidColorBrush x:Key="PanelBrush" Color="#252526"/>
<SolidColorBrush x:Key="BorderBrush" Color="#3F3F46"/>
<SolidColorBrush x:Key="TextBrush" Color="#CCCCCC"/>
<SolidColorBrush x:Key="AccentBrush" Color="#00A2FF"/>
<SolidColorBrush x:Key="HeaderBrush" Color="#569CD6"/>
<SolidColorBrush x:Key="HoverBrush" Color="#2A2D2E"/>
<SolidColorBrush x:Key="WarningBrush" Color="#D13438"/>
<!-- Label Style -->
<Style TargetType="Label">
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Padding" Value="0,0,5,0"/>
</Style>
<!-- ComboBox Style -->
<Style TargetType="ComboBox">
<Setter Property="Background" Value="{StaticResource PanelBrush}"/>
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="5,3"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Style.Resources>
<!-- These overrides force standard WPF ComboBox to render with our dark background and text colors -->
<SolidColorBrush x:Key="{x:Static SystemColors.WindowBrushKey}" Color="#252526" />
<SolidColorBrush x:Key="{x:Static SystemColors.WindowTextBrushKey}" Color="#CCCCCC" />
</Style.Resources>
</Style>
<!-- ComboBoxItem Style -->
<Style TargetType="ComboBoxItem">
<Setter Property="Background" Value="{StaticResource PanelBrush}"/>
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
<Setter Property="Padding" Value="6,4"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{StaticResource HoverBrush}"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="{StaticResource AccentBrush}"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</Style.Triggers>
</Style>
<!-- TextBox Style -->
<Style TargetType="TextBox">
<Setter Property="Background" Value="{StaticResource PanelBrush}"/>
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="5,3"/>
<Setter Property="CaretBrush" Value="White"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
<!-- Button Style -->
<Style TargetType="Button">
<Setter Property="Background" Value="{StaticResource PanelBrush}"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="10,6"/>
<Setter Property="Cursor" Value="Hand"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{StaticResource HoverBrush}"/>
</Trigger>
</Style.Triggers>
</Style>
<!-- CheckBox Style -->
<Style TargetType="CheckBox">
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Margin" Value="0,5,0,5"/>
</Style>
</Window.Resources>
<Grid Margin="15">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <!-- Title -->
<RowDefinition Height="*"/> <!-- Settings content -->
<RowDefinition Height="Auto"/> <!-- Buttons -->
</Grid.RowDefinitions>
<TextBlock Text="Build Options" FontSize="18" FontWeight="Bold" Foreground="{StaticResource HeaderBrush}" Margin="0,0,0,15"/>
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" Margin="0,0,0,15">
<StackPanel>
<!-- Group 1: Make Flags -->
<GroupBox Header="SM64 Build Parameters" BorderBrush="{StaticResource BorderBrush}" Foreground="{StaticResource HeaderBrush}" Padding="8">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- TARGET PLATFORM -->
<Label Grid.Row="0" Grid.Column="0" Content="Target Platform:" Margin="0,4"/>
<ComboBox Grid.Row="0" Grid.Column="1" x:Name="PlatformComboBox" Margin="0,4" SelectionChanged="PlatformComboBox_SelectionChanged">
<ComboBoxItem Content="N64 ROM" IsSelected="True"/>
<ComboBoxItem Content="PC Port"/>
</ComboBox>
<!-- BUILD ENVIRONMENT -->
<Label Grid.Row="1" Grid.Column="0" x:Name="EnvLabel" Content="Build Environment:" Margin="0,4" Visibility="Collapsed"/>
<ComboBox Grid.Row="1" Grid.Column="1" x:Name="EnvComboBox" Margin="0,4" Visibility="Collapsed" SelectionChanged="EnvComboBox_SelectionChanged">
<ComboBoxItem Content="WSL (Ubuntu)" IsSelected="True"/>
<ComboBoxItem Content="MSYS2 (Native Windows)"/>
</ComboBox>
<!-- MSYS2 DIRECTORY -->
<Label Grid.Row="2" Grid.Column="0" x:Name="MsysLabel" Content="MSYS2 Path:" Margin="0,4" Visibility="Collapsed"/>
<Grid Grid.Row="2" Grid.Column="1" x:Name="MsysGrid" Visibility="Collapsed" Margin="0,4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox x:Name="MsysPathTextBox" Text="C:\msys64" VerticalContentAlignment="Center"/>
<Button Grid.Column="1" x:Name="BrowseMsysButton" Content="Browse..." Margin="5,0,0,0" Padding="10,0" Click="BrowseMsysButton_Click"/>
</Grid>
<!-- VERSION -->
<Label Grid.Row="3" Grid.Column="0" Content="Version:" Margin="0,4"/>
<ComboBox Grid.Row="3" Grid.Column="1" x:Name="VersionComboBox" Margin="0,4">
<ComboBoxItem Content="us" IsSelected="True"/>
<ComboBoxItem Content="jp"/>
<ComboBoxItem Content="eu"/>
<ComboBoxItem Content="sh"/>
<ComboBoxItem Content="cn"/>
</ComboBox>
<!-- COMPILER -->
<Label Grid.Row="4" Grid.Column="0" Content="Compiler:" Margin="0,4"/>
<ComboBox Grid.Row="4" Grid.Column="1" x:Name="CompilerComboBox" Margin="0,4" SelectionChanged="CompilerComboBox_SelectionChanged">
<ComboBoxItem Content="ido" IsSelected="True"/>
<ComboBoxItem Content="gcc"/>
</ComboBox>
<!-- GRUCODE -->
<Label Grid.Row="5" Grid.Column="0" Content="RSP Microcode:" Margin="0,4"/>
<ComboBox Grid.Row="5" Grid.Column="1" x:Name="GrucodeComboBox" Margin="0,4">
<ComboBoxItem Content="f3d_old" IsSelected="True"/>
<ComboBoxItem Content="f3d_new"/>
<ComboBoxItem Content="f3dex"/>
<ComboBoxItem Content="f3dex2"/>
<ComboBoxItem Content="f3dzex"/>
</ComboBox>
<!-- JOBS -->
<Label Grid.Row="6" Grid.Column="0" Content="Parallel Jobs (-j):" Margin="0,4"/>
<TextBox Grid.Row="6" Grid.Column="1" x:Name="JobsTextBox" Text="8" Margin="0,4" PreviewTextInput="NumberValidationTextBox"/>
<!-- CHECKBOXES -->
<StackPanel Grid.Row="7" Grid.Column="1" Margin="0,5,0,0">
<CheckBox x:Name="CompareCheckBox" Content="Compare ROM hash (COMPARE=1)"/>
<CheckBox x:Name="NonMatchingCheckBox" Content="Build non-matching (NON_MATCHING=1)"/>
<CheckBox x:Name="ExtendRomCheckBox" Content="Extend ROM to 24MB (Uncompressed MIO0)" Visibility="Collapsed"/>
</StackPanel>
</Grid>
</GroupBox>
<!-- Group 2: Emulator Settings -->
<GroupBox Header="Emulator Configuration" BorderBrush="{StaticResource BorderBrush}" Foreground="{StaticResource HeaderBrush}" Padding="8" Margin="0,10,0,0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox Grid.Row="0" Grid.Column="0" x:Name="EmulatorPathTextBox" Margin="0,4" IsReadOnly="True"/>
<Button Grid.Row="0" Grid.Column="1" x:Name="BrowseEmulatorButton" Content="..." Click="BrowseEmulator_Click" Margin="5,4,0,4" Width="40"/>
<CheckBox Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" x:Name="AutoRunCheckBox" Content="Auto-launch emulator after successful build" Margin="0,4"/>
</Grid>
</GroupBox>
<!-- Group 3: Reset & Clean Project -->
<GroupBox Header="Reset & Clean Project" BorderBrush="{StaticResource BorderBrush}" Foreground="{StaticResource HeaderBrush}" Padding="8" Margin="0,10,0,0">
<StackPanel>
<Grid Margin="0,0,0,8">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Content="Git Repository:"/>
<TextBox Grid.Column="1" x:Name="GitUrlTextBox" Text="https://github.com/n64decomp/sm64.git"/>
</Grid>
<StackPanel Orientation="Horizontal" Margin="0,0,0,5">
<Button Content="Clean & Fresh Start (Re-clone)" Click="CleanAndClone_Click" Background="{StaticResource WarningBrush}" BorderBrush="{StaticResource WarningBrush}" Foreground="White"/>
<Button Content="Revert Source Changes" Click="RevertSource_Click" Margin="10,0,0,0"/>
</StackPanel>
<TextBlock Text="Re-clone wipes the directory completely (keeps baseroms). Revert only discards file edits, keeping builds." FontSize="10" Foreground="#888888" Margin="0,4,0,0"/>
</StackPanel>
</GroupBox>
<!-- Group 4: Target Compatibility Matrix -->
<GroupBox Header="Target Compatibility Matrix" BorderBrush="{StaticResource BorderBrush}" Foreground="{StaticResource HeaderBrush}" Padding="8" Margin="0,10,0,0">
<StackPanel>
<!-- PC Port Compatibility -->
<TextBlock Text="PC Port (Native execution):" FontWeight="Bold" Margin="0,0,0,5" Foreground="#CCCCCC"/>
<Grid Margin="5,0,0,10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Text="• MSYS2 MinGW64: " Margin="0,2" Foreground="#CCCCCC"/>
<TextBlock Grid.Row="0" Grid.Column="1" Text="Very Stable" FontWeight="Bold" Foreground="#4CAF50" Margin="0,2"/>
<TextBlock Grid.Row="1" Grid.Column="0" Text="• WSL (Ubuntu): " Margin="0,2" Foreground="#CCCCCC"/>
<TextBlock Grid.Row="1" Grid.Column="1" Text="Kinda Unstable" FontWeight="Bold" Foreground="#FBC02D" Margin="0,2"/>
<TextBlock Grid.Row="2" Grid.Column="0" Text="• GCC Compiler: " Margin="0,2" Foreground="#CCCCCC"/>
<TextBlock Grid.Row="2" Grid.Column="1" Text="Recommended" FontWeight="Bold" Foreground="#4CAF50" Margin="0,2"/>
<TextBlock Grid.Row="3" Grid.Column="0" Text="• IDO Compiler: " Margin="0,2" Foreground="#CCCCCC"/>
<TextBlock Grid.Row="3" Grid.Column="1" Text="Not Recommended" FontWeight="Bold" Foreground="#F44336" Margin="0,2"/>
</Grid>
<!-- SM64 Decompilation -->
<TextBlock Text="SM64 N64 Decompilation:" FontWeight="Bold" Margin="0,5,0,5" Foreground="#CCCCCC"/>
<Grid Margin="5,0,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Text="• IDO Compiler: " Margin="0,2" Foreground="#CCCCCC"/>
<TextBlock Grid.Row="0" Grid.Column="1" Text="Recommended" FontWeight="Bold" Foreground="#4CAF50" Margin="0,2"/>
<TextBlock Grid.Row="1" Grid.Column="0" Text="• GCC Compiler: " Margin="0,2" Foreground="#CCCCCC"/>
<TextBlock Grid.Row="1" Grid.Column="1" Text="Not Recommended (Kinda Broken)" FontWeight="Bold" Foreground="#F44336" Margin="0,2"/>
</Grid>
</StackPanel>
</GroupBox>
</StackPanel>
</ScrollViewer>
<!-- Action Buttons -->
<Border Grid.Row="2" BorderBrush="{StaticResource BorderBrush}" BorderThickness="0,1,0,0" Padding="0,10,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="1" Content="Build & Run" Click="Build_Click" Background="{StaticResource AccentBrush}" BorderThickness="0" Foreground="White" Width="100" FontWeight="Bold"/>
<Button Grid.Column="2" Content="Cancel" Click="Cancel_Click" Margin="10,0,0,0" Width="80"/>
</Grid>
</Border>
</Grid>
</Window>