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
After successful packaging, two executable files will be generated in the `dist` directory:
50
85
51
86
-`UserBank_Stdio_Core.exe` - Standard MCP server based on `main.py`
52
87
-`UserBank_SSE_Core.exe` - SSE mode server based on `main_sse.py`
53
88
89
+
### macOS
90
+
After successful packaging, two executable files will be generated in the `dist` directory:
91
+
92
+
-`UserBank_Stdio_Core` - Standard MCP server based on `main.py`
93
+
-`UserBank_SSE_Core` - SSE mode server based on `main_sse.py`
94
+
54
95
## Running Instructions
55
96
56
-
### UserBank_Stdio_Core.exe
97
+
### Windows
98
+
99
+
#### UserBank_Stdio_Core.exe
57
100
- This is the standard MCP server
58
101
- Double-click to run and start the server
59
102
- Suitable for MCP client connections
60
103
61
-
### UserBank_SSE_Core.exe
104
+
####UserBank_SSE_Core.exe
62
105
- This is the SSE mode HTTP server
63
106
- Double-click to start the web server
64
107
- Default listening port is determined by configuration file
65
108
- Supports CORS and can be accessed through browsers
66
109
110
+
### macOS
111
+
112
+
#### UserBank_Stdio_Core
113
+
- This is the standard MCP server
114
+
- Run in terminal: `./dist/UserBank_Stdio_Core`
115
+
- Suitable for MCP client connections
116
+
117
+
#### UserBank_SSE_Core
118
+
- This is the SSE mode HTTP server
119
+
- Run in terminal: `./dist/UserBank_SSE_Core`
120
+
- Default listening port is determined by configuration file
121
+
- Supports CORS and can be accessed through browsers
122
+
67
123
## Important Notes
68
124
69
125
1.**Dependency Inclusion**: The packaging process automatically includes all necessary dependency files:
@@ -73,28 +129,34 @@ After successful packaging, two executable files will be generated in the `dist`
73
129
74
130
2.**Hidden Imports**: Configuration files include all necessary hidden imports to ensure no module missing issues at runtime
75
131
76
-
3.**File Size**: Generated exe files may be large (typically 50-100MB), which is normal as they contain the complete Python runtime and all dependencies
132
+
3.**File Size**: Generated executable files may be large (typically 50-100MB), which is normal as they contain the complete Python runtime and all dependencies
77
133
78
-
4.**Runtime Environment**: Generated exe files can run on any Windows machine without requiring Python installation
134
+
4.**Runtime Environment**:
135
+
- Windows: Generated exe files can run on any Windows machine without requiring Python installation
136
+
- macOS: Generated executables can run on any macOS machine without requiring Python installation
79
137
80
-
5.**Configuration Files**: Ensure configuration files and database files are in the same directory as the exe files or in correct relative paths
138
+
5.**Configuration Files**: Ensure configuration files and database files are in the same directory as the executable files or in correct relative paths
81
139
82
140
## Troubleshooting
83
141
84
142
### If Build Fails
85
-
1. Ensure all dependencies are properly installed: `pip install -r requirements.txt`
143
+
1. Ensure all dependencies are properly installed:
144
+
- Windows: `pip install -r requirements.txt`
145
+
- macOS: `pip3 install -r requirements.txt`
86
146
2. Check for syntax errors or import errors
87
147
3. Review PyInstaller's detailed error messages
88
148
89
149
### If Runtime Errors Occur
90
150
1. Check if configuration file paths are correct
91
151
2. Ensure database files exist and are accessible
92
-
3. Review error messages in console output
152
+
3. Review error messages in console/terminal output
93
153
94
154
### Common Issues
95
155
-**Module Not Found**: Check if `hiddenimports` list includes all necessary modules
96
156
-**File Path Errors**: Ensure file paths in `datas` list are correct
97
-
-**Permission Issues**: Ensure sufficient permissions to create and run exe files
157
+
-**Permission Issues**:
158
+
- Windows: Ensure sufficient permissions to create and run exe files
159
+
- macOS: Ensure sufficient permissions to create and run executables, may need to use `chmod +x` command
98
160
99
161
## Custom Configuration
100
162
@@ -104,4 +166,18 @@ If you need to modify the packaging configuration, you can edit the `.spec` file
104
166
- Add `icon` field to set program icon
105
167
- Modify `console` field to control console window visibility
106
168
- Add additional data files in `datas`
107
-
- Add additional hidden import modules in `hiddenimports`
169
+
- Add additional hidden import modules in `hiddenimports`
170
+
171
+
## Security Considerations
172
+
173
+
1.**Code Signing**:
174
+
- Windows: Digital certificate signing recommended
175
+
- macOS: Code signing recommended to avoid security warnings
176
+
2.**Permission Settings**: Ensure application has appropriate file system access permissions
177
+
3.**Firewall Settings**: If using SSE mode, ensure firewall allows application network access
178
+
179
+
## Performance Optimization
180
+
181
+
1.**UPX Compression**: UPX compression enabled by default to reduce file size
182
+
2.**Resource Optimization**: Resource inclusion can be optimized by modifying `.spec` files
183
+
3.**Launch Optimization**: Launch time can be optimized by adjusting PyInstaller parameters
0 commit comments