Skip to content

starkatt85/Emergence

Repository files navigation

Compilation into exe

It is recommended to build the svelte files into a static html page using npm run build, and then use Pyinstaller to build the exe with the build folder (which contains the npm run build commmand's output) as extra data. It is not gauranteed to be portable when packaged using Pyinstaller (We havent tested its cross system compatibility, The exe works fine in the same system in which it was packaged, but causes dll error when copied and pasted and ran in a different system).

For Developers

reading this is recommended

The frontend is built using svelte. To compile svelte into a working html file, use:

npm run build

Run this in your terminal in the project directory. This will generate index.html with other required files inside the build folder. Use the index.html file to host it in a pywebview window (the window is created by host.py file). Please use host.py file to host the index.html. Feel free to create/use a src directory for python codes as needed (maybe for organizing files and code), name it anything else but src as it is already created by Svelte for svelte files. Suggested name for directory backend.

For a working pywebview window, the very basic host.py code is

import webview

window = webview.create_window("Emergence", "build/index.html", width=1280, height=800)
webview.start()

This is what the host.py contains as of the very first "Update README.md" commit.

A new npm command has been added npm run app that automatically builds the html and runs the python code to run the app. Default-ly use this to run every time.

Svelte based info for Python devs

This svelte app is build using the @sveltejs/adapter-static, to build a static html file. Pywebview simply hosting the index.html along with the folders and files inside build directory should be enough for now (problems may or may not be encountered in the future, will be resovlable anyway).

Sveltekit is a javascript

{The below content were Auto Generated by SvelteKit (Devs who dont work with svelte, ignore this.)}

sv

Everything you need to build a Svelte project, powered by sv.

Creating a project

If you're seeing this, you've probably already done this step. Congrats!

# create a new project in the current directory
npx sv create

# create a new project in my-app
npx sv create my-app

Developing

Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

Building

To create a production version of your app:

npm run build

You can preview the production build with npm run preview.

To deploy your app, you may need to install an adapter for your target environment.

About

A fancy music player with custom lyrics support built using Python and Web Technologies.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •