diff --git a/.gitignore b/.gitignore index be650a79b..135ce5fb2 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ pnpm-debug.log* # macOS-specific files .DS_Store + src/content/docs/api/Animations.mdx src/content/docs/api/Audio.mdx src/content/docs/api/Camera.mdx @@ -38,7 +39,7 @@ src/content/docs/api/Logging.mdx src/content/docs/api/Networking.mdx src/content/docs/api/Physics.mdx src/content/docs/api/Raspberry.mdx -src/content/docs/api/Resource Bundles.mdx +src/content/docs/api/Resource-Bundles.mdx src/content/docs/api/Resources.mdx src/content/docs/api/Social.mdx src/content/docs/api/Sprites.mdx @@ -61,7 +62,7 @@ src/content/docs/usage-examples/Logging.mdx src/content/docs/usage-examples/Networking.mdx src/content/docs/usage-examples/Physics.mdx src/content/docs/usage-examples/Raspberry.mdx -src/content/docs/usage-examples/Resource Bundles.mdx +src/content/docs/usage-examples/Resource-Bundles.mdx src/content/docs/usage-examples/Resources.mdx src/content/docs/usage-examples/Social.mdx src/content/docs/usage-examples/Sprites.mdx diff --git a/CONTRIBUTE.md b/CONTRIBUTE.md index 8b28285de..96bf72697 100644 --- a/CONTRIBUTE.md +++ b/CONTRIBUTE.md @@ -3,83 +3,126 @@ Follow these steps to contribute to the SplashKit website repository: 1. **Fork the Repository:** + - Visit the SplashKit repository on GitHub. - Click on the "Fork" button in the top-right corner of the page. This will create a copy of the repository under your GitHub account. 2. **Clone Your Fork:** + - Open your terminal or Git client. - Clone your forked repository to your local machine using the following command: - ```shell - git clone https://github.com/YOUR_USERNAME/splashkit.git - ``` + ```shell + git clone https://github.com/YOUR_USERNAME/splashkit.git + ``` + +3. **Checkout new branch:** + + - Open your terminal or Git client. + - Create a new branch on your forked repository using the following command (replace `` with your chosen name): + + ```shell + git checkout -b <new-branch> + ``` + +4. **Make Your Changes:** -3. **Make Your Changes:** - Navigate to the project directory on your local machine. - Make your respective changes, ensuring high-quality contributions. -4. **Commit Your Changes:** +5. **Commit Your Changes:** + - After making changes, commit them with meaningful commit messages. - ```shell - git add . - git commit -m "Your descriptive commit message" - ``` + ```shell + git add . + git commit -m "Your descriptive commit message" + ``` + +6. **Push Changes to Your Fork:** -5. **Push Changes to Your Fork:** - Push your changes to your forked repository on GitHub. - ```shell - git push origin master - ``` + ```shell + git push origin master + ``` + +7. **Create a Pull Request (PR):** -6. **Create a Pull Request (PR):** - Visit your forked repository on GitHub. - Click on the "New Pull Request" button. - - Ensure the base repository is set to `splashkit/splashkit` and the base branch is `main`. - - Ensure the head repository is set to `YOUR_USERNAME/splashkit` and the compare branch is `master`. + - Ensure the base and head repositories have been set correctly. - Click on "Create Pull Request." -7. **Wait for Review:** +8. **Wait for Review:** + - The maintainers will review your PR. Be patient, and be ready to respond to any feedback or comments. - If changes are requested, make the necessary updates and push them to your forked repository. -8. **Follow Up to Comments:** +9. **Follow Up to Comments:** + - Engage with any comments or questions from the maintainers. - If additional changes are needed, repeat steps 4-7. -9. **PR Approval/Rejection:** - - Once your changes are approved, the maintainers will merge your PR into the main repository. - - If your changes are rejected, understand the feedback and consider making improvements before submitting another PR. +10. **PR Approval/Rejection:** + + - Once your changes are approved, the maintainers will merge your PR into the main repository. + - If your changes are rejected, understand the feedback and consider making improvements before submitting another PR. By following these steps, you contribute effectively to the SplashKit website. Remember to adhere to the project's guidelines and maintain a collaborative and respectful environment. ## Website Guide - - -This guide provides information on the structure and organization of the SplashKit website using the Starlight framework. Follow these instructions to navigate through the project and make necessary updates. +This guide provides information on the structure and organization of the SplashKit website, which is built on the Starlight framework. Follow these instructions to navigate through the project and make necessary updates effectively. ### Installation and Commands -For basic installation and commands, please refer to the [`Readme.md`](/README.md) file in the project's root directory. +For detailed installation instructions and common commands, refer to the [`README.md`](/README.md) file in the root directory of the project. + +### Project Structure Overview -### Image Resources +The SplashKit website project structure is organized as follows: -All image resources are located under the `public` root directory. +```plaintext +. +├── public/ # Publicly accessible resources +│ ├── gifs/ # GIF files used across the website +│ ├── images/ # General image resources +│ ├── resources/ # Resource files for various purposes +│ └── usage-examples/ # Files for usage examples +├── src/ +│ ├── assets/ # Additional assets for the website +│ ├── components/ # Reusable UI components +│ ├── content/ # Documentation and content files +│ │ ├── docs/ # Main documentation directory +│ │ ├── guides/ # Guides for specific features +│ │ ├── installation/ # Installation instructions +│ │ ├── troubleshoot/ # Troubleshooting information +│ ├── fonts/ # Custom fonts used on the site +│ ├── styles/ # Global and component CSS styles +└── test/ # Scripts for testing and page generation +``` + +### Image and Usage Example Resources + +All image resources are located in the `public/images` directory. + +Usage examples, which illustrate how to use different SplashKit functions, are organized under the `public/usage-examples/` directory. Ensure that any new usage example files are placed here. ### Documentation Pages -Documentation pages are stored under `root/src/content/docs/`. To find information on specific SplashKit components such as Animations, Sounds, etc., refer to the respective sections within the `components` directory. +Documentation pages are stored under `src/content/docs/`. For sections related to specific components, such as Animations, Sounds, or other SplashKit features, refer to the respective subdirectories within `src/content/docs/components`. -Each working directory can contain an `index.mdx` file. This file serves as the page that will be accessed when only the section is fetched. For instance, under the `installation` directory, the `index.mdx` page will be accessed when `https://some-host/installation/` is fetched. +- Each section may include an `index.mdx` file, which serves as the main page when navigating to a section URL (e.g., the `index.mdx` file in the `installation` folder is accessed via `https://your-site/installation/`). -### CSS Files +### Styling and CSS Files -CSS files can be found under `src/styles/`. If you create a new directory or use new style files, update the `astro.config.mjs` file in the root directory to read the files. +All CSS files can be found under the `src/styles/` directory. If you add new CSS files or directories, ensure they are referenced in the `astro.config.mjs` file in the root directory to apply styles correctly across the website. ### Test Directory -Inside the `test` directory, you will find a NodeJS script that generates MDX pages required for component generation. Refer to the comments inside the script for detailed instructions on usage and customization. +The `test` directory contains scripts, including a NodeJS script that generates MDX pages needed for component generation. Refer to comments within each script for specific instructions on usage and customization. + +### Guidelines -Make sure to follow these guidelines to maintain a well-organized and functional SplashKit website powered by the Starlight framework. +Adhere to these structure and organization guidelines to maintain a functional, well-organized SplashKit website on the Starlight framework. Consistency across directories and files will streamline contributions and enhance project maintainability. diff --git a/README.md b/README.md index 10ddb9cc8..c579a3dcb 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,40 @@ -# SplashKit SDK - Starlight Framework +# [splashkit.io](https://splashkit.io) Website - Starlight Framework -## Introduction +SplashKit Logo -Welcome to the official documentation for the SplashKit SDK on the Starlight framework! This README markdown script will guide you through the installation process and provide an overview of the features and functionalities of the SDK. +Welcome to the official documentation website for the SplashKit SDK, using the Starlight (Astro) framework! This README will guide you through the installation process and provide an overview of the features and functionalities of the SDK. -## Deployment Status +[splashkit/splashkit.io-starlight](https://github.com/splashkit/splashkit.io-starlight) -[Thoth Tech's 'splashkit.io' Site](https://splashkit-io.netlify.app/) - [![Netlify Status](https://api.netlify.com/api/v1/badges/e8def4e6-f39d-458a-8ca9-556d61ce1fbd/deploy-status)](https://app.netlify.com/sites/splashkit-io/deploys) +[![GitHub contributors](https://img.shields.io/github/contributors/splashkit/splashkit.io-starlight?label=Contributors&color=F5A623)](https://github.com/splashkit/splashkit.io-starlight/graphs/contributors) +[![GitHub issues](https://img.shields.io/github/issues/splashkit/splashkit.io-starlight?label=Issues&color=F5A623)](https://github.com/splashkit/splashkit.io-starlight/issues) +[![GitHub pull requests](https://img.shields.io/github/issues-pr/splashkit/splashkit.io-starlight?label=Pull%20Requests&color=F5A623)](https://github.com/splashkit/splashkit.io-starlight/pulls) +[![Website](https://img.shields.io/website?down_color=red&down_message=offline&label=Website&up_color=green&up_message=online&url=https%3A%2F%2Fsplashkit.io)](https://splashkit.io/) +![Netlify](https://img.shields.io/netlify/29627b16-8f40-4b42-8ae8-1912895f5305?label=Netlify&color=F5A623) +![Forks](https://img.shields.io/github/forks/splashkit/splashkit.io-starlight?label=Forks&color=F5A623) +![Stars](https://img.shields.io/github/stars/splashkit/splashkit.io-starlight?label=Stars&color=F5A623) - +[thoth-tech/splashkit.io-starlight](https://github.com/thoth-tech/splashkit.io-starlight) * -## Installation +[![GitHub contributors](https://img.shields.io/github/contributors/thoth-tech/splashkit.io-starlight?label=Contributors&color=F5A623)](https://github.com/thoth-tech/splashkit.io-starlight/graphs/contributors) +[![GitHub issues](https://img.shields.io/github/issues/thoth-tech/splashkit.io-starlight?label=Issues&color=F5A623)](https://github.com/thoth-tech/splashkit.io-starlight/issues) +[![GitHub pull requests](https://img.shields.io/github/issues-pr/thoth-tech/splashkit.io-starlight?label=Pull%20Requests&color=F5A623)](https://github.com/thoth-tech/splashkit.io-starlight/pulls) +[![Website Preview](https://img.shields.io/badge/Preview-splashkit.io-blue)](https://splashkit-io.netlify.app/) +![Forks](https://img.shields.io/github/forks/thoth-tech/splashkit.io-starlight?label=Forks&color=F5A623) +![Stars](https://img.shields.io/github/stars/thoth-tech/splashkit.io-starlight?label=Stars&color=F5A623) + +**\* SplashKit Development in Thoth Tech** -1. Install and open Docker app. -2. Fork then clone this repository. -3. Reopen cloned repository in container (pop-up may appear in VS Code) +Thoth Tech is a people-focused educational technology company within Deakin University's capstone program which provides real-world learning opportunities and allows students to contribute significantly to projects like SplashKit, enhancing its capabilities and resources. + +## Installation If needed: +1. Install and open Docker: Ensure Docker is installed and running on your machine. +2. Fork and clone this repository: This allows you to make your own changes and submit them if needed. +3. Reopen the cloned repository in a container: You may get a prompt to open it in a container in VS Code; select "Reopen in Container." + - Install the necessary dependencies. Make sure you have the following installed: ```shell @@ -32,6 +48,11 @@ Inside of your Astro + Starlight project, you'll see the following folders and f ```plaintext . ├── public/ +│ ├── gifs/ +│ ├── images/ +│ ├── resources/ +│ └── usage-examples/ +├── scripts/ └── src/ ├── assets/ ├── components/ @@ -40,7 +61,8 @@ Inside of your Astro + Starlight project, you'll see the following folders and f │ │ ├── api/ │ │ ├── guides/ │ │ ├── installation/ - │ │ └── troubleshoot/ + │ │ ├── troubleshoot/ + │ │ └── arcade-hackathon-project/ ├── fonts/ ├── styles/ @@ -50,26 +72,27 @@ Inside of your Astro + Starlight project, you'll see the following folders and f └── tsconfig.json ``` -Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name. - -Images can be added to `src/assets/` and embedded in Markdown with a relative link. - -Static assets, like favicons and gifs, can be placed in the `public/` directory. +- **Documentation Files**: Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name. +- **Images and Assets**: Images can be added to `src/assets/` and embedded in Markdown with a relative link. +- **Static Assets**: Static assets, like favicons and gifs, can be placed in the `public/` directory. ## 🧞 Commands All commands are run from the root of the project, from a terminal: -| Command | Action | -| :------------------------ | :----------------------------------------------- | -| `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:3000` | -| `npm run build` | Build your production site to `./dist/` | -| `npm run preview` | Preview your build locally, before deploying | -| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | -| `npm run astro -- --help` | Get help using the Astro CLI | -| `npm run generate-mdx` | Generate MDX file *(for functions)* from JSON data in `test` folder | +| Command | Action | +| :-------------------------------------- | :---------------------------------------------------------------------------------------------------------- | +| `npm install` | Installs dependencies | +| `npm run dev` | Starts local dev server at `localhost:4322` | +| `npm run build` | Builds your production site to `./dist/` | +| `npm run preview` | Previews your build locally, before deploying | +| `npm run astro ...` | Runs CLI commands like `astro add`, `astro check` | +| `npm run astro -- --help` | Gets help using the Astro CLI | +| `npm run generate-mdx` | Generates an MDX file *(for functions)* from JSON data in the `test` folder | +| `npm run generate-usage-examples-pages` | Runs the script to generate usage example pages from the `./scripts/usage-example-page-generation.cjs` file | +| `npm run generate-usage-examples-pages write_line-1-simple` | Runs the script to generate usage example pages from the `./scripts/usage-example-page-generation.cjs` file and prints the testing output for the `write_line-1-simple` example | +| `npm run check-links` | Sets `CHECK_LINKS=true`, runs `npm run build`, then resets `CHECK_LINKS=false` | ## Contributing -We welcome contributions from the community to enhance the SplashKit SDK on the Starlight framework. If you would like to contribute, please follow the guidelines outlined in the CONTRIBUTING.md file. +We welcome contributions from the community to enhance the SplashKit SDK on the Starlight framework. If you would like to contribute, please follow the guidelines outlined in the [CONTRIBUTE.md](./CONTRIBUTE.md) file. diff --git a/public/images/installation/WSL-in-vscode.png b/public/images/installation/WSL-in-vscode.png new file mode 100644 index 000000000..99f9ff4ad Binary files /dev/null and b/public/images/installation/WSL-in-vscode.png differ diff --git a/public/images/installation/cplus-in-vscode.png b/public/images/installation/cplus-in-vscode.png new file mode 100644 index 000000000..381315b6e Binary files /dev/null and b/public/images/installation/cplus-in-vscode.png differ diff --git a/public/images/installation/csharp-in-vscode.png b/public/images/installation/csharp-in-vscode.png new file mode 100644 index 000000000..4c30fead7 Binary files /dev/null and b/public/images/installation/csharp-in-vscode.png differ diff --git a/public/images/installation/linux/arch-error.png b/public/images/installation/linux/arch-error.png new file mode 100644 index 000000000..2eb9d35d9 Binary files /dev/null and b/public/images/installation/linux/arch-error.png differ diff --git a/public/images/installation/linux/missing-library.png b/public/images/installation/linux/missing-library.png new file mode 100644 index 000000000..1c0f3f3b2 Binary files /dev/null and b/public/images/installation/linux/missing-library.png differ diff --git a/public/images/installation/linux/skm-global-linux-fail.png b/public/images/installation/linux/skm-global-linux-fail.png new file mode 100644 index 000000000..f7b954d2c Binary files /dev/null and b/public/images/installation/linux/skm-global-linux-fail.png differ diff --git a/public/images/installation/python-in-vscode.png b/public/images/installation/python-in-vscode.png new file mode 100644 index 000000000..cd14ce538 Binary files /dev/null and b/public/images/installation/python-in-vscode.png differ diff --git a/public/usage-examples/graphics/draw_bitmap_named/draw_bitmap_named-2-extended-oop.cs b/public/usage-examples/graphics/draw_bitmap_named/draw_bitmap_named-2-extended-oop.cs new file mode 100644 index 000000000..a52a8eb40 --- /dev/null +++ b/public/usage-examples/graphics/draw_bitmap_named/draw_bitmap_named-2-extended-oop.cs @@ -0,0 +1,105 @@ +using SplashKitSDK; + +namespace GUIHelloWorld +{ + public class Program + { + public static void Main() + { + // Download resources + SplashKit.DownloadSoundEffect("Hello World", "https://programmers.guide/resources/code-examples/part-0/hello-world-snippet-saddle-club.ogg", 443); + SplashKit.DownloadFont("main", "https://programmers.guide/resources/code-examples/part-0/Roboto-Italic.ttf", 443); + SplashKit.DownloadBitmap("Earth", "https://programmers.guide/resources/code-examples/part-0/earth.png", 443); + SplashKit.DownloadBitmap("SmallEarth", "https://programmers.guide/resources/code-examples/part-0/earth-small.png", 443); + SplashKit.DownloadBitmap("SplashKitBox", "https://programmers.guide/resources/code-examples/part-0/skbox.png", 443); + + SplashKit.OpenWindow("Hello World: Using Resources with SplashKit", 800, 600); + SplashKit.PlaySoundEffect("Hello World"); + + SplashKit.ClearScreen(Color.White); + SplashKit.DrawText("Anyone remember the \"Hello World\" Saddle Club song?", Color.Black, "main", 30, 40, 200); + SplashKit.RefreshScreen(); + SplashKit.Delay(2500); + + SplashKit.ClearScreen(Color.White); + + // H + SplashKit.DrawBitmap("SmallEarth", 20, 100); + SplashKit.DrawBitmap("SmallEarth", 20, 130); + SplashKit.DrawBitmap("SmallEarth", 20, 160); + SplashKit.DrawBitmap("SmallEarth", 20, 190); + SplashKit.DrawBitmap("SmallEarth", 20, 220); + SplashKit.DrawBitmap("SmallEarth", 52, 160); + SplashKit.DrawBitmap("SmallEarth", 84, 100); + SplashKit.DrawBitmap("SmallEarth", 84, 130); + SplashKit.DrawBitmap("SmallEarth", 84, 160); + SplashKit.DrawBitmap("SmallEarth", 84, 190); + SplashKit.DrawBitmap("SmallEarth", 84, 220); + SplashKit.RefreshScreen(); + SplashKit.Delay(200); + + // E + SplashKit.DrawBitmap("SmallEarth", 148, 100); + SplashKit.DrawBitmap("SmallEarth", 148, 130); + SplashKit.DrawBitmap("SmallEarth", 148, 160); + SplashKit.DrawBitmap("SmallEarth", 148, 190); + SplashKit.DrawBitmap("SmallEarth", 148, 220); + SplashKit.DrawBitmap("SmallEarth", 180, 100); + SplashKit.DrawBitmap("SmallEarth", 212, 100); + SplashKit.DrawBitmap("SmallEarth", 180, 160); + SplashKit.DrawBitmap("SmallEarth", 180, 220); + SplashKit.DrawBitmap("SmallEarth", 212, 220); + SplashKit.RefreshScreen(); + SplashKit.Delay(200); + + // L + SplashKit.DrawBitmap("SmallEarth", 276, 100); + SplashKit.DrawBitmap("SmallEarth", 276, 130); + SplashKit.DrawBitmap("SmallEarth", 276, 160); + SplashKit.DrawBitmap("SmallEarth", 276, 190); + SplashKit.DrawBitmap("SmallEarth", 276, 220); + SplashKit.DrawBitmap("SmallEarth", 308, 220); + SplashKit.DrawBitmap("SmallEarth", 340, 220); + SplashKit.RefreshScreen(); + SplashKit.Delay(200); + + // L + SplashKit.DrawBitmap("SmallEarth", 404, 100); + SplashKit.DrawBitmap("SmallEarth", 404, 130); + SplashKit.DrawBitmap("SmallEarth", 404, 160); + SplashKit.DrawBitmap("SmallEarth", 404, 190); + SplashKit.DrawBitmap("SmallEarth", 404, 220); + SplashKit.DrawBitmap("SmallEarth", 436, 220); + SplashKit.DrawBitmap("SmallEarth", 468, 220); + SplashKit.RefreshScreen(); + SplashKit.Delay(200); + + // O + SplashKit.DrawBitmap("SmallEarth", 530, 160); + SplashKit.DrawBitmap("SmallEarth", 622, 160); + SplashKit.DrawBitmap("SmallEarth", 540, 128); + SplashKit.DrawBitmap("SmallEarth", 560, 100); + SplashKit.DrawBitmap("SmallEarth", 592, 100); + SplashKit.DrawBitmap("SmallEarth", 612, 128); + SplashKit.DrawBitmap("SmallEarth", 540, 192); + SplashKit.DrawBitmap("SmallEarth", 560, 220); + SplashKit.DrawBitmap("SmallEarth", 592, 220); + SplashKit.DrawBitmap("SmallEarth", 612, 192); + SplashKit.RefreshScreen(); + SplashKit.Delay(500); + + // World + SplashKit.DrawBitmap("Earth", 100, 350); + SplashKit.RefreshScreen(); + SplashKit.Delay(2000); + + // SplashKit ("Me") + SplashKit.DrawBitmap("SplashKitBox", 450, 300); + SplashKit.DrawText("SplashKit!", Color.Black, "main", 50, 450, 530); + SplashKit.RefreshScreen(); + SplashKit.Delay(2000); + + SplashKit.CloseAllWindows(); + } + } +} \ No newline at end of file diff --git a/public/usage-examples/graphics/draw_bitmap_named/draw_bitmap_named-2-extended-top-level.cs b/public/usage-examples/graphics/draw_bitmap_named/draw_bitmap_named-2-extended-top-level.cs new file mode 100644 index 000000000..5441fb8ee --- /dev/null +++ b/public/usage-examples/graphics/draw_bitmap_named/draw_bitmap_named-2-extended-top-level.cs @@ -0,0 +1,94 @@ +using static SplashKitSDK.SplashKit; + +// Download resources +DownloadSoundEffect("Hello World", "https://programmers.guide/resources/code-examples/part-0/hello-world-snippet-saddle-club.ogg", 443); +DownloadFont("main", "https://programmers.guide/resources/code-examples/part-0/Roboto-Italic.ttf", 443); +DownloadBitmap("Earth", "https://programmers.guide/resources/code-examples/part-0/earth.png", 443); +DownloadBitmap("SmallEarth", "https://programmers.guide/resources/code-examples/part-0/earth-small.png", 443); +DownloadBitmap("SplashKitBox", "https://programmers.guide/resources/code-examples/part-0/skbox.png", 443); + +OpenWindow("Hello World: Using Resources with SplashKit", 800, 600); +PlaySoundEffect("Hello World"); + +ClearScreen(ColorWhite()); +DrawText("Anyone remember the \"Hello World\" Saddle Club song?", ColorBlack(), "main", 30, 40, 200); +RefreshScreen(); +Delay(2500); + +ClearScreen(ColorWhite()); + +// H +DrawBitmap("SmallEarth", 20, 100); +DrawBitmap("SmallEarth", 20, 130); +DrawBitmap("SmallEarth", 20, 160); +DrawBitmap("SmallEarth", 20, 190); +DrawBitmap("SmallEarth", 20, 220); +DrawBitmap("SmallEarth", 52, 160); +DrawBitmap("SmallEarth", 84, 100); +DrawBitmap("SmallEarth", 84, 130); +DrawBitmap("SmallEarth", 84, 160); +DrawBitmap("SmallEarth", 84, 190); +DrawBitmap("SmallEarth", 84, 220); +RefreshScreen(); +Delay(200); + +// E +DrawBitmap("SmallEarth", 148, 100); +DrawBitmap("SmallEarth", 148, 130); +DrawBitmap("SmallEarth", 148, 160); +DrawBitmap("SmallEarth", 148, 190); +DrawBitmap("SmallEarth", 148, 220); +DrawBitmap("SmallEarth", 180, 100); +DrawBitmap("SmallEarth", 212, 100); +DrawBitmap("SmallEarth", 180, 160); +DrawBitmap("SmallEarth", 180, 220); +DrawBitmap("SmallEarth", 212, 220); +RefreshScreen(); +Delay(200); + +// L +DrawBitmap("SmallEarth", 276, 100); +DrawBitmap("SmallEarth", 276, 130); +DrawBitmap("SmallEarth", 276, 160); +DrawBitmap("SmallEarth", 276, 190); +DrawBitmap("SmallEarth", 276, 220); +DrawBitmap("SmallEarth", 308, 220); +DrawBitmap("SmallEarth", 340, 220); +RefreshScreen(); +Delay(200); + +// L +DrawBitmap("SmallEarth", 404, 100); +DrawBitmap("SmallEarth", 404, 130); +DrawBitmap("SmallEarth", 404, 160); +DrawBitmap("SmallEarth", 404, 190); +DrawBitmap("SmallEarth", 404, 220); +DrawBitmap("SmallEarth", 436, 220); +DrawBitmap("SmallEarth", 468, 220); +RefreshScreen(); +Delay(200); + +// O +DrawBitmap("SmallEarth", 530, 160); +DrawBitmap("SmallEarth", 622, 160); +DrawBitmap("SmallEarth", 540, 128); +DrawBitmap("SmallEarth", 560, 100); +DrawBitmap("SmallEarth", 592, 100); +DrawBitmap("SmallEarth", 612, 128); +DrawBitmap("SmallEarth", 540, 192); +DrawBitmap("SmallEarth", 560, 220); +DrawBitmap("SmallEarth", 592, 220); +DrawBitmap("SmallEarth", 612, 192); +RefreshScreen(); +Delay(500); + +// World +DrawBitmap("Earth", 100, 350); +RefreshScreen(); +Delay(2000); + +// SplashKit ("Me") +DrawBitmap("SplashKitBox", 450, 300); +DrawText("SplashKit!", ColorBlack(), "main", 50, 450, 530); +RefreshScreen(); +Delay(2000); \ No newline at end of file diff --git a/public/usage-examples/graphics/draw_bitmap_named/draw_bitmap_named-2-extended.cpp b/public/usage-examples/graphics/draw_bitmap_named/draw_bitmap_named-2-extended.cpp new file mode 100644 index 000000000..ebb362a73 --- /dev/null +++ b/public/usage-examples/graphics/draw_bitmap_named/draw_bitmap_named-2-extended.cpp @@ -0,0 +1,101 @@ +#include "splashkit.h" + +int main() +{ + // Download resources + download_sound_effect("Hello World", "https://programmers.guide/resources/code-examples/part-0/hello-world-snippet-saddle-club.ogg", 443); + download_font("main", "https://programmers.guide/resources/code-examples/part-0/Roboto-Italic.ttf", 443); + download_bitmap("Earth", "https://programmers.guide/resources/code-examples/part-0/earth.png", 443); + download_bitmap("SmallEarth", "https://programmers.guide/resources/code-examples/part-0/earth-small.png", 443); + download_bitmap("SplashKitBox", "https://programmers.guide/resources/code-examples/part-0/skbox.png", 443); + + open_window("Hello World: Using Resources with SplashKit", 800, 600); + play_sound_effect("Hello World"); + + clear_screen(COLOR_WHITE); + draw_text("Anyone remember the \"Hello World\" Saddle Club song?", COLOR_BLACK, "main", 30, 40, 200); + refresh_screen(); + delay(2500); + + clear_screen(COLOR_WHITE); + + // H + draw_bitmap("SmallEarth", 20, 100); + draw_bitmap("SmallEarth", 20, 130); + draw_bitmap("SmallEarth", 20, 160); + draw_bitmap("SmallEarth", 20, 190); + draw_bitmap("SmallEarth", 20, 220); + draw_bitmap("SmallEarth", 52, 160); + draw_bitmap("SmallEarth", 84, 100); + draw_bitmap("SmallEarth", 84, 130); + draw_bitmap("SmallEarth", 84, 160); + draw_bitmap("SmallEarth", 84, 190); + draw_bitmap("SmallEarth", 84, 220); + refresh_screen(); + delay(200); + + // E + draw_bitmap("SmallEarth", 148, 100); + draw_bitmap("SmallEarth", 148, 130); + draw_bitmap("SmallEarth", 148, 160); + draw_bitmap("SmallEarth", 148, 190); + draw_bitmap("SmallEarth", 148, 220); + draw_bitmap("SmallEarth", 180, 100); + draw_bitmap("SmallEarth", 212, 100); + draw_bitmap("SmallEarth", 180, 160); + draw_bitmap("SmallEarth", 180, 220); + draw_bitmap("SmallEarth", 212, 220); + refresh_screen(); + delay(200); + + // L + draw_bitmap("SmallEarth", 276, 100); + draw_bitmap("SmallEarth", 276, 130); + draw_bitmap("SmallEarth", 276, 160); + draw_bitmap("SmallEarth", 276, 190); + draw_bitmap("SmallEarth", 276, 220); + draw_bitmap("SmallEarth", 308, 220); + draw_bitmap("SmallEarth", 340, 220); + refresh_screen(); + delay(200); + + // L + draw_bitmap("SmallEarth", 404, 100); + draw_bitmap("SmallEarth", 404, 130); + draw_bitmap("SmallEarth", 404, 160); + draw_bitmap("SmallEarth", 404, 190); + draw_bitmap("SmallEarth", 404, 220); + draw_bitmap("SmallEarth", 436, 220); + draw_bitmap("SmallEarth", 468, 220); + refresh_screen(); + delay(200); + + // O + draw_bitmap("SmallEarth", 530, 160); + draw_bitmap("SmallEarth", 622, 160); + draw_bitmap("SmallEarth", 540, 128); + draw_bitmap("SmallEarth", 560, 100); + draw_bitmap("SmallEarth", 592, 100); + draw_bitmap("SmallEarth", 612, 128); + draw_bitmap("SmallEarth", 540, 192); + draw_bitmap("SmallEarth", 560, 220); + draw_bitmap("SmallEarth", 592, 220); + draw_bitmap("SmallEarth", 612, 192); + refresh_screen(); + delay(500); + + // World + draw_bitmap("Earth", 100, 350); + refresh_screen(); + delay(2000); + + // SplashKit ("Me") + draw_bitmap("SplashKitBox", 450, 300); + draw_text("SplashKit!", COLOR_BLACK, "main", 50, 450, 530); + refresh_screen(); + delay(2000); + + close_all_windows(); + + return 0; +} \ No newline at end of file diff --git a/public/usage-examples/graphics/draw_bitmap_named/draw_bitmap_named-2-extended.py b/public/usage-examples/graphics/draw_bitmap_named/draw_bitmap_named-2-extended.py new file mode 100644 index 000000000..fb6a2eef5 --- /dev/null +++ b/public/usage-examples/graphics/draw_bitmap_named/draw_bitmap_named-2-extended.py @@ -0,0 +1,96 @@ +from splashkit import * + +# Download resources +download_sound_effect("Hello World", "https://programmers.guide/resources/code-examples/part-0/hello-world-snippet-saddle-club.ogg", 443) +download_font("main", "https://programmers.guide/resources/code-examples/part-0/Roboto-Italic.ttf", 443) +download_bitmap("Earth", "https://programmers.guide/resources/code-examples/part-0/earth.png", 443) +download_bitmap("SmallEarth", "https://programmers.guide/resources/code-examples/part-0/earth-small.png", 443) +download_bitmap("SplashKitBox", "https://programmers.guide/resources/code-examples/part-0/skbox.png", 443) + +open_window("Hello World: Using Resources with SplashKit", 800, 600) +play_sound_effect_named("Hello World") + +clear_screen(color_white()) +draw_text_font_as_string("Anyone remember the \"Hello World\" Saddle Club song?", color_black(), "main", 30, 40, 200) +refresh_screen() +delay(2500) + +clear_screen(color_white()) + +# H +draw_bitmap_named("SmallEarth", 20, 100) +draw_bitmap_named("SmallEarth", 20, 130) +draw_bitmap_named("SmallEarth", 20, 160) +draw_bitmap_named("SmallEarth", 20, 190) +draw_bitmap_named("SmallEarth", 20, 220) +draw_bitmap_named("SmallEarth", 52, 160) +draw_bitmap_named("SmallEarth", 84, 100) +draw_bitmap_named("SmallEarth", 84, 130) +draw_bitmap_named("SmallEarth", 84, 160) +draw_bitmap_named("SmallEarth", 84, 190) +draw_bitmap_named("SmallEarth", 84, 220) +refresh_screen() +delay(200) + +# E +draw_bitmap_named("SmallEarth", 148, 100) +draw_bitmap_named("SmallEarth", 148, 130) +draw_bitmap_named("SmallEarth", 148, 160) +draw_bitmap_named("SmallEarth", 148, 190) +draw_bitmap_named("SmallEarth", 148, 220) +draw_bitmap_named("SmallEarth", 180, 100) +draw_bitmap_named("SmallEarth", 212, 100) +draw_bitmap_named("SmallEarth", 180, 160) +draw_bitmap_named("SmallEarth", 180, 220) +draw_bitmap_named("SmallEarth", 212, 220) +refresh_screen() +delay(200) + +# L +draw_bitmap_named("SmallEarth", 276, 100) +draw_bitmap_named("SmallEarth", 276, 130) +draw_bitmap_named("SmallEarth", 276, 160) +draw_bitmap_named("SmallEarth", 276, 190) +draw_bitmap_named("SmallEarth", 276, 220) +draw_bitmap_named("SmallEarth", 308, 220) +draw_bitmap_named("SmallEarth", 340, 220) +refresh_screen() +delay(200) + +# L +draw_bitmap_named("SmallEarth", 404, 100) +draw_bitmap_named("SmallEarth", 404, 130) +draw_bitmap_named("SmallEarth", 404, 160) +draw_bitmap_named("SmallEarth", 404, 190) +draw_bitmap_named("SmallEarth", 404, 220) +draw_bitmap_named("SmallEarth", 436, 220) +draw_bitmap_named("SmallEarth", 468, 220) +refresh_screen() +delay(200) + +# O +draw_bitmap_named("SmallEarth", 530, 160) +draw_bitmap_named("SmallEarth", 622, 160) +draw_bitmap_named("SmallEarth", 540, 128) +draw_bitmap_named("SmallEarth", 560, 100) +draw_bitmap_named("SmallEarth", 592, 100) +draw_bitmap_named("SmallEarth", 612, 128) +draw_bitmap_named("SmallEarth", 540, 192) +draw_bitmap_named("SmallEarth", 560, 220) +draw_bitmap_named("SmallEarth", 592, 220) +draw_bitmap_named("SmallEarth", 612, 192) +refresh_screen() +delay(500) + +# World +draw_bitmap_named("Earth", 100, 350) +refresh_screen() +delay(2000) + +# SplashKit ("Me") +draw_bitmap_named("SplashKitBox", 450, 300) +draw_text_font_as_string("SplashKit!", color_black(), "main", 50, 450, 530) +refresh_screen() +delay(2000) + +close_all_windows() \ No newline at end of file diff --git a/public/usage-examples/graphics/draw_bitmap_named/draw_bitmap_named-2-extended.txt b/public/usage-examples/graphics/draw_bitmap_named/draw_bitmap_named-2-extended.txt new file mode 100644 index 000000000..9b952ce38 --- /dev/null +++ b/public/usage-examples/graphics/draw_bitmap_named/draw_bitmap_named-2-extended.txt @@ -0,0 +1,5 @@ +#### Hello World! This is SplashKit! + +The following code shows a fun example of using [Draw Bitmap](/api/graphics/#draw-bitmap-3) to create a fun animation/video. This example was created by someone that grew up as a "horse girl" and is reminded of the Saddle Club intro theme song (played in this example) every time she creates a new "hello world" program. + +*Originally created for the [programmers.guide](https://programmers.guide/) website.* \ No newline at end of file diff --git a/public/usage-examples/graphics/draw_bitmap_named/draw_bitmap_named-2-extended.webm b/public/usage-examples/graphics/draw_bitmap_named/draw_bitmap_named-2-extended.webm new file mode 100644 index 000000000..933420a84 Binary files /dev/null and b/public/usage-examples/graphics/draw_bitmap_named/draw_bitmap_named-2-extended.webm differ diff --git a/scripts/components.cjs b/scripts/components.cjs index 5c3c4c25c..853fba54a 100644 --- a/scripts/components.cjs +++ b/scripts/components.cjs @@ -440,10 +440,11 @@ fs.readFile(`${__dirname}/api.json`, "utf8", async (err, data) => { } - + // Replace spaces with hyphens in the name + const formattedName = name.replace(/\s+/g, '-'); // Write the MDX file - fs.writeFile(`./src/content/docs/api/${name}.mdx`, mdxContent, (err) => { + fs.writeFile(`./src/content/docs/api/${formattedName}.mdx`, mdxContent, (err) => { if (err) { console.log(kleur.red(`Error writing ${input} MDX file: ${err.message}`)); } else { diff --git a/scripts/generate-groups.cjs b/scripts/generate-groups.cjs index ee3ca7f40..ed3e0ccc2 100644 --- a/scripts/generate-groups.cjs +++ b/scripts/generate-groups.cjs @@ -5,16 +5,16 @@ const path = require('path'); // Import the path module to handle and transform // Define the path to the directory containing the guide groups const guidesDir = './src/content/docs/guides'; // Define the path where the output JSON file will be saved -const outputFile = './src/components/guides-groups.json'; +const guidesOutputJson = './scripts/guides-groups.json'; // Read the contents of the guides directory -const groupNames = fs.readdirSync(guidesDir, { withFileTypes: true }) +const guidesFolderNames = fs.readdirSync(guidesDir, { withFileTypes: true }) // Filter out only the directories from the list of files and directories .filter(dirent => dirent.isDirectory()) // Map the directory names to lowercase to standardise them .map(dirent => dirent.name); // Write the list of group names to the output JSON file -fs.writeFileSync(outputFile, JSON.stringify(groupNames, null, 2)); +fs.writeFileSync(guidesOutputJson, JSON.stringify(guidesFolderNames, null, 2)); // Log a message to the console indicating that the JSON file has been created -console.log(kleur.green("Available tutorial/guide category names have been written to " + outputFile + "\n")); \ No newline at end of file +console.log(kleur.green("Available tutorial/guide category names have been written to " + guidesOutputJson + "\n")); \ No newline at end of file diff --git a/src/components/guides-groups.json b/scripts/guides-groups.json similarity index 100% rename from src/components/guides-groups.json rename to scripts/guides-groups.json diff --git a/scripts/usage-example-page-generation.cjs b/scripts/usage-example-page-generation.cjs index d91391564..c43ac5644 100644 --- a/scripts/usage-example-page-generation.cjs +++ b/scripts/usage-example-page-generation.cjs @@ -434,21 +434,32 @@ categories.forEach((categoryKey) => { const imageFiles = categoryFiles.filter(file => file.endsWith(exampleKey + '.png')); let outputFilePath = categoryPath + "/" + functionKey + "/" + exampleTxtKey; - + // Check for .png files if (imageFiles.length > 0) { outputFilePath = outputFilePath.replaceAll(".txt", ".png"); + mdxContent += `![${exampleKey} example](${outputFilePath})\n` } else { - const gifFiles = categoryFiles.filter(file => file.endsWith('.gif')); + const gifFiles = categoryFiles.filter(file => file.endsWith('.gif')).filter(file => file.startsWith(exampleKey)); + // Check for .gif files if (gifFiles.length > 0) { outputFilePath = outputFilePath.replaceAll(".txt", ".gif"); + mdxContent += `![${exampleKey} example](${outputFilePath})\n` } else { - console.log(kleur.red("\nError: No image or gif files found for " + exampleKey + "usage example")); + const webmFiles = categoryFiles.filter(file => file.endsWith('.webm')); + // Check for .webm files + if (webmFiles.length > 0) { + outputFilePath = outputFilePath.replaceAll(".txt", ".webm"); + mdxContent += `\n` + } + else { + console.log(kleur.red("\nError: No image, gif or webm (audio) files found for " + exampleKey + "usage example")); + } } } - - mdxContent += `![${exampleKey} example](${outputFilePath})\n` mdxContent += "\n---\n"; }); } diff --git a/src/components/Guides.astro b/src/components/Guides.astro index 738f37b10..ae47c9da7 100644 --- a/src/components/Guides.astro +++ b/src/components/Guides.astro @@ -13,7 +13,7 @@ interface Frontmatter { } // Define paths -const jsonFilePath = path.resolve("./src/components/guides-groups.json"); +const jsonFilePath = path.resolve("./scripts/guides-groups.json"); // Define the type for the group names type GroupName = string; diff --git a/src/content/docs/index.mdx b/src/content/docs/index.mdx index 43955a24f..03e644ab2 100644 --- a/src/content/docs/index.mdx +++ b/src/content/docs/index.mdx @@ -70,7 +70,7 @@ bash <(curl -s https://raw.githubusercontent.com/splashkit/skm/master/install-sc diff --git a/src/content/docs/installation/Linux/index.mdx b/src/content/docs/installation/Linux/index.mdx index bd9adda59..61eb219f4 100644 --- a/src/content/docs/installation/Linux/index.mdx +++ b/src/content/docs/installation/Linux/index.mdx @@ -1,16 +1,16 @@ --- title: Linux Installation Overview -description: SKM on Linux +description: Installation guide for SplashKit on Linux. sidebar: label: Overview attrs: class: linux --- -To get SplashKit installed on Linux, follow the four steps: - import { LinkCard, CardGrid } from "@astrojs/starlight/components"; +To get SplashKit installed on Linux, follow the four steps: + + +1. **Open a Terminal** + + Locate your terminal in the applications menu, or use the keyboard shortcut (`Ctrl + Alt + T` on most Linux systems). + + ![Opening a terminal in Linux](/gifs/linux/open-terminal.gif) + +2. **Update Your System** + + Before installing new packages, it’s important to keep your system up-to-date to ensure the latest security and stability improvements. Run the following command based on your Linux distribution: + + + + + ```shell + sudo apt-get update && sudo apt-get upgrade + ``` + + + + + + + ```shell + sudo pacman -Syu + ``` + + + + + ```shell + yay -Syu + ``` + + + + + + + ```shell + sudo dnf update + ``` + + + + +3. **Install Required Command Line Tools** + + To proceed with SplashKit installation, you need to have **curl** and **git** installed. Use your package manager to install these tools: + + + + + ```shell + sudo apt-get install curl git + ``` + + + + + + + ```shell + sudo pacman -S curl git + ``` + + + + + ```shell + yay -S curl git + ``` + + + + + + + ```shell + sudo dnf install curl git + ``` + + + + +4. **Verify Installation (Optional)** + + To confirm the tools are successfully installed, run: + + ```shell + curl --version + git --version + ``` + + Both commands should output version information if the installation was successful. + + + +You’re now ready to continue with the SplashKit installation. Proceed to **Step 2** to complete your setup. diff --git a/src/content/docs/installation/Linux/step-2.md b/src/content/docs/installation/Linux/step-2.md deleted file mode 100644 index 7feaa2cef..000000000 --- a/src/content/docs/installation/Linux/step-2.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: Install SplashKit -sidebar: - label: 2. SplashKit -# attrs: -# class: linux ---- - -Once you have installed the [Command Line Tools](/installation/linux/step-1/) you can install SplashKit and build the SplashKit library from its source. - -## Steps - -1. Open up a terminal. - - ![Opening a terminal](/gifs/linux/open-terminal.gif) - -2. Install the SplashKit Manager by copy/pasting the command below into your terminal and press enter. - - ```shell - bash <(curl -s https://raw.githubusercontent.com/splashkit/skm/master/install-scripts/skm-install.sh) - ``` - -3. Restart the terminal and execute `skm` to test it was successfully installed. - - ```shell - skm - ``` - - You should see the following messages: - - ```shell - SplashKit is installed successfully! - Missing skm command. For help use 'skm help' - ``` - -4. Run the following command to install the necessary dependencies and compile splashkit. - - ```shell - skm linux install - ``` - -5. Run the following command to install splashkit globally. - - ```shell - skm global install - ``` diff --git a/src/content/docs/installation/Linux/step-2.mdx b/src/content/docs/installation/Linux/step-2.mdx new file mode 100644 index 000000000..59211b0b2 --- /dev/null +++ b/src/content/docs/installation/Linux/step-2.mdx @@ -0,0 +1,163 @@ +--- +title: Install SplashKit +description: Install SplashKit on Linux. +sidebar: + label: 2. SplashKit +--- + +import { Tabs, TabItem } from "@astrojs/starlight/components"; +import { Steps } from '@astrojs/starlight/components'; + +[SplashKit](https://splashkit.io) is a beginner’s all-purpose software toolkit that will allow you to create fun and exciting programs more easily, especially for Graphical User Interface (GUI) programs. + +Follow these steps to set up SplashKit on Linux and start building interactive, visually engaging applications quickly and easily! + +## Installation Steps + + + +1. **Open the Terminal** + + ![Opening a terminal](/gifs/linux/open-terminal.gif) + +2. **Install the SplashKit Manager** + + Copy and paste the following command into your terminal, then press **Enter**: + + ```shell + bash <(curl -s https://raw.githubusercontent.com/splashkit/skm/master/install-scripts/skm-install.sh) + ``` + +3. **Restart the Terminal and Test the Installation** + + After restarting the terminal, run the following command to confirm the installation: + + ```shell + skm + ``` + + You should see messages similar to: + + ```shell + SplashKit is installed successfully! + Missing skm command. For help use 'skm help' + ``` + +4. **Install Dependencies and Compile SplashKit** + + Use the following command to install the necessary dependencies and compile SplashKit: + + ```shell + skm linux install + ``` + + If you encounter dependency issues, you can install the dependencies manually using the commands below for your Linux distribution: + + + + + ```shell + sudo apt-get install cmake libpng-dev libcurl4-openssl-dev libsdl2-dev libsdl2-mixer-dev libsdl2-gfx-dev libsdl2-image-dev libsdl2-net-dev libsdl2-ttf-dev libmikmod-dev libncurses5-dev libbz2-dev libflac-dev libvorbis-dev libwebp-dev libfreetype6-dev build-essential clang + ``` + + + + + + + ```shell + sudo pacman -S cmake libpng sdl2 sdl2_ttf sdl2_image sdl2_net sdl2_mixer sdl2_gfx clang freetype2 ncurses bzip2 flac libvorbis libmikmod libwebp + ``` + + + + + ```shell + yay -S cmake libpng sdl2 sdl2_ttf sdl2_image sdl2_net sdl2_mixer sdl2_gfx clang freetype2 ncurses bzip2 flac libvorbis libmikmod libwebp + ``` + + + + + + + ```shell + sudo dnf install cmake libpng SDL2 SDL2_ttf SDL2_image SDL2_net SDL2_mixer SDL2_gfx clang freetype ncurses bzip2 flac libvorbis libmikmod libwebp + ``` + + + + +5. **Add SplashKit to Your Path** + + If you encounter issues with the `skm` command, manually add SplashKit to your PATH: + +
+ Update your `bash` or `zsh` profile manually: + + + + 1. Update Path in `~/.bashrc` or `~/.zshrc` + + + + Open your `~/.bashrc` file: + + ```shell + nano ~/.bashrc + ``` + + Add the following lines near the end: + + ```shell + export PATH="$PATH:$HOME/.splashkit:$PATH" + ``` + + Update your profile: + + ```shell + source ~/.bashrc + ``` + + + + Open your `~/.zshrc` file: + + ```shell + nano ~/.zshrc + ``` + + Add the following lines near the end: + + ```shell + export PATH="$PATH:$HOME/.splashkit:$PATH" + ``` + + Update your profile: + + ```shell + source ~/.zshrc + ``` + + + + + 2. Update the System Library Path + + Run the following command to add `/usr/local/lib` to the system’s library path, ensuring they are available to your applications: + + ```shell + sudo ldconfig /usr/local/lib + ``` + + +
+ +6. **Install SplashKit Globally** + Run the following command to install SplashKit globally: + + ```shell + skm global install + ``` + +
diff --git a/src/content/docs/installation/Linux/step-3.md b/src/content/docs/installation/Linux/step-3.md deleted file mode 100644 index bd30f5da4..000000000 --- a/src/content/docs/installation/Linux/step-3.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: Install Visual Studio Code -sidebar: - label: 3. Visual Studio Code -# attrs: -# class: linux ---- - -Once you have the [built splashkit](/installation/linux/step-3/) you -can download and install Visual Studio Code to use as a source code editor. - -## Steps - -1. Download [Visual Studio Code](https://code.visualstudio.com/) - - ![Downloading Visual Studio Code for Ubuntu](/gifs/linux/download-vsc.gif) - -2. Open up a terminal. - - ![Opening a terminal in Ubuntu](/gifs/linux/open-terminal.gif) - -3. Install Visual Studio Code - - In the terminal window, change directory using the ```cd``` command to the - directory where Visual Studio Code downloaded - - ```shell - cd ~/Downloads - ``` - - Then, install the .deb package by copying and pasting the code below into - your terminal and pressing enter. - - ```shell - sudo dpkg -i code_1.*.deb - ``` - - ![Installing Visual Studio Code on Ubuntu](/gifs/linux/install-vsc.gif) - -4. In Visual Studio Code you should install the following extensions: - - For C#: - - - [C#](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp) - - [C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit) - - [Intellicode for C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.vscodeintellicode-csharp) - - You can do this from the command line by executing: - - ```shell - code --install-extension ms-dotnettools.csharp - code --install-extension ms-dotnettools.csdevkit - code --install-extension ms-dotnettools.vscodeintellicode-csharp - ``` - - For C++: - - - [C++ Extension Pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools-extension-pack) - - You can do this from the command line by executing: - - ```shell - code --install-extension ms-vscode.cpptools-extension-pack - ``` diff --git a/src/content/docs/installation/Linux/step-3.mdx b/src/content/docs/installation/Linux/step-3.mdx new file mode 100644 index 000000000..9bd647e5d --- /dev/null +++ b/src/content/docs/installation/Linux/step-3.mdx @@ -0,0 +1,205 @@ +--- +title: Install Visual Studio Code +description: Download and install Visual Studio Code to use as a source code editor, and install the necessary extensions for C# and C++. +sidebar: + label: 3. Visual Studio Code +--- + +import { Tabs, TabItem } from "@astrojs/starlight/components"; +import { LinkButton } from '@astrojs/starlight/components'; +import { Steps } from '@astrojs/starlight/components'; + +[Visual Studio Code](https://code.visualstudio.com/) is a versatile, user-friendly source code editor that supports extensions for multiple languages, including C#, C++ and python. Follow these steps to install Visual Studio Code on Linux and set up the necessary extensions. + +### Installation Instructions for Ubuntu/Debian + + + +1. **Download Visual Studio Code** + + Visit the [Visual Studio Code download page](https://code.visualstudio.com/) and select the `.deb` package for Ubuntu/Debian systems. This will download the installer to your default `Downloads` folder. + + ![Downloading Visual Studio Code for Ubuntu](/gifs/linux/download-vsc.gif) + +2. **Open a Terminal** + + Open a terminal on your system: + + - Use the application menu to find "Terminal." + - Or press `Ctrl + Alt + T` as a shortcut on most Ubuntu systems. + +3. **Navigate to the Download Location** + + By default, downloaded files are saved in the `~/Downloads` directory. Navigate there using: + + ```shell + cd ~/Downloads + ``` + + Then run the following command to install Visual Studio Code: + + ```shell + sudo dpkg -i code_1.*.deb + ``` + + ![Installing Visual Studio Code on Ubuntu](/gifs/linux/install-vsc.gif) + + + +### Installation Instructions for Fedora + + + +1. **Add the Repository** + + Open a terminal and add the Visual Studio Code repository and GPG key using the following commands: + + ```shell + sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc + echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" | sudo tee /etc/yum.repos.d/vscode.repo > /dev/null + ``` + +2. **Update the Package Cache** + + Update the package cache to ensure your system recognizes the new repository: + + ```shell + dnf check-update + ``` + +3. **Install Visual Studio Code** + + For Fedora 22 and newer, install Visual Studio Code using: + + ```shell + sudo dnf install code + ``` + + For older systems, use: + + ```shell + sudo yum install code + ``` + + + +### Installation Instructions for Arch Linux + +For Arch Linux, you have two primary installation options: + + + +1. **Install the Proprietary Visual Studio Code Binary from the AUR (preferred option)** + + This version includes Microsoft branding and telemetry, it's maintained by the Arch User Repository (AUR). Install it with: + + ```shell + yay -S visual-studio-code-bin + ``` + + *Note:* If `yay` is not installed, you can use another AUR helper (such as `paru`) or follow the [AUR manual installation instructions](https://wiki.archlinux.org/title/Arch_User_Repository#Installing_and_upgrading_packages). + +2. **Install the Official Open-Source Version (Code - OSS)** + + The open-source version of Visual Studio Code is available directly from the Arch community repositories. Install it using: + + ```shell + sudo pacman -S code + ``` + + + +--- + +## Installing Extensions for Development + +After setting up Visual Studio Code, enhance your development environment by adding essential extensions for C#, C++, and Python. These extensions provide robust tools for coding, debugging, and code intelligence, making your setup complete for SplashKit projects. + +:::note +If you are using code OSS you won't be able to install extensions via the command line. You will need to install them directly from the Visual Studio Marketplace. +::: + +--- + +### C# Extensions + +#### Method 1: Via the Extensions Website + +Install the following C# extensions directly from the Visual Studio Marketplace: + +C# +C# Dev Kit +Intellicode for C# Dev Kit + +#### Method 2: Via the Command Line + +You can also install these C# extensions directly from the terminal by running: + +```shell +code --install-extension ms-dotnettools.csharp +code --install-extension ms-dotnettools.csdevkit +code --install-extension ms-dotnettools.vscodeintellicode-csharp +``` + +#### Method 3: Within Visual Studio Code + +To add these extensions within Visual Studio Code: + +1. Open the Extensions view by pressing `Ctrl+Shift+X`. +2. Search for "C# Microsoft" and the top 3 extensions listed above should appear. Click **Install** for each. If they don't then search for them individually. + +![Adding C# extensions in Visual Studio Code](/images/installation/csharp-in-vscode.png) + +--- + +### C++ Extensions + +#### Method 1: Via the Extensions Website + +Install the C++ Extension Pack for comprehensive C++ support: + +C++ Extension Pack + +#### Method 2: Via the Command Line + +To install the C++ Extension Pack directly from the terminal: + +```shell +code --install-extension ms-vscode.cpptools-extension-pack +``` + +#### Method 3: Within Visual Studio Code + +To add the C++ extension within Visual Studio Code: + +1. Open the Extensions view (`Ctrl+Shift+X`). +2. Search for "C++ Extension Pack" and click **Install**. + +![Adding C++ extensions in Visual Studio Code](/images/installation/cplus-in-vscode.png) + +--- + +### Python Extensions + +#### Method 1: Via the Extensions Website + +For Python support, install the Python Extension Pack from the Visual Studio Marketplace: + +Python Extension Pack + +#### Method 2: Via the Command Line + +To install the Python Extension Pack directly from the terminal: + +```shell +code --install-extension donjayamanne.python-extension-pack +``` + +#### Method 3: Within Visual Studio Code + +To install the Python extensions within Visual Studio Code: + +1. Open the Extensions view (`Ctrl+Shift+X`). +2. Search for "Python Extension Pack" and click **Install**. + +![Adding Python extensions in Visual Studio Code](/images/installation/python-in-vscode.png) diff --git a/src/content/docs/installation/Linux/step-4.md b/src/content/docs/installation/Linux/step-4.md deleted file mode 100644 index 9e1fe69aa..000000000 --- a/src/content/docs/installation/Linux/step-4.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: Install Language Specific Tools -sidebar: - label: 4. Language Tools - # attrs: - # class: linux ---- - -SplashKit works with a number of programming languages. -Each of these has its own set of tools you will need to install. - -* For C#, install the [.NET Core](/installation/linux/languages/dotnet/) SDK. -* For C++, you (should) _already_ be ready to go. - -Guides for other supported languages like Python and Pascal are coming soon. - -## What's next? - -Congratulations! If you've followed these steps correctly, then you will have -installed all the tools needed to start programming with SplashKit! - -It's time to get programming... diff --git a/src/content/docs/installation/Linux/step-4.mdx b/src/content/docs/installation/Linux/step-4.mdx new file mode 100644 index 000000000..63c62f6be --- /dev/null +++ b/src/content/docs/installation/Linux/step-4.mdx @@ -0,0 +1,173 @@ +--- +title: Install Language Specific Tools +description: Install the language specific tools for SplashKit on Linux. +sidebar: + label: 4. Language Tools +--- + +import { Tabs, TabItem } from "@astrojs/starlight/components"; +import { Steps } from '@astrojs/starlight/components'; +import { LinkButton } from '@astrojs/starlight/components'; + +SplashKit supports multiple programming languages, each with its own set of tools. Follow the instructions below to install the required tools for your language of choice. + +## Language-Specific Installations + +### C# (.NET) + +To develop with C# in SplashKit, you’ll need to install .NET. Installation methods vary by Linux distribution: + +.NET Download Page +Ubuntu Page +Debian Page +Fedora Page + +
+Arch Steps + To install .NET SDK on Arch: + + ```shell + yay -S dotnet-sdk + ``` + + To install only the .NET runtime (for running .NET apps without development tools): + + ```shell + yay -S dotnet-runtime + ``` + +
+ +If the .NET installer does not automatically update your shell profile, you can manually add it: + +
+Update your `bash` or `zsh` profile manually: + + +Open your `~/.bashrc` file: + +```shell +nano ~/.bashrc +``` + +Add the following lines near the end: + +```shell +export DOTNET_ROOT=$HOME/.dotnet +export PATH=$PATH:$HOME/.dotnet +``` + +Apply the changes: + +```shell +source ~/.bashrc +``` + + + +Open your `.zshrc` file: + +```shell +nano ~/.zshrc +``` + +Add the following lines near the end: + +```shell +export DOTNET_ROOT=$HOME/.dotnet +export PATH=$PATH:$HOME/.dotnet +``` + +Apply the changes: + +```shell +source ~/.zshrc +``` + + + +
+ +--- + +### C++ + +For C++, you should already have the necessary tools if you have a standard Linux development environment. No additional setup is required specifically for SplashKit. + +--- + +### Python + +Most Linux distributions include Python pre-installed. If Python isn’t installed, or if you need additional Python tools, follow the steps below. + + + +1. **Installing Python** + + Install Python 3 and `pip` (Python package installer) using the following commands based on your Linux distribution: + + + + + ```shell + sudo apt install python3 python3-pip + ``` + + + + + + + + ```shell + sudo pacman -S python python-pip + ``` + + + + + ```shell + yay -S python python-pip + ``` + + + + + + + + ```shell + sudo dnf install python3 python3-pip + ``` + + + + + --- + +2. **Verify Installation (Optional)** + + To confirm that Python and `pip` are successfully installed, check the versions: + + ```shell + python3 --version + pip3 --version + ``` + + Both commands should output version information if the installation was successful. + + + +--- + +### Other Languages + +Support for other languages such as Rust and Pascal are coming soon. + +--- + +## Next Steps + +Congratulations! You've completed the setup of language-specific tools for SplashKit. You're now ready to start developing. + +**Ready to start coding?** diff --git a/src/content/docs/installation/MacOS/index.mdx b/src/content/docs/installation/MacOS/index.mdx index 4b8d6c3d7..e197ba28d 100644 --- a/src/content/docs/installation/MacOS/index.mdx +++ b/src/content/docs/installation/MacOS/index.mdx @@ -1,15 +1,16 @@ --- title: MacOS Installation Overview +description: Installation guide for SplashKit on MacOS. sidebar: label: Overview attrs: class: apple --- -To get SplashKit installed on macOS, follow the four steps: - import { LinkCard, CardGrid } from "@astrojs/starlight/components"; +To get SplashKit installed on macOS, follow the four steps: + -## Steps - -1. Firstly, we need to install the [Homebrew Package Manager](https://brew.sh). - Copy and paste the command given on the website into your terminal. - - ![Installing Homebrew](/gifs/macos/install-brew.gif) - - You will need to enter in your password into the terminal to install - Homebrew. Whilst you may type into the keyboard, no password characters - will appear for security reasons. - -1. Now use `brew` from your terminal to to install the .NET Core SDK: - - ```shell - brew install dotnet-sdk --cask - ``` - - You will also need to link the `dotnet` command into `/usr/local/bin`: - - ```shell - ln -s /usr/local/share/dotnet/dotnet /usr/local/bin - ``` - -1. To test if the .NET Core was installed successfully, see if the `dotnet` command exists. - - ```shell - dotnet - ``` - - If you're seeing `command not found`, you may you can execute the following command - to fix it: - - ```shell - ln -s /usr/local/share/dotnet/dotnet /usr/local/bin - ``` - - ![Known issues with dotnet install](/gifs/macos/dotnet-known-issues.gif) - - Should you have any other installation issues, review the .NET core [release notes](https://github.com/dotnet/core/tree/master/release-notes) - or raise an issue on [GitHub](https://github.com/splashkit/splashkit-macos/issues). - -1. In Visual Studio Code you should install the following extensions: - - [C#](https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp) - - [C# XML Documentation Comments](https://marketplace.visualstudio.com/items?itemName=k--kato.docomment) - - [vscode-icons](https://marketplace.visualstudio.com/items?itemName=vscode-icons-team.vscode-icons) - - You can do this from the command line by executing: - - ```shell - code --install-extension ms-vscode.csharp - code --install-extension k--kato.docomment - code --install-extension vscode-icons - ``` - - You can also search for them by opening up the extensions panel. - You can use the ⌘+x to open the panel. Then search for the name - and click install: - - ![Installing VSCode C# Extensions](/gifs/macos/extensions.gif) diff --git a/src/content/docs/installation/MacOS/step-1.md b/src/content/docs/installation/MacOS/step-1.md deleted file mode 100644 index 5dc72f5ab..000000000 --- a/src/content/docs/installation/MacOS/step-1.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: Install Xcode Command Line Tools -sidebar: - label: 1. Command Line Tools - # attrs: - # class: apple ---- - -The Command Line Tools provided by Xcode provide a large amount of developer -tools required to compile and develop applications. - -## Steps - -1. Open the _Terminal_ application. - - :::tip[How do I find the Terminal on my Mac?] - - 1. Press _**Command**_ (⌘) + _**Space bar**_ to open the Spotlight Search. - 2. Start typing "Terminal". - 3. Click the **Terminal** app. - - ::: - -2. Copy the command below and paste it into your terminal and press enter. - - ```shell - xcode-select --install - ``` - - ![Gif showing Spotlight Search to open Terminal and pasting Xcode install command](/gifs/macos/terminal-xcode-install.gif) - - **Note:** After running the command above, if you get something like this: - - ![A Terminal window showing message that 'Command Line Tools' are already installed](/images/installation/macos/xcode-install.png) - - That means you've already installed Xcode, and are ready to move to the next step! diff --git a/src/content/docs/installation/MacOS/step-1.mdx b/src/content/docs/installation/MacOS/step-1.mdx new file mode 100644 index 000000000..0297ee1d2 --- /dev/null +++ b/src/content/docs/installation/MacOS/step-1.mdx @@ -0,0 +1,43 @@ +--- +title: Install Xcode Command Line Tools +description: Install the Xcode Command Line Tools on MacOS. +sidebar: + label: 1. Command Line Tools +--- + +import { Steps } from '@astrojs/starlight/components'; + +SplashKit requires a few command line tools to be installed on your system before you can proceed with the installation. Follow the steps below to install these tools, then continue with the SplashKit installation. + +## Installation Steps + + + +1. **Open the Terminal Application** + Locate the Terminal using Spotlight Search: + + :::tip[How to Open Terminal on macOS] + 1. Press **Command** (⌘) + **Space bar** to open Spotlight Search. + 2. Begin typing "Terminal." + 3. Select the **Terminal** app from the search results. + ::: + +2. **Install Xcode Command Line Tools** + In the Terminal, copy and paste the following command, then press **Enter**: + + ```shell + xcode-select --install + ``` + + ![Gif showing Spotlight Search to open Terminal and pasting Xcode install command](/gifs/macos/terminal-xcode-install.gif) + +3. **Follow the On-Screen Prompts** + A pop-up window will appear, prompting you to install the Command Line Tools. Follow the instructions to complete the installation. + + **Note:** If you see a message indicating that "Command Line Tools" are already installed, you can proceed to the next step without reinstalling. + + ![A Terminal window showing message that 'Command Line Tools' are already installed](/images/installation/macos/xcode-install.png) + + + +You’re now ready to continue with the SplashKit installation. Proceed to **Step 2** to complete your setup. diff --git a/src/content/docs/installation/MacOS/step-2.md b/src/content/docs/installation/MacOS/step-2.md deleted file mode 100644 index 619e4ec75..000000000 --- a/src/content/docs/installation/MacOS/step-2.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: Install SplashKit -sidebar: - label: 2. SplashKit -# attrs: -# class: apple ---- - -[SplashKit](https://splashkit.io) is a beginner's all-purpose software toolkit that will allow you to create fun and exciting programs more easily, especially for Graphical User Interface (GUI) programs. - -## Steps - -1. Copy the following code and paste and run it within the Terminal. - - ```shell - bash <(curl -s https://raw.githubusercontent.com/splashkit/skm/master/install-scripts/skm-install.sh) - ``` - - This is the code from the [SplashKit Homepage](http://splashkit.io). - - ![Gif showing skm installing in Terminal](/gifs/macos/skm-install.gif) - -2. Restart the terminal and execute `skm` to test it was successfully installed. - - ```shell - skm - ``` - - You should see the following messages: - - ```shell - SplashKit is installed successfully! - Missing skm command. For help use 'skm help' - ``` - - SplashKit supports a number of languages. Run `skm help` at the terminal to see the different commands you can run. - -3. *(Optional if on latest macOS version)* - Run the following command to install the necessary dependencies and compile splashkit. - - ```shell - skm macos install - ``` - -4. Run the following command to install splashkit globally: - - ```shell - skm global install - ``` - - ![Gif showing skm installing globally in Terminal](/gifs/macos/skm-global-install.gif) diff --git a/src/content/docs/installation/MacOS/step-2.mdx b/src/content/docs/installation/MacOS/step-2.mdx new file mode 100644 index 000000000..ba0d062bc --- /dev/null +++ b/src/content/docs/installation/MacOS/step-2.mdx @@ -0,0 +1,66 @@ +--- +title: Install SplashKit +description: Install SplashKit on MacOS. +sidebar: + label: 2. SplashKit +--- + +import { Steps } from '@astrojs/starlight/components'; + +[SplashKit](https://splashkit.io) is a beginner’s all-purpose software toolkit that will allow you to create fun and exciting programs more easily, especially for Graphical User Interface (GUI) programs. + +Follow these steps to set up SplashKit on macOS and begin building interactive, visually appealing applications! + +## Installation Steps + + + +1. **Run the SplashKit Installer** + + Open your Terminal and paste the following command to download and install SplashKit: + + ```shell + bash <(curl -s https://raw.githubusercontent.com/splashkit/skm/master/install-scripts/skm-install.sh) + ``` + + This command downloads the installer directly from the [SplashKit homepage](https://splashkit.io). + + ![Gif showing skm installing in Terminal](/gifs/macos/skm-install.gif) + +2. **Verify the Installation** + + Restart your Terminal to ensure the new installation path is recognized. Then, enter the following command to check if SplashKit Manager (`skm`) is installed: + + ```shell + skm + ``` + + You should see a message confirming the installation: + + ```shell + SplashKit is installed successfully! + Missing skm command. For help, use 'skm help' + ``` + + *Tip:* Use `skm help` to explore additional commands for managing SplashKit. + +3. **Install Dependencies and Compile SplashKit** + + *(Optional for users on the latest macOS version)* + To install any necessary dependencies and compile SplashKit, use: + + ```shell + skm macos install + ``` + +4. **Install SplashKit Globally** + + For easier access, install SplashKit globally by running: + + ```shell + skm global install + ``` + + ![Gif showing skm installing globally in Terminal](/gifs/macos/skm-global-install.gif) + + diff --git a/src/content/docs/installation/MacOS/step-3.md b/src/content/docs/installation/MacOS/step-3.md deleted file mode 100644 index dbc81479d..000000000 --- a/src/content/docs/installation/MacOS/step-3.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: Install Visual Studio Code -sidebar: - label: 3. Visual Studio Code - # attrs: - # class: apple ---- - -Visual Studio Code, also commonly known as *VS Code* or just *Code*, is a powerful and versatile code editor that enables efficient coding, debugging, and collaboration for your SplashKit projects! - -## Steps - -1. Download `Visual Studio Code`, found at [code.visualstudio.com](https://code.visualstudio.com). - -2. Install Visual Studio Code. - - ![Gif showing Visual Studio installation in Finder](/gifs/macos/vs-code-install.gif) - -3. In Visual Studio Code you should install the following extensions: - - For C#: - - - [C#](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp) - - [C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit) - - [Intellicode for C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.vscodeintellicode-csharp) - - You can do this from the command line by executing: - - ```shell - code --install-extension ms-dotnettools.csharp - code --install-extension ms-dotnettools.csdevkit - code --install-extension ms-dotnettools.vscodeintellicode-csharp - ``` - - For C++: - - - [C++ Extension Pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools-extension-pack) - - You can do this from the command line by executing: - - ```shell - code --install-extension ms-vscode.cpptools-extension-pack - ``` diff --git a/src/content/docs/installation/MacOS/step-3.mdx b/src/content/docs/installation/MacOS/step-3.mdx new file mode 100644 index 000000000..73ad63eb1 --- /dev/null +++ b/src/content/docs/installation/MacOS/step-3.mdx @@ -0,0 +1,101 @@ +--- +title: Install Visual Studio Code +description: Download and install Visual Studio Code to use as a source code editor, and install the necessary extensions for C# and C++. +sidebar: + label: 3. Visual Studio Code +--- + +import { LinkButton } from '@astrojs/starlight/components'; + +[Visual Studio Code](https://code.visualstudio.com/) is a versatile, user-friendly source code editor that supports extensions for multiple languages, including C#, C++ and python. Follow these steps to install Visual Studio Code on Mac OS and set up the necessary extensions. + +## Install Visual Studio Code + +1. Download `Visual Studio Code`, found at [code.visualstudio.com](https://code.visualstudio.com). + +2. Install Visual Studio Code. + + ![Gif showing Visual Studio installation in Finder](/gifs/macos/vs-code-install.gif) + +## Installing Extensions for Development + +After setting up Visual Studio Code, enhance your development environment by adding essential extensions for C#, C++, and Python. These extensions provide robust tools for coding, debugging, and code intelligence, making your setup complete for SplashKit projects. + +### C# Extensions + +#### Method 1: Via the Extensions Website + +Install the following C# extensions directly from the Visual Studio Marketplace: + +C# +C# Dev Kit +Intellicode for C# Dev Kit + +#### Method 2: Via the Command Line + +You can also install these C# extensions directly from the terminal by running: + +```shell +code --install-extension ms-dotnettools.csharp +code --install-extension ms-dotnettools.csdevkit +code --install-extension ms-dotnettools.vscodeintellicode-csharp +``` + +#### Method 3: Within Visual Studio Code + +To add these extensions within Visual Studio Code: + +1. Open the Extensions view by pressing `Ctrl+Shift+X`. +2. Search for "C# Microsoft" and the top 3 extensions listed above should appear. Click **Install** for each. If they don't then search for them individually. + +![Adding C# extensions in Visual Studio Code](/images/installation/csharp-in-vscode.png) + +### C++ Extensions + +#### Method 1: Via the Extensions Website + +Install the C++ Extension Pack for comprehensive C++ support: + +C++ Extension Pack + +#### Method 2: Via the Command Line + +To install the C++ Extension Pack directly from the terminal: + +```shell +code --install-extension ms-vscode.cpptools-extension-pack +``` + +#### Method 3: Within Visual Studio Code + +To add the C++ extension within Visual Studio Code: + +1. Open the Extensions view (`Ctrl+Shift+X`). +2. Search for "C++ Extension Pack" and click **Install**. + +![Adding C++ extensions in Visual Studio Code](/images/installation/cplus-in-vscode.png) + +### Python Extensions + +#### Method 1: Via the Extensions Website + +For Python support, install the Python Extension Pack from the Visual Studio Marketplace: + +Python Extension Pack + +#### Method 2: Via the Command Line + +To install the Python Extension Pack directly from the terminal: + +```shell +code --install-extension donjayamanne.python-extension-pack +``` + +#### Method 3: Within Visual Studio Code + +To install the Python extensions within Visual Studio Code: + +1. Open the Extensions view (`Ctrl+Shift+X`). +2. Search for "Python Extension Pack" and click **Install**. + +![Adding Python extensions in Visual Studio Code](/images/installation/python-in-vscode.png) diff --git a/src/content/docs/installation/MacOS/step-4.md b/src/content/docs/installation/MacOS/step-4.md deleted file mode 100644 index 8a6f0f491..000000000 --- a/src/content/docs/installation/MacOS/step-4.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: Install Language Specific Tools -sidebar: - label: 4. Language Tools - # attrs: - # class: apple ---- - -SplashKit works with a number of programming languages. -Each of these has its own set of tools you will need to install. - -* For C#, install the [.NET Core](/installation/macos/languages/dotnet/) SDK. -* For C++, you're _already_ ready to go. - -Guides for other supported languages like Python and Pascal are coming soon. - -## What's next? - -Congratulations! If you've followed these steps correctly, then you will have -installed all the tools needed to start programming with SplashKit! - -It's time to get programming... diff --git a/src/content/docs/installation/MacOS/step-4.mdx b/src/content/docs/installation/MacOS/step-4.mdx new file mode 100644 index 000000000..76d7a32e5 --- /dev/null +++ b/src/content/docs/installation/MacOS/step-4.mdx @@ -0,0 +1,88 @@ +--- +title: Install Language Specific Tools +description: Install the language specific tools for SplashKit on MacOS. +sidebar: + label: 4. Language Tools +--- + +import { LinkButton } from '@astrojs/starlight/components'; +import { Steps } from '@astrojs/starlight/components'; + +SplashKit supports multiple programming languages, each with its own set of tools. Follow the instructions below to install the required tools for your chosen language. + +## Language-Specific Installations + +### C# (.NET) + +To develop with C# in SplashKit, you’ll need to install the .NET SDK. + + + +1. **Download the .NET SDK** + + Go to the [official .NET download page](https://dotnet.microsoft.com/download) and download the latest version of the .NET SDK for macOS. + +2. **Install the .NET SDK** + + Run the downloaded installer and follow the on-screen instructions to complete the installation. + +3. **Verify the Installation** + + Restart your terminal to ensure the SDK is recognized, then run the following command to confirm the installation: + + ```shell + dotnet --version + ``` + + If installed correctly, this command will output the version number of the .NET SDK. + + + +### For C++ + +For C++, you (should) _already_ be ready to go. + +### Python + +To develop with Python in SplashKit, you’ll need Python 3 installed. You can easily install Python 3 using Homebrew. + + + +1. **Install Homebrew** (if not already installed) + + Open your terminal and enter the following command to install Homebrew: + + ```shell + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + ``` + +2. **Install Python 3** + + Use Homebrew to install Python 3: + + ```shell + brew install python + ``` + +3. **Verify Installation (Optional)** + + Check that Python 3 and `pip3` (Python’s package installer) are correctly installed by running: + + ```shell + python3 --version + pip3 --version + ``` + + Both commands should output version information if the installation was successful. + + + +### Other Languages + +Support for other languages such as Rust and Pascal are coming soon. + +## Next Steps + +Congratulations! You've completed the setup of language-specific tools for SplashKit. You're now ready to start developing. + +**Ready to start coding?** diff --git a/src/content/docs/installation/Virtual Machine/index.md b/src/content/docs/installation/Virtual Machine/index.md index 8411e8c84..49e7e740d 100644 --- a/src/content/docs/installation/Virtual Machine/index.md +++ b/src/content/docs/installation/Virtual Machine/index.md @@ -1,5 +1,8 @@ --- title: Virtual Machine Installation Guide +description: Installation guide for SplashKit using the provided virtual machine. +sidebar: + label: Overview --- If you cannot get SplashKit working natively, you can download and use the provided SplashKit Virtual Machine. The provided virtual maching comes with everything you need to get started quickly with SplashKit. diff --git a/src/content/docs/installation/Windows (MSYS2)/index.mdx b/src/content/docs/installation/Windows (MSYS2)/index.mdx index aa095ff70..14d0f660c 100644 --- a/src/content/docs/installation/Windows (MSYS2)/index.mdx +++ b/src/content/docs/installation/Windows (MSYS2)/index.mdx @@ -1,35 +1,36 @@ --- title: Windows (MSYS2) Installation Overview +description: Installation guide for SplashKit on Windows using MSYS2. sidebar: label: Overview attrs: class: windows --- -To get SplashKit installed on Windows, follow the four steps: - import { LinkCard, CardGrid } from "@astrojs/starlight/components"; +To get SplashKit installed on Windows, follow the four steps: + diff --git a/src/content/docs/installation/Windows (MSYS2)/languages/dotnet.md b/src/content/docs/installation/Windows (MSYS2)/languages/dotnet.md deleted file mode 100644 index 4ca2916ae..000000000 --- a/src/content/docs/installation/Windows (MSYS2)/languages/dotnet.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: Installing the .NET Core SDK on Windows -sidebar: - hidden: true - attrs: - class: windows - ---- - -For coding in C#, you will need to install the `.NET` SDK which will allow you to use the *dotnet* terminal command to create, build, and run your C# project code. - -## Steps - -1. Download the latest version of the .NET SDK for Windows from the official .NET website: [dotnet.microsoft.com/download](https://dotnet.microsoft.com/download) - -2. Run the downloaded installer and follow on-screen instructions. - -3. Restart your terminal, and run the following command to check it is installed: - - ```shell - dotnet --version - ``` diff --git a/src/content/docs/installation/Windows (MSYS2)/languages/gcc-not-in-use.md b/src/content/docs/installation/Windows (MSYS2)/languages/gcc-not-in-use.md deleted file mode 100644 index b120834e6..000000000 --- a/src/content/docs/installation/Windows (MSYS2)/languages/gcc-not-in-use.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: Installing GCC on Windows -sidebar: - hidden: true - attrs: - class: windows ---- -GCC is essential for Windows users because it provides a powerful and reliable compiler for programming languages like C, C++, and more. - -## Steps - -1. Open an MSYS2 terminal -1. Run the following command: - - ```shell - pacman --disable-download-timeout -S mingw-w64-{x86_64,i686}-gcc mingw-w64-{i686,x86_64}-gdb - ``` - - ![install-gpp-msys](/gifs/windows/install-gpp-msys.gif) - -1. Run the compiler from either the **MSYS2 MinGW 64-bit** or **MSYS2 MinGW 32-bit** terminals - - ![demo-compiler](/gifs/windows/demo-compiler.gif) - -1. In Visual Studio Code you should install the following extensions: - -- C++ (search for `ms-vscode.cpptools`) -- vscode-icons (search for `vscode-icons`) - - ![extensions](/gifs/windows/extensions.gif) diff --git a/src/content/docs/installation/Windows (MSYS2)/step-1.md b/src/content/docs/installation/Windows (MSYS2)/step-1.md deleted file mode 100644 index dcbb3e03d..000000000 --- a/src/content/docs/installation/Windows (MSYS2)/step-1.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: Install MSYS2 and Command Line Tools -sidebar: - label: 1. MSYS2 and Command Line Tools - # attrs: - # class: windows ---- - -MSYS2 provide a unix terminal environment for Windows. We will need this to run the build commands to create our SplashKit programs. - -## Install MSYS2/MINGW64 Terminal - -1. Download the installer from the official MSYS2 website: [www.msys2.org](https://www.msys2.org/) - -2. To install MSYS2, double-click the downloaded executable file, and follow the on-screen instructions. - - *It is strongly recommended that you use the default install path, but you can customise the other installation options as needed.* - - :::note[Which Terminal?] - MSYS2 comes with a variety of terminal environments. The **MINGW64** terminal environment is recommended for 64-bit computers (MINGW32 for 32-bit) as it has been found to support the C# and C++ terminal commands you will use. - - Therefore, you should use the **MINGW64** (MSYS2 MINGW64) terminal, which you can find by searching "mingw64" in the Windows Start menu and selecting the **MSYS2 MINGW64** App. - ::: - - :::tip[Pin it!] - To make it easier to open each time, you can pin your terminal to the Taskbar. - - - Open MINGW64 terminal. - - Right-click on the blue MSYS2 App icon in the taskbar. - - Select "Pin to taskbar". - - ::: - -## Install Command Line Tools - -To install SplashKit, you will firstly need to install some command line tools using the `pacman` package manager. - -1. Copy and paste the following command into your **MINGW64** terminal window to install the `git`, `clang`, `gcc` and `gdb` pacman packages: - - ```shell - pacman -S git mingw-w64-x86_64-clang mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb --noconfirm --disable-download-timeout - ``` - - :::caution[Paste commands into MINGW64 Terminal] - Unfortunately, you won't be able to use `Ctrl` + `V` to paste. - - Instead, right-click anywhere in the terminal window and then select **Paste**. - ::: diff --git a/src/content/docs/installation/Windows (MSYS2)/step-1.mdx b/src/content/docs/installation/Windows (MSYS2)/step-1.mdx new file mode 100644 index 000000000..b48eb4939 --- /dev/null +++ b/src/content/docs/installation/Windows (MSYS2)/step-1.mdx @@ -0,0 +1,61 @@ +--- +title: Install MSYS2 and Command Line Tools +description: Install MSYS2 and the necessary command line tools for SplashKit on Windows. +sidebar: + label: 1. MSYS2 and Command Line Tools +--- + +import { Steps } from '@astrojs/starlight/components'; + +SplashKit requires a few command line tools to be installed on your system before you proceed with the installation. Follow the steps below to install these tools, then you can continue with the SplashKit installation. + +MSYS2 provides a Unix-like terminal environment for Windows, allowing you to run the build commands needed to create SplashKit programs. + +## Installation Steps + + + +1. **Download MSYS2** + + Download the installer from the official MSYS2 website: [www.msys2.org](https://www.msys2.org/) + +2. **Install MSYS2** + + Double-click the downloaded executable file and follow the on-screen instructions to complete the installation. + + *We recommend using the default installation path, though you may customize other options as needed.* + +3. **Open the MINGW64 Terminal** + + MSYS2 includes several terminal environments, and we recommend the **MINGW64** environment for 64-bit systems (use **MINGW32** for 32-bit). This terminal best supports the C# and C++ commands used with SplashKit. + + :::note[Choosing the Correct Terminal] + To open **MINGW64**, search for "mingw64" in the Windows Start menu and select the **MSYS2 MINGW64** app. + ::: + + :::tip[Pin MINGW64 to the Taskbar] + To make it easier to open each time, you can pin MINGW64 to the taskbar: + - Open the MINGW64 terminal. + - Right-click on the blue MSYS2 icon in the taskbar. + - Select "Pin to taskbar." + + ![Image showing MSYS2 MINGW64 App pinning to taskbar](/public/images/installation/windows/mingw64-pin-to-taskbar.png) + ::: + +4. **Install Command Line Tools** + + To prepare for SplashKit, you’ll need to install essential tools using the `pacman` package manager within **MINGW64**. + + Copy and paste the following command into the **MINGW64** terminal window to install `git`, `clang`, `gcc`, and `gdb`: + + ```shell + pacman -S git mingw-w64-x86_64-clang mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb --noconfirm --disable-download-timeout + ``` + + :::caution[Pasting Commands in MINGW64 Terminal] + `Ctrl` + `V` won’t work to paste in MINGW64. Instead, right-click anywhere in the terminal window and select **Paste**. + ::: + + + +You’re now ready to proceed with the SplashKit installation. Continue to **Step 2** to complete your setup. diff --git a/src/content/docs/installation/Windows (MSYS2)/step-2.md b/src/content/docs/installation/Windows (MSYS2)/step-2.md deleted file mode 100644 index 9782e98ba..000000000 --- a/src/content/docs/installation/Windows (MSYS2)/step-2.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: Install SplashKit -sidebar: - label: 2. SplashKit -# attrs: -# class: windows ---- - -Once you have MSYS2 installed, you can install the SplashKit library: - -## Steps - -1. In your MSYS2 Terminal, copy/paste and run the following line - - ```shell - bash <(curl -s https://raw.githubusercontent.com/splashkit/skm/master/install-scripts/skm-install.sh) - ``` - - This can also be found on the [SplashKit](http://www.splashkit.io) home page. - - - -2. Restart the terminal and execute `skm` to test it was successfully installed. - - ```shell - skm - ``` - - You should see the following messages: - - ```shell - SplashKit is installed successfully! - Missing skm command. For help use 'skm help' - ``` - - SplashKit supports a number of languages. Run `skm help` at the terminal to see the different commands you can run. - -3. Run the following command to install splashkit globally: - - ```shell - skm global install - ``` diff --git a/src/content/docs/installation/Windows (MSYS2)/step-2.mdx b/src/content/docs/installation/Windows (MSYS2)/step-2.mdx new file mode 100644 index 000000000..3b06c3b31 --- /dev/null +++ b/src/content/docs/installation/Windows (MSYS2)/step-2.mdx @@ -0,0 +1,63 @@ +--- +title: Install SplashKit +description: Install SplashKit on Windows (MSYS2). +sidebar: + label: 2. SplashKit +--- + +import { Steps } from '@astrojs/starlight/components'; + +[SplashKit](https://splashkit.io) is a beginner’s all-purpose software toolkit that will allow you to create fun and exciting programs more easily, especially for Graphical User Interface (GUI) programs. + +Follow these steps to set up SplashKit on Windows with MSYS2 and start building interactive, visually appealing applications! + +## Installation Steps + + + +1. **Run the SplashKit Installer** + + In your MSYS2 Terminal, paste and run the following command to download and install SplashKit: + + ```shell + bash <(curl -s https://raw.githubusercontent.com/splashkit/skm/master/install-scripts/skm-install.sh) + ``` + + This command downloads the installer directly from the [SplashKit homepage](https://splashkit.io). + + {/*TODO: Add gif*/} + +2. **Verify the Installation** + + Restart your MSYS2 terminal, then enter the following command to check if SplashKit Manager (`skm`) is installed: + + ```shell + skm + ``` + + You should see messages confirming the installation, such as: + + ```shell + SplashKit is installed successfully! + Missing skm command. For help use 'skm help' + ``` + + *Tip:* Use `skm help` to explore available commands for working with SplashKit. + +3. **Install Dependencies** + + Use the following command to install the necessary dependencies and compile SplashKit: + + ```shell + skm windows install + ``` + +4. **Install SplashKit Globally** + + For easier access, install SplashKit globally by running: + + ```shell + skm global install + ``` + + diff --git a/src/content/docs/installation/Windows (MSYS2)/step-3.md b/src/content/docs/installation/Windows (MSYS2)/step-3.md deleted file mode 100644 index 45e3c5d84..000000000 --- a/src/content/docs/installation/Windows (MSYS2)/step-3.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: Install Visual Studio Code -sidebar: - label: 3. Visual Studio Code - # attrs: - # class: windows ---- - -Visual Studio Code, also commonly known as *VS Code* or just *Code*, is a powerful and versatile code editor that enables efficient coding, debugging, and collaboration for your SplashKit projects! - -## Steps - -1. Download [Visual Studio Code](https://code.visualstudio.com) - -2. Run the installer. - -3. In Visual Studio Code you should install the following extensions: - - For C#: - - - [C#](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp) - - [C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit) - - [Intellicode for C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.vscodeintellicode-csharp) - - You can do this from the command line by executing: - - ```shell - code --install-extension ms-dotnettools.csharp - code --install-extension ms-dotnettools.csdevkit - code --install-extension ms-dotnettools.vscodeintellicode-csharp - ``` - - For C++: - - - [C++ Extension Pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools-extension-pack) - - You can do this from the command line by executing: - - ```shell - code --install-extension ms-vscode.cpptools-extension-pack - ``` diff --git a/src/content/docs/installation/Windows (MSYS2)/step-3.mdx b/src/content/docs/installation/Windows (MSYS2)/step-3.mdx new file mode 100644 index 000000000..9586c034c --- /dev/null +++ b/src/content/docs/installation/Windows (MSYS2)/step-3.mdx @@ -0,0 +1,97 @@ +--- +title: Install Visual Studio Code +description: Download and install Visual Studio Code to use as a source code editor, and install the necessary extensions for C# and C++. +sidebar: + label: 3. Visual Studio Code +--- + +import { LinkButton } from '@astrojs/starlight/components'; + +[Visual Studio Code](https://code.visualstudio.com/) is a versatile, user-friendly source code editor that supports extensions for multiple languages, including C#, C++ and python. Follow these steps to install Visual Studio Code on Windows and set up the necessary extensions. + +## Install Visual Studio Code + +Download [Visual Studio Code](https://code.visualstudio.com), and run the installer. + +## Installing Extensions for Development + +After setting up Visual Studio Code, enhance your development environment by adding essential extensions for C#, C++, and Python. These extensions provide robust tools for coding, debugging, and code intelligence, making your setup complete for SplashKit projects. + +### C# Extensions + +#### Method 1: Via the Extensions Website + +Install the following C# extensions directly from the Visual Studio Marketplace: + +C# +C# Dev Kit +Intellicode for C# Dev Kit + +#### Method 2: Via the Command Line + +You can also install these C# extensions directly from the terminal by running: + +```shell +code --install-extension ms-dotnettools.csharp +code --install-extension ms-dotnettools.csdevkit +code --install-extension ms-dotnettools.vscodeintellicode-csharp +``` + +#### Method 3: Within Visual Studio Code + +To add these extensions within Visual Studio Code: + +1. Open the Extensions view by pressing `Ctrl+Shift+X`. +2. Search for "C# Microsoft" and the top 3 extensions listed above should appear. Click **Install** for each. If they don't then search for them individually. + +![Adding C# extensions in Visual Studio Code](/images/installation/csharp-in-vscode.png) + +### C++ Extensions + +#### Method 1: Via the Extensions Website + +Install the C++ Extension Pack for comprehensive C++ support: + +C++ Extension Pack + +#### Method 2: Via the Command Line + +To install the C++ Extension Pack directly from the terminal: + +```shell +code --install-extension ms-vscode.cpptools-extension-pack +``` + +#### Method 3: Within Visual Studio Code + +To add the C++ extension within Visual Studio Code: + +1. Open the Extensions view (`Ctrl+Shift+X`). +2. Search for "C++ Extension Pack" and click **Install**. + +![Adding C++ extensions in Visual Studio Code](/images/installation/cplus-in-vscode.png) + +### Python Extensions + +#### Method 1: Via the Extensions Website + +For Python support, install the Python Extension Pack from the Visual Studio Marketplace: + +Python Extension Pack + +#### Method 2: Via the Command Line + +To install the Python Extension Pack directly from the terminal: + +```shell +code --install-extension donjayamanne.python-extension-pack +``` + +#### Method 3: Within Visual Studio Code + +To install the Python extensions within Visual Studio Code: + +1. Open the Extensions view (`Ctrl+Shift+X`). +2. Search for "Python Extension Pack" and click **Install**. + +![Adding Python extensions in Visual Studio Code](/images/installation/python-in-vscode.png) diff --git a/src/content/docs/installation/Windows (MSYS2)/step-4.md b/src/content/docs/installation/Windows (MSYS2)/step-4.md deleted file mode 100644 index e0f4985d0..000000000 --- a/src/content/docs/installation/Windows (MSYS2)/step-4.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Install Language Specific Tools -sidebar: - label: 4. Language Tools - # attrs: - # class: windows ---- - -## Steps - -SplashKit works with a number of programming languages. Each of these has its own set of tools you will need to install. -/installation/windows/mingw/ - -- For C#, install the [Dotnet core](/installation/windows-msys2/languages/dotnet/) tools. -- For C++, you're _already_ ready to go. - -## What's next? - -Congratulations! If you've followed these steps correctly, then you will have installed all the tools needed to start programming with SplashKit! diff --git a/src/content/docs/installation/Windows (MSYS2)/step-4.mdx b/src/content/docs/installation/Windows (MSYS2)/step-4.mdx new file mode 100644 index 000000000..2dc4a888c --- /dev/null +++ b/src/content/docs/installation/Windows (MSYS2)/step-4.mdx @@ -0,0 +1,85 @@ +--- +title: Install Language Specific Tools +description: Install the language specific tools for SplashKit on Windows (MSYS2). +sidebar: + label: 4. Language Tools +--- + +import { LinkButton } from '@astrojs/starlight/components'; +import { Steps } from '@astrojs/starlight/components'; + +SplashKit supports multiple programming languages, each with its own set of tools. Follow the steps below to install the necessary tools for your chosen language. + +## Language-Specific Installations + +### C# (.NET) + +To develop with C# in SplashKit, you’ll need to install the .NET SDK. + + + +1. **Download the .NET SDK** + + Go to the [official .NET SDK download page](https://dotnet.microsoft.com/download) and download the latest version for Windows. + +2. **Install the .NET SDK** + + Run the downloaded installer and follow the on-screen instructions to complete the installation. + +3. **Verify the Installation** + + Open your MSYS2 terminal and run the following command to confirm that .NET is installed: + + ```shell + dotnet --version + ``` + + If installed correctly, this command will output the version number of the .NET SDK. + + + +### C++ + +For C++ development, your MSYS2 setup already includes the necessary tools for SplashKit. No additional setup is required specifically for C++. + +### Python + +To develop with Python in SplashKit, follow these steps to install Python on your system. + + + +1. **Download the Python Installer** + + Go to the [Python download page](https://www.python.org/downloads/windows/) and download the latest Python installer for Windows. + +2. **Run the Installer and Select Optional Features** + + - During the installation, check the box to **Add python.exe to PATH**. + - Choose additional features, such as installing `pip`, as needed. + +3. **Complete the Installation** + + Follow the on-screen instructions to complete the installation. + +4. **Verify Installation (Optional)** + + To confirm that `Python` and `pip` are successfully installed, open your MSYS2 terminal and run the following commands: + + ```shell + python --version + pip --version + ``` + + Both commands should output version information if the installation was successful. + + + +### Other Languages + +Support for other languages such as Rust and Pascal are coming soon. + +## Next Steps + +Congratulations! You've completed the setup of language-specific tools for SplashKit. You're now ready to start developing. + +**Ready to start coding?** diff --git a/src/content/docs/installation/Windows (WSL)/index.mdx b/src/content/docs/installation/Windows (WSL)/index.mdx index cda392654..ee2a8106d 100644 --- a/src/content/docs/installation/Windows (WSL)/index.mdx +++ b/src/content/docs/installation/Windows (WSL)/index.mdx @@ -1,14 +1,16 @@ --- title: Windows (WSL) Installation Overview +description: Installation guide for SplashKit on Windows using WSL. sidebar: label: Overview attrs: class: windows-wsl --- -To get SplashKit installed on Windows, follow the four steps: import { LinkCard, CardGrid } from "@astrojs/starlight/components"; +To get SplashKit installed on Windows, follow the four steps: + + +1. **Install WSL (Ubuntu)** + + ### Method 1: Command Line (Recommended) + + To install both WSL and Ubuntu from the command line, follow these steps. Open Terminal, PowerShell, or Command Prompt in *administrator mode* by right-clicking and selecting "Run as administrator," then enter the command below: + + ```shell + wsl --install + ``` + + ![Gif showing WSL terminal running wsl --install commands](/gifs/windows/wsl-terminal.gif) + + ### Method 2: Microsoft Store (Alternative) + + Alternatively, you can install WSL (and Ubuntu) directly from the Microsoft Store. + + - Search "WSL" in the Microsoft Store app, or [click here](https://apps.microsoft.com/store/detail/9P9TQF7MRM4R). + - Next, download **Ubuntu** from the Microsoft Store. Search "Ubuntu," or [click this link](https://apps.microsoft.com/store/detail/9PDXGNCFSCZV). + + ![Gif showing WSL being installed from Microsoft Store](/gifs/windows/install-wsl.gif) + +2. **Create Ubuntu User Account** + + Restart your computer if you haven’t already. After restarting, a terminal window will open to finish Ubuntu setup. If it doesn’t, open the WSL or Ubuntu app manually. + + When prompted, enter a UNIX username and password. + For example, if you choose the username "**default-user**," your terminal will look like this: + + ![Image showing WSL terminal with ubuntu user account setup](/images/installation/windows/terminal-ubuntu-user-account.png) + + :::tip[Troubleshooting Installation Issues] + If you have issues installing WSL with Ubuntu, reset the installation by entering: + + ```shell + wsl --unregister Ubuntu + ``` + + Then, reinstall using: + + ```shell + wsl --install + ``` + + Lastly, open Ubuntu again to create your user account. + ::: + +3. **(Optional) Configure Windows Terminal for WSL** + + To have the Windows **Terminal** app automatically open with WSL, you can set the *Default profile* to WSL (Ubuntu). + + - Open the Terminal app, click the drop-down arrow at the top of the window, then click "Settings." + - In *Default profile*, select an **Ubuntu** profile. Choose the profile with the Linux penguin icon if available. + - Click **Save** to apply changes. + + ![Image showing Terminal App settings to set WSL as default profile](/images/installation/windows/windows-terminal-default-profile.png) + + :::tip[Pin it to the Taskbar] + To make the Terminal app easily accessible, open it, right-click its icon in the taskbar, and select "Pin to taskbar." + ::: + +4. **Install Command Line Tools** + + To proceed with SplashKit on WSL, you’ll need to install `git`, `curl`, and `clang` using `apt` in your **WSL Terminal**. + + First, update the package lists: + + ```shell + sudo apt update + ``` + + Next, install the tools: + + ```shell + sudo apt install git curl clang + ``` + + ![Gif showing command above being run in WSL Terminal](/gifs/windows/wsl-git-curl.gif) + + + +You’re now ready to proceed with the SplashKit installation. Continue to **Step 2** to complete your setup. diff --git a/src/content/docs/installation/Windows (WSL)/step-2.md b/src/content/docs/installation/Windows (WSL)/step-2.md deleted file mode 100644 index 9875ef597..000000000 --- a/src/content/docs/installation/Windows (WSL)/step-2.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: Install SplashKit -sidebar: - label: 2. SplashKit -# attrs: -# class: windows-wsl ---- - -Once you have WSL installed, you can install the SplashKit library: - -## Steps - -1. Open up a WSL/Ubuntu terminal. - -2. Install the SplashKit Manager by copy/pasting the command below into your terminal and press enter. - - ```shell - bash <(curl -s https://raw.githubusercontent.com/splashkit/skm/master/install-scripts/skm-install.sh) - ``` - -3. Restart the terminal and execute `skm` to test it was successfully installed. - - ```shell - skm - ``` - - You should see the following messages: - - ```shell - SplashKit is installed successfully! - Missing skm command. For help use 'skm help' - ``` - -4. Run the following command to install the necessary dependencies and compile splashkit. - - ```shell - skm linux install - ``` - -5. Run the following command to install splashkit globally. - - ```shell - skm global install - ``` diff --git a/src/content/docs/installation/Windows (WSL)/step-2.mdx b/src/content/docs/installation/Windows (WSL)/step-2.mdx new file mode 100644 index 000000000..7d25bc4e2 --- /dev/null +++ b/src/content/docs/installation/Windows (WSL)/step-2.mdx @@ -0,0 +1,65 @@ +--- +title: Install SplashKit +description: Install SplashKit on Windows (WSL). +sidebar: + label: 2. SplashKit +--- + +import { Steps } from '@astrojs/starlight/components'; + +[SplashKit](https://splashkit.io) is a beginner’s all-purpose software toolkit that will allow you to create fun and exciting programs more easily, especially for Graphical User Interface (GUI) programs. + +Follow these steps to set up SplashKit on WSL and start building interactive, visually appealing applications on Windows! + +## Installation Steps + + + +1. **Open a WSL/Ubuntu Terminal** + + Launch your WSL or Ubuntu terminal. + +2. **Install the SplashKit Manager** + + Copy and paste the following command into your terminal, then press **Enter**: + + ```shell + bash <(curl -s https://raw.githubusercontent.com/splashkit/skm/master/install-scripts/skm-install.sh) + ``` + + This command downloads the installer directly from the [SplashKit homepage](https://splashkit.io). + +3. **Verify the Installation** + + Restart your terminal to ensure the new installation path is recognized, then run the following command to confirm SplashKit Manager (`skm`) is installed: + + ```shell + skm + ``` + + You should see messages confirming the installation: + + ```shell + SplashKit is installed successfully! + Missing skm command. For help use 'skm help' + ``` + + *Tip:* Use `skm help` to explore additional commands for managing SplashKit. + +4. **Install Dependencies and Compile SplashKit** + + Run this command to install any necessary dependencies and compile SplashKit: + + ```shell + skm linux install + ``` + +5. **Install SplashKit Globally** + + For easier access, install SplashKit globally by running: + + ```shell + skm global install + ``` + + diff --git a/src/content/docs/installation/Windows (WSL)/step-3.md b/src/content/docs/installation/Windows (WSL)/step-3.md deleted file mode 100644 index 123ea8b60..000000000 --- a/src/content/docs/installation/Windows (WSL)/step-3.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: Install Visual Studio Code -sidebar: - label: 3. Visual Studio Code - # attrs: - # class: windows-wsl ---- - -Visual Studio Code, also commonly known as *VS Code* or just *Code*, is a powerful and versatile code editor that enables efficient coding, debugging, and collaboration for your SplashKit projects! - -## Steps - -1. Download [Visual Studio Code](https://code.visualstudio.com) - -2. Run the installer. - -3. In Visual Studio Code you should install the following extensions: - - For WSL (required): - - - [WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) - - You can do this from the command line by executing: - - ```shell - code --install-extension ms-vscode-remote.remote-wsl - ``` - - For C#: - - - [C#](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp) - - [C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit) - - [Intellicode for C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.vscodeintellicode-csharp) - - You can do this from the command line by executing: - - ```shell - code --install-extension ms-dotnettools.csharp - code --install-extension ms-dotnettools.csdevkit - code --install-extension ms-dotnettools.vscodeintellicode-csharp - ``` - - For C++: - - - [C++ Extension Pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools-extension-pack) - - You can do this from the command line by executing: - - ```shell - code --install-extension ms-vscode.cpptools-extension-pack - ``` diff --git a/src/content/docs/installation/Windows (WSL)/step-3.mdx b/src/content/docs/installation/Windows (WSL)/step-3.mdx new file mode 100644 index 000000000..e20d6ae4e --- /dev/null +++ b/src/content/docs/installation/Windows (WSL)/step-3.mdx @@ -0,0 +1,122 @@ +--- +title: Install Visual Studio Code +sidebar: + label: 3. Visual Studio Code +--- + +import { LinkButton } from '@astrojs/starlight/components'; +import { Steps } from '@astrojs/starlight/components'; + +[Visual Studio Code](https://code.visualstudio.com/) is a versatile, user-friendly source code editor that supports extensions for multiple languages, including C#, C++ and python. Follow these steps to install Visual Studio Code on WSL and set up the necessary extensions. + +## Install Visual Studio Code + +Download [Visual Studio Code](https://code.visualstudio.com), and run the installer. + +## Installing Extensions for Development + +After setting up Visual Studio Code, enhance your development environment by adding essential extensions for C#, C++, and Python. These extensions provide robust tools for coding, debugging, and code intelligence, making your setup complete for SplashKit projects. + +### WSL Extension + +#### Method 1: Via the Extensions Website + +Install the WSL extension directly from the Visual Studio Marketplace: + +WSL Extension + +#### Method 2: Via the Command Line + +You can also install the WSL extension directly from the terminal: + +```shell +code --install-extension ms-vscode-remote.remote-wsl +``` + +#### Method 3: Within Visual Studio Code + +To add the WSL extension within Visual Studio Code: + +1. Open the Extensions view by pressing `Ctrl+Shift+X`. +2. Search for "WSL" and click **Install**. + +![Adding WSL extension in Visual Studio Code](/images/installation/WSL-in-vscode.png) + +### C# Extensions + +#### Method 1: Via the Extensions Website + +Install the following C# extensions directly from the Visual Studio Marketplace: + +C# +C# Dev Kit +Intellicode for C# Dev Kit + +#### Method 2: Via the Command Line + +You can also install these C# extensions directly from the terminal by running: + +```shell +code --install-extension ms-dotnettools.csharp +code --install-extension ms-dotnettools.csdevkit +code --install-extension ms-dotnettools.vscodeintellicode-csharp +``` + +#### Method 3: Within Visual Studio Code + +To add these extensions within Visual Studio Code: + +1. Open the Extensions view by pressing `Ctrl+Shift+X`. +2. Search for "C# Microsoft" and the top 3 extensions listed above should appear. Click **Install** for each. If they don't then search for them individually. + +![Adding C# extensions in Visual Studio Code](/images/installation/csharp-in-vscode.png) + +### C++ Extensions + +#### Method 1: Via the Extensions Website + +Install the C++ Extension Pack for comprehensive C++ support: + +C++ Extension Pack + +#### Method 2: Via the Command Line + +To install the C++ Extension Pack directly from the terminal: + +```shell +code --install-extension ms-vscode.cpptools-extension-pack +``` + +#### Method 3: Within Visual Studio Code + +To add the C++ extension within Visual Studio Code: + +1. Open the Extensions view (`Ctrl+Shift+X`). +2. Search for "C++ Extension Pack" and click **Install**. + +![Adding C++ extensions in Visual Studio Code](/images/installation/cplus-in-vscode.png) + +### Python Extensions + +#### Method 1: Via the Extensions Website + +For Python support, install the Python Extension Pack from the Visual Studio Marketplace: + +Python Extension Pack + +#### Method 2: Via the Command Line + +To install the Python Extension Pack directly from the terminal: + +```shell +code --install-extension donjayamanne.python-extension-pack +``` + +#### Method 3: Within Visual Studio Code + +To install the Python extensions within Visual Studio Code: + +1. Open the Extensions view (`Ctrl+Shift+X`). +2. Search for "Python Extension Pack" and click **Install**. + +![Adding Python extensions in Visual Studio Code](/images/installation/python-in-vscode.png) diff --git a/src/content/docs/installation/Windows (WSL)/step-4.md b/src/content/docs/installation/Windows (WSL)/step-4.md deleted file mode 100644 index 724b66218..000000000 --- a/src/content/docs/installation/Windows (WSL)/step-4.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Install Language Specific Tools -sidebar: - label: 4. Language Tools - # attrs: - # class: windows ---- - -## Steps - -SplashKit works with a number of programming languages. Each of these has its own set of tools you will need to install. -/installation/windows/mingw/ - -- For C#, install the [Dotnet core](/installation/windows-wsl/languages/dotnet/) tools. -- For C++, you're _already_ ready to go. - -## What's next? - -Congratulations! If you've followed these steps correctly, then you will have installed all the tools needed to start programming with SplashKit! diff --git a/src/content/docs/installation/Windows (WSL)/step-4.mdx b/src/content/docs/installation/Windows (WSL)/step-4.mdx new file mode 100644 index 000000000..416fa8581 --- /dev/null +++ b/src/content/docs/installation/Windows (WSL)/step-4.mdx @@ -0,0 +1,87 @@ +--- +title: Install Language Specific Tools +description: Install the language specific tools for SplashKit on Windows (WSL). +sidebar: + label: 4. Language Tools +--- + +import { Steps } from '@astrojs/starlight/components'; + +SplashKit supports multiple programming languages, each with its own set of tools. Follow the instructions below to install the required tools for your chosen language on Windows Subsystem for Linux (WSL). + +## Language-Specific Installations + +### C# (.NET) + +To develop with C# in SplashKit, you’ll need to install the .NET SDK. + + + +1. **Visit the .NET Download Page** + + Go to the [.NET download page for Linux](https://dotnet.microsoft.com/en-us/download?initial-os=linux) and select the instructions for your Ubuntu distribution. + +2. **Follow the Installation Instructions** + + Follow the on-screen instructions provided by the .NET website to complete the installation on your WSL environment. + +3. **Verify Installation (Optional)** + + Open your WSL terminal and run the following command to confirm the .NET SDK is installed: + + ```shell + dotnet --version + ``` + + If installed correctly, this command will output the version number of the .NET SDK. + + + +### C++ + +For C++ development, your WSL setup should already include the necessary tools for SplashKit. No additional setup is required specifically for C++. + +### Python + +To develop with Python in SplashKit, follow these steps to install Python and `pip` on your WSL environment. + + + +1. **Install Python 3** + + In your WSL terminal, run the following command to install Python 3: + + ```shell + sudo apt install python3 + ``` + +2. **(Optional) Install pip** + + If you need the Python package manager, `pip`, run: + + ```shell + sudo apt install python3-pip + ``` + +3. **Verify Installation (Optional)** + + To check that Python and `pip` are installed, run the following commands: + + ```shell + python3 --version + pip3 --version + ``` + + Both commands should output version information if the installation was successful. + + + +### Other Languages + +Support for other languages such as Rust and Pascal are coming soon. + +## Next Steps + +Congratulations! You've completed the setup of language-specific tools for SplashKit. You're now ready to start developing. + +**Ready to start coding?** diff --git a/src/content/docs/installation/update-splashkit.mdx b/src/content/docs/installation/update-splashkit.mdx new file mode 100644 index 000000000..b7c8066db --- /dev/null +++ b/src/content/docs/installation/update-splashkit.mdx @@ -0,0 +1,19 @@ +--- +title: Updating SplashKit +description: Update your SplashKit SDK to ensure compatibility with the latest features and bug fixes. +sidebar: + label: Updating SplashKit + order: 1 +--- + +The SplashKit SDK is regularly updated to provide compatibility with the latest features, enhancements, and bug fixes. If you encounter issues or notice differences between your SDK and the latest documentation, updating SplashKit may resolve these. + +## How to update SplashKit + +To update SplashKit on your system, use the following command in your terminal: + +```shell +skm update +``` + +This command fetches the latest version of SplashKit and updates your SDK to the most recent release. diff --git a/src/content/docs/troubleshoot/Linux/index.mdx b/src/content/docs/troubleshoot/Linux/index.mdx new file mode 100644 index 000000000..0daccb2a9 --- /dev/null +++ b/src/content/docs/troubleshoot/Linux/index.mdx @@ -0,0 +1,17 @@ +--- +title: Overview +description: This page provides solutions to known installation issues encountered by Linux users while installing or using SplashKit. +lastUpdated: 2024-12-04 +sidebar: + order: 2 + attrs: + class: linux +--- + +*This repository provides solutions to known installation issues encountered by Linux users while installing SplashKit. If you are facing any problems with SplashKit, refer to this document for possible solutions.* + +| Link | Description | +| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| [Issue_1](/troubleshoot/linux/linux-issue-1) | `skm global install` failed with error `libSplashKit.so` not found. | +| [Issue_2](/troubleshoot/linux/linux-issue-2) | `error while loading shared libraries: libSplashKit.so: cannot open shared object file` when trying to run a SplashKit program. | +| [Issue_3](/troubleshoot/linux/linux-issue-3) | `skm global install` fails on Arch-based Linux distributions due to `libjxl` dependency errors with `SDL2_image`. | diff --git a/src/content/docs/troubleshoot/Linux/linux-issue-1.mdx b/src/content/docs/troubleshoot/Linux/linux-issue-1.mdx new file mode 100644 index 000000000..14eb62e3c --- /dev/null +++ b/src/content/docs/troubleshoot/Linux/linux-issue-1.mdx @@ -0,0 +1,86 @@ +--- +title: Error while loading shared libraries, skm global install failed +description: Issue with the error `libSplashKit.so` not found when trying to run a SplashKit program on Linux, and how to fix it. +sidebar: + label: 1. skm global install not working +--- + +import { Steps } from '@astrojs/starlight/components'; + +:::caution[Linux: Error While Running `skm global install` Command] + +This guide addresses the error where `libSplashKit.so` is not found when trying to run a SplashKit program on Linux using the `skm global install` command. This issue often occurs when `bash` or `zsh` cannot locate the SplashKit library path. + +::: + +## Problem + +If you receive an error when attempting to install SplashKit using `skm global install`, it’s likely because the system cannot locate the necessary SplashKit library files. Adding these paths manually can resolve the issue. + +![Error Example](/images/installation/linux/skm-global-linux-fail.png) + +## Solutions + +Follow these steps to update your shell profiles and system library path to include SplashKit. + +### Update Your Shell Profile (`~/.bashrc` or `~/.zshrc`) + +**For Bash Users**: + + + +1. Open your `~/.bashrc` file: + + ```shell + nano ~/.bashrc + ``` + +2. Add the following line near the end of the file: + + ```shell + export PATH="$PATH:$HOME/.splashkit" + ``` + +3. Save and close the file, then update your profile: + + ```shell + source ~/.bashrc + ``` + + + +**For Zsh Users**: + + + +1. Open your `~/.zshrc` file: + + ```shell + nano ~/.zshrc + ``` + +2. Add the following line near the end of the file: + + ```shell + export PATH="$PATH:$HOME/.splashkit" + ``` + +3. Save and close the file, then update your profile: + + ```shell + source ~/.zshrc + ``` + + + +### Update the System Library Path + +To make sure your system can access the SplashKit library files, add `/usr/local/lib` to the system’s library path: + +```shell +sudo ldconfig /usr/local/lib +``` + +This command will configure your system to recognise libraries in `/usr/local/lib`, allowing SplashKit applications to locate `libSplashKit.so` as needed. + +Following these steps should resolve the `libSplashKit.so` not found error and ensure that SplashKit can be successfully installed and run on Linux. diff --git a/src/content/docs/troubleshoot/Linux/linux-issue-2.mdx b/src/content/docs/troubleshoot/Linux/linux-issue-2.mdx new file mode 100644 index 000000000..a33676079 --- /dev/null +++ b/src/content/docs/troubleshoot/Linux/linux-issue-2.mdx @@ -0,0 +1,88 @@ +--- +title: Error while loading shared libraries, skm global install failed +description: Issue with the error `libSplashKit.so` not found when trying to run a SplashKit program on Linux, and how to fix it. +sidebar: + label: 2. libSplashKit.so not found +--- + +import { Steps } from '@astrojs/starlight/components'; + +:::caution[`error while loading shared libraries: libSplashKit.so`] + +This guide addresses the error where `libSplashKit.so` cannot be found when attempting to run a SplashKit program on Linux. This issue typically occurs when the system cannot locate the SplashKit library path, especially if recent changes were made to `bash` or `zsh` profiles. + +::: + +## Problem + +When trying to run a SplashKit program, you may see an error indicating that `libSplashKit.so` cannot be found. This is often due to missing or incorrect paths in the shell profile or system library configuration. + +![Error Example](/images/installation/linux/missing-library.png) + +## Solutions + +Follow these steps to ensure your shell profile and system library paths are configured correctly. + +### Step 1: Update Your Shell Profile (`~/.bashrc` or `~/.zshrc`) + +**For Bash Users**: + + + +1. Open the `~/.bashrc` file: + + ```shell + nano ~/.bashrc + ``` + +2. Add the following line near the end of the file to include SplashKit in your PATH: + + ```shell + export PATH="$PATH:$HOME/.splashkit" + ``` + +3. Save and close the file, then apply the changes: + + ```shell + source ~/.bashrc + ``` + + + +**For Zsh Users**: + + + +1. Open the `~/.zshrc` file: + + ```shell + nano ~/.zshrc + ``` + +2. Add the following line near the end of the file: + + ```shell + export PATH="$PATH:$HOME/.splashkit" + ``` + +3. Save and close the file, then update your profile: + + ```shell + source ~/.zshrc + ``` + + + +### Step 2: Update the System Library Path + +To ensure the system can locate `libSplashKit.so`, add `/usr/local/lib` to the system’s library path: + +```shell +sudo ldconfig /usr/local/lib +``` + +This command configures the system to recognize libraries in `/usr/local/lib`, ensuring that `libSplashKit.so` is accessible to your applications. + +--- + +Following these steps should resolve the `libSplashKit.so` not found error and allow you to successfully run SplashKit programs on Linux. diff --git a/src/content/docs/troubleshoot/Linux/linux-issue-3.mdx b/src/content/docs/troubleshoot/Linux/linux-issue-3.mdx new file mode 100644 index 000000000..503aff575 --- /dev/null +++ b/src/content/docs/troubleshoot/Linux/linux-issue-3.mdx @@ -0,0 +1,83 @@ +--- +title: skm global install fails on Arch-based Linux distributions +description: Issue with the `skm global install` command failing during installation on Arch-based Linux due to `libjxl` dependency errors with `SDL2_image`. +sidebar: + label: 3. skm global install fails on Arch-based Linux +--- + +import { Steps } from '@astrojs/starlight/components'; + +:::caution[`skm global install` Fails During Installation on Arch-Based Distributions] + +This guide addresses the issue where the `skm global install` command fails during the installation process on Arch-based Linux distributions like Manjaro due to a dependency error with `libjxl` required by `SDL2_image`. + +::: + +:::note + +This error can also occur due to various package issues, which might give you an error for a different package, this often stems from outdated or corrupted dependencies in the default repository. + +::: + +## Problem + +When running the `skm global install` command, you may encounter an error like the one shown below, indicating issues with unresolved references to `libjxl` in `SDL2_image`. This typically happens due to outdated dependencies in the default repository. + +![Error Example](/images/installation/linux/arch-error.png) + +## Solution + +Follow the steps below to resolve the issue by upgrading dependencies or linking to updated repositories. + + + +1. **Step 1: Update System Repositories** + + Ensure your system's package repositories are up-to-date by running the following command: + + ```shell + sudo pacman -Syu + ``` + + This will synchronize your system with the latest versions of all installed packages. + +2. **Step 2: Use `pamac` to Update Without AUR Packages** + + If the issue persists due to `SDL2_image` dependencies (e.g., `libjxl`), use `pamac` to update the package cache and repositories linked to newer dependency versions: + + ```shell + pamac update --no-aur + ``` + + This command ensures that your system links to updated repositories and fetches the latest dependencies for `SDL2_image`. + +3. **Step 3: Verify Installation of `SDL2_image` Dependencies** + + To manually check if `libjxl` and other related dependencies are installed, run: + + ```shell + pamac install libjxl + sudo pacman -S sdl2_image + ``` + + These commands will ensure that the necessary libraries for SplashKit are correctly installed. + +4. **Step 4: Retry `skm global install`** + + After updating the dependencies, retry the SplashKit global installation: + + ```shell + skm global install + ``` + + If the dependencies were resolved correctly, the installation should now complete without errors. + + + +## Additional Notes + +If you encounter further errors, verify your system's library paths and ensure `libSplashKit.so` is correctly located by running: + +```shell +sudo ldconfig /usr/local/lib +``` diff --git a/src/content/docs/troubleshoot/Linux/linux.mdx b/src/content/docs/troubleshoot/Linux/linux.mdx deleted file mode 100644 index 95c4db6f8..000000000 --- a/src/content/docs/troubleshoot/Linux/linux.mdx +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Linux Troubleshooting -description: This page provides solutions to known installation issues encountered by Linux users while installing or using SplashKit. -lastUpdated: 2024-07-31 -sidebar: - order: 2 ---- - -*This repository provides solutions to known installation issues encountered by Linux users while installing SplashKit. If you are facing any problems with SplashKit, refer to this document for possible solutions.* - -## Table of Contents diff --git a/src/content/docs/troubleshoot/MacOS/index.mdx b/src/content/docs/troubleshoot/MacOS/index.mdx new file mode 100644 index 000000000..cc9d79a60 --- /dev/null +++ b/src/content/docs/troubleshoot/MacOS/index.mdx @@ -0,0 +1,20 @@ +--- +title: Overview +description: This page provides solutions to known installation issues encountered by Mac users while installing or using SplashKit. +lastUpdated: 2024-10-30 +sidebar: + order: 2 + attrs: + class: apple +--- + +*This repository provides solutions to known installation issues encountered by Mac users while installing SplashKit. If you are facing any problems with SplashKit, refer to this document for possible solutions.* + +| Link | Description | +| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------- | +| [Issue_1](/troubleshoot/macos/mac-issue-1) | `bash <(curl -s https://raw.githubusercontent.com/splashkit/skm/master/installscripts/skm-install.sh)` does nothing | +| [Issue_2](/troubleshoot/macos/mac-issue-2) | `brew cask install dotnet-sdk` command not working or issues with Homebrew installation | +| [Issue_3](/troubleshoot/macos/mac-issue-3) | `ln -s /usr/local/share/dotnet/dotnet /usr/local/bin` command not working | +| [Issue_4](/troubleshoot/macos/mac-issue-4) | `System.DllNotFoundException unable to load DLL splashkit.dll` when trying to run program | +| [Issue_5](/troubleshoot/macos/mac-issue-5) | `zsh: command not found: skm` | +| [Issue_6](/troubleshoot/macos/mac-issue-6) | Error mentioning `are you missing an assembly reference?` | diff --git a/src/content/docs/troubleshoot/MacOS/list/mac-issue-1.md b/src/content/docs/troubleshoot/MacOS/list/mac-issue-1.md deleted file mode 100644 index 4d1333194..000000000 --- a/src/content/docs/troubleshoot/MacOS/list/mac-issue-1.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: bash <(curl... does nothing -description: A reference page in my new Starlight docs site. -sidebar: - label: 1. Bash curl not working - attrs: - class: apple ---- - -

Issue : MacOS

- -### `bash <(curl -s https://raw.githubusercontent.com/splashkit/skm/master/install-scripts/skm-install.sh)` does nothing - -![skm install](https://i.imgur.com/BD8jqnT.png) - -## Solutions - -1. Solution 1: - - Make sure you are connected to the internet. -1. Solution 2: - - Disable your computer’s firewall. -1. Solution 3: Go to this URL: [here](https://github.com/splashkit/skm/blob/master/install-scripts/skm-install.sh) - Then click the “Download raw file” button shown below (where the red arrow is pointing to): - - ![-](https://i.imgur.com/MWhWHRO.png) - Then open Finder to wherever you saved it. - In the Terminal, type and then drag and drop the file from Finder into the Terminal window: - - ![-](https://i.imgur.com/LTCf6qW.png) diff --git a/src/content/docs/troubleshoot/MacOS/list/mac-issue-2.md b/src/content/docs/troubleshoot/MacOS/list/mac-issue-2.md deleted file mode 100644 index cd03b6094..000000000 --- a/src/content/docs/troubleshoot/MacOS/list/mac-issue-2.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: install dotnet-sdk command not working -description: A reference page in my new Starlight docs site. -sidebar: - label: 2. Brew cask install - attrs: - class: apple ---- - -

