naturalcrit / homebrewery

Create authentic looking D&D homebrews using only markdown
https://homebrewery.naturalcrit.com
MIT License
1.04k stars 317 forks source link

Windows Install Scripts - Add server start batch file #2763

Open G-Ambatte opened 1 year ago

G-Ambatte commented 1 year ago

Your idea:

One thought (can be a separate PR). Would it be possible to create a shortcut to a batch file or something that the user can double-click next time they want to run, instead of trying to remember to type npm start?

As mentioned here, we can add a simple batch script to the installation scripts to start the Homebrewery server.

5e-Cleric commented 1 month ago

I actually have something for this, a static version and a dev one.

@echo off
cd /d C:\Repositories\homebrewery
start cmd /k npm run build ^& npm start

Change the route to the tool as fits your setup

Maybe i should remove the build process, as long as the user remembers to run it again after any update.

This will only work with the db open.

G-Ambatte commented 1 month ago

The best method forward is likely to modify the install script to take an install path as an argument; during the install, create a permanent environment variable and copy the files to that location (which would allow for the simultaneous fix of the typo in the Windows Choco install script); this variable can then also be called in a start_server script to start the Hb server, wherever the user decided to install it.

5e-Cleric commented 1 month ago

I don't know, if we are doing all this, why not go all the way, incorporate ElectronJs and make it "Easily" into a desktop app?

G-Ambatte commented 1 month ago

ElectronJS is a different beast altogether, and serves a different purpose to a locally hosted web server. It's not a bad idea, and certainly people have already tried it - but 100% it should have it's own issue, it would be a massive scope creep to go from "let's write a three or four line script to simplify starting the server" to "let's rebuild the project as a standalone cross-platform app using ElectronJS".