Upload readme
Browse files
readme
CHANGED
|
@@ -58,23 +58,31 @@ python adviceprinter.py
|
|
| 58 |
|
| 59 |
These instructions will guide you through packaging the Python script into a standalone macOS application (`.app`) and then creating a user-friendly disk image (`.dmg`) for distribution.
|
| 60 |
|
|
|
|
| 61 |
### Step 1: Build the `.app` Bundle
|
| 62 |
We will use `PyInstaller` to bundle our script and all its dependencies into a single executable application.
|
| 63 |
|
| 64 |
```bash
|
| 65 |
-
pyinstaller --onefile --windowed --icon=
|
| 66 |
```
|
| 67 |
**Command Breakdown:**
|
| 68 |
* `--onefile`: Bundles everything into a single executable file inside the `.app` package.
|
| 69 |
* `--windowed`: Prevents the terminal console window from appearing when the GUI application is launched.
|
| 70 |
-
* `--icon=
|
| 71 |
|
| 72 |
This command will create `build` and `dist` directories. Your final application, `adviceprinter.app`, will be inside the `dist` directory.
|
| 73 |
|
| 74 |
### Step 2: Prepare the Disk Image (`.dmg`) Contents
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
A `.dmg` file provides a familiar drag-and-drop installation experience for macOS users. We'll create a temporary folder to stage the contents of our disk image.
|
| 76 |
|
|
|
|
| 77 |
```bash
|
|
|
|
|
|
|
| 78 |
# Create a staging directory for the DMG contents
|
| 79 |
mkdir dmg_content
|
| 80 |
|
|
|
|
| 58 |
|
| 59 |
These instructions will guide you through packaging the Python script into a standalone macOS application (`.app`) and then creating a user-friendly disk image (`.dmg`) for distribution.
|
| 60 |
|
| 61 |
+
|
| 62 |
### Step 1: Build the `.app` Bundle
|
| 63 |
We will use `PyInstaller` to bundle our script and all its dependencies into a single executable application.
|
| 64 |
|
| 65 |
```bash
|
| 66 |
+
pyinstaller --onefile --windowed --icon=logo.icns adviceprinter.py
|
| 67 |
```
|
| 68 |
**Command Breakdown:**
|
| 69 |
* `--onefile`: Bundles everything into a single executable file inside the `.app` package.
|
| 70 |
* `--windowed`: Prevents the terminal console window from appearing when the GUI application is launched.
|
| 71 |
+
* `--icon=logo.icns`: Sets the application icon. **Note:** For macOS, it is highly recommended to use a `.icns` file instead of `.ico` for proper display.
|
| 72 |
|
| 73 |
This command will create `build` and `dist` directories. Your final application, `adviceprinter.app`, will be inside the `dist` directory.
|
| 74 |
|
| 75 |
### Step 2: Prepare the Disk Image (`.dmg`) Contents
|
| 76 |
+
|
| 77 |
+
For this step, you will need **Homebrew** installed. If you don't have it, you can install it from [brew.sh](https://brew.sh/).
|
| 78 |
+
|
| 79 |
+
|
| 80 |
A `.dmg` file provides a familiar drag-and-drop installation experience for macOS users. We'll create a temporary folder to stage the contents of our disk image.
|
| 81 |
|
| 82 |
+
|
| 83 |
```bash
|
| 84 |
+
brew install create-dmg
|
| 85 |
+
|
| 86 |
# Create a staging directory for the DMG contents
|
| 87 |
mkdir dmg_content
|
| 88 |
|