Skip to content

Commit

Permalink
feat: 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraZiling committed Jul 29, 2024
1 parent 531c3fa commit 8f7a68b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 33 deletions.
7 changes: 7 additions & 0 deletions Hollow/ViewModels/Pages/GameSettingsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public partial class GameSettingsViewModel : ViewModelBase, IViewModelBase

[ObservableProperty]
private bool _isGameDirectoryValid;


[RelayCommand]
private void SettingsChanged() => IsSettingsChanged = true;
Expand Down Expand Up @@ -53,10 +54,16 @@ private bool ValidateSettings()

[ObservableProperty]
private string _screenResolutionWidth = "";
partial void OnScreenResolutionWidthChanged(string value) => SettingsChanged();

[ObservableProperty]
private string _screenResolutionHeight = "";
partial void OnScreenResolutionHeightChanged(string value) => SettingsChanged();

[ObservableProperty]
private bool _isFullScreen;
partial void OnIsFullScreenChanged(bool value) => SettingsChanged();


private readonly IGameService _gameService;
private readonly IConfigurationService _configurationService;
Expand Down
21 changes: 3 additions & 18 deletions Hollow/Views/Pages/GameSettings.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,7 @@
Name="ScreenResolutionWidthTextBox"
Text="{Binding ScreenResolutionWidth, Mode=TwoWay}"
Watermark="{I18N {x:Static languages:LangKeys.GameSettings_Screen_ResolutionWidth}}"
Width="100">
<Interaction.Behaviors>
<EventTriggerBehavior EventName="TextChanged" SourceObject="ScreenResolutionWidthTextBox">
<InvokeCommandAction Command="{Binding SettingsChangedCommand}" />
</EventTriggerBehavior>
</Interaction.Behaviors>
</TextBox>
Width="100" />
<TextBlock
Margin="0,0,0,3"
Text="x"
Expand All @@ -37,20 +31,11 @@
Name="ScreenResolutionHeightTextBox"
Text="{Binding ScreenResolutionHeight, Mode=TwoWay}"
Watermark="{I18N {x:Static languages:LangKeys.GameSettings_Screen_ResolutionHeight}}"
Width="100">
<Interaction.Behaviors>
<EventTriggerBehavior EventName="TextChanged" SourceObject="ScreenResolutionHeightTextBox">
<InvokeCommandAction Command="{Binding SettingsChangedCommand}" />
</EventTriggerBehavior>
</Interaction.Behaviors>
</TextBox>
Width="100" />
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="7">
<TextBlock Text="{I18N {x:Static languages:LangKeys.GameSettings_Screen_FullScreen}}" VerticalAlignment="Center" />
<CheckBox
Command="{Binding SettingsChangedCommand}"
IsChecked="{Binding IsFullScreen, Mode=TwoWay}"
Name="FullScreenCheckBox" />
<CheckBox IsChecked="{Binding IsFullScreen, Mode=TwoWay}" Name="FullScreenCheckBox" />
</StackPanel>
</StackPanel>

Expand Down
30 changes: 15 additions & 15 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
param(
[string] $Version = "0.0.5.0"
[string] $Version = "0.1.0.0"
)

$ErrorActionPreference = "Stop";
Expand All @@ -10,31 +10,31 @@ cargo build --manifest-path .\hollow-launcher\Cargo.toml -r

Write-Output "Start building withRuntime...";

dotnet publish Hollow.Windows/Hollow.Windows.csproj -o "build/$Version/withRuntime/hollow_app" -r win-x64 -p:SelfContained=true -p:AssemblyVersion=$Version -p:Configuration=Release;
dotnet publish Hollow.Windows/Hollow.Windows.csproj -o "build/$Version/Hollow_withRuntime/hollow_app" -r win-x64 -p:SelfContained=true -p:AssemblyVersion=$Version -p:Configuration=Release;

Write-Output "Removing unused files of withRuntime...";

