-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Handle IOException separately in ApiProcedures Caught IOException explicitly to provide more granular error handling. This allows to throw the IOException immediately while preserving the behavior for general exceptions. Adjusted throttler release comment to remove redundant text. * Enable output redirection in ApiProcedures This commit updates the process start information in ApiProcedures.cs to redirect standard output and error. It also sets UseShellExecute to false and CreateNoWindow to true for better process control and visibility. * Merge pull request #37 * Add support for bug tracking and enhance profile management * Add ability to change installation directory dynamically * Enhance path handling with Path.GetFullPath() Updated the SystemIOProcedures helper to use Path.GetFullPath for constructing and validating paths. This ensures absolute references, thereby enhancing path accuracy and security checks when manipulating directories and files. * Add OAuth token authentication method Implement a new authentication method using OAuth tokens across several classes to enhance security. This method allows users to authenticate using an access token, improving the flexibility and modernizing the authentication process. * Add ProcessHelper to handle process module monitoring Introduce ProcessHelper with a StartWatch method to observe and log module changes of a given process. This implementation uses reactive extensions to handle the monitoring and provides module addition and removal logging. * Prevent overwriting files larger than 100MB. Added a size check to skip overwriting files that are 100MB or larger in the `SystemIOProcedures` class. This change ensures large files are not unnecessarily replaced, optimizing performance and avoiding potential issues with large file handling. * Fix potential crash in ProfileFileWatcher process termination Ensure the process has not exited before attempting to kill it to prevent an InvalidOperationException. Added a try-catch block to safely handle exceptions if the process termination fails. * Add README for Gml.Client setup and development Created a comprehensive README guide for the Gml.Client project. It includes step-by-step instructions for cloning, setting up, building, running, and publishing the project, as well as contributing guidelines and additional resources. --------- Co-authored-by: Akemiko <[email protected]> Co-authored-by: GamerVII-NET <[email protected]>
- Loading branch information
1 parent
2c66ab4
commit eacbbb5
Showing
8 changed files
with
174 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# Cloning and Setting Up the Gml.Client Project | ||
|
||
This guide will help you clone the `Gml.Client` project from GitHub, set up the development environment, and publish the | ||
project. | ||
|
||
## Prerequisites | ||
|
||
Before you begin, ensure that you have the following software installed on your machine: | ||
|
||
- [Git](https://git-scm.com/) | ||
- .NET SDK (version 8.0) | ||
- [JetBrains Rider](https://www.jetbrains.com/rider/) | ||
|
||
## Cloning the Repository | ||
|
||
1. Open a terminal. | ||
2. Run the following command to clone the repository: | ||
|
||
```sh | ||
git clone https://github.com/Gml-Launcher/Gml.Client.git | ||
``` | ||
|
||
3. Navigate to the project directory: | ||
|
||
```sh | ||
cd Gml.Client | ||
``` | ||
|
||
## Setting Up the Development Environment | ||
|
||
1. Open JetBrains Rider. | ||
2. Open the cloned `Gml.Client` project in Rider: | ||
|
||
- Select `Open` from the welcome screen. | ||
- Navigate to the `Gml.Client` project directory and select it. | ||
|
||
3. After the project is loaded, Rider will restore the necessary dependencies. This may take some time. | ||
|
||
## Building the Project | ||
|
||
1. Ensure your project target framework is correctly set to .NET 8.0. You can verify and set the target framework in the | ||
`.csproj` file(s) of your projects: | ||
|
||
```xml | ||
<TargetFramework>net8.0</TargetFramework> | ||
``` | ||
|
||
2. Build the project by selecting `Build > Build Solution` from the main menu or by pressing `Ctrl+Shift+B`. | ||
|
||
## Running the Project | ||
|
||
1. Ensure the correct startup configuration is selected (typically the main executable project). | ||
2. Run the project by selecting `Run > Run` from the main menu or by pressing `Shift+F10`. | ||
|
||
## Publishing the Project | ||
|
||
1. Open a terminal. | ||
2. Navigate to the project directory if not already there: | ||
|
||
```sh | ||
cd Gml.Client | ||
``` | ||
|
||
3. Run the publish command using the .NET CLI: | ||
|
||
```sh | ||
dotnet publish -c Release -o ./publish | ||
``` | ||
|
||
This will publish the project in the `Release` configuration to the `./publish` directory. | ||
|
||
## Contributing | ||
|
||
If you'd like to contribute to the project, please fork the repository and create a pull request. Make sure your code | ||
adheres to the project's coding standards and passes all the tests. | ||
|
||
For any issues or feature requests, you can open an issue on | ||
the [GitHub Issues](https://github.com/Gml-Launcher/Gml.Client/issues) page of the repository. | ||
|
||
## Additional Resources | ||
|
||
- [JetBrains Rider Documentation](https://www.jetbrains.com/help/rider/Introduction.html) | ||
- [.NET Documentation](https://learn.microsoft.com/en-us/dotnet/) | ||
|
||
By following the above steps, you should be able to set up, develop, and publish the `Gml.Client` project successfully. | ||
Happy coding! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System.Diagnostics; | ||
using System.Reactive; | ||
using System.Reactive.Linq; | ||
|
||
namespace Gml.Client.Helpers; | ||
|
||
public static class ProcessHelper | ||
{ | ||
private static IDisposable? _watchDisposable; | ||
|
||
public static void StartWatch(this Process process) | ||
{ | ||
_watchDisposable?.Dispose(); | ||
|
||
_watchDisposable = process.Modules | ||
.Cast<ProcessModule>() | ||
.ToObservable() | ||
.Subscribe(module => Console.WriteLine($"Module added: {module}"), () => Console.WriteLine("A module was removed")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters