diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml
new file mode 100644
index 00000000..222a592a
--- /dev/null
+++ b/.github/workflows/dotnet.yml
@@ -0,0 +1,28 @@
+# This workflow will build a .NET project
+# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
+
+name: .NET
+
+on:
+ push:
+ branches: [ "main" ]
+ pull_request:
+ branches: [ "main" ]
+
+jobs:
+ build:
+
+ runs-on: windows-latest
+
+ steps:
+ - uses: actions/checkout@v4
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: 8.0.x
+ - name: Restore dependencies
+ run: dotnet restore
+ - name: Build
+ run: dotnet build --no-restore
+ - name: Test
+ run: dotnet test --no-build --verbosity normal
\ No newline at end of file
diff --git a/.github/workflows/download.yml b/.github/workflows/download.yml
deleted file mode 100644
index c51eb8f3..00000000
--- a/.github/workflows/download.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-name: (Crowdin) New PR request
-
-on:
- workflow_dispatch:
-
-permissions:
- contents: write
-
-jobs:
- crowdin:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Synchronize with Crowdin
- uses: crowdin/github-action@v1
- with:
- upload_sources: false
- upload_translations: false
- download_translations: true
- skip_untranslated_strings: true
- localization_branch_name: translations
-
- create_pull_request: false
- pull_request_title: 'New Crowdin translations'
- pull_request_body: 'New Crowdin pull request with translations'
- pull_request_base_branch_name: 'main'
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
- CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
\ No newline at end of file
diff --git a/.github/workflows/upload.yml b/.github/workflows/upload.yml
deleted file mode 100644
index eaf729c8..00000000
--- a/.github/workflows/upload.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-name: Upload to Crowdin
-
-on:
- workflow-dispatch:
-
-jobs:
- crowdin:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Crowdin push
- uses: crowdin/github-action@v1
- with:
- upload_sources: true
- upload_translations: true
- download_translations: false
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
- CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
\ No newline at end of file
diff --git a/FriishProduce/FriishProduce.csproj b/FriishProduce/FriishProduce.csproj
index 7bfef07f..4324e95f 100644
--- a/FriishProduce/FriishProduce.csproj
+++ b/FriishProduce/FriishProduce.csproj
@@ -16,13 +16,14 @@
publish\
true
Disk
- false
- Foreground
+ true
+ Background
7
Days
false
false
true
+ 1.1.0.0
0
1.1.0.%2a
false
@@ -411,6 +412,7 @@
SettingsForm.cs
+
@@ -714,6 +716,16 @@
+
+ False
+
+
+
+
+ Exclude
+ True
+ File
+
False
@@ -726,9 +738,9 @@
-
+
False
- Microsoft .NET Framework 4.7.2 %28x86 and x64%29
+ Microsoft .NET Framework 4.8 %28x86 and x64%29
true
diff --git a/FriishProduce/Options/VC_NEO.Designer.cs b/FriishProduce/Options/VC_NEO.Designer.cs
index eb426893..6019c2f1 100644
--- a/FriishProduce/Options/VC_NEO.Designer.cs
+++ b/FriishProduce/Options/VC_NEO.Designer.cs
@@ -34,17 +34,5 @@ public string bios {
this["bios"] = value;
}
}
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string bios_path {
- get {
- return ((string)(this["bios_path"]));
- }
- set {
- this["bios_path"] = value;
- }
- }
}
}
diff --git a/FriishProduce/Options/VC_NEO.settings b/FriishProduce/Options/VC_NEO.settings
index 7164c87d..511b23d7 100644
--- a/FriishProduce/Options/VC_NEO.settings
+++ b/FriishProduce/Options/VC_NEO.settings
@@ -5,8 +5,5 @@
VC2
-
-
-
\ No newline at end of file
diff --git a/FriishProduce/SettingsForm.Designer.cs b/FriishProduce/SettingsForm.Designer.cs
index 4c2d49c5..811193b7 100644
--- a/FriishProduce/SettingsForm.Designer.cs
+++ b/FriishProduce/SettingsForm.Designer.cs
@@ -39,6 +39,7 @@ private void InitializeComponent()
this.vc_n64_romc_type_list = new System.Windows.Forms.ComboBox();
this.bottomPanel2 = new System.Windows.Forms.Panel();
this.bottomPanel1 = new System.Windows.Forms.Panel();
+ this.b_reset = new System.Windows.Forms.Button();
this.b_cancel = new System.Windows.Forms.Button();
this.b_ok = new System.Windows.Forms.Button();
this.GetBanners = new System.Windows.Forms.Button();
@@ -258,12 +259,21 @@ private void InitializeComponent()
// bottomPanel1
//
this.bottomPanel1.BackColor = System.Drawing.SystemColors.ControlLight;
+ this.bottomPanel1.Controls.Add(this.b_reset);
this.bottomPanel1.Controls.Add(this.b_cancel);
this.bottomPanel1.Controls.Add(this.b_ok);
this.bottomPanel1.Controls.Add(this.GetBanners);
resources.ApplyResources(this.bottomPanel1, "bottomPanel1");
this.bottomPanel1.Name = "bottomPanel1";
//
+ // b_reset
+ //
+ resources.ApplyResources(this.b_reset, "b_reset");
+ this.b_reset.Name = "b_reset";
+ this.b_reset.Tag = "reset";
+ this.b_reset.UseVisualStyleBackColor = true;
+ this.b_reset.Click += new System.EventHandler(this.Reset_Click);
+ //
// b_cancel
//
this.b_cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
@@ -1186,8 +1196,6 @@ private void InitializeComponent()
this.ControlBox = false;
this.Controls.Add(this.bottomPanel2);
this.Controls.Add(this.TreeView);
- this.Controls.Add(this.bios_files);
- this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Controls.Add(this.adobe_flash);
this.Controls.Add(this.forwarder);
@@ -1198,6 +1206,8 @@ private void InitializeComponent()
this.Controls.Add(this.vc_pce);
this.Controls.Add(this.vc_neo);
this.Controls.Add(this.default_injection_methods);
+ this.Controls.Add(this.bios_files);
+ this.Controls.Add(this.panel2);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.KeyPreview = true;
this.MaximizeBox = false;
@@ -1388,5 +1398,6 @@ private void InitializeComponent()
private System.Windows.Forms.CheckBox vc_pce_sgenable;
private JCS.ToggleSwitch vc_pce_padbutton_switch;
private System.Windows.Forms.Label vc_pce_padbutton;
+ private System.Windows.Forms.Button b_reset;
}
}
\ No newline at end of file
diff --git a/FriishProduce/SettingsForm.cs b/FriishProduce/SettingsForm.cs
index 5b63256a..2ad156ca 100644
--- a/FriishProduce/SettingsForm.cs
+++ b/FriishProduce/SettingsForm.cs
@@ -471,6 +471,16 @@ private void Cancel_Click(object sender, EventArgs e)
DialogResult = DialogResult.Cancel;
}
+ private void Reset_Click(object sender, EventArgs e)
+ {
+ if (MessageBox.Show(Program.Lang.Msg(11), MessageBox.Buttons.YesNo, MessageBox.Icons.Warning) == MessageBox.Result.Yes)
+ {
+ Default.Reset();
+ System.Diagnostics.Process.Start(Application.ExecutablePath);
+ System.Diagnostics.Process.GetCurrentProcess().Kill();
+ }
+ }
+
private void DownloadBanners_Click(object sender, EventArgs e)
{
System.Media.SystemSounds.Beep.Play();
diff --git a/FriishProduce/SettingsForm.resx b/FriishProduce/SettingsForm.resx
index 685bdbbe..77f1a3b9 100644
--- a/FriishProduce/SettingsForm.resx
+++ b/FriishProduce/SettingsForm.resx
@@ -309,6 +309,30 @@
0
+
+ 12, 9
+
+
+ 182, 23
+
+
+ 3
+
+
+ reset
+
+
+ b_reset
+
+
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ bottomPanel1
+
+
+ 0
+
NoControl
@@ -334,7 +358,7 @@
bottomPanel1
- 0
+ 1
NoControl
@@ -361,13 +385,13 @@
bottomPanel1
- 1
+ 2
NoControl
- 12, 8
+ 365, 8
165, 24
@@ -388,7 +412,7 @@
bottomPanel1
- 2
+ 3
0, 1
@@ -737,7 +761,7 @@
$this
- 4
+ 2
12, 128
@@ -782,7 +806,7 @@
$this
- 9
+ 7
SD
@@ -929,7 +953,7 @@
$this
- 6
+ 4
True
@@ -1025,7 +1049,7 @@
$this
- 7
+ 5
10, 18
@@ -1091,7 +1115,7 @@
$this
- 12
+ 10
10, 18
@@ -1352,7 +1376,7 @@
$this
- 10
+ 8
True
@@ -1724,7 +1748,7 @@
$this
- 11
+ 9
True
@@ -2084,7 +2108,7 @@
$this
- 3
+ 13
10, 18
@@ -2285,7 +2309,7 @@
$this
- 13
+ 11
NoControl
@@ -2450,7 +2474,7 @@
$this
- 2
+ 12
True
@@ -3095,7 +3119,7 @@
$this
- 5
+ 3
True
@@ -3338,7 +3362,7 @@
$this
- 8
+ 6
True
diff --git a/FriishProduce/Strings/en.json b/FriishProduce/Strings/en.json
index d55dda6d..28f40c04 100644
--- a/FriishProduce/Strings/en.json
+++ b/FriishProduce/Strings/en.json
@@ -156,6 +156,7 @@
"settingsform": {
"general": "General",
+ "reset": "Reset to default",
"language": "Language",
"system_default": "System default",
"reset_all_dialogs": "Reset all dialogs",
diff --git a/FriishProduce/Strings/es.json b/FriishProduce/Strings/es.json
index 939aabe5..8a5d0dcb 100644
--- a/FriishProduce/Strings/es.json
+++ b/FriishProduce/Strings/es.json
@@ -100,7 +100,7 @@
"007": "El seleccionado no contiene ningún contenido válido de manual electrónico.",
"008": "Actualización de FriishProduce\nYa está disponible para descargar la nueva versión {0} de FriishProduce.\nActualmente está utilizando la versión {1}.\n\n¿Quiere descargar la actualización de GitHub ahora?",
"009": "Actualmente ya está actualizado.",
- "011": "¿Quieres reiniciar todos sus ajustes?",
+ "011": "¿Quieres restablecer todos sus ajustes?",
"error": "Se ha producido un error",
"e_000": "No se pudo conectar a Internet.\n{0}",
@@ -151,6 +151,7 @@
"settingsform": {
"general": "General",
+ "reset": "Restablecer todo",
"language": "Idioma",
"system_default": "Idioma del sistema",
"reset_all_dialogs": "Restablecer la opción \"No volver a mostrar este mensaje\"",
diff --git a/FriishProduce/Strings/fr.json b/FriishProduce/Strings/fr.json
index 50298350..17f2f81e 100644
--- a/FriishProduce/Strings/fr.json
+++ b/FriishProduce/Strings/fr.json
@@ -156,6 +156,7 @@
"settingsform": {
"general": "Général",
+ "reset": "Réinitialiser tout",
"language": "Langue",
"system_default": "Système",
"reset_all_dialogs": "Réinitialiser le paramètre « Ne plus afficher ce message »",
diff --git a/FriishProduce/Strings/ja.json b/FriishProduce/Strings/ja.json
index a02f8267..47cb6196 100644
Binary files a/FriishProduce/Strings/ja.json and b/FriishProduce/Strings/ja.json differ
diff --git a/FriishProduce/Strings/ko.json b/FriishProduce/Strings/ko.json
index bc2efac7..03b0b8bf 100644
--- a/FriishProduce/Strings/ko.json
+++ b/FriishProduce/Strings/ko.json
@@ -155,6 +155,7 @@
"settingsform": {
"general": "일반",
+ "reset": "Reset to default",
"language": "언어",
"system_default": "시스템 기본값",
"reset_all_dialogs": "모든 대화상자 재설정",
diff --git a/FriishProduce/Subforms/ContentOptions/Options_VC_NEO.cs b/FriishProduce/Subforms/ContentOptions/Options_VC_NEO.cs
index 0ab87d46..d57d15d1 100644
--- a/FriishProduce/Subforms/ContentOptions/Options_VC_NEO.cs
+++ b/FriishProduce/Subforms/ContentOptions/Options_VC_NEO.cs
@@ -32,7 +32,7 @@ protected override void ResetOptions()
// *******
if (Options != null)
{
- bool valid = File.Exists(FriishProduce.Options.BIOSFILES.Default.neogeo);
+ bool valid = File.Exists(BIOSFILES.Default.neogeo);
// Clear list selection if not found
if (!valid && biosIndex == 0)
@@ -45,8 +45,8 @@ protected override void ResetOptions()
);
Options["BIOS"] = VC_NEO.Default.bios;
- FriishProduce.Options.BIOSFILES.Default.neogeo = null;
- FriishProduce.Options.BIOSFILES.Default.Save();
+ BIOSFILES.Default.neogeo = null;
+ BIOSFILES.Default.Save();
}
bios_list.SelectedIndex = biosIndex;
diff --git a/FriishProduce/_classes/Program/Settings.cs b/FriishProduce/_classes/Program/Settings.cs
new file mode 100644
index 00000000..3459acbd
--- /dev/null
+++ b/FriishProduce/_classes/Program/Settings.cs
@@ -0,0 +1,42 @@
+// using Config.Net;
+
+namespace FriishProduce
+{
+ public class Settings
+ {
+ public Settings()
+ {
+ }
+
+ public struct App
+ {
+ string Language { get; set; }
+ bool AutoUpdate { get; set; }
+ bool DoNotShow_000 { get; set; }
+ bool DoNotShow_001 { get; set; }
+ bool AutoGameScan { get; set; }
+ bool AutoFillSaveData { get; set; }
+ bool EnableUseOnlineWAD { get; set; }
+ bool BypassROMSize { get; set; }
+ int Image_Interpolation { get; set; }
+ bool Image_FitAspectRatio { get; set; }
+ string Default_TargetProjectFilename { get; set; }
+ string Default_TargetExportFilename { get; set; }
+ int Default_BannerRegion { get; set; }
+ int Default_InjectionMethod_NES { get; set; }
+ int Default_InjectionMethod_SNES { get; set; }
+ int Default_InjectionMethod_N64 { get; set; }
+ int Default_InjectionMethod_SEGA { get; set; }
+ }
+
+ public interface Paths
+ {
+ string Database { get; set; }
+ string BIOS_NEO { get; set; }
+ string BIOS_PSX { get; set; }
+ string BIOS_GB { get; set; }
+ string BIOS_GBC { get; set; }
+ string BIOS_GBA { get; set; }
+ }
+ }
+}
diff --git a/FriishProduce/_classes/Program/Updater.cs b/FriishProduce/_classes/Program/Updater.cs
index 4fdc61a0..7f7c7325 100644
--- a/FriishProduce/_classes/Program/Updater.cs
+++ b/FriishProduce/_classes/Program/Updater.cs
@@ -1,6 +1,7 @@
using Octokit;
using Ookii.Dialogs.WinForms;
using System;
+using System.Deployment.Application;
using System.Threading.Tasks;
namespace FriishProduce
@@ -16,6 +17,70 @@ public static string GetCurrentVersion()
return "v" + ver.Substring(0, ver[4] != '0' ? 5 : 3);
}
+ public static async void InstallUpdateSyncWithInfo()
+ {
+ UpdateCheckInfo info = null;
+
+ if (ApplicationDeployment.IsNetworkDeployed)
+ {
+ ApplicationDeployment ad = ApplicationDeployment.CurrentDeployment;
+
+ try
+ {
+ info = ad.CheckForDetailedUpdate();
+
+ }
+ catch (DeploymentDownloadException dde)
+ {
+ MessageBox.Show("The new version of the application cannot be downloaded at this time. \n\nPlease check your network connection, or try again later. Error: " + dde.Message);
+ return;
+ }
+ catch (InvalidDeploymentException ide)
+ {
+ MessageBox.Show("Cannot check for a new version of the application. The ClickOnce deployment is corrupt. Please redeploy the application and try again. Error: " + ide.Message);
+ return;
+ }
+ catch (InvalidOperationException ioe)
+ {
+ MessageBox.Show("This application cannot be updated. It is likely not a ClickOnce application. Error: " + ioe.Message);
+ return;
+ }
+
+ if (info.UpdateAvailable)
+ {
+ bool doUpdate = true;
+
+ if (!info.IsUpdateRequired)
+ {
+ var client = new GitHubClient(new ProductHeaderValue("FriishProduce"));
+ var release = await client.Repository.Release.GetLatest("CatmanFan", "FriishProduce");
+
+ Version latest = new Version(release.TagName.Substring(1).Replace("-beta", ""));
+ Version current = new Version(GetCurrentVersion().Substring(1));
+
+ if (MessageBox.Show(string.Format(Program.Lang.Msg(8), latest, current), MessageBox.Buttons.YesNo, MessageBox.Icons.Shield) != MessageBox.Result.Yes)
+ {
+ doUpdate = false;
+ }
+ }
+
+ doUpdate = ad.Update();
+ if (doUpdate)
+ {
+ try
+ {
+ System.Windows.Forms.Application.Restart();
+ }
+ catch (DeploymentDownloadException dde)
+ {
+ MessageBox.Show("Cannot install the latest version of the application. \n\nPlease check your network connection, or try again later. Error: " + dde);
+ return;
+ }
+ }
+ }
+ }
+ }
+
public static async Task GetLatest()
{
try
diff --git a/crowdin.yml b/crowdin.yml
deleted file mode 100644
index deb96c40..00000000
--- a/crowdin.yml
+++ /dev/null
@@ -1,82 +0,0 @@
-"project_id": "645230"
-"api_token": "3913abc79b6d6d801462c128de34578164c96d9d0bfab7cd18ee73ea4118bf5e68dae5e1175f29da"
-"base_path": "."
-"base_url": "https://api.crowdin.com"
-"preserve_hierarchy": true
-
-"files": [
- {
- "source": "FriishProduce/Strings/*.resx", #source files filter
- "translation": "/FriishProduce/Strings/%locale%/%original_file_name%", #where translations are stored
- "languages_mapping": {
- "locale": {
- "af": "af",
- "am": "am",
- "an": "an",
- "ar": "ar",
- "ast": "ast",
- "az": "az",
- "ber": "ber",
- "be": "be",
- "bg": "bg",
- "bn": "bn",
- "bs": "bs",
- "ca": "ca",
- "ckb": "ckb",
- "co": "co",
- "cs": "cs",
- "da": "da",
- "de": "de",
- "el": "el",
- "en": "en",
- "et": "et",
- "eu": "eu",
- "fa": "fa",
- "fi": "fi",
- "fr": "fr",
- "ga-IE": "ga",
- "gl": "gl",
- "he": "he",
- "hr": "hr",
- "hu": "hu",
- "hy-AM": "hy",
- "id": "id",
- "is": "is",
- "it": "it",
- "ja": "ja",
- "ka": "ka",
- "kab": "kab",
- "kk": "kk",
- "ko": "ko",
- "ku": "ku",
- "lt": "lt",
- "lv": "lv",
- "ms": "ms",
- "nb": "nb",
- "nl": "nl",
- "oc": "oc",
- "om": "om",
- "pl": "pl",
- "ro": "ro",
- "ru": "ru",
- "sk": "sk",
- "sl": "sl",
- "sq": "sq",
- "sr": "sr",
- "tg": "tg",
- "th": "th",
- "ti": "ti",
- "tr": "tr",
- "uk": "uk",
- "uz": "uz",
- "vi": "vi",
- "es-ES": "es",
- "pa-IN": "pa",
- "sv-SE": "sv",
- "pt-PT": "pt",
- "zh-CN": "zh-Hans",
- "zh-TW": "zh-Hant"
- }
- }
- }
-]