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

CMD window closes immediately on running mapshot.exe directly. #3

Closed
cengbrecht opened this issue Jan 10, 2021 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@cengbrecht
Copy link

Hello!
I think this is a great mod, however, I am having trouble just viewing the default html file on windows.
It should be able to run seeing the code there, however, it is unable to load the mapshot.json due to the link being a file:/// rather than http://
I have tried editing the js file that is generated from however it isn't following my change.
I was wondering if you've tried this, or if this is not possible.

@cengbrecht
Copy link
Author

Trying out the exe file... Read then comment..
Will see if that fixes the issues. :)

@cengbrecht
Copy link
Author

Yeah, the exe fixes the problem. Sorry about that.
Note, when loading the exe, run in a cmd window so you can see the output for anyone who doesnt know how to use the exe.
You will probably have to point it at your factorio installation if its on steam.
And you don't need to defign which map to show, it will list them.

@Palats
Copy link
Owner

Palats commented Jan 11, 2021

Unfortunately (as you experienced), just loading through file:/// doesn't work. In practice, security on browsers makes it virtually impossible to make it work (beside having a single .html file and no other file) - hence requiring a webserver. This is what the .exe provides, though any other webserver would do the trick.

For the steam version - the .exe does not try to use the Steam version for now. If steam is not running, running the steam version does not work, so I haven't included it in the path to look for by default as it was not a great experience (whether the end result is better is up for debate).

For the cmd window - in theory, when run from the explorer, the window should stay open, giving the opportunity to see the output. If you had a case where it got closed immediately (thus requiring launching from cmd explictly) that would be a bug indeed.

@cengbrecht
Copy link
Author

Hey Palats!

Fantastic mod!

Yes, the cmd window did immediately close. And I QUITE like the map tool.
I would love to give you more feedback on it if you're interested, I have lots of ideas and questions.

The whole reason I was thinking of it, was to look for something like Dynmap for Minecraft.

On the maps I've rendered yesterday, they all had a 1px gap between the images on the map, is this normal?

@cengbrecht cengbrecht reopened this Jan 11, 2021
@cengbrecht cengbrecht changed the title Loading index.html errors on link 597 of main-number.js file CMD window closes immediately on running mapshot.exe directly. Jan 11, 2021
@Palats
Copy link
Owner

Palats commented Jan 11, 2021

Thanks for the feedback! I'm happy with ideas/questions - Github issues & Factorio mod discussion pages (https://mods.factorio.com/mod/mapshot/discussion) are fine places for those. Though of course I make no guarantees :) I tend to work on mapshot only periodically. I guess once Factorio 1.1 gets released I will do another pass.

For Dynmap - I've used it for Minecraft, it is nice. Unfortunately, it is not possible to do something similarly real-time with Factorio, as the plugins are much more limited (Minecraft plugins basically patch Minecraft code, while Factorio as a clean API surface). I have one idea to simulate it, but that would be a terrible hack.

For the gaps between tiles - indeed, that's an issue. It comes from Leaflet, the map library I'm using. I've open #4 to track it (somehow I got use it and never took a stab so far).

@Palats Palats added the bug Something isn't working label Jan 17, 2021
@cengbrecht cengbrecht closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants