Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create executables of geostyler-cli #346

Closed
jansule opened this issue May 10, 2023 · 2 comments
Closed

Create executables of geostyler-cli #346

jansule opened this issue May 10, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@jansule
Copy link
Contributor

jansule commented May 10, 2023

It would be nice to create executables of geostyler-cli that can run without having node installed. Such an executable could be used e.g. in order to create a QGIS plugin that allows the conversion from/to other formats from within QGIS. With the current setup users would have to have nodejs installed on their systems, which is probably not the case for non-developers.

Maybe it might be worth to check out https://github.com/nexe/nexe for creating such executables.

@jansule jansule added the enhancement New feature or request label May 10, 2023
@geographika
Copy link
Collaborator

Some other options discussed at https://github.com/leafac/caxa#prior-art
It looks like https://github.com/vercel/pkg might be the most widely used approach?

@geographika
Copy link
Collaborator

This worked surprisingly well! From within the geostyler-cli folder, once the /dist output has been created:

npm install -g pkg
pkg dist/src/index.js --output geostyler

This produced the following file (running on Windows):

image

I copied this to a clean Windows machine with the test data:

geostyler -s sld -t qgis -o D:\Temp D:\Temp\testdata

Output created as expected!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: Needs Review/Support
Development

No branches or pull requests

2 participants