Update build instructions (#107)

This commit is contained in:
Thorsten Sommer 2024-09-03 17:40:11 +02:00 committed by GitHub
parent 2889581702
commit 8d8a47b43b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,21 +1,36 @@
# Building # Building
You just want to use the app? Then simply [download the appropriate setup for your operating system](Setup.md). This chapter is intended for developers who want to modify and customize the code. You just want to use the app? Then simply [download the appropriate setup for your operating system](Setup.md). This chapter is intended for developers who want to modify and customize the code.
In order to build MindWork AI Studio from source instead of using the pre-built binaries, follow these steps: ## Prerequisites
1. Install the [.NET 8 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0). 1. Install the [.NET 8 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0).
2. [Install the Rust compiler](https://www.rust-lang.org/tools/install) in the latest version. 2. [Install the Rust compiler](https://www.rust-lang.org/tools/install) in the latest version.
3. [Install NuShell](https://www.nushell.sh/). This shell works on all operating systems and is required because the build script is written in NuShell. 3. Met the prerequisites for building [Tauri](https://tauri.app/v1/guides/getting-started/prerequisites/). Node.js is **not** required, though.
4. Clone the repository. 4. Install the Tauri CLI by running `cargo install tauri-cli`.
5. Open a terminal with NuShell. 5. [Install NuShell](https://www.nushell.sh/) when you want to prepare a release or build a local binary. NuShell works on all operating systems and is required because the build script is written in NuShell.
6. Navigate to the `/app/MindWork AI Studio` directory within the repository. 6. Clone the repository.
7. To build the current version, run `nu build.nu publish`.
## Build instructions
In order to build MindWork AI Studio from source instead of using the pre-built binaries, follow these steps:
1. Ensure you have met all the prerequisites.
2. Open a terminal with NuShell.
3. Navigate to the `/app/MindWork AI Studio` directory within the repository.
4. To build the current version, run `nu build.nu publish`.
- This will build the app for the current operating system, for both x64 (Intel, AMD) and ARM64 (e.g., Apple Silicon, Raspberry Pi). - This will build the app for the current operating system, for both x64 (Intel, AMD) and ARM64 (e.g., Apple Silicon, Raspberry Pi).
- The setup program will be located in `runtime/target/release/bundle` afterward. - The setup program will be located in `runtime/target/release/bundle` afterward.
8. In order to create a new release: 5. In order to create a new release:
1. To prepare a new release, run `nu build.nu prepare <ACTION>`, where `<ACTION>` is either `patch`, `minor`, or `major`. In case you need to adjust the version manually, you can do so in the `metadata.txt` file at the root of the repository; the first line contains the version number. 1. Before finishing the PR, make sure to create a changelog file in the `/app/MindWork AI Studio/wwwroot/changelog` directory. The file should be named `vX.Y.Z.md` and contain the changes made in the release (your changes and any other changes that are part of the release).
2. The actual release will be built by our GitHub Workflow. For this to work, you need to create a PR with your changes. 2. To prepare a new release, run `nu build.nu prepare <ACTION>`, where `<ACTION>` is either `patch`, `minor`, or `major`.
3. Before finishing the PR, make sure to create a changelog file in the `/app/MindWork AI Studio/wwwroot/changelog` directory. The file should be named `vX.Y.Z.md` and contain the changes made in the release (your changes and any other changes that are part of the release). 3. The actual release will be built by our GitHub Workflow. For this to work, you need to create a PR with your changes.
4. Your proposed changes will be reviewed and merged. 4. Your proposed changes will be reviewed and merged.
5. Once the PR is merged, a member of the maintainers team will create & push an appropriate git tag in the format `vX.Y.Z`. 5. Once the PR is merged, a member of the maintainers team will create & push an appropriate git tag in the format `vX.Y.Z`.
6. The GitHub Workflow will then build the release and upload it to the [release page](https://github.com/MindWorkAI/AI-Studio/releases/latest). 6. The GitHub Workflow will then build the release and upload it to the [release page](https://github.com/MindWorkAI/AI-Studio/releases/latest).
7. Building the release including virus scanning takes about 2 1/2 hours. 7. Building the release including virus scanning takes some time. Please be patient.
## Run the app locally with all your changes
Do you want to test your changes before creating a PR? Follow these steps:
1. Ensure you have met all the prerequisites.
2. Open a terminal (in this case, it doesn't have to be NuShell).
3. Navigate to the `runtime` directory within the repository, e.g. `cd repos/mindwork-ai-studio/runtime`.
4. Run `cargo run`.
Cargo will compile the Rust code and start the runtime. The runtime will then start the .NET compiler. When the .NET source code is compiled, the app will start. You can now test your changes.