3 Commits

11 changed files with 70 additions and 24 deletions

1
.gitignore vendored
View File

@@ -19,6 +19,7 @@ bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Pp]ub/
# Visual Studio 2015 cache/options directory
.vs/

19
MakeInstaller.ps1 Normal file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env powershell
param (
[string]$Version,
[string]$BuildConfig = "Release"
)
if ($Version -eq "") {
Write-Host "Usage: .\MakeInstaller.ps1 <VERSION_NUMBER> [-BuildConfig <BUILD_CONFIG>]"
Write-Host "Example: .\MakeInstaller.ps1 2025.823.0 -BuildConfig Debug"
exit
}
$tmpPub = ".\pub"
if (-not (Test-Path -Path $tmpPub)) {
New-Item -ItemType Directory -path $tmpPub
}
dotnet publish -c $BuildConfig osu.Desktop --self-contained -r win-x64 -o $tmpPub -verbosity:m /p:Version=$Version
vpk pack --packId jvnkosu.Client --packTitle "jvnkosu!lazer" --packVersion $Version --packDir ./pub --mainExe="osu!.exe"

View File

@@ -115,10 +115,12 @@ namespace osu.Desktop
if (IsFirstRun)
LocalConfig.SetValue(OsuSetting.ReleaseStream, ReleaseStream.Lazer);
if (IsPackageManaged)
return new NoActionUpdateManager();
// if (IsPackageManaged)
// return new NoActionUpdateManager();
return new VelopackUpdateManager();
// return new VelopackUpdateManager();
return new NoActionUpdateManager(); // for now, APIs are useless for actually downloading the releases. TODO: adapt UpdateManager for gitea
}
public override bool RestartAppWhenExited()

View File

@@ -78,6 +78,20 @@ Your experience will not be perfect, and may even feel subpar compared to games
Please bear with us as we continue to improve the game for you!");
/// <summary>
/// "Welcome to jvnkosu!lazer!"
/// </summary>
public static LocalisableString GreetingNotification => new TranslatableString(getKey(@"greeting_notification"), @"Welcome to jvnkosu!lazer!");
/// <summary>
/// "Failed to load backgrounds!\nCheck your internet connection"
/// </summary>
public static LocalisableString SeasonalBackgroundsFail => new TranslatableString(getKey(@"seasonal_backgrounds_fail"), @"Failed to load backgrounds!\nCheck your internet connection"); // TODO: implement l10n in osu-resources
/// <summary>
/// "Successfully refreshed background categories!"
/// </summary>
public static LocalisableString SeasonalBackgroundsRefreshed => new TranslatableString(getKey(@"seasonal_backgrounds_refreshed"), @"Successfully refreshed background categories!");
private static string getKey(string key) => $@"{prefix}:{key}";
}
}

View File

@@ -64,16 +64,26 @@ namespace osu.Game.Localisation
/// </summary>
public static LocalisableString BackgroundSource => new TranslatableString(getKey(@"background_source"), @"Background source");
/// <summary>
/// "Use custom backgrounds from server"
/// </summary>
public static LocalisableString UseSeasonalBackgrounds => new TranslatableString(getKey(@"use_seasonal_backgrounds"), @"Use custom backgrounds from server");
/// <summary>
/// "Seasonal backgrounds"
/// </summary>
public static LocalisableString SeasonalBackgrounds => new TranslatableString(getKey(@"seasonal_backgrounds"), @"Seasonal backgrounds");
/*/// <summary>
/// "Seasonal backgrounds"
/// </summary>*/
/* public static LocalisableString SeasonalBackgroundsCategories => new TranslatableString(getKey(@"seasonal_backgrounds_categories"), @"Seasonal backgrounds categories");
*/
/// <summary>
/// "Background categories"
/// </summary>
public static LocalisableString SeasonalBackgroundsCategories => new TranslatableString(getKey(@"seasonal_backgrounds_categories"), @"Background categories");
/// <summary>
/// "Refresh categories"
/// </summary>
public static LocalisableString SeasonalBackgroundsRefresh => new TranslatableString(getKey(@"seasonal_backgrounds_refresh"), @"Refresh categories");
/// <summary>
/// "Changes to this setting will only apply with an active osu!supporter tag."
/// </summary>

View File

@@ -8,7 +8,7 @@ namespace osu.Game.Online.API.Requests
public class GetMenuContentRequest : OsuJsonWebRequest<APIMenuContent>
{
public GetMenuContentRequest()
: base(@"https://assets.ppy.sh/menu-content.json")
: base(@"https://osu.jvnko.boats/uploads/menu-content.json") // TODO: backend
{
}
}

View File