Issue : MacOS

- -### `brew cask install dotnet-sdk` command not working (or any issues installing Homebrew) - -
- -## Solution - -The corrected command is: - -```shell -brew install dotnet-sdk --cask -``` - -Or alternatively, you can download .NET 7.0 from the [Microsoft website](https://dotnet.microsoft.com/en-us/download/dotnet/7.0) and click on the macOS installer link. - -**Note**: Arm64 is used for M1 chips onwards, and x64 is used for Intel based chips. diff --git a/src/content/docs/troubleshoot/MacOS/list/mac-issue-3.md b/src/content/docs/troubleshoot/MacOS/list/mac-issue-3.md deleted file mode 100644 index 6e29c4861..000000000 --- a/src/content/docs/troubleshoot/MacOS/list/mac-issue-3.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: ln -s /usr/local.... command not working -description: A reference page in my new Starlight docs site. -sidebar: - label: 3. Local bin Error - attrs: - class: apple ---- - -

Issue : MacOS

- -### `ln -s /usr/local/share/dotnet/dotnet /usr/local/bin` command not working - -![-](https://i.imgur.com/MJgfrXW.png) - -## Solution - -Run the following command, and then enter your password: - -```shell -sudo ln -s /usr/local/share/dotnet/dotnet /usr/local/bin -``` - -*The `sudo` command temporarily gives you system (root) privileges.* - -**Note:** If you get a “`zsh: permission denied: dotnet`” error at any point, open Finder and -navigate to the “`/usr/local/bin`” folder. (*You can do this by clicking “Go” at the top of the -screen, then click on “Go to Folder…” and type the folder path here.*) - -Delete the “`dotnet`” file in that folder, and then run the command shown at the top of this -Solution in a new Terminal window. diff --git a/src/content/docs/troubleshoot/MacOS/list/mac-issue-4.md b/src/content/docs/troubleshoot/MacOS/list/mac-issue-4.md deleted file mode 100644 index 3076e3fff..000000000 --- a/src/content/docs/troubleshoot/MacOS/list/mac-issue-4.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: System.DllNotFoundException -description: A reference page in my new Starlight docs site. -sidebar: - label: 4. DllNotFoundException - attrs: - class: apple ---- - -

