This is a program which takes a React/Next.js/HTML project and provides a simple way to bundle it into a local application using PyWebview.
- Windows
- Linux
-
Clone the repository
git clone https://github.com/jchu634/EasyWebpageBundler
-
Install the required packages
# For Windows pip install -r requirements.txt
# For Linux pip install -r linux_requirements.txt
-
Add your React/Next.js/HTML project to the
static
folder -
Customise the build scripts to include your project name
package.iss
(Windows)#define AppName "EasyWebPageBundler" #define AppVersion "1.0.0" #define AppPublisher "Example" #define AppExeName "EasyWebPageBundler"
build.ps1
(Windows)$applicationName = "EasyWebPageBundler"
build.sh
(Linux)applicationName="EasyWebPageBundler"
-
Add environment variables as appropiate to the
.env
file (Optional)ENV = "production" ERR404 = True APPNAME = "EasyWebPageBundler"
ENV
- The environment the application is running in. (production/development)ERR404
- Whether you have a404.html
page when a page is not found. (True/False)APPNAME
- The name of the application.
-
Run the build script
.\build.ps1
- The webpages are rendered using PyWebview.
- The pages are served using FastAPI.
- The application is bundled using PyInstaller.
- The windows iinstaller is created using Inno Setup.