Remove-Item -Path ./build/$Version/withRuntime/hollow_app/Microsoft.Web.WebView2.Core.xml
Remove-Item -Path ./build/$Version/withRuntime/hollow_app/Microsoft.Web.WebView2.WinForms.dll
Remove-Item -Path ./build/$Version/withRuntime/hollow_app/Microsoft.Web.WebView2.WinForms.xml
Remove-Item -Path ./build/$Version/withRuntime/hollow_app/Microsoft.Web.WebView2.Wpf.dll
Remove-Item -Path ./build/$Version/withRuntime/hollow_app/Microsoft.Web.WebView2.Wpf.xml
Remove-Item -Path ./build/$Version/Hollow_withRuntime/hollow_app/Microsoft.Web.WebView2.Core.xml
Remove-Item -Path ./build/$Version/Hollow_withRuntime/hollow_app/Microsoft.Web.WebView2.WinForms.dll
Remove-Item -Path ./build/$Version/Hollow_withRuntime/hollow_app/Microsoft.Web.WebView2.WinForms.xml
Remove-Item -Path ./build/$Version/Hollow_withRuntime/hollow_app/Microsoft.Web.WebView2.Wpf.dll
Remove-Item -Path ./build/$Version/Hollow_withRuntime/hollow_app/Microsoft.Web.WebView2.Wpf.xml

Copy-Item -Path ".\hollow-launcher\target\release\Hollow.exe" -Destination ".\build\$Version\withRuntime\Hollow.exe"
Copy-Item -Path ".\hollow-launcher\target\release\Hollow.exe" -Destination ".\build\$Version\Hollow_withRuntime\Hollow.exe"

Write-Output "Start building withoutRuntime...";

dotnet publish Hollow.Windows/Hollow.Windows.csproj -o "build/$Version/withoutRuntime/hollow_app" -r win-x64 -p:SelfContained=false -p:AssemblyVersion=$Version -p:Configuration=Release;
dotnet publish Hollow.Windows/Hollow.Windows.csproj -o "build/$Version/Hollow_withoutRuntime/hollow_app" -r win-x64 -p:SelfContained=false -p:AssemblyVersion=$Version -p:Configuration=Release;

Write-Output "Removing unused files of withoutRuntime...";

Remove-Item -Path ./build/$Version/withoutRuntime/hollow_app/Microsoft.Web.WebView2.Core.xml
Remove-Item -Path ./build/$Version/withoutRuntime/hollow_app/Microsoft.Web.WebView2.WinForms.dll
Remove-Item -Path ./build/$Version/withoutRuntime/hollow_app/Microsoft.Web.WebView2.WinForms.xml
Remove-Item -Path ./build/$Version/withoutRuntime/hollow_app/Microsoft.Web.WebView2.Wpf.dll
Remove-Item -Path ./build/$Version/withoutRuntime/hollow_app/Microsoft.Web.WebView2.Wpf.xml
Remove-Item -Path ./build/$Version/Hollow_withoutRuntime/hollow_app/Microsoft.Web.WebView2.Core.xml
Remove-Item -Path ./build/$Version/Hollow_withoutRuntime/hollow_app/Microsoft.Web.WebView2.WinForms.dll
Remove-Item -Path ./build/$Version/Hollow_withoutRuntime/hollow_app/Microsoft.Web.WebView2.WinForms.xml
Remove-Item -Path ./build/$Version/Hollow_withoutRuntime/hollow_app/Microsoft.Web.WebView2.Wpf.dll
Remove-Item -Path ./build/$Version/Hollow_withoutRuntime/hollow_app/Microsoft.Web.WebView2.Wpf.xml

Copy-Item -Path ".\hollow-launcher\target\release\Hollow.exe" -Destination ".\build\$Version\withoutRuntime\Hollow.exe"
Copy-Item -Path ".\hollow-launcher\target\release\Hollow.exe" -Destination ".\build\$Version\Hollow_withoutRuntime\Hollow.exe"

Write-Output "Build Finished";

Expand Down

0 comments on commit 8f7a68b

Please sign in to comment.