Issue : MacOS

- -### `System.DllNotFoundException unable to load DLL splashkit.dll` when trying to run program - -## Solutions - -1. Make sure your macOS is fully updated to the latest software if possible (at least version -**12.0** or later). - -2. For older macOS versions (**pre-12.0**), you can use the following commands in the terminal to -change SplashKit to a previous version (run each line separately): - - ```shell - cd ~/.splashkit - ``` - - ```shell - git fetch –unshallow - ``` - - ```shell - git checkout cbb68dc - ``` - - Note: Using `skm dotnet new` after these commands might change the way that the - SplashKit project files are created, so you can use this [**Template SplashKit project**](https://deakin365-my.sharepoint.com/:u:/g/personal/o_mckeon_deakin_edu_au/EZWAVnpc1QxHqFB7KbZ-j_sBreJCSEJLomdDUKsnT7DykA?e=EKefqK) (*zipped folder*) to create new projects instead of using `skm dotnet new`: - - **Note**: Read the “`README.txt`” file for instructions on how to use the template for new - projects. There is also a comment in `Program.cs` file to help with this, and then you can - remove these commented lines. diff --git a/src/content/docs/troubleshoot/MacOS/list/mac-issue-5.md b/src/content/docs/troubleshoot/MacOS/list/mac-issue-5.md deleted file mode 100644 index 92eebe2d5..000000000 --- a/src/content/docs/troubleshoot/MacOS/list/mac-issue-5.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: zsh command not found skm -description: A reference page in my new Starlight docs site. -sidebar: - label: 5. zsh not found - attrs: - class: apple ---- - -

