Skip to content

Commit

Permalink
Changed remaining branding
Browse files Browse the repository at this point in the history
Changed remaining branding and AppData settings for Indie Box
  • Loading branch information
spacefarergames committed Jan 25, 2024
1 parent 5061ce7 commit d607405
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 56 deletions.
20 changes: 10 additions & 10 deletions Gavilya/Helpers/CoverImageHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,28 +46,28 @@ public CoverImageHelper(string url, int id, int gameId)
public async Task<string> Download()
{

if (!Directory.Exists(FileSys.AppDataPath + @"\Léo Corporation\Gavilya\Games")) // If the directory doesn't exist
if (!Directory.Exists(FileSys.AppDataPath + @"\Spacefarer\IndieBox\Games")) // If the directory doesn't exist
{
Directory.CreateDirectory(FileSys.AppDataPath + @"\Léo Corporation\Gavilya\Games"); // Create the direspctory
Directory.CreateDirectory(FileSys.AppDataPath + @"Spacefarer\IndieBox\Games"); // Create the direspctory
}

if (!Directory.Exists(FileSys.AppDataPath + @$"\Léo Corporation\Gavilya\games\{_gameId}")) // If the directory doesn't exist
if (!Directory.Exists(FileSys.AppDataPath + @$"\Spacefarer\IndieBox\games\{_gameId}")) // If the directory doesn't exist
{
Directory.CreateDirectory(FileSys.AppDataPath + $@"\Léo Corporation\Gavilya\Games\{_gameId}"); // Create the game directory
Directory.CreateDirectory(FileSys.AppDataPath + $@"\Spacefarer\IndieBox\Games\{_gameId}"); // Create the game directory
}
else
{
if (File.Exists(FileSys.AppDataPath + $@"\Léo Corporation\Gavilya\Games\{_gameId}\bg_img{_id}.jpg")) // If the image exist
if (File.Exists(FileSys.AppDataPath + $@"\Spacefarer\IndieBox\Games\{_gameId}\bg_img{_id}.jpg")) // If the image exist
{
File.Delete(FileSys.AppDataPath + $@"\Léo Corporation\Gavilya\Games\{_gameId}\bg_img{_id}.jpg");
File.Delete(FileSys.AppDataPath + $@"\Spacefarer\IndieBox\Games\{_gameId}\bg_img{_id}.jpg");
}

await DownloadFileAsync(new Uri(_url), FileSys.AppDataPath + $@"\Léo Corporation\Gavilya\Games\{_gameId}\bg_img{_id}.jpg"); // Download the image
return FileSys.AppDataPath + @$"\Léo Corporation\Gavilya\Games\{_gameId}\bg_img{_id}.jpg"; // Return the result
await DownloadFileAsync(new Uri(_url), FileSys.AppDataPath + $@"\Spacefarer\IndieBox\Games\{_gameId}\bg_img{_id}.jpg"); // Download the image
return FileSys.AppDataPath + @$"\Spacefarer\IndieBox\Games\{_gameId}\bg_img{_id}.jpg"; // Return the result
}

await DownloadFileAsync(new Uri(_url), FileSys.AppDataPath + $@"\Léo Corporation\Gavilya\Games\{_gameId}\bg_img{_id}.jpg"); // Download the image
return FileSys.AppDataPath + @$"\Léo Corporation\Gavilya\Games\{_gameId}\bg_img{_id}.jpg"; // Return the path
await DownloadFileAsync(new Uri(_url), FileSys.AppDataPath + $@"\Spacefarer\IndieBox\Games\{_gameId}\bg_img{_id}.jpg"); // Download the image
return FileSys.AppDataPath + @$"\Spacefarer\IndieBox\Games\{_gameId}\bg_img{_id}.jpg"; // Return the path
}

private static async Task DownloadFileAsync(Uri uri, string filePath)
Expand Down
4 changes: 2 additions & 2 deletions Gavilya/Helpers/ThemeHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static void ChangeTheme(ThemeInfo theme, string path)
/// <returns>The installed themes</returns>
public static List<(ThemeInfo, string)> GetInstalledThemes()
{
string themePath = $@"{FileSys.AppDataPath}\Léo Corporation\Gavilya\Themes\";
string themePath = $@"{FileSys.AppDataPath}\Spacefarer\IndieBox\Themes\";

// If there is no themes
if (!Directory.Exists(themePath))
Expand Down Expand Up @@ -98,7 +98,7 @@ public static void ChangeTheme(ThemeInfo theme, string path)
public static void InstallTheme(string path)
{
string guid = GuidGen.Generate(new GuidOptions(32, false, false, false));
ZipFile.ExtractToDirectory(path, $@"{FileSys.AppDataPath}\Léo Corporation\Gavilya\Themes\{guid}");
ZipFile.ExtractToDirectory(path, $@"{FileSys.AppDataPath}\Spacefarer\IndieBox\Themes\{guid}");
}

public static ThemeInfo GetThemeFromPath(string path)
Expand Down
10 changes: 5 additions & 5 deletions Gavilya/Models/ProfileData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ public void Save()
{
XmlSerializer xmlSerializer = new(GetType());

if (!Directory.Exists($@"{FileSys.AppDataPath}\Léo Corporation\Gavilya")) // If the directory doesn't exist
if (!Directory.Exists($@"{FileSys.AppDataPath}\Spacefarer\IndieBox")) // If the directory doesn't exist
{
Directory.CreateDirectory($@"{FileSys.AppDataPath}\Léo Corporation\Gavilya"); // Create the directory
Directory.CreateDirectory($@"{FileSys.AppDataPath}\Spacefarer\IndieBox"); // Create the directory
}

StreamWriter streamWriter = new($@"{FileSys.AppDataPath}\Léo Corporation\Gavilya\Profiles.g4v");
StreamWriter streamWriter = new($@"{FileSys.AppDataPath}\Spacefarer\IndieBox\Profiles.g4v");
xmlSerializer.Serialize(streamWriter, this);
streamWriter.Dispose();
}

public void Load()
{
if (!File.Exists($@"{FileSys.AppDataPath}\Léo Corporation\Gavilya\Profiles.g4v"))
if (!File.Exists($@"{FileSys.AppDataPath}\Spacefarer\IndieBox\Profiles.g4v"))
{
Profiles = new()
{
Expand All @@ -63,7 +63,7 @@ public void Load()
}

XmlSerializer xmlSerializer = new(GetType());
StreamReader streamReader = new($@"{FileSys.AppDataPath}\Léo Corporation\Gavilya\Profiles.g4v");
StreamReader streamReader = new($@"{FileSys.AppDataPath}\Spacefarer\IndieBox\Profiles.g4v");
ProfileData loadedProfiles = (ProfileData)xmlSerializer.Deserialize(streamReader) ?? new();

Profiles = loadedProfiles.Profiles;
Expand Down
2 changes: 1 addition & 1 deletion Gavilya/Models/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public Settings()
IsMaximized = false;
MakeAutoSave = true;
AutoSaveDay = 1;
SavePath = $@"{FileSys.AppDataPath}\Léo Corporation\Gavilya\Backups";
SavePath = $@"{FileSys.AppDataPath}\Spacefarer\IndieBox\Backups";
MaxNumberRecentGamesShown = 4;
NumberOfSearchResultsToDisplay = 3;
FpsCounterOpacity = 1;
Expand Down
30 changes: 15 additions & 15 deletions Gavilya/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions Gavilya/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
<value>Your Games</value>
</data>
<data name="MainWindowTitle" xml:space="preserve">
<value>Gavilya</value>
<value>Indie Box</value>
</data>
<data name="Add" xml:space="preserve">
<value>Add</value>
Expand Down Expand Up @@ -166,7 +166,7 @@
<value>About</value>
</data>
<data name="AppName" xml:space="preserve">
<value>Gavilya</value>
<value>Indie Box</value>
</data>
<data name="CheckForUpdates" xml:space="preserve">
<value>Check updates</value>
Expand All @@ -181,7 +181,7 @@
<value>No updates available</value>
</data>
<data name="UpdateAvMessage" xml:space="preserve">
<value>Updates are available for Gavilya:</value>
<value>Updates are available for Indie Box</value>
</data>
<data name="UpdateVersion" xml:space="preserve">
<value>Version:</value>
Expand All @@ -199,7 +199,7 @@
<value>Close</value>
</data>
<data name="XUDoesNotExist" xml:space="preserve">
<value>Xalyus Updater doesn't exist, please reinstall Gavilya.</value>
<value>Xalyus Updater doesn't exist, please reinstall Indie Box</value>
</data>
<data name="CoverSearch" xml:space="preserve">
<value>Search for a game cover</value>
Expand Down Expand Up @@ -295,10 +295,10 @@
<value>Import your games</value>
</data>
<data name="ExportGamesDescription" xml:space="preserve">
<value>Export your games in Gavilya to .gav save file.</value>
<value>Export your games in Indie Box to .gav save file.</value>
</data>
<data name="ImportGamesDescription" xml:space="preserve">
<value>Import a .gav save file in Gavilya. The current save file is going to be replaced by the new one.</value>
<value>Import a .gav save file in Indie Box. The current save file is going to be replaced by the new one.</value>
</data>
<data name="Export" xml:space="preserve">
<value>Export</value>
Expand Down Expand Up @@ -331,7 +331,7 @@
<value>Languages</value>
</data>
<data name="ChangeLanguageDescription" xml:space="preserve">
<value>Change Gavilya's current language.</value>
<value>Change Indie Box current language.</value>
</data>
<data name="Default" xml:space="preserve">
<value>Default</value>
Expand Down Expand Up @@ -370,7 +370,7 @@
<value>The process to look for when the game is running. It allows the possibility to count the time you played the game. Keep the field empty to use the default executable.</value>
</data>
<data name="Welcome" xml:space="preserve">
<value>Welcome to Gavilya</value>
<value>Welcome to Indie Box</value>
</data>
<data name="GameGathered" xml:space="preserve">
<value>Where all your games are gathered.</value>
Expand All @@ -394,7 +394,7 @@
<value>RAWG Database integration</value>
</data>
<data name="RAWGDescriptionFirstRun" xml:space="preserve">
<value>Gavilya is integrated with the RAWG.io database, which means that Gavilya can automatically find covers, descriptions, and other informations about a game.</value>
<value>Gavilya is integrated with the RAWG.io database, which means that Indie Box can automatically find covers, descriptions, and other informations about a game.</value>
</data>
<data name="ImportGamesFirstRunDescription" xml:space="preserve">
<value>If you were a previous user, you may wanna import an existing ".gav" save file.</value>
Expand All @@ -403,7 +403,7 @@
<value>Done!</value>
</data>
<data name="ReadyFirstRun" xml:space="preserve">
<value>You are now ready to use Gavilya.</value>
<value>You are now ready to use Indie Box.</value>
</data>
<data name="LetsGo" xml:space="preserve">
<value>Let's go!</value>
Expand Down Expand Up @@ -499,7 +499,7 @@
<value>This game has no achievements.</value>
</data>
<data name="NoAchivementsMsg" xml:space="preserve">
<value>Gavilya hasn't found any achievements in the RAWG.io database, or this game is not associated with RAWG.</value>
<value>Indie Box hasn't found any achievements in the RAWG.io database, or this game is not associated with RAWG.</value>
</data>
<data name="Reset" xml:space="preserve">
<value>Reset</value>
Expand Down Expand Up @@ -604,7 +604,7 @@
<value>Not associated</value>
</data>
<data name="UpdateAvMessageNotify" xml:space="preserve">
<value>Updates are available for Gavilya.</value>
<value>Updates are available for Indie Box</value>
</data>
<data name="Back" xml:space="preserve">
<value>Back</value>
Expand Down Expand Up @@ -679,7 +679,7 @@
<value>Default view mode in Library</value>
</data>
<data name="PopupMenu" xml:space="preserve">
<value>Gavilya - Menu</value>
<value>Indie Box - Menu</value>
</data>
<data name="DefaultPage" xml:space="preserve">
<value>Default page</value>
Expand All @@ -703,7 +703,7 @@
<value>Are you sure you want to reset ALL settings? This operation is irreversible.</value>
</data>
<data name="GavilyaNeedsRestartChanges" xml:space="preserve">
<value>Gavilya needs to restart to apply changes.</value>
<value>Indie Box needs to restart to apply changes.</value>
</data>
<data name="TheStart" xml:space="preserve">
<value>The Start</value>
Expand Down Expand Up @@ -976,7 +976,7 @@
<value>Themes</value>
</data>
<data name="ThemesDesc" xml:space="preserve">
<value>Set the theme of Gavilya.</value>
<value>Set the theme of Indie Box</value>
</data>
<data name="ThemesImport" xml:space="preserve">
<value>Import a theme</value>
Expand Down
2 changes: 1 addition & 1 deletion Gavilya/Scripts/license_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
GAVILYA_LICENSE_INFO = """/*
MIT License
Copyright (c) Léo Corporation
Copyright (c) Spacefarer R&D
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion Gavilya/ViewModels/FirstRun/JumpInViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public JumpInViewModel(Profile profile, ProfileData profileData)
_profileData.Profiles[_profileData.Profiles.IndexOf(_profile)].Settings.IsFirstRun = false;
_profileData.Save();

Process.Start(FileSys.CurrentAppDirectory + @"\Gavilya.exe");
Process.Start(FileSys.CurrentAppDirectory + @"\IndieBox.exe");
Application.Current.Shutdown(0);
});
}
Expand Down
4 changes: 2 additions & 2 deletions Gavilya/ViewModels/Settings/AboutViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private async void CheckUpdate(object? obj)
}

_profileData.Save();
Sys.ExecuteAsAdmin(Directory.GetCurrentDirectory() + @"\Xalyus Updater.exe"); // Start the updater
//Sys.ExecuteAsAdmin(Directory.GetCurrentDirectory() + @"\Xalyus Updater.exe"); // Start the updater
Application.Current.Shutdown(); // Close
}

Expand All @@ -103,6 +103,6 @@ private void Licenses(object? obj)

private void OpenRepo(object? obj)
{
Process.Start("explorer.exe", "https://github.com/Leo-Corporation/Gavilya"); // Open the GitHub repository in the default browser
Process.Start("explorer.exe", "https://github.com/spacefarergames/IndieBox/"); // Open the GitHub repository in the default browser
}
}
Loading

0 comments on commit d607405

Please sign in to comment.