@@ -413,10 +413,9 @@ namespace osu.Game
{
Schedule(() =>
{
// TODO: cache categories to only show this if *new* categories appear
Notifications?.Post(new SimpleNotification
{
Text = "Successfully refreshed background categories",
Text = ButtonSystemStrings.SeasonalBackgroundsRefreshed,
Icon = FontAwesome.Solid.CheckCircle,
Transient = true
});
@@ -948,7 +947,7 @@ namespace osu.Game
protected virtual Loader CreateLoader() => new Loader();
protected virtual UpdateManager CreateUpdateManager() => new UpdateManager();
protected virtual UpdateManager CreateUpdateManager() => new NoActionUpdateManager();
/// <summary>
/// Adjust the globally applied <see cref="DrawSizePreservingFillContainer.TargetDrawSize"/> in every <see cref="ScalingContainer"/>.
@@ -1207,7 +1206,7 @@ namespace osu.Game
Margin = new MarginPadding(5),
}, topMostOverlayContent.Add);
if (!IsDeployedBuild)
// if (!IsDeployedBuild) // we're going to have the "developer build" banner for a while
loadComponentSingleFile(devBuildBanner = new DevBuildBanner(), ScreenContainer.Add);
loadComponentSingleFile(osuLogo, _ =>
@@ -1362,7 +1361,7 @@ namespace osu.Game
{
Notifications?.Post(new SimpleErrorNotification
{
Text = "Failed to load backgrounds!\nCheck your internet connection",
Text = ButtonSystemStrings.SeasonalBackgroundsFail,
Icon = FontAwesome.Solid.ExclamationTriangle,
Transient = true
});
@@ -1738,7 +1737,7 @@ namespace osu.Game
introScreen = intro;
SimpleNotification notification = new SimpleNotification
{
Text = "Welcome to jvnkosu!lazer!",
Text = ButtonSystemStrings.GreetingNotification,
Transient = true,
};
Notifications?.Post(notification);

View File

@@ -32,7 +32,7 @@ namespace osu.Game.Overlays
Origin = Anchor.BottomCentre,
Font = OsuFont.Torus.With(size: 12),
Colour = colours.GrayF,
Text = "jvnkosu! development build",
Text = $@"jvnkosu! " + game.Version,
Y = -12,
},
new OsuSpriteText

View File

@@ -40,19 +40,19 @@ namespace osu.Game.Overlays.Settings.Sections.UserInterface
var backgroundToggle = new SettingsCheckbox
{
LabelText = "Пользовательские фоны",
LabelText = UserInterfaceStrings.UseSeasonalBackgrounds,
Current = enabledProxyBindable
};
var categoryDropdown = new SettingsDropdown<string>
{
LabelText = "Категория фонов",
LabelText = UserInterfaceStrings.SeasonalBackgroundsCategories,
Current = config.GetBindable<string>(OsuSetting.BackgroundCategory)
};
var refreshButton = new SettingsButton
{
Text = "Обновить список категорий",
Text = UserInterfaceStrings.SeasonalBackgroundsRefresh,
Action = () => backgroundLoader.RefreshCategories()
};

View File

@@ -36,7 +36,7 @@ namespace osu.Game.Updater
ReleaseStream stream = externalReleaseStream ?? ReleaseStream.Value;
bool includePrerelease = stream == Configuration.ReleaseStream.Tachyon;
OsuJsonWebRequest<GitHubRelease[]> releasesRequest = new OsuJsonWebRequest<GitHubRelease[]>("https://api.github.com/repos/ppy/osu/releases?per_page=10&page=1");
OsuJsonWebRequest<GitHubRelease[]> releasesRequest = new OsuJsonWebRequest<GitHubRelease[]>("https://gitea.jvnko.boats/api/v1/repos/jvnkosu/client/releases?limit=10&page=1");
await releasesRequest.PerformAsync(cancellationToken).ConfigureAwait(false);
GitHubRelease[] releases = releasesRequest.ResponseObject;

View File

@@ -69,9 +69,10 @@ namespace osu.Game.Updater
if (FixedReleaseStream != null)
config.SetValue(OsuSetting.ReleaseStream, FixedReleaseStream.Value);
// notify the user if they're using a build that is not officially sanctioned.
if (RuntimeInfo.EntryAssembly.GetCustomAttribute<OfficialBuildAttribute>() == null)
Notifications.Post(new SimpleNotification { Text = NotificationsStrings.NotOfficialBuild });
// nope, doesn't matter, we're already not official
// // notify the user if they're using a build that is not officially sanctioned.
// if (RuntimeInfo.EntryAssembly.GetCustomAttribute<OfficialBuildAttribute>() == null)
// Notifications.Post(new SimpleNotification { Text = NotificationsStrings.NotOfficialBuild });
}
else
{