Issue : MacOS

- -### `zsh: command not found: skm` - -![-](https://i.imgur.com/Qv8RaHc.png) - -## Solution - -Add the `.splashkit` folder to your .zshrc file. -The `.zshrc` file is located in “`~/Users/(your username)/`”. - -*Replace "(your username)" with your username.* -Note: You can get your username using the `whoami` command in the Terminal as shown below: - -![-](https://i.imgur.com/Le4nSdA.png) - -You might need to show hidden files. Hold down the shift and command keys, and then -press the `. key (period/dot)` to toggle showing hidden files. - -Open the `.zshrc` file and add the following line: - -```shell -export PATH="$HOME/.splashkit:$PATH" -``` - -As an added precaution for dotnet, you can also add this line to the same file: - -```shell -export PATH="/usr/local/share/dotnet:$PATH" -``` - -And while you are adding to this file, you can also add the following line, which will allow -you to use the command `code .` to open Visual Studio Code from your terminal: - -```shell -export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin" -``` diff --git a/src/content/docs/troubleshoot/MacOS/list/mac-issue-6.md b/src/content/docs/troubleshoot/MacOS/list/mac-issue-6.md deleted file mode 100644 index 3d7b951a6..000000000 --- a/src/content/docs/troubleshoot/MacOS/list/mac-issue-6.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Missing an assembly reference? -description: A reference page in my new Starlight docs site. -sidebar: - label: 6. Assembly reference - attrs: - class: apple ---- - -

