Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 2.6 (Desktop) #309

Merged
merged 14 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ Other style rules:

If you need additional nuget dependencies, please contact the repository maintainers first before adding them.
We want to keep the application as small as possible. If you add dependencies, ensure that they work in a trimmed release.
To test the release-compatibility of your local changes, run the local release test script `installer\Tools\SquirrelBuildAndRelease.ps1` and install the created executable locally.
To test the release-compatibility of your local changes, run the local release test script `installer\BuildVelopackRelease.ps1` and install the created executable locally.
45 changes: 20 additions & 25 deletions .github/workflows/desktop-release-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,35 @@ on:
- release/desktop

jobs:
build-and-test:
verify-velopack-release:
runs-on: windows-latest
name: Release build and test
name: Verify Velopack release process

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json

- name: Restore dependencies
run: dotnet restore dirs.proj
- name: Build application
run: dotnet build dirs.proj -c Release
run: dotnet build dirs.proj --no-restore -c Release
- name: Test application
run: dotnet test dirs.proj --no-build -c Release --verbosity normal

verify-squirrel-release:
runs-on: windows-latest
name: Verify squirrel release process

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
- name: Run SquirrelBuildAndRelease
run: installer\Tools\SquirrelBuildAndRelease.ps1
shell: powershell
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
path: releases/WoWsShipBuilderSetup.exe
retention-days: 5
- name: Extract certificate
run: |
$certB64 = '${{ secrets.WOWSSB_CERT }}'
[IO.File]::WriteAllBytes(".\wowssb.pfx", [Convert]::FromBase64String([char[]]$certB64))
- name: Create Velopack Release
run: |
dotnet tool install -g vpk
vpk download github -o releases --repoUrl ${{ github.server_url }}/${{ github.repository }}
installer\BuildVelopackRelease.ps1 -skipBuild -signingCert wowssb.pfx -signingPassword '${{ secrets.WOWSSB_CERT_KEY }}'
shell: pwsh
- name: Cleanup certificate
run: Remove-Item .\wowssb.pfx
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,26 @@ jobs:
name: Build and release application

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Create application config
run: 'echo "$APPCONFIG" > WoWsShipBuilder.Desktop/Infrastructure/StaticConfiguration/ApplicationOptions.json'
shell: bash
env:
APPCONFIG: ${{secrets.SHIPBUILDER_APPCONFIG}}

- name: Restore dependencies
run: dotnet restore dirs.proj
- name: Build application
run: dotnet build dirs.proj --no-restore -c Release

- name: Store current application version
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: buildInfo
path: WoWsShipBuilder.Desktop\buildInfo.txt
Expand All @@ -42,16 +43,20 @@ jobs:
run: |
$certB64 = '${{ secrets.WOWSSB_CERT }}'
[IO.File]::WriteAllBytes(".\wowssb.pfx", [Convert]::FromBase64String([char[]]$certB64))
- name: Squirrel build and release
run: installer\Tools\SquirrelBuildAndRelease.ps1 -signingCert wowssb.pfx -signingPassword '${{ secrets.WOWSSB_CERT_KEY }}'
shell: powershell
- name: Create Velopack Release
run: |
dotnet tool install -g vpk
vpk download github -o releases --repoUrl ${{ github.server_url }}/${{ github.repository }}
installer\BuildVelopackRelease.ps1 -skipBuild -signingCert wowssb.pfx -signingPassword '${{ secrets.WOWSSB_CERT_KEY }}'
vpk upload github -o releases --repoUrl ${{ github.server_url }}/${{ github.repository }} --publish --releaseName ${{ env.CURRENT_TAG }} --tag ${{ env.CURRENT_TAG }} --token ${{ secrets.GITHUB_TOKEN }}
shell: pwsh
- name: Cleanup certificate
run: Remove-Item .\wowssb.pfx

- name: Release
uses: ncipollo/release-action@v1
with:
artifacts: releases/*
allowUpdates: true
bodyFile: ReleaseNotes.md
tag: ${{ env.CURRENT_TAG }}
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -62,7 +67,7 @@ jobs:
needs: build-and-release

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Download version info
uses: actions/download-artifact@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You can either share builds with others or just store them and access them later

It comes with a nice dark mode and includes some additional features like visualizing the turret angles of a ship or showing the dispersion graphs for one or more ships.

The application is distributed using Clowd.Squirrel, an automatic installer and updater that will install the application and keep it up to date after the first installation.
The application is distributed using Velopack, an automatic installer and updater that will install the application and keep it up to date after the first installation.
Update checks only run on application startup so it won't mess up your system with unnecessary services. The application itself is stored in your local app data and installation should not require admin permissions.

**WARNING**: You may get a Windows SmartScreen warning or a warning from your AV software when installing the tool. This is due to the distributed binary being unsigned. Unfortunately, code-signing certificates are rather expensive so we are not able to sign our binary at the moment.
Expand Down
14 changes: 10 additions & 4 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Update 2.5
# Update 2.6

## Download and Install

Download [**WoWsShipBuilderSetup.exe**](https://github.com/WoWs-Builder-Team/WoWs-ShipBuilder/releases/latest/download/WoWsShipBuilderSetup.exe) and execute it to install the application.
Download [**WoWsShipBuilder-win-Setup.exe**](https://github.com/WoWs-Builder-Team/WoWs-ShipBuilder/releases/latest/download/WoWsShipBuilder-win-Setup.exe)
and execute it to install the application.

### Portable Version

Alternatively, download the portable version [**WoWsShipBuilder-win-Portable.zip**](https://github.com/WoWs-Builder-Team/WoWs-ShipBuilder/releases/latest/download/WoWsShipBuilder-win-Portable.zip)
from the artifacts of this release, then extract it and run **WoWsShipBuilder.exe**.

---

Expand All @@ -12,11 +18,11 @@ Download [**WoWsShipBuilderSetup.exe**](https://github.com/WoWs-Builder-Team/WoW
<summary>Click to show release notes</summary>

### Additions
- Ammo switch time is now visible in ship comparison

### Changes
- Technical improvements to the application
- We have replaced the app's update framework. Future updates should be significantly smaller and therefore faster to download.

### Bugfixes
- Ship upgrades cannot be selected on mobile devices (#303)

</details>
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,10 @@
{
decimal maxSpeedModifier = modifiers.ApplyModifiers("ManeuverabilityDataContainer.Speed", 1m);

var speedBoostModifier = modifiers.ApplyModifiers("ManeuverabilityDataContainer.BoostCoeff.SpeedBoost", 0);
var speedBoostModifier = modifiers.ApplyModifiers("ManeuverabilityDataContainer.BoostCoeff.SpeedBoost", 0m);
if (speedBoostModifier != 0)
{
maxSpeedModifier += speedBoostModifier + modifiers.ApplyModifiers("ManeuverabilityDataContainer.SpeedBoostForsage", 0); // Speed boost is additive, Halland UU bonus only applies if regular speed boost is active
maxSpeedModifier += speedBoostModifier + modifiers.ApplyModifiers("ManeuverabilityDataContainer.SpeedBoostForsage", 0m); // Speed boost is additive, Halland UU bonus only applies if regular speed boost is active
}

decimal enlargedPropellerShaftSpeedModifier = modifiers.ApplyModifiers("ManeuverabilityDataContainer.PropellerShaftSpeed", 1m);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@using WoWsShipBuilder.DataStructures
@using WoWsShipBuilder.DataElements
@using WoWsShipBuilder.DataElements
@using WoWsShipBuilder.Features.ShipStats.ViewModels
@using WoWsShipBuilder.Features.DataContainers;
@using WoWsShipBuilder.Infrastructure.Localization.Resources
Expand Down Expand Up @@ -37,7 +36,7 @@
<MudPaper Outlined="true">
@foreach (var consumable in consumableSlot.ConsumableData)
{
<MudMenuItem Style="padding: 0;" OnClick="@(_ => SwapConsumable(consumableSlot, consumable))">
<MudMenuItem Style="padding: 0;" OnAction="@(_ => SwapConsumable(consumableSlot, consumable))">
<MudTooltip Placement="Placement.Right" Color="Color.Transparent" Style="z-index: 1000000">
<ChildContent>
<MudImage Width="@GetImageSize()" Height="@GetImageSize()" Src="@GetConsumableIcon(consumable)"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
@using WoWsShipBuilder.DataStructures
@using WoWsShipBuilder.DataStructures.Ship
@using WoWsShipBuilder.Infrastructure.Localization
@using WoWsShipBuilder.DataStructures.Ship
@inherits ReactiveComponentBase<WoWsShipBuilder.Features.ShipStats.ViewModels.ShipModuleViewModel>
@inject ILocalizer Localizer

Expand All @@ -21,7 +19,7 @@
<MudButton OnClick="@(_ => ViewModel.SelectModuleExecute(upgrade))" Class="pa-2 mb-n2" Style="@GetImageStyle()" Variant="Variant.Outlined" >
<MudImage Width="@GetImageSize()" Height="@GetImageSize()" Src="@GetModuleIcon(upgrade, ViewModel.SelectedModules.Contains(upgrade))"/>
</MudButton>
<MudText Style="@($"min-height: {(columnUpgrade.IndexOf(upgrade) == columnUpgrade.Count - 1 ? "20" : "40")}px; max-width: 80px; max-height: 40px; overflow: hidden; white-space: break-spaces; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: small")" Align="Align.Center" Typo="Typo.body2">
<MudText Style="@($"min-height: {(columnUpgrade.IndexOf(upgrade) == columnUpgrade.Count - 1 ? "20" : "40")}px; max-width: {(ViewModel.ShipUpgrades.Count > 5 ? "69" : "80")}px; max-height: 40px; overflow: hidden; white-space: break-spaces; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: small")" Align="Align.Center" Typo="Typo.body2">
@Localizer.GetGameLocalization(upgrade.Name).Localization
</MudText>
</MudStack>
Expand Down Expand Up @@ -72,4 +70,4 @@
return "min-width: 55px; width: 55px; height: 55px;";
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<MudPaper Outlined="true">
@foreach (var modernization in columnModernizations)
{
<MudMenuItem Style="padding: 2px 4px;" OnClick="@(_ => ViewModel.OnModernizationSelected(modernization, columnModernizations))">
<MudMenuItem Style="padding: 2px 4px;" OnAction="@(_ => ViewModel.OnModernizationSelected(modernization, columnModernizations))">
<MudTooltip Color="Color.Transparent" Placement="Placement.Right" Delay="350">
<ChildContent>
<MudImage Width="@GetImageSize(true)" Height="@GetImageSize(true)" Src="@GetUpgradeIcon(modernization)"/>
Expand Down
Loading
Loading