You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ark_main_config.md
+41-1Lines changed: 41 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,21 +16,61 @@ workspace:
16
16
exclude:
17
17
- ".git/**"
18
18
- "venv/**"
19
+
- "**/__pycache__/**"
19
20
20
21
build:
21
22
engine: pyinstaller
22
23
output: dist/
23
24
icon: assets/icon.ico
24
25
exclude:
25
-
- "tests/**"
26
+
- "tkinter"
27
+
- "unittest"
26
28
data:
27
29
- source: assets/
28
30
destination: assets/
31
+
type: dir
32
+
- source: config.json
33
+
destination: config.json
34
+
type: file
29
35
30
36
plugins:
31
37
bcasl_enabled: true
32
38
```
33
39
40
+
## Build Data Mappings
41
+
42
+
The `build.data` section defines external files and directories to be bundled with the executable. Each entry must specify:
43
+
44
+
- `source`: The relative path to the asset.
45
+
- `destination`: The relative path where the asset will be placed in the final bundle.
46
+
- `type`: Explicitly categorize the asset:
47
+
- `dir`: For entire directories.
48
+
- `file`: For single files.
49
+
50
+
> **Note**: For backward compatibility, `type` defaults to `dir` if omitted, but explicit typing is highly recommended.
51
+
52
+
## Build Exclusions vs Workspace Exclusions
53
+
54
+
It is critical to distinguish between these two exclusion sections. Using them interchangeably is a common source of build failures.
55
+
56
+
### 1. `workspace.exclude` (UI Filter)
57
+
Used exclusively for the **GUI workspace view filter**.
58
+
- **Purpose**: Hide files and folders from the file list in the user interface.
59
+
- **Usage**: Perfect for `.git/`, `venv/`, `__pycache__/`, or other technical folders you don't want to see in the GUI.
60
+
61
+
### 2. `build.exclude` (Python Packages)
62
+
Determines which **Python packages/modules** are ignored by the compiler.
63
+
- **Purpose**: Prevent specific Python libraries from being bundled.
64
+
- **Restriction**: This is **NOT** a general folder excluder. It should **NEVER** contain technical patterns like `*.pyc`, `__pycache__`, or `.git`. These are handled automatically by the Core or should be hidden via `workspace.exclude`.
65
+
66
+
⚠️ **CRITICAL WARNING: Name Collisions**
67
+
Patterns in `build.exclude` are passed to engines (like Nuitka or PyInstaller) as **logical module exclusions**.
68
+
69
+
If you have a local folder named `venv` (your virtual environment) and you add `venv` to `build.exclude` thinking you are excluding a directory, you are actually telling the compiler: *"Do not bundle the Python package named 'venv'"*.
70
+
If your project or any dependency uses `import venv` (the standard library), your application **will crash** because the library was removed from the bundle.
71
+
72
+
**Rule of thumb**: Only use `build.exclude` for real Python modules you want to remove (e.g., `tkinter`, `unittest`, or a specific large sub-package). For everything else, use `workspace.exclude`.
73
+
34
74
## Build Entrypoint
35
75
36
76
`project.entry`defines the primary script to compile. It must be a path relative to the workspace root.
0 commit comments