Issue : MacOS

- -### Error that mentions (`are you missing an assembly reference?`) - -![-](https://i.imgur.com/IE0qHXu.png) - -## Solution - -If your project is called SplashKit, choose a different name for it. - -**Note:** The project name is created from the name of the folder where you are creating the -SplashKit project. diff --git a/src/content/docs/troubleshoot/MacOS/mac-issue-1.mdx b/src/content/docs/troubleshoot/MacOS/mac-issue-1.mdx new file mode 100644 index 000000000..1f989ce87 --- /dev/null +++ b/src/content/docs/troubleshoot/MacOS/mac-issue-1.mdx @@ -0,0 +1,63 @@ +--- +title: bash <(curl... does nothing +description: Issue in MacOS, `bash <(curl -s https://raw.githubusercontent.com/splashkit/skm/master/install-scripts/skm-install.sh)` does nothing, and how to fix it. +sidebar: + label: 1. Bash curl not working +--- + +import { Steps } from '@astrojs/starlight/components'; + +:::caution[Bash Curl Command Does Nothing on MacOS] + +This guide addresses the issue on MacOS where running the command `bash <(curl -s https://raw.githubusercontent.com/splashkit/skm/master/install-scripts/skm-install.sh)` does not trigger the expected installation. Follow the solutions below to resolve this. + +::: + +## Problem + +Attempting to run the command `bash <(curl -s https://raw.githubusercontent.com/splashkit/skm/master/install-scripts/skm-install.sh)` results in no response from the terminal, with no indication of success or error. + +![skm install error](https://i.imgur.com/BD8jqnT.png) + +## Solutions + +### Solution 1: Check Internet Connection + +Make sure your device is connected to the internet, as this command depends on a stable connection to access the script online. + +--- + +### Solution 2: Temporarily Disable Firewall + +Sometimes, a MacOS firewall may block the terminal from downloading content. To check if this is the issue, temporarily disable your firewall: + + + +1. Open **System Preferences** and go to **Security & Privacy**. +2. Select the **Firewall** tab. +3. Click **Turn Off Firewall** temporarily and retry the command. + + + +Once the installation completes, you can re-enable the firewall for security. + +--- + +### Solution 3: Manually Download and Run the Script + +If the command still doesn’t respond, you can manually download and execute the script as follows: + + + +1. Go to the [skm-install.sh script](https://github.com/splashkit/skm/blob/master/install-scripts/skm-install.sh). +2. Click the “Download raw file” button (see below): + + ![Download Raw File](https://i.imgur.com/MWhWHRO.png) + +3. Save the file to an easily accessible location, such as the Downloads folder. +4. Open Terminal and type the command `bash` (with a space at the end). +5. Drag the downloaded file from Finder into the Terminal window, then press **Enter** to run it. + + + +![Drag and Drop into Terminal](https://i.imgur.com/LTCf6qW.png) diff --git a/src/content/docs/troubleshoot/MacOS/mac-issue-2.mdx b/src/content/docs/troubleshoot/MacOS/mac-issue-2.mdx new file mode 100644 index 000000000..d8ac994ca --- /dev/null +++ b/src/content/docs/troubleshoot/MacOS/mac-issue-2.mdx @@ -0,0 +1,55 @@ +--- +title: install dotnet-sdk command not working +description: Issue with the `brew cask install dotnet-sdk` command not working on MacOS, and how to fix it. +sidebar: + label: 2. Brew cask install +--- + +{/*NOTE: Can probably remove this one now that we no longer have this command in our installation guide*/} + +import { Steps } from '@astrojs/starlight/components'; + +:::caution[`brew cask install dotnet-sdk` Command Not Working] + +This guide addresses issues on MacOS where the command `brew cask install dotnet-sdk` fails. The instructions below provide the correct command and alternative installation options for the .NET SDK. + +::: + +## Problem + +Running `brew cask install dotnet-sdk` on MacOS returns an error, as `cask` is no longer required for this command in recent versions of Homebrew. + +## Solution + +### Corrected Command + +The updated command for installing .NET SDK is: + +```shell +brew install dotnet-sdk --cask +``` + +This command installs the latest compatible version of the .NET SDK using Homebrew. Make sure Homebrew is updated by running `brew update` before trying the installation. + +--- + +### Alternative Installation + +If Homebrew is not an option or you encounter further issues, you can download the .NET SDK directly from the Microsoft website: + + + +1. Go to the [.NET SDK 7.0 download page](https://dotnet.microsoft.com/en-us/download/dotnet/7.0). +2. Select the macOS installer link for your system architecture: + - **Arm64** for Apple Silicon (M1 and newer chips). + - **x64** for Intel-based Macs. + + + +Download and install using the installer provided on the website. + +**Note:** Make sure to choose the correct architecture for your Mac model to avoid compatibility issues. + +--- + +This should resolve issues with installing .NET SDK on MacOS via Homebrew or the Microsoft website. diff --git a/src/content/docs/troubleshoot/MacOS/mac-issue-3.mdx b/src/content/docs/troubleshoot/MacOS/mac-issue-3.mdx new file mode 100644 index 000000000..fb9b8fb7b --- /dev/null +++ b/src/content/docs/troubleshoot/MacOS/mac-issue-3.mdx @@ -0,0 +1,57 @@ +--- +title: ln -s /usr/local.... command not working +description: Issue with the `ln -s /usr/local/share/dotnet/dotnet /usr/local/bin` command not working on MacOS, and how to fix it. +sidebar: + label: 3. Local bin Error +--- + +import { Steps } from '@astrojs/starlight/components'; + +:::caution[`ln -s /usr/local/share/dotnet/dotnet /usr/local/bin` Command Not Working] + +This guide provides a solution for MacOS users encountering issues when trying to create a symbolic link for .NET using the command `ln -s /usr/local/share/dotnet/dotnet /usr/local/bin`. + +::: + +## Problem + +When running `ln -s /usr/local/share/dotnet/dotnet /usr/local/bin`, some users receive an error message or find that the command does not work as expected, often due to permission issues or existing conflicting files. + +![Error Example](https://i.imgur.com/MJgfrXW.png) + +## Solution + +To resolve this issue, use the following command, which includes `sudo` to grant temporary system (root) privileges: + +```shell +sudo ln -s /usr/local/share/dotnet/dotnet /usr/local/bin +``` + +*The `sudo` command is used here to give necessary permissions.* + + + +1. **Enter Your Password:** After running the command above, you will be prompted to enter your password. Type it in and press **Enter**. + +2. **If You Encounter a Permission Denied Error:** + + If you receive a “`zsh: permission denied: dotnet`” error, it’s likely due to an existing file conflict in the `/usr/local/bin` directory. + +3. **Delete the Existing Dotnet File:** + + Open Finder and navigate to the “`/usr/local/bin`” folder: + - Click “**Go**” at the top of the screen. + - Select “**Go to Folder…**” and enter `/usr/local/bin` as the folder path. + - In the `/usr/local/bin` folder, locate and delete any existing `dotnet` file. + +4. **Re-run the Command:** + + Open a new Terminal window and re-enter the command: + + ```shell + sudo ln -s /usr/local/share/dotnet/dotnet /usr/local/bin + ``` + + + +Following these steps should successfully create the symbolic link, allowing you to use the `dotnet` command from any terminal session. diff --git a/src/content/docs/troubleshoot/MacOS/mac-issue-4.mdx b/src/content/docs/troubleshoot/MacOS/mac-issue-4.mdx new file mode 100644 index 000000000..5108da0c3 --- /dev/null +++ b/src/content/docs/troubleshoot/MacOS/mac-issue-4.mdx @@ -0,0 +1,58 @@ +--- +title: System.DllNotFoundException +description: Issue with MacOS, `System.DllNotFoundException unable to load DLL splashkit.dll` when trying to run program, and how to fix it. +sidebar: + label: 4. DllNotFoundException +--- + +{/*NOTE: Can probably remove this one now that we have the macos install*/} + +import { Steps } from '@astrojs/starlight/components'; + +:::caution[`System.DllNotFoundException unable to load DLL splashkit.dll`] + +This guide provides solutions for MacOS users encountering the `System.DllNotFoundException` error when attempting to run programs that rely on `splashkit.dll`. This issue is often related to operating system compatibility or outdated SplashKit versions. + +::: + +## Problem + +When attempting to run a program that uses SplashKit on MacOS, you may encounter the following error message: `System.DllNotFoundException unable to load DLL splashkit.dll`. + +## Solutions + +### Ensure macOS is Updated + +Update your macOS to the latest version available. Ideally, your OS should be version **12.0** or later, as compatibility issues with `splashkit.dll` are less likely on recent versions of macOS. + +--- + +### For Older macOS Versions (Pre-12.0) + +If you are using a version of macOS older than 12.0, you can revert SplashKit to a previous version that may be more compatible with your system. Run the following commands in Terminal, one line at a time: + +```shell +cd ~/.splashkit +``` + +```shell +git fetch --unshallow +``` + +```shell +git checkout cbb68dc +``` + +**Note**: After these commands, using `skm dotnet new` might affect the structure of SplashKit project files. Instead, you can use this [Template SplashKit Project](https://deakin365-my.sharepoint.com/:u:/g/personal/o_mckeon_deakin_edu_au/EZWAVnpc1QxHqFB7KbZ-j_sBreJCSEJLomdDUKsnT7DykA?e=EKefqK) (*zipped folder*) for creating new projects. + +### Instructions + + + +1. Unzip the downloaded template. +2. Read the “`README.txt`” file for guidance on setting up new projects. +3. Review the `Program.cs` file, which includes a comment to help configure the project. Once set up, you can remove the comment lines. + + + +These steps should help resolve compatibility issues with `splashkit.dll` and ensure that your programs run smoothly. diff --git a/src/content/docs/troubleshoot/MacOS/mac-issue-5.mdx b/src/content/docs/troubleshoot/MacOS/mac-issue-5.mdx new file mode 100644 index 000000000..8859e842e --- /dev/null +++ b/src/content/docs/troubleshoot/MacOS/mac-issue-5.mdx @@ -0,0 +1,78 @@ +--- +title: zsh command not found skm +description: Issue with the `zsh` command not found on MacOS, and how to fix it. +sidebar: + label: 5. zsh not found +--- + +import { Steps } from '@astrojs/starlight/components'; + +:::caution[`zsh: command not found: skm`] + +This guide helps resolve the error `zsh: command not found: skm` on MacOS. This issue occurs when the SplashKit path is not correctly set in the `.zshrc` file. + +::: + +## Problem + +When trying to use `skm` in the terminal, you may encounter the error `zsh: command not found: skm`, indicating that the `.splashkit` directory is not included in your PATH. + +![Error Example](https://i.imgur.com/Qv8RaHc.png) + +## Solution + +To resolve this, add the `.splashkit` folder to your `.zshrc` file. Follow the steps below: + + + +1. **Locate Your `.zshrc` File** + + The `.zshrc` file is located in your home directory at `~/Users/(your username)/`. + + If you don’t see it, press **Shift + Command + . (dot)** to toggle hidden files visibility in Finder. + +2. **Identify Your Username (Optional)** + + To ensure you’re in the correct directory, you can use the `whoami` command in Terminal to check your username: + + ```shell + whoami + ``` + + ![Username Check Example](https://i.imgur.com/Le4nSdA.png) + +3. **Add SplashKit to PATH** + + Open the `.zshrc` file with a text editor and add the following line at the end to include the SplashKit path: + + ```shell + export PATH="$HOME/.splashkit:$PATH" + ``` + +4. **Optional: Add .NET Path to PATH** + + For .NET compatibility, add this line to your `.zshrc` file as well: + + ```shell + export PATH="/usr/local/share/dotnet:$PATH" + ``` + +5. **Optional: Enable VS Code from Terminal** + + To enable the `code .` command for opening Visual Studio Code from the terminal, add the following line: + + ```shell + export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin" + ``` + +6. **Apply Changes** + + Save the `.zshrc` file and then reload it with the following command to apply changes immediately: + + ```shell + source ~/.zshrc + ``` + + + +After completing these steps, your terminal should recognize the `skm` command, and you should be able to use SplashKit as expected. diff --git a/src/content/docs/troubleshoot/MacOS/mac-issue-6.mdx b/src/content/docs/troubleshoot/MacOS/mac-issue-6.mdx new file mode 100644 index 000000000..418b2762f --- /dev/null +++ b/src/content/docs/troubleshoot/MacOS/mac-issue-6.mdx @@ -0,0 +1,40 @@ +--- +title: Missing an assembly reference? +description: Issue with the error that mentions (`are you missing an assembly reference?`) on MacOS, and how to fix it. +sidebar: + label: 6. Assembly reference +--- + +import { Steps } from '@astrojs/starlight/components'; + +:::caution[Error: "Are you missing an assembly reference?"] + +This guide addresses the common error on MacOS where the message “are you missing an assembly reference?” appears when trying to run a SplashKit project. This is often due to a naming conflict in the project setup. + +::: + +## Problem + +When creating or running a SplashKit project, an error message stating "are you missing an assembly reference?" may appear. This can happen if the project is named "SplashKit," which conflicts with internal references. + +![Error Example](https://i.imgur.com/IE0qHXu.png) + +## Solution + +To resolve this error, ensure your project name is different from "SplashKit." + + + +1. **Rename Your Project Folder** + + Make sure the folder where you create your SplashKit project does not have the name “SplashKit.” + + Choose a unique name for the folder, as the project name is automatically derived from it. + +2. **Recreate the Project (if needed)** + + If the error persists, try recreating the project in a new folder with a different name to avoid any cached references to the previous setup. + + + +Following these steps should eliminate the naming conflict, allowing your SplashKit project to compile and run without the assembly reference error. diff --git a/src/content/docs/troubleshoot/MacOS/mac.mdx b/src/content/docs/troubleshoot/MacOS/mac.mdx deleted file mode 100644 index 4da3b3301..000000000 --- a/src/content/docs/troubleshoot/MacOS/mac.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: MacOS Troubleshooting -description: This page provides solutions to known installation issues encountered by Mac users while installing or using SplashKit. -lastUpdated: 2023-09-01 - -sidebar: - order: 2 ---- - -*This repository provides solutions to known installation issues encountered by Mac -users while installing SplashKit. If you are facing any problems with SplashKit, -refer to this document for possible solutions.* - -## Table of Contents - -- [Issue 1:](/troubleshoot/macos/list/mac-issue-1) "`bash <(curl -s https://raw.githubusercontent.com/splashkit/skm/master/installscripts/skm-install.sh)`" does nothing -- [Issue 2:](/troubleshoot/macos/list/mac-issue-2) "`brew cask install dotnet-sdk`" command not working (or any issues installing Homebrew) -- [Issue 3:](/troubleshoot/macos/list/mac-issue-3) "`ln -s /usr/local/share/dotnet/dotnet /usr/local/bin`" command not working -- [Issue 4:](/troubleshoot/macos/list/mac-issue-4) "`System.DllNotFoundException unable to load DLL splashkit.dll`" when trying to run program -- [Issue 5:](/troubleshoot/macos/list/mac-issue-5) "`zsh: command not found: skm`" -- [Issue 6:](/troubleshoot/macos/list/mac-issue-6) Error that mentions "(`are you missing an assembly reference?`)" diff --git a/src/content/docs/troubleshoot/Windows (MSYS2)/index.mdx b/src/content/docs/troubleshoot/Windows (MSYS2)/index.mdx new file mode 100644 index 000000000..b24efd90b --- /dev/null +++ b/src/content/docs/troubleshoot/Windows (MSYS2)/index.mdx @@ -0,0 +1,21 @@ +--- +title: Overview +description: This page provides solutions to known installation issues encountered by Windows users while installing or using SplashKit. +lastUpdated: 2024-10-30 +sidebar: + order: 1 + attrs: + class: windows +--- + +*This repository provides solutions to known installation issues encountered by Windows users while installing SplashKit. If you are facing any problems with SplashKit, refer to this document for possible solutions.* + +| Link | Description | +| -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| [Issue_1](/troubleshoot/windows-msys2/win-issue-1) | `bash <(curl -s https://raw.githubusercontent.com/splashkit/skm/master/installscripts/skm-install.sh)` does nothing | +| [Issue_2](/troubleshoot/windows-msys2/win-issue-2) | `System.DllNotFoundException unable to load DLL splashkit.dll` when trying to run program | +| [Issue_3](/troubleshoot/windows-msys2/win-issue-3) | `-bash: skm: command not found` | +| [Issue_4](/troubleshoot/windows-msys2/win-issue-4) | `Unable to find the .NET SDK` | +| [Issue_5](/troubleshoot/windows-msys2/win-issue-5) | `dotnet: command not found` | +| [Issue_6](/troubleshoot/windows-msys2/win-issue-6) | Error that mentions "(`are you missing an assembly reference?`)" | +| [Issue_7](/troubleshoot/windows-msys2/win-issue-7) | Guide: Update Environment System path | diff --git a/src/content/docs/troubleshoot/Windows (MSYS2)/win-issue-1.mdx b/src/content/docs/troubleshoot/Windows (MSYS2)/win-issue-1.mdx new file mode 100644 index 000000000..e731ab673 --- /dev/null +++ b/src/content/docs/troubleshoot/Windows (MSYS2)/win-issue-1.mdx @@ -0,0 +1,67 @@ +--- +title: bash <(curl.. does nothing +description: Issue in Windows, `bash <(curl -s https://raw.githubusercontent.com/splashkit/skm/master/install-scripts/skm-install.sh)` does nothing, and how to fix it. +sidebar: + label: 1. Bash curl not working +--- + +import { Steps } from '@astrojs/starlight/components'; + +:::caution[`bash <(curl -s ... install-scripts/skm-install.sh)` Command Does Nothing] + +This guide provides solutions for Windows users who encounter issues when trying to run the install script command from the main page. This command may not execute as expected due to firewall or connection issues. + +::: + +## Problem + +On Windows, running `bash <(curl -s https://raw.githubusercontent.com/splashkit/skm/master/install-scripts/skm-install.sh)` may result in no output or action in the terminal, often due to network settings or restrictions. + +![Error Example](https://i.imgur.com/c6ejBFS.png?1) + +## Solutions + +Follow the steps below to resolve this issue and successfully run the SplashKit installer script: + +### Check Your Internet Connection + +Ensure your computer is connected to the internet, as this command requires a stable connection to download the script. + +--- + +### Temporarily Disable Firewall + +Your firewall may be blocking the script from running. Try temporarily disabling your firewall: + + + +1. Open **Control Panel** and navigate to **System and Security** > **Windows Defender Firewall**. +2. Select **Turn Windows Defender Firewall on or off** and choose **Turn off** for both Private and Public networks. +3. Run the command again in your terminal, then re-enable the firewall after the installation. + + + +--- + +### Manually Download and Run the Script + +If the command still does nothing, you can manually download and run the script with the following steps: + + + +1. Go to the [skm-install.sh script](https://github.com/splashkit/skm/blob/master/install-scripts/skm-install.sh). +2. Click the “Download raw file” button as shown below: + + ![Download Raw File](https://i.imgur.com/MWhWHRO.png) + +3. Save the file to a location you can easily access, such as your **Downloads** folder. +4. Open the **MINGW64** terminal and type `bash` (with a space at the end). +5. Drag the downloaded file from **File Explorer** into the terminal window to add its path, as shown here: + + ![Drag and Drop Example](https://i.imgur.com/ZbcghXz.png) + +6. Press **Enter** to run the script. This should complete the installation of `skm`, allowing you to continue with the tutorial from the next step. + + + +These steps should allow you to successfully run the `skm` installation script on Windows. If issues persist, refer to the additional troubleshooting guides or contact support. diff --git a/src/content/docs/troubleshoot/Windows (MSYS2)/win-issue-2.mdx b/src/content/docs/troubleshoot/Windows (MSYS2)/win-issue-2.mdx new file mode 100644 index 000000000..9639a3cc2 --- /dev/null +++ b/src/content/docs/troubleshoot/Windows (MSYS2)/win-issue-2.mdx @@ -0,0 +1,87 @@ +--- +title: System.DllNotFoundException +description: Issue with Windows, `System.DllNotFoundException unable to load DLL splashkit.dll` when trying to run program, and how to fix it. +sidebar: + label: 2. DllNotFoundException +--- + +import { Steps } from '@astrojs/starlight/components'; + +:::caution[`System.DllNotFoundException unable to load DLL splashkit.dll`] + +This guide provides solutions for Windows users encountering the `System.DllNotFoundException` error when trying to run a SplashKit program. This error typically occurs when the `splashkit.dll` file is missing or not correctly linked to the project. + +::: + +## Problem + +When attempting to run a SplashKit program, you may see an error message: `System.DllNotFoundException unable to load DLL splashkit.dll`. This issue may stem from antivirus interference, path configuration, or project setup. + +![Error Example](https://i.imgur.com/uEz1nxT.png) + +## Solutions + +### Disable Antivirus Software Temporarily + +Some antivirus programs may block `splashkit.dll`. Temporarily disable your antivirus software and try running the program again. + +--- + +### Avoid Naming Conflicts + +Ensure your project name is not "SplashKit," as this can cause conflicts. Rename the project folder if necessary. + + --- + +### Use the Correct Terminal and Folder Setup + +- Open the **MINGW64** terminal, not the MSYS terminal, to create your project files. +- Ensure the project files are located in their own dedicated folder to avoid any path or configuration issues. + +--- + +### Manually Add `splashkit.dll` to Your System PATH + +To ensure Windows can locate `splashkit.dll`, manually add its directory to your PATH environment variable: + +- Follow steps 1–3 in the “Update your system PATH variable” section [here](/troubleshoot/windows-msys2/win-issue-7). +- Return to this guide and continue with the instructions below. + +#### Next Step + +- In the “Edit environment variable” window, ensure the following paths are added to your PATH, similar to the example in the green box below: + +![Path Configuration Example](https://i.imgur.com/lTzyRSo.png) + +- If any of the paths are missing, click **New** (red box) and add the missing path. Adjust it to match your own username. +- Once added, click **OK** in all windows, open a **new** MINGW64 terminal, and try running the program again. + +--- + +### Copy SplashKit Binaries to Your Build Output Folder (Last Resort) + +If all else fails, try manually copying the SplashKit binaries to your project’s build output directory: + + + + 1. Navigate to the folder containing SplashKit binaries at `C:\msys64\home\(your username)\.splashkit\lib\win64`. + + *Replace "(your username)" with your actual username (you can use the `whoami` command in the terminal to confirm your username).* + + Your folder contents should look similar to this: + + ![SplashKit Binaries Example](https://i.imgur.com/XRha19P.png) + + 2. Copy all files from this folder into your project’s build output directory, which is typically located at: + + `\bin\Debug\net7.0` + + For example, if your project folder is named "MyProject" and uses .NET 7.0, the path would be: + + `MyProject\bin\Debug\net7.0` + + **Note:** If you’re using a different .NET version, adjust the path accordingly. + + + +Following these steps should help resolve the `System.DllNotFoundException` error and allow your program to locate `splashkit.dll` properly. diff --git a/src/content/docs/troubleshoot/Windows (MSYS2)/win-issue-3.mdx b/src/content/docs/troubleshoot/Windows (MSYS2)/win-issue-3.mdx new file mode 100644 index 000000000..9a6ba7bc8 --- /dev/null +++ b/src/content/docs/troubleshoot/Windows (MSYS2)/win-issue-3.mdx @@ -0,0 +1,56 @@ +--- +title: skm command not found +description: Issue with the `skm` command not found on Windows, and how to fix it. +sidebar: + label: 3. skm not found +--- + +import { Steps } from '@astrojs/starlight/components'; + +:::caution[`-bash: skm: command not found`] + +This guide helps resolve the error `-bash: skm: command not found` on Windows. This issue typically arises when the system path for `skm` is not set correctly or is blocked by antivirus software. + +::: + +## Problem + +When trying to use `skm` in the terminal, you may see the error message `-bash: skm: command not found`. This usually indicates that the system cannot locate the `skm` executable, likely due to a missing path entry or antivirus interference. + +![Error Example](https://i.imgur.com/PMDiueq.png?1) + +## Solution + +Follow the steps below to add `skm` to your system PATH and resolve the issue. + +### Update Your System PATH Variable + +- Follow **Steps 1–3** in the “Update your system PATH variable” section [here](/troubleshoot/windows-msys2/win-issue-7). +- After completing those steps, return here for further instructions. + +--- + +### Disable Antivirus Temporarily + +Temporarily disable your antivirus software, as it may be blocking the `skm` command. Once the setup is complete, you can re-enable the antivirus for security. + +--- + +### Add Required Paths to PATH Variable + +Open the **Edit environment variable** window, and check for the two paths shown in the green box below: + +![Path Configuration Example](https://i.imgur.com/H9sF33y.png) + +If any of these paths are missing: + +- Click **New** (red box) and add the missing path. +- Replace any username-specific segments with your actual Windows username. + +Once added, click **OK** in all windows to save the changes. + +### Restart MINGW64 Terminal + +Open a **new** MINGW64 terminal window and try running the `skm` command again. + +These steps should resolve the issue, enabling the `skm` command to function as expected in your terminal. diff --git a/src/content/docs/troubleshoot/Windows (MSYS2)/win-issue-4.mdx b/src/content/docs/troubleshoot/Windows (MSYS2)/win-issue-4.mdx new file mode 100644 index 000000000..78cf1be09 --- /dev/null +++ b/src/content/docs/troubleshoot/Windows (MSYS2)/win-issue-4.mdx @@ -0,0 +1,54 @@ +--- +title: Unable find .NET SDK +description: Issue with the .NET SDK not found on Windows, and how to fix it. +sidebar: + label: 4. .NET SDK not found +--- + +import { Steps } from '@astrojs/starlight/components'; + +:::caution[`Unable to find the .NET SDK`] + +This guide provides a solution for Windows users who encounter the error message “Unable to find the .NET SDK.” This issue often arises when the system PATH is missing the .NET SDK directory. + +::: + +## Problem + +When trying to run a .NET project, you may see the error `Unable to find the .NET SDK`, indicating that the system cannot locate the required SDK files. + +![Error Example](https://i.imgur.com/sjzZGQa.png) + +## Solution + +To resolve this issue, add the .NET SDK folder to your system PATH. + +### Update Your System PATH Variable + +Start by following **Steps 1–3** in the “Update your system PATH variable” section [here](/troubleshoot/windows-msys2/win-issue-7). + +After completing those steps, return here to add the specific .NET SDK path. + +--- + +### Add .NET SDK Path to PATH Variable + + + +1. Open the **Edit environment variable** window. +2. Click **New** (red box) to add a new entry. +3. Enter the .NET SDK path as shown in the green box below: + + ![Path Configuration Example](https://i.imgur.com/T6wIBWt.png) + +4. Adjust the path if necessary, ensuring it aligns with the location where the .NET SDK is installed on your system (the default location is typically `C:\Program Files\dotnet`). + + + +### Restart MINGW64 Terminal + +Click **OK** on all open windows to save the changes. + +Open a **new** MINGW64 terminal window and try running the program again. + +Following these steps should allow Windows to locate the .NET SDK, enabling you to run your project without further issues. diff --git a/src/content/docs/troubleshoot/Windows (MSYS2)/win-issue-5.mdx b/src/content/docs/troubleshoot/Windows (MSYS2)/win-issue-5.mdx new file mode 100644 index 000000000..854a6d6be --- /dev/null +++ b/src/content/docs/troubleshoot/Windows (MSYS2)/win-issue-5.mdx @@ -0,0 +1,51 @@ +--- +title: dotnet command not found +description: Issue with the `dotnet` command not found on Windows, and how to fix it. +sidebar: + label: 5. Dotnet not found +--- + +import { Steps } from '@astrojs/starlight/components'; + +:::caution[`dotnet: command not found`] + +This guide helps resolve the error `dotnet: command not found` on Windows. This issue typically occurs when the system PATH does not include the .NET SDK directory. + +::: + +## Problem + +When trying to use the `dotnet` command in the terminal, you may see an error indicating that the command is not found. This is usually due to a missing .NET SDK path in the system PATH environment variable. + +![Error Example](https://i.imgur.com/gzi30bu.png) + +## Solution + +To resolve this, add the .NET SDK folder to your system PATH. + +### Update Your System PATH Variable + +Follow **Steps 1–3** in the “Update your system PATH variable” section [here](/troubleshoot/windows-msys2/win-issue-7). + +After completing those steps, return here to add the specific .NET SDK path. + +### Add .NET SDK Path to PATH Variable + + + +1. Open the **Edit environment variable** window. +2. Click **New** (red box) to add a new entry. +3. Enter the .NET SDK path as shown in the green box below: + + ![Path Configuration Example](https://i.imgur.com/T6wIBWt.png) + +4. Ensure the path aligns with the location where the .NET SDK is installed on your system, typically `C:\Program Files\dotnet`. + + + +### Restart MINGW64 Terminal + +- Click **OK** on all open windows to save the changes. +- Open a **new** MINGW64 terminal window and try running the `dotnet` command again. + +Following these steps should make the `dotnet` command available, allowing you to run .NET applications on Windows without further issues. diff --git a/src/content/docs/troubleshoot/Windows (MSYS2)/win-issue-6.mdx b/src/content/docs/troubleshoot/Windows (MSYS2)/win-issue-6.mdx new file mode 100644 index 000000000..e7d7528d0 --- /dev/null +++ b/src/content/docs/troubleshoot/Windows (MSYS2)/win-issue-6.mdx @@ -0,0 +1,40 @@ +--- +title: Missing an assembly reference? +description: Issue with the error that mentions (`are you missing an assembly reference?`) on Windows, and how to fix it. +sidebar: + label: 6. Assembly reference +--- + +import { Steps } from '@astrojs/starlight/components'; + +:::caution[Error: "Are you missing an assembly reference?"] + +This guide addresses the error on Windows where the message “are you missing an assembly reference?” appears when attempting to run a SplashKit project. This often occurs due to a naming conflict. + +::: + +## Problem + +When creating or running a SplashKit project on Windows, an error may appear stating, "are you missing an assembly reference?". This issue can happen if the project is named "SplashKit," which can conflict with internal references. + +![Error Example](https://i.imgur.com/2W23AI2.png) + +## Solution + +To resolve this error, avoid naming your project "SplashKit." + + + +1. **Rename Your Project Folder** + + Make sure the folder where you create your SplashKit project does not use the name “SplashKit.” + + Choose a unique folder name, as the project name is automatically generated based on this folder. + +2. **Recreate the Project (if needed)** + + If you continue to see the error, try recreating the project in a new folder with a different name to avoid cached references to the original setup. + + + +Following these steps should eliminate any naming conflicts, allowing your SplashKit project to compile and run without the assembly reference error. diff --git a/src/content/docs/troubleshoot/Windows (MSYS2)/win-issue-7.mdx b/src/content/docs/troubleshoot/Windows (MSYS2)/win-issue-7.mdx new file mode 100644 index 000000000..47e6d990a --- /dev/null +++ b/src/content/docs/troubleshoot/Windows (MSYS2)/win-issue-7.mdx @@ -0,0 +1,64 @@ +--- +title: system “Path” variable +description: Issue with the system “Path” variable on Windows, and how to fix it. +sidebar: + label: 7. Update Path Variable +--- + +import { Steps } from '@astrojs/starlight/components'; + +:::caution[Update Your System “Path” Variable on Windows] + +This guide provides instructions to update the system “Path” variable on Windows to include the paths required by SplashKit, resolving related issues. + +::: + +## Problem + +If essential paths for running SplashKit commands are missing from the system “Path” variable, you may encounter errors when attempting to run or compile projects. Updating the Path variable to include these paths will allow Windows to locate the necessary files. + +## Solution + +Follow these steps to update your system “Path” variable: + + + +1. **Open Environment Variables Settings** + + Use the taskbar search bar to type “environment variables.” + + Select the matching result, as shown below. + + ![Environment Variables Search](https://i.imgur.com/i3cb9nr.png) + +2. **Access the Environment Variables Menu** + + In the “System Properties” window, go to the **Advanced** tab (red box) and click **Environment Variables** (green box). + + ![System Properties](https://i.imgur.com/4Cbmnja.png) + +3. **Select the Path Variable for Editing** + + In the Environment Variables window, locate the **Path** variable (red box) and select it, then click **Edit** (green box). + + ![Edit Path Variable](https://i.imgur.com/e4H9XIF.png) + + **Tip:** To find your username for the paths in the next steps, open File Explorer or type `whoami` in the terminal to confirm your username. + + ![Finding Username](https://i.imgur.com/2neJLOs.png) + +4. **Add Required Paths for SplashKit** + + In the “Edit Environment Variable” window, add the necessary paths by clicking **New** and entering each path. Replace “your_username” with your actual username. + + ![Add Paths](https://i.imgur.com/AvNrlNV.png) + + Once the paths are added, click **OK** on all open windows to save your changes. + +5. **Verify the Update** + + Open a **new** MINGW64 terminal and run your program to confirm the paths have been correctly set and that SplashKit functions as expected. + + + +Following these steps should resolve any issues related to the system “Path” variable and ensure SplashKit commands run smoothly on Windows. diff --git a/src/content/docs/troubleshoot/Windows (WSL)/WSL.mdx b/src/content/docs/troubleshoot/Windows (WSL)/WSL.mdx deleted file mode 100644 index 4b54776f5..000000000 --- a/src/content/docs/troubleshoot/Windows (WSL)/WSL.mdx +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Windows (WSL) Troubleshooting -description: This page provides solutions to known installation issues encountered by WSL users while installing or using SplashKit. -lastUpdated: 2024-07-31 -sidebar: - order: 2 ---- - -*This repository provides solutions to known installation issues encountered by WSL users while installing SplashKit. If you are facing any problems with SplashKit, refer to this document for possible solutions.* - -## Table of Contents - -- [Issue 1:](/troubleshoot/windows-wsl/list/wsl-issue-1) `Exception has occurred: CLR/System.StackOverflowException` when trying to open GUI applications. diff --git a/src/content/docs/troubleshoot/Windows (WSL)/index.mdx b/src/content/docs/troubleshoot/Windows (WSL)/index.mdx new file mode 100644 index 000000000..dbc582c2f --- /dev/null +++ b/src/content/docs/troubleshoot/Windows (WSL)/index.mdx @@ -0,0 +1,15 @@ +--- +title: Overview +description: This page provides solutions to known installation issues encountered by WSL users while installing or using SplashKit. +lastUpdated: 2024-10-30 +sidebar: + order: 2 + attrs: + class: windows-wsl +--- + +*This repository provides solutions to known installation issues encountered by WSL users while installing SplashKit. If you are facing any problems with SplashKit, refer to this document for possible solutions.* + +| Link | Description | +| ------------------------------------------------ | ------------------------------------------------------------------------------------------------- | +| [Issue_1](/troubleshoot/windows-wsl/wsl-issue-1) | `Exception has occurred: CLR/System.StackOverflowException` when trying to open GUI applications. | diff --git a/src/content/docs/troubleshoot/Windows (WSL)/list/wsl-issue-1.md b/src/content/docs/troubleshoot/Windows (WSL)/list/wsl-issue-1.md deleted file mode 100644 index 6b32d729f..000000000 --- a/src/content/docs/troubleshoot/Windows (WSL)/list/wsl-issue-1.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: Stack overflow Exception for GUI applications in WSL -description: Stack Overflow Exception when trying to open GUI application in WSL and how to resolve it. -sidebar: - label: 1. Stack Overflow - attrs: - class: windows ---- -

Issue : WSL

- -### Stack Overflow Exception when trying to open GUI application in WSL - -![Image showing stack overflow issue when debugging](/images/installation/wsl/stack-overflow-error-wsl-terminal.png) - -![Image showing stack overflow issue when debugging](/images/installation/wsl/stack-overflow-error-wsl-debug.png) - -## Solutions - -To run Linux GUI Apps in WSL, you need to install the correct vGPU driver for your system. Here are the steps to resolve the stack overflow exception: - -### Step 1 - -- Update your WSL with the command `wsl --update`, then restart your WSL by doing `wsl --shutdown` and then `wsl` to restart it. - -### Step 2 - -- Find and install the correct vGPU driver for your system to run Linux GUI apps: - - - [Intel Graphics Driver](https://www.intel.com/content/www/us/en/download/19344/intel-graphics-windows-dch-drivers.html) - - [AMD Graphics Driver](https://www.amd.com/en/support/download/drivers.html) - - [NVIDIA Graphics Driver](https://www.nvidia.com/Download/index.aspx?lang=en-us) - -For more information, you can read Microsoft's [Run Linux GUI apps on the Windows Subsystem for Linux](https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps) article. diff --git a/src/content/docs/troubleshoot/Windows (WSL)/wsl-issue-1.mdx b/src/content/docs/troubleshoot/Windows (WSL)/wsl-issue-1.mdx new file mode 100644 index 000000000..9f4c1c314 --- /dev/null +++ b/src/content/docs/troubleshoot/Windows (WSL)/wsl-issue-1.mdx @@ -0,0 +1,59 @@ +--- +title: Stack overflow Exception for GUI applications in WSL +description: Stack Overflow Exception when trying to open GUI application in WSL and how to resolve it. +sidebar: + label: 1. Stack Overflow +--- + +import { Steps } from '@astrojs/starlight/components'; + +:::caution[Stack Overflow Exception When Opening GUI Application in WSL] + +This guide addresses a Stack Overflow Exception encountered when trying to open a GUI application within the Windows Subsystem for Linux (WSL). This issue typically arises when the necessary vGPU driver for running Linux GUI applications in WSL is missing. + +::: + +## Problem + +When attempting to launch a Linux GUI application in WSL, a Stack Overflow Exception error may occur due to compatibility or driver issues, preventing the app from running correctly. + +![Stack Overflow Error in Terminal](/images/installation/wsl/stack-overflow-error-wsl-terminal.png) + +![Stack Overflow Error in Debug Mode](/images/installation/wsl/stack-overflow-error-wsl-debug.png) + +## Solutions + +To enable Linux GUI applications in WSL, follow these steps to ensure you have the correct environment and drivers: + + + +1. **Update WSL** + + Start by updating your WSL installation with the command below: + + ```shell + wsl --update + ``` + + After updating, restart WSL to apply the changes: + + ```shell + wsl --shutdown + wsl + ``` + + --- + +2. **Install the Appropriate vGPU Driver** + + Install the correct virtual GPU (vGPU) driver for your system to enable support for Linux GUI applications in WSL. Select the driver that matches your hardware: + + - [Intel Graphics Driver](https://www.intel.com/content/www/us/en/download/19344/intel-graphics-windows-dch-drivers.html) + - [AMD Graphics Driver](https://www.amd.com/en/support/download/drivers.html) + - [NVIDIA Graphics Driver](https://www.nvidia.com/Download/index.aspx?lang=en-us) + + + +For further details, consult Microsoft’s guide on [Running Linux GUI Apps on the Windows Subsystem for Linux](https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps). + +Following these steps should resolve the Stack Overflow Exception and allow you to successfully run GUI applications within WSL. diff --git a/src/content/docs/troubleshoot/Windows/list/win-issue-1.md b/src/content/docs/troubleshoot/Windows/list/win-issue-1.md deleted file mode 100644 index dab3b2d67..000000000 --- a/src/content/docs/troubleshoot/Windows/list/win-issue-1.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: bash <(curl.. does nothing -description: A reference page in my new Starlight docs site. -sidebar: - label: 1. Bash curl not working - attrs: - class: windows ---- - -

Issue : Windows

- -## "`bash <(curl -s https://raw.githubusercontent.com/splashkit/skm/master/install-scripts/skm-install.sh)`" does nothing - -![-](https://i.imgur.com/c6ejBFS.png?1) - -## Solutions - -1. Solution 1: - - Make sure you are connected to the internet. -1. Solution 2: - - Disable your computer’s firewall. -1. Solution 3: Go to this URL: [here](https://github.com/splashkit/skm/blob/master/install-scripts/skm-install.sh) - - Then click the “Download raw file” button shown below (where the red arrow is pointing - to) and save it to somewhere like the Downloads folder: - ![-](https://i.imgur.com/MWhWHRO.png) - Then open File Explorer to wherever you saved it. -In the MINGW64 terminal, type `bash` and then drag and drop the file from File Explorer -into the terminal window: - ![-](https://i.imgur.com/ZbcghXz.png) - Press "`Enter`" and that should run the script. That will install skm, and you can carry on in the -tutorial from after the "`bash <( curl -s....)`" step. diff --git a/src/content/docs/troubleshoot/Windows/list/win-issue-2.md b/src/content/docs/troubleshoot/Windows/list/win-issue-2.md deleted file mode 100644 index 5100f0122..000000000 --- a/src/content/docs/troubleshoot/Windows/list/win-issue-2.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: System.DllNotFoundException -description: A reference page in my new Starlight docs site. -sidebar: - label: 2. DllNotFoundException - attrs: - class: windows ---- - -

Issue : Windows

- -## `System.DllNotFoundException unable to load DLL splashkit.dll` when trying to run program - -![-](https://i.imgur.com/uEz1nxT.png) - -## Solutions - -1. **Solution 1:** - - Disable any antivirus software on your computer. -1. **Solution 2:** - - Make sure your project isn't called "SplashKit". -1. **Solution 3:** - - Make sure you are creating your project using the MINGW64 terminal (rather than the MSYS -terminal) and create the project files in its own directory/folder. -1. **Solution 4:** - Add the folder containing splashkit.dll file to your path environment variable manually. - Firstly, go through Steps 1 – 3 shown in the “Update your system “Path” variable” section [here](/troubleshoot/windows/list/win-issue-7). - - Then come back here for the Next Step. - - **Next Step:** In the “Edit environment variable” window, you should have these two paths - shown in the image below (Green Box) – on the next page - ![-](https://i.imgur.com/lTzyRSo.png) - If you are missing one of the paths in the Green box, click "New" (Red box), then add the - path you are missing. It will be similar to what is shown in the Green box - just using your - own username. - - Once it is added, click “OK” on all the windows, open a **new** MINGW64 terminal and try - running the program again. -1. **Solution 5 (if all else fails):** - Get it working by copying the SplashKit binaries to the build output: - The SplashKit binaries are in - - `C:\msys64\home\(your username)\.splashkit\lib\win64` - *Replace "(your username)" with your username. (See Note about “whoami” above to get -your username.)* - - The contents of the folder should look something like this: - ![-](https://i.imgur.com/XRha19P.png) - Copy all of these into the build output of your SplashKit project. - This will usually be: - - `\bin\Debug\net7.0` - - *eg, if the folder name is MyProject, and you are using .NET 7.0, it would be:* - - `MyProject\bin\Debug\net7.0` diff --git a/src/content/docs/troubleshoot/Windows/list/win-issue-3.md b/src/content/docs/troubleshoot/Windows/list/win-issue-3.md deleted file mode 100644 index 18fc4cac6..000000000 --- a/src/content/docs/troubleshoot/Windows/list/win-issue-3.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: skm command not found -description: A reference page in my new Starlight docs site. -sidebar: - label: 3. skm not found - attrs: - class: windows ---- - -

Issue : Windows

- -## `-bash: skm: command not found` - -![-](https://i.imgur.com/PMDiueq.png?1) - -## Solution - -Firstly, go through Steps 1 – 3 shown in the “Update your system “Path” variable” section [here](/troubleshoot/windows/list/win-issue-7) - -Then come back here for the Next Step. -Disable any antivirus software on your computer. - -**Next Step:** -In the “Edit environment variable” window, you should have these two paths shown in the image below (Green Box): - -![-](https://i.imgur.com/H9sF33y.png) - -If you are missing one of the paths in the Green box, click "New" (Red box), then add the -path you are missing. -It will be similar to what is shown in the Green box - just using your own username. - -Once it is added, click “OK” on all the windows, open a **new** MINGW64 terminal and tryrunning the program again. diff --git a/src/content/docs/troubleshoot/Windows/list/win-issue-4.md b/src/content/docs/troubleshoot/Windows/list/win-issue-4.md deleted file mode 100644 index 43800b2cd..000000000 --- a/src/content/docs/troubleshoot/Windows/list/win-issue-4.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: Unable find .NET SDK -description: A reference page in my new Starlight docs site. -sidebar: - label: 4. .NET SDK not found - attrs: - class: windows ---- - -

Issue : Windows

- -## `Unable to find the .NET SDK:` - -![-](https://i.imgur.com/sjzZGQa.png) - -**Solution :** -You might need to add the dotnet folder path to your “Path” environment variable. - -Firstly, go through Steps 1 – 3 shown in the “Update your system “Path” variable” section [here](/troubleshoot/windows/list/win-issue-7) - -Then come back here for the Next Step. - -**Next Step:** In the “Edit environment variable” window, click "New" (Red box), then add the -path shown in the Green box: -![-](https://i.imgur.com/T6wIBWt.png) - -Once it is added, click “OK” on all the windows, open a **new** MINGW64 terminal and try running the program again. diff --git a/src/content/docs/troubleshoot/Windows/list/win-issue-5.md b/src/content/docs/troubleshoot/Windows/list/win-issue-5.md deleted file mode 100644 index 3aee24a01..000000000 --- a/src/content/docs/troubleshoot/Windows/list/win-issue-5.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: dotnet command not found -description: A reference page in my new Starlight docs site. -sidebar: - label: 5. Dotnet not found - attrs: - class: windows ---- - -

Issue : Windows

- -## “`dotnet: command not found`” - -![-](https://i.imgur.com/gzi30bu.png) - -## Solution - -You might need to add the dotnet folder path to your “Path” environment variable. -Firstly, go through Steps 1 – 3 shown in the “Update your system “Path” variable” section [here](/troubleshoot/windows/list/win-issue-7). - -Then come back here for the Next Step. -**Next Step:** In the “Edit environment variable” window, click "New" (Red box), then add the -path shown in the Green box: - -![-](https://i.imgur.com/T6wIBWt.png) - -Once it is added, click “`OK`” on all the windows, open a **new** MINGW64 terminal and try running the program again. diff --git a/src/content/docs/troubleshoot/Windows/list/win-issue-6.md b/src/content/docs/troubleshoot/Windows/list/win-issue-6.md deleted file mode 100644 index 7f0ae7733..000000000 --- a/src/content/docs/troubleshoot/Windows/list/win-issue-6.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Missing an assembly reference? -description: A reference page in my new Starlight docs site. -sidebar: - label: 6. Assembly reference - attrs: - class: windows ---- - -

Issue : Windows

- -## Error that mentions “(`are you missing an assembly reference?`)” - -![-](https://i.imgur.com/2W23AI2.png) - -## Solution - -If your project is called SplashKit, choose a different name for it. - -**Note:** The project name is created from the name of the folder where you are creating the -SplashKit project in your terminal. diff --git a/src/content/docs/troubleshoot/Windows/list/win-issue-7.md b/src/content/docs/troubleshoot/Windows/list/win-issue-7.md deleted file mode 100644 index 578d844c3..000000000 --- a/src/content/docs/troubleshoot/Windows/list/win-issue-7.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: system “Path” variable -description: A reference page in my new Starlight docs site. -sidebar: - label: 7. Update Path Variable - attrs: - class: windows ---- - -## Update your system “Path” variable - -Steps to add to the "Path" environment variable: - -1. Search for "environment variables" using the search on the task bar: - - ![-](https://i.imgur.com/i3cb9nr.png) - - (**Note:** Red box - this might look like a text box for you, Yellow box - you should only have to - type "`env`", then Green box - That's what you click on.) -1. Under the "`Advanced`" Tab (Red box), click on "`Environment variables`" (Green box): - - ![-](https://i.imgur.com/4Cbmnja.png) -1. Click on "`Path`" (Red box), then click "`Edit`" (Green box): - - ![-](https://i.imgur.com/e4H9XIF.png) - - **Note about finding username (for Next Steps):** You can look through your folders in file - explorer to get your username if needed, or use the command in the terminal as - shown below: - ![-](https://i.imgur.com/2neJLOs.png) - - ***(Step 4 on next page – This is just a step showing the 3 required paths for SplashKit)*** -1. In the “Edit environment variable” window, you should have the following paths shown in the Green box (using your own username): - ![-](https://i.imgur.com/AvNrlNV.png) - - Once you have these paths, click “OK” on all the windows, open a new MINGW64 terminal -and try running the program again. diff --git a/src/content/docs/troubleshoot/Windows/windows.mdx b/src/content/docs/troubleshoot/Windows/windows.mdx deleted file mode 100644 index 82b620af8..000000000 --- a/src/content/docs/troubleshoot/Windows/windows.mdx +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Windows (MSYS2) Troubleshooting -description: This page provides solutions to known installation issues encountered by Windows users while installing or using SplashKit. -lastUpdated: 2023-09-01 -sidebar: - order: 1 ---- - -*This repository provides solutions to known installation issues encountered by Windows users while installing SplashKit. If you are facing any problems with SplashKit, refer to this document for possible solutions.* - -## Table of Contents - -- [Issue 1](/troubleshoot/windows/list/win-issue-1): "`bash <(curl -s https://raw.githubusercontent.com/splashkit/skm/master/installscripts/skm-install.sh)`" does nothing -- [Issue 2](/troubleshoot/windows/list/win-issue-2): "`System.DllNotFoundException unable to load DLL splashkit.dll`" when trying to run program -- [Issue 3](/troubleshoot/windows/list/win-issue-3): "`-bash: skm: command not found`" -- [Issue 4](/troubleshoot/windows/list/win-issue-4): `Unable to find the .NET SDK` -- [Issue 5](/troubleshoot/windows/list/win-issue-5) : "`dotnet: command not found`" -- [Issue 6](/troubleshoot/windows/list/win-issue-6) : Error that mentions "(`are you missing an assembly reference?`)" -- [Issue 7](/troubleshoot/windows/list/win-issue-7): Guide: Update Environment System path diff --git a/src/content/docs/troubleshoot/index.mdx b/src/content/docs/troubleshoot/index.mdx index ea17ea907..ebd2de6a4 100644 --- a/src/content/docs/troubleshoot/index.mdx +++ b/src/content/docs/troubleshoot/index.mdx @@ -14,17 +14,31 @@ sidebar: import { LinkCard, CardGrid } from '@astrojs/starlight/components'; +:::tip[Troubleshooting with SplashKit?] +If you encounter issues, ensure SplashKit is properly installed, check for syntax errors in your code, and consult the documentation for common solutions. - - - -:::tip[Troubleshooting with SplashKit? ] -Ensure proper library installation, check code syntax for errors, and consult the documentation for common issues and solutions to swiftly resolve any programming hiccups. +Updating your SplashKit installation can often resolve compatibility or bug-related issues. Follow the steps in the [Updating SplashKit Guide](/installation/update-splashkit) to make sure you're using the latest version. ::: - - + + + + - - diff --git a/src/content/docs/usage-examples/CONTRIBUTING.mdx b/src/content/docs/usage-examples/CONTRIBUTING.mdx index 9e04f2875..b7fa732f6 100644 --- a/src/content/docs/usage-examples/CONTRIBUTING.mdx +++ b/src/content/docs/usage-examples/CONTRIBUTING.mdx @@ -7,7 +7,10 @@ sidebar: To contribute a function usage example, you need to create the following files: - **Text file** (.txt) containing a title and short description of the example. -- **Image file** (.png) (or **Gif file** (.gif) if the example code is interactive) showing the expected output of the example. +- **Output Image/Video file** showing the expected output of the example. This output file needs to be one of the following: + - **Image file** (.png) + - **Gif file** (.gif) if the example code is interactive + - **Webm file** (.webm) if there is audio in the code example. - **Code files** with the example code. This must be a complete code example, not just a snippet of code. - ***Zip file*** (*only if your code requires resource files*) containing the "Resources" folder created with the `skm resources` command, with any resources needed for your example code to run. (More info about adding this at the end.) @@ -79,13 +82,14 @@ Here is an example of the contents of the `write_line-2-extended.txt` file: The following code is an example of using [Write Line](/api/terminal#write-line-5) to create ASCII art of "Charlie the Unicorn" in the terminal. ``` -### Image of Gif file +### Output Image/Gif/Audio file Add a screenshot of the output of the example program. -If the example program includes user input or any movement, please create a Gif showing the program running. +- If the example program includes user input or any movement, please create a Gif showing the program running. +- If the example program includes audio, please create a Webm file showing the program running. You can use a tool such as [ffmpeg](https://ffmpeg.org/) to convert your video files to `.webm` files. -Remove identifying details from the image/gif where possible. +Remove identifying details from the image/gif/audio where possible. ### Code file(s) @@ -125,7 +129,7 @@ To test this example code you can download these [**Resources**](/usage-examples Then update the link in the template above to add the ``, `` and ``. -eg. For the `draw_bitmap_named` example that has been created, the text file contents would look like this: +eg. For the first `draw_bitmap_named` example that has been created, the text file contents would look like this: ```plaintext ### Basic Bitmap Drawing