├── .gitattributes
├── .gitignore
├── App.config
├── Assets
├── fist.ico
└── fist.png
├── Form1.Designer.cs
├── Form1.cs
├── Form1.resx
├── Goldbergalizer.csproj
├── Goldbergalizer.sln
├── Program.cs
├── Properties
├── AssemblyInfo.cs
├── Resources.Designer.cs
├── Resources.resx
├── Settings.Designer.cs
└── Settings.settings
├── README.md
├── fist.ico
└── packages.config
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Ww][Ii][Nn]32/
27 | [Aa][Rr][Mm]/
28 | [Aa][Rr][Mm]64/
29 | bld/
30 | [Bb]in/
31 | [Oo]bj/
32 | [Oo]ut/
33 | [Ll]og/
34 | [Ll]ogs/
35 |
36 | # Visual Studio 2015/2017 cache/options directory
37 | .vs/
38 | # Uncomment if you have tasks that create the project's static files in wwwroot
39 | #wwwroot/
40 |
41 | # Visual Studio 2017 auto generated files
42 | Generated\ Files/
43 |
44 | # MSTest test Results
45 | [Tt]est[Rr]esult*/
46 | [Bb]uild[Ll]og.*
47 |
48 | # NUnit
49 | *.VisualState.xml
50 | TestResult.xml
51 | nunit-*.xml
52 |
53 | # Build Results of an ATL Project
54 | [Dd]ebugPS/
55 | [Rr]eleasePS/
56 | dlldata.c
57 |
58 | # Benchmark Results
59 | BenchmarkDotNet.Artifacts/
60 |
61 | # .NET Core
62 | project.lock.json
63 | project.fragment.lock.json
64 | artifacts/
65 |
66 | # ASP.NET Scaffolding
67 | ScaffoldingReadMe.txt
68 |
69 | # StyleCop
70 | StyleCopReport.xml
71 |
72 | # Files built by Visual Studio
73 | *_i.c
74 | *_p.c
75 | *_h.h
76 | *.ilk
77 | *.meta
78 | *.obj
79 | *.iobj
80 | *.pch
81 | *.pdb
82 | *.ipdb
83 | *.pgc
84 | *.pgd
85 | *.rsp
86 | *.sbr
87 | *.tlb
88 | *.tli
89 | *.tlh
90 | *.tmp
91 | *.tmp_proj
92 | *_wpftmp.csproj
93 | *.log
94 | *.vspscc
95 | *.vssscc
96 | .builds
97 | *.pidb
98 | *.svclog
99 | *.scc
100 |
101 | # Chutzpah Test files
102 | _Chutzpah*
103 |
104 | # Visual C++ cache files
105 | ipch/
106 | *.aps
107 | *.ncb
108 | *.opendb
109 | *.opensdf
110 | *.sdf
111 | *.cachefile
112 | *.VC.db
113 | *.VC.VC.opendb
114 |
115 | # Visual Studio profiler
116 | *.psess
117 | *.vsp
118 | *.vspx
119 | *.sap
120 |
121 | # Visual Studio Trace Files
122 | *.e2e
123 |
124 | # TFS 2012 Local Workspace
125 | $tf/
126 |
127 | # Guidance Automation Toolkit
128 | *.gpState
129 |
130 | # ReSharper is a .NET coding add-in
131 | _ReSharper*/
132 | *.[Rr]e[Ss]harper
133 | *.DotSettings.user
134 |
135 | # TeamCity is a build add-in
136 | _TeamCity*
137 |
138 | # DotCover is a Code Coverage Tool
139 | *.dotCover
140 |
141 | # AxoCover is a Code Coverage Tool
142 | .axoCover/*
143 | !.axoCover/settings.json
144 |
145 | # Coverlet is a free, cross platform Code Coverage Tool
146 | coverage*.json
147 | coverage*.xml
148 | coverage*.info
149 |
150 | # Visual Studio code coverage results
151 | *.coverage
152 | *.coveragexml
153 |
154 | # NCrunch
155 | _NCrunch_*
156 | .*crunch*.local.xml
157 | nCrunchTemp_*
158 |
159 | # MightyMoose
160 | *.mm.*
161 | AutoTest.Net/
162 |
163 | # Web workbench (sass)
164 | .sass-cache/
165 |
166 | # Installshield output folder
167 | [Ee]xpress/
168 |
169 | # DocProject is a documentation generator add-in
170 | DocProject/buildhelp/
171 | DocProject/Help/*.HxT
172 | DocProject/Help/*.HxC
173 | DocProject/Help/*.hhc
174 | DocProject/Help/*.hhk
175 | DocProject/Help/*.hhp
176 | DocProject/Help/Html2
177 | DocProject/Help/html
178 |
179 | # Click-Once directory
180 | publish/
181 |
182 | # Publish Web Output
183 | *.[Pp]ublish.xml
184 | *.azurePubxml
185 | # Note: Comment the next line if you want to checkin your web deploy settings,
186 | # but database connection strings (with potential passwords) will be unencrypted
187 | *.pubxml
188 | *.publishproj
189 |
190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
191 | # checkin your Azure Web App publish settings, but sensitive information contained
192 | # in these scripts will be unencrypted
193 | PublishScripts/
194 |
195 | # NuGet Packages
196 | *.nupkg
197 | # NuGet Symbol Packages
198 | *.snupkg
199 | # The packages folder can be ignored because of Package Restore
200 | **/[Pp]ackages/*
201 | # except build/, which is used as an MSBuild target.
202 | !**/[Pp]ackages/build/
203 | # Uncomment if necessary however generally it will be regenerated when needed
204 | #!**/[Pp]ackages/repositories.config
205 | # NuGet v3's project.json files produces more ignorable files
206 | *.nuget.props
207 | *.nuget.targets
208 |
209 | # Microsoft Azure Build Output
210 | csx/
211 | *.build.csdef
212 |
213 | # Microsoft Azure Emulator
214 | ecf/
215 | rcf/
216 |
217 | # Windows Store app package directories and files
218 | AppPackages/
219 | BundleArtifacts/
220 | Package.StoreAssociation.xml
221 | _pkginfo.txt
222 | *.appx
223 | *.appxbundle
224 | *.appxupload
225 |
226 | # Visual Studio cache files
227 | # files ending in .cache can be ignored
228 | *.[Cc]ache
229 | # but keep track of directories ending in .cache
230 | !?*.[Cc]ache/
231 |
232 | # Others
233 | ClientBin/
234 | ~$*
235 | *~
236 | *.dbmdl
237 | *.dbproj.schemaview
238 | *.jfm
239 | *.pfx
240 | *.publishsettings
241 | orleans.codegen.cs
242 |
243 | # Including strong name files can present a security risk
244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
245 | #*.snk
246 |
247 | # Since there are multiple workflows, uncomment next line to ignore bower_components
248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
249 | #bower_components/
250 |
251 | # RIA/Silverlight projects
252 | Generated_Code/
253 |
254 | # Backup & report files from converting an old project file
255 | # to a newer Visual Studio version. Backup files are not needed,
256 | # because we have git ;-)
257 | _UpgradeReport_Files/
258 | Backup*/
259 | UpgradeLog*.XML
260 | UpgradeLog*.htm
261 | ServiceFabricBackup/
262 | *.rptproj.bak
263 |
264 | # SQL Server files
265 | *.mdf
266 | *.ldf
267 | *.ndf
268 |
269 | # Business Intelligence projects
270 | *.rdl.data
271 | *.bim.layout
272 | *.bim_*.settings
273 | *.rptproj.rsuser
274 | *- [Bb]ackup.rdl
275 | *- [Bb]ackup ([0-9]).rdl
276 | *- [Bb]ackup ([0-9][0-9]).rdl
277 |
278 | # Microsoft Fakes
279 | FakesAssemblies/
280 |
281 | # GhostDoc plugin setting file
282 | *.GhostDoc.xml
283 |
284 | # Node.js Tools for Visual Studio
285 | .ntvs_analysis.dat
286 | node_modules/
287 |
288 | # Visual Studio 6 build log
289 | *.plg
290 |
291 | # Visual Studio 6 workspace options file
292 | *.opt
293 |
294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
295 | *.vbw
296 |
297 | # Visual Studio LightSwitch build output
298 | **/*.HTMLClient/GeneratedArtifacts
299 | **/*.DesktopClient/GeneratedArtifacts
300 | **/*.DesktopClient/ModelManifest.xml
301 | **/*.Server/GeneratedArtifacts
302 | **/*.Server/ModelManifest.xml
303 | _Pvt_Extensions
304 |
305 | # Paket dependency manager
306 | .paket/paket.exe
307 | paket-files/
308 |
309 | # FAKE - F# Make
310 | .fake/
311 |
312 | # CodeRush personal settings
313 | .cr/personal
314 |
315 | # Python Tools for Visual Studio (PTVS)
316 | __pycache__/
317 | *.pyc
318 |
319 | # Cake - Uncomment if you are using it
320 | # tools/**
321 | # !tools/packages.config
322 |
323 | # Tabs Studio
324 | *.tss
325 |
326 | # Telerik's JustMock configuration file
327 | *.jmconfig
328 |
329 | # BizTalk build output
330 | *.btp.cs
331 | *.btm.cs
332 | *.odx.cs
333 | *.xsd.cs
334 |
335 | # OpenCover UI analysis results
336 | OpenCover/
337 |
338 | # Azure Stream Analytics local run output
339 | ASALocalRun/
340 |
341 | # MSBuild Binary and Structured Log
342 | *.binlog
343 |
344 | # NVidia Nsight GPU debugger configuration file
345 | *.nvuser
346 |
347 | # MFractors (Xamarin productivity tool) working folder
348 | .mfractor/
349 |
350 | # Local History for Visual Studio
351 | .localhistory/
352 |
353 | # BeatPulse healthcheck temp database
354 | healthchecksdb
355 |
356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
357 | MigrationBackup/
358 |
359 | # Ionide (cross platform F# VS Code tools) working folder
360 | .ionide/
361 |
362 | # Fody - auto-generated XML schema
363 | FodyWeavers.xsd
--------------------------------------------------------------------------------
/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Assets/fist.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ealtairz2318/Goldberglarizer/fc86bc6ef42f39562f368cffa332d324c9f129da/Assets/fist.ico
--------------------------------------------------------------------------------
/Assets/fist.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ealtairz2318/Goldberglarizer/fc86bc6ef42f39562f368cffa332d324c9f129da/Assets/fist.png
--------------------------------------------------------------------------------
/Form1.Designer.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace Goldbergalizer
3 | {
4 | partial class Golderberg_Alizer_Form
5 | {
6 | ///
7 | /// Required designer variable.
8 | ///
9 | private System.ComponentModel.IContainer components = null;
10 |
11 | ///
12 | /// Clean up any resources being used.
13 | ///
14 | /// true if managed resources should be disposed; otherwise, false.
15 | protected override void Dispose(bool disposing)
16 | {
17 | if (disposing && (components != null))
18 | {
19 | components.Dispose();
20 | }
21 | base.Dispose(disposing);
22 | }
23 |
24 | #region Windows Form Designer generated code
25 |
26 | ///
27 | /// Required method for Designer support - do not modify
28 | /// the contents of this method with the code editor.
29 | ///
30 | private void InitializeComponent()
31 | {
32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Golderberg_Alizer_Form));
33 | this.GameFolder_text_box = new System.Windows.Forms.TextBox();
34 | this.GameFolder_Text = new System.Windows.Forms.Label();
35 | this.GameFolder_Btn_Finder = new System.Windows.Forms.Button();
36 | this.Golberglarize_Btn = new System.Windows.Forms.Button();
37 | this.label1 = new System.Windows.Forms.Label();
38 | this.label2 = new System.Windows.Forms.Label();
39 | this.Update_btn = new System.Windows.Forms.Button();
40 | this.SuspendLayout();
41 | //
42 | // GameFolder_text_box
43 | //
44 | this.GameFolder_text_box.Location = new System.Drawing.Point(86, 71);
45 | this.GameFolder_text_box.Name = "GameFolder_text_box";
46 | this.GameFolder_text_box.ReadOnly = true;
47 | this.GameFolder_text_box.Size = new System.Drawing.Size(192, 20);
48 | this.GameFolder_text_box.TabIndex = 0;
49 | //
50 | // GameFolder_Text
51 | //
52 | this.GameFolder_Text.AutoSize = true;
53 | this.GameFolder_Text.Location = new System.Drawing.Point(2, 74);
54 | this.GameFolder_Text.Name = "GameFolder_Text";
55 | this.GameFolder_Text.Size = new System.Drawing.Size(78, 13);
56 | this.GameFolder_Text.TabIndex = 1;
57 | this.GameFolder_Text.Text = "Game Folder(s)";
58 | //
59 | // GameFolder_Btn_Finder
60 | //
61 | this.GameFolder_Btn_Finder.Location = new System.Drawing.Point(284, 69);
62 | this.GameFolder_Btn_Finder.Name = "GameFolder_Btn_Finder";
63 | this.GameFolder_Btn_Finder.Size = new System.Drawing.Size(75, 23);
64 | this.GameFolder_Btn_Finder.TabIndex = 2;
65 | this.GameFolder_Btn_Finder.Text = "...";
66 | this.GameFolder_Btn_Finder.UseVisualStyleBackColor = true;
67 | this.GameFolder_Btn_Finder.Click += new System.EventHandler(this.GameFolder_Btn_Finder_Click);
68 | //
69 | // Golberglarize_Btn
70 | //
71 | this.Golberglarize_Btn.Location = new System.Drawing.Point(130, 165);
72 | this.Golberglarize_Btn.Name = "Golberglarize_Btn";
73 | this.Golberglarize_Btn.Size = new System.Drawing.Size(119, 29);
74 | this.Golberglarize_Btn.TabIndex = 3;
75 | this.Golberglarize_Btn.Text = "Golberglarize!";
76 | this.Golberglarize_Btn.UseVisualStyleBackColor = true;
77 | this.Golberglarize_Btn.Click += new System.EventHandler(this.Goldbergalarize);
78 | //
79 | // label1
80 | //
81 | this.label1.AutoSize = true;
82 | this.label1.Location = new System.Drawing.Point(288, 309);
83 | this.label1.Name = "label1";
84 | this.label1.Size = new System.Drawing.Size(89, 13);
85 | this.label1.TabIndex = 4;
86 | this.label1.Text = "by @ealtairz2318";
87 | //
88 | // label2
89 | //
90 | this.label2.AutoSize = true;
91 | this.label2.Location = new System.Drawing.Point(5, 309);
92 | this.label2.Name = "label2";
93 | this.label2.Size = new System.Drawing.Size(23, 13);
94 | this.label2.TabIndex = 5;
95 | this.label2.Text = "V.1";
96 | //
97 | // Update_btn
98 | //
99 | this.Update_btn.Location = new System.Drawing.Point(5, 12);
100 | this.Update_btn.Name = "Update_btn";
101 | this.Update_btn.Size = new System.Drawing.Size(115, 23);
102 | this.Update_btn.TabIndex = 6;
103 | this.Update_btn.Text = "Update Emulator";
104 | this.Update_btn.UseVisualStyleBackColor = true;
105 | this.Update_btn.Click += new System.EventHandler(this.UpdateEmulator);
106 | //
107 | // Golderberg_Alizer_Form
108 | //
109 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
110 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
111 | this.ClientSize = new System.Drawing.Size(389, 331);
112 | this.Controls.Add(this.Update_btn);
113 | this.Controls.Add(this.label2);
114 | this.Controls.Add(this.label1);
115 | this.Controls.Add(this.Golberglarize_Btn);
116 | this.Controls.Add(this.GameFolder_Btn_Finder);
117 | this.Controls.Add(this.GameFolder_Text);
118 | this.Controls.Add(this.GameFolder_text_box);
119 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
120 | this.Name = "Golderberg_Alizer_Form";
121 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
122 | this.Text = "Goldberg-Alizer";
123 | this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.OnExitCaching);
124 | this.Load += new System.EventHandler(this.Goldberg_Files_Updater);
125 | this.ResumeLayout(false);
126 | this.PerformLayout();
127 |
128 | }
129 |
130 | #endregion
131 |
132 | private System.Windows.Forms.TextBox GameFolder_text_box;
133 | private System.Windows.Forms.Label GameFolder_Text;
134 | private System.Windows.Forms.Button GameFolder_Btn_Finder;
135 | private System.Windows.Forms.Button Golberglarize_Btn;
136 | private System.Windows.Forms.Label label1;
137 | private System.Windows.Forms.Label label2;
138 | private System.Windows.Forms.Button Update_btn;
139 | }
140 | }
141 |
142 |
--------------------------------------------------------------------------------
/Form1.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 | using System.Net;
11 | using System.IO;
12 | using Ionic.Zip;
13 |
14 |
15 |
16 | namespace Goldbergalizer
17 | {
18 | public partial class Golderberg_Alizer_Form : Form
19 | {
20 |
21 | public Golderberg_Alizer_Form()
22 | {
23 | InitializeComponent();
24 |
25 | }
26 | private void GameFolder_Btn_Finder_Click(object sender, EventArgs e)
27 | {
28 | using (FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog()) // Finds the Folder
29 | {
30 | folderBrowserDialog.Description = "Select the Game folder(s)";
31 | folderBrowserDialog.ShowNewFolderButton = false;
32 |
33 | if (folderBrowserDialog.ShowDialog() == DialogResult.OK)
34 | {
35 | GameFolder_text_box.Text = folderBrowserDialog.SelectedPath;
36 | }
37 | }
38 | }
39 | private void Goldberg_Files_Updater(object sender, EventArgs e)
40 | {
41 | string appDirectory = AppDomain.CurrentDomain.BaseDirectory;
42 | string filesDirectory = Path.Combine(appDirectory, "Files");
43 | // Ensure the directory exists
44 | if (!Directory.Exists(filesDirectory))
45 | {
46 | Directory.CreateDirectory(filesDirectory);
47 | }
48 |
49 | string[] specificFiles = { "steam_api.dll", "steam_api64.dll" }; // Replace with actual file names
50 |
51 | // Check if all specific files exist in the "Files" directory
52 | bool allFilesExist = specificFiles.All(file => File.Exists(Path.Combine(filesDirectory, file)));
53 |
54 | if (!allFilesExist)
55 | {
56 | string url = "https://gitlab.com/Mr_Goldberg/goldberg_emulator/-/jobs/4247811310/artifacts/download";
57 | string destinationPath = Path.Combine(filesDirectory, "file.zip"); // Replace with your file name
58 |
59 | using (WebClient client = new WebClient())
60 | {
61 | try
62 | {
63 | client.DownloadFile(url, destinationPath);
64 | MessageBox.Show("Goldberg Files Succsfully Downloaded", "Download Successful", MessageBoxButtons.OK, MessageBoxIcon.Information);
65 |
66 | // Unzip and extract specific files
67 | UnzipAndExtractSpecificFiles(destinationPath, filesDirectory, specificFiles);
68 | }
69 | catch (Exception ex)
70 | {
71 | string errorMessage = $"An error occurred: {ex.Message}";
72 | Console.WriteLine(errorMessage);
73 | MessageBox.Show(errorMessage, "Cannot Connect and Download Goldberg Files", MessageBoxButtons.OK, MessageBoxIcon.Error);
74 | Environment.Exit(1); // Exit the application with an error code
75 | }
76 | }
77 | }
78 | OnLoadText();
79 | } // Updates and Downloads Current Goldberg Builds
80 | public static void UnzipAndExtractSpecificFiles(string zipFilePath, string extractPath, string[] specificFiles)
81 | {
82 | // Ensure the extraction directory exists
83 | if (!Directory.Exists(extractPath))
84 | {
85 | Directory.CreateDirectory(extractPath);
86 | }
87 |
88 | try
89 | {
90 | // Extract specific files from the ZIP archive
91 | using (ZipFile zip = ZipFile.Read(zipFilePath))
92 | {
93 | foreach (ZipEntry entry in zip)
94 | {
95 | if (Array.Exists(specificFiles, fileName => fileName.Equals(entry.FileName, StringComparison.OrdinalIgnoreCase)))
96 | {
97 | entry.Extract(extractPath, ExtractExistingFileAction.OverwriteSilently);
98 | }
99 | }
100 | }
101 |
102 | // Delete the ZIP file after extraction
103 | File.Delete(zipFilePath);
104 | Console.WriteLine("Extraction complete and ZIP file deleted.");
105 | }
106 | catch (Exception ex)
107 | {
108 | Console.WriteLine($"An error occurred during extraction: {ex.Message}");
109 | }
110 | } // Unzips and find the necessary files
111 | public void Goldbergalarize(object sender, EventArgs e)
112 | {
113 | string gameFolderPath = GameFolder_text_box.Text;
114 |
115 | // Check if the game folder path is provided
116 | if (string.IsNullOrWhiteSpace(gameFolderPath) || !Directory.Exists(gameFolderPath))
117 | {
118 | MessageBox.Show("Please provide a valid game folder path.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
119 | return;
120 | }
121 |
122 | string filesDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Files");
123 | string[] specificFiles = { "steam_api.dll", "steam_api64.dll" };
124 |
125 | try
126 | {
127 | // Get all folders and subfolders in the game folder
128 | string[] folders = Directory.GetDirectories(gameFolderPath, "*", SearchOption.AllDirectories);
129 |
130 | bool filesUpdated = false;
131 | StringBuilder updatedFolders = new StringBuilder();
132 |
133 | // Iterate through each folder
134 | foreach (string folder in folders)
135 | {
136 | // Check if either of the files exist in the folder
137 | bool fileExists = specificFiles.Any(file => File.Exists(Path.Combine(folder, file)));
138 |
139 | if (fileExists)
140 | {
141 | // Copy files from "Files" folder to the current folder
142 | foreach (string file in specificFiles)
143 | {
144 | string sourceFilePath = Path.Combine(filesDirectory, file);
145 | string destinationFilePath = Path.Combine(folder, file);
146 |
147 | // Check if the source and destination files are different
148 | if (File.Exists(sourceFilePath) && (!File.Exists(destinationFilePath) || !FilesAreEqual(sourceFilePath, destinationFilePath)))
149 | {
150 | File.Copy(sourceFilePath, destinationFilePath, true);
151 | filesUpdated = true;
152 | updatedFolders.AppendLine(folder);
153 | }
154 | }
155 | }
156 | }
157 |
158 | if (filesUpdated)
159 | {
160 | MessageBox.Show($"Files updated successfully in the following folders:\n\n{updatedFolders}", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
161 | }
162 | else
163 | {
164 | MessageBox.Show("No files were updated.", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
165 | }
166 | }
167 | catch (Exception ex)
168 | {
169 | MessageBox.Show($"An error occurred: {ex.Message}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
170 | }
171 | ExitingFunctions();
172 | } // Compares and Updates Existing Steam Games
173 | private bool FilesAreEqual(string filePath1, string filePath2) // Helper method to compare file contents
174 | {
175 | byte[] file1 = File.ReadAllBytes(filePath1);
176 | byte[] file2 = File.ReadAllBytes(filePath2);
177 |
178 | return file1.SequenceEqual(file2);
179 | }
180 | public void OnLoadText()
181 | {
182 | string appDirectory = AppDomain.CurrentDomain.BaseDirectory;
183 | string filesDirectory = Path.Combine(appDirectory, "Files");
184 | string cacheFilePath = Path.Combine(filesDirectory, "Path.txt");
185 |
186 | try
187 | {
188 | // Check if the cache file exists
189 | if (File.Exists(cacheFilePath))
190 | {
191 | // Read the folder path from the cache file
192 | string folderPath = File.ReadAllText(cacheFilePath);
193 |
194 | // Populate the GameFolder_text_box with the cached folder path
195 | GameFolder_text_box.Text = folderPath;
196 | Console.WriteLine("Cached folder path loaded successfully.");
197 | }
198 | else
199 | {
200 | Console.WriteLine("No cached folder path found.");
201 | }
202 | }
203 | catch (Exception ex)
204 | {
205 | Console.WriteLine($"An error occurred while loading cached folder path: {ex.Message}");
206 | }
207 | }
208 | private void OnExitCaching(object sender, FormClosingEventArgs e)
209 | {
210 | ExitingFunctions();
211 | }
212 | public void ExitingFunctions()
213 | {
214 | string appDirectory = AppDomain.CurrentDomain.BaseDirectory;
215 | string filesDirectory = Path.Combine(appDirectory, "Files");
216 | string cacheFilePath = Path.Combine(filesDirectory, "Path.txt");
217 |
218 | try
219 | {
220 | // Get the folder path from the GameFolder_text_box
221 | string folderPath = GameFolder_text_box.Text;
222 |
223 | // Write the folder path to the cache file
224 | File.WriteAllText(cacheFilePath, folderPath);
225 | Console.WriteLine("Folder path cached successfully.");
226 | }
227 | catch (Exception ex)
228 | {
229 | Console.WriteLine($"An error occurred while caching folder path: {ex.Message}");
230 | }
231 | }// Events when closing the application
232 | public void UpdateEmulator(object sender, EventArgs e)
233 | {
234 | // Get the directory where the application is located
235 | string appDirectory = AppDomain.CurrentDomain.BaseDirectory;
236 | string filesDirectory = Path.Combine(appDirectory, "Files");
237 |
238 | // Check if the "Files" directory exists
239 | if (Directory.Exists(filesDirectory))
240 | {
241 | try
242 | {
243 | // Delete the "Files" directory and all its contents
244 | Directory.Delete(filesDirectory, true);
245 | Console.WriteLine("Files folder deleted successfully.");
246 | }
247 | catch (Exception ex)
248 | {
249 | // If an error occurs during deletion, log the error message
250 | Console.WriteLine($"Error deleting Files folder: {ex.Message}");
251 | }
252 | }
253 | else
254 | {
255 | Console.WriteLine("Files folder does not exist.");
256 | }
257 |
258 | Goldberg_Files_Updater(this,EventArgs.Empty);
259 | } // Updates Emulator to Latest
260 | }
261 | }
262 |
--------------------------------------------------------------------------------
/Goldbergalizer.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {8B49C07F-23D0-487A-9203-951F648B407F}
8 | WinExe
9 | Goldbergalizer
10 | Goldbergalizer
11 | v4.7.2
12 | 512
13 | true
14 | true
15 | C:\Users\elija\Desktop\
16 | true
17 | Disk
18 | false
19 | Foreground
20 | 7
21 | Days
22 | false
23 | false
24 | true
25 | true
26 | 0
27 | 1.0.0.%2a
28 | false
29 | false
30 | true
31 |
32 |
33 | AnyCPU
34 | true
35 | full
36 | false
37 | bin\Debug\
38 | DEBUG;TRACE
39 | prompt
40 | 4
41 |
42 |
43 | AnyCPU
44 | pdbonly
45 | true
46 | bin\Release\
47 | TRACE
48 | prompt
49 | 4
50 |
51 |
52 | fist.ico
53 |
54 |
55 |
56 | packages\DotNetZip.1.16.0\lib\net40\DotNetZip.dll
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 | Form
73 |
74 |
75 | Form1.cs
76 |
77 |
78 |
79 |
80 | Form1.cs
81 |
82 |
83 | ResXFileCodeGenerator
84 | Resources.Designer.cs
85 | Designer
86 |
87 |
88 | True
89 | Resources.resx
90 |
91 |
92 |
93 | SettingsSingleFileGenerator
94 | Settings.Designer.cs
95 |
96 |
97 | True
98 | Settings.settings
99 | True
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 | False
108 | Microsoft .NET Framework 4.7.2 %28x86 and x64%29
109 | true
110 |
111 |
112 | False
113 | .NET Framework 3.5 SP1
114 | false
115 |
116 |
117 |
118 |
119 |
120 |
121 |
--------------------------------------------------------------------------------
/Goldbergalizer.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.33927.289
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Goldbergalizer", "Goldbergalizer.csproj", "{8B49C07F-23D0-487A-9203-951F648B407F}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {8B49C07F-23D0-487A-9203-951F648B407F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {8B49C07F-23D0-487A-9203-951F648B407F}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {8B49C07F-23D0-487A-9203-951F648B407F}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {8B49C07F-23D0-487A-9203-951F648B407F}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {672E5C66-9004-46C2-B5D4-22257388495B}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace Goldbergalizer
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// The main entry point for the application.
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Golderberg_Alizer_Form());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Goldbergalizer")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Goldbergalizer")]
13 | [assembly: AssemblyCopyright("Copyright © 2024")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("8b49c07f-23d0-487a-9203-951f648b407f")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 |
12 | namespace Goldbergalizer.Properties
13 | {
14 | ///
15 | /// A strongly-typed resource class, for looking up localized strings, etc.
16 | ///
17 | // This class was auto-generated by the StronglyTypedResourceBuilder
18 | // class via a tool like ResGen or Visual Studio.
19 | // To add or remove a member, edit your .ResX file then rerun ResGen
20 | // with the /str option, or rebuild your VS project.
21 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
22 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
23 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
24 | internal class Resources
25 | {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources()
33 | {
34 | }
35 |
36 | ///
37 | /// Returns the cached ResourceManager instance used by this class.
38 | ///
39 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
40 | internal static global::System.Resources.ResourceManager ResourceManager
41 | {
42 | get
43 | {
44 | if ((resourceMan == null))
45 | {
46 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Goldbergalizer.Properties.Resources", typeof(Resources).Assembly);
47 | resourceMan = temp;
48 | }
49 | return resourceMan;
50 | }
51 | }
52 |
53 | ///
54 | /// Overrides the current thread's CurrentUICulture property for all
55 | /// resource lookups using this strongly typed resource class.
56 | ///
57 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
58 | internal static global::System.Globalization.CultureInfo Culture
59 | {
60 | get
61 | {
62 | return resourceCulture;
63 | }
64 | set
65 | {
66 | resourceCulture = value;
67 | }
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 |
12 | namespace Goldbergalizer.Properties
13 | {
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
17 | {
18 |
19 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
20 |
21 | public static Settings Default
22 | {
23 | get
24 | {
25 | return defaultInstance;
26 | }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Updates all emulated Steams Games to Goldberg Emulator
2 |
3 |
4 | WARNING - DONT APPLY THIS TO YOUR STEAM LIBRARY OR ELSE IT MIGHT GOLBERGIFYH IT ALL
5 | - IF YOU DID WELL YOU CAN JUST VERIFY YOUR GAME IN STEAM TO RESTORE IT TO VALID STEAM VERSION
6 |
--------------------------------------------------------------------------------
/fist.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ealtairz2318/Goldberglarizer/fc86bc6ef42f39562f368cffa332d324c9f129da/fist.ico
--------------------------------------------------------------------------------
/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------