Skip to content

A demonstration project that utilizes Electron as the frontend and a Python Flask service as the backend, including packaging it into an executable app for MacOS.

Notifications You must be signed in to change notification settings

jacobdong/electron-python-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

预期结果

1696658500933.jpg

step 01 server 环境准备

根目录下

cd server

1.1 初始化

sh __shell/init.sh

1.2 安装依赖

sh __shell/install.sh

step 02 启动开发环境

根目录下

cd app

2.1 安装依赖

npm install

2.2 启动开发环境

npm run start:dev 

1696659201617.jpg

step 03 构建打包

构建结果存储在根目录下 __dist目录

3.1 构建 python app

cd server
sh __shell/build.sh

构建结果如下(__dist目录下)

.
└── server
    └── app
        ├── _internal
        │   ├── Python -> Python.framework/Versions/3.10/Python
        │   ├── Python.framework
        │   ├── __static
        │   ├── base_library.zip
        │   ├── flask-3.0.0.dist-info
        │   ├── lib-dynload
        │   ├── libcrypto.1.1.dylib
        │   ├── liblzma.5.dylib
        │   ├── libmpdec.3.dylib
        │   ├── libreadline.8.dylib
        │   ├── libssl.1.1.dylib
        │   ├── markupsafe
        │   └── werkzeug-3.0.0.dist-info
        └── app

3.1 构建 electron

根目录下

cd app
npm run dist

构建结果如下(__dist目录下)

.
├── server
│   └── app
│       ├── _internal
│       └── app
└── target
    ├── builder-effective-config.yaml
    ├── electron-python-app-1.0.0-universal.dmg
    ├── electron-python-app-1.0.0-universal.dmg.blockmap
    └── mac-universal
        └── electron-python-app.app

About

A demonstration project that utilizes Electron as the frontend and a Python Flask service as the backend, including packaging it into an executable app for MacOS.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published