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

Disk images are pulled from internet when running locally #37

Open
agr opened this issue Feb 7, 2022 · 4 comments
Open

Disk images are pulled from internet when running locally #37

agr opened this issue Feb 7, 2022 · 4 comments
Labels
investigate More investigation is needed (eg, may be difficult to reproduce)

Comments

@agr
Copy link

agr commented Feb 7, 2022

The "Running locally" guide mentions that when doing so local disk images are used, but I don't see it to be the case:
image

From what I managed to understand, the following code is responsible for this:

image

Unfortunately, the actual web page uses its "compiled" version, where this check is thrown away which forces it not to even consider trying fetching the disk locally:

image

image

Now, looking at https://github.com/jeffpar/pcjs/tree/master/machines/pcx86/releases, it seems there are many different versions of that pcx86.js file and it seems different images use different versions and some of them even reference "uncompiled" versions of it. How does it happen?

How do I fix this?

Ultimately, I want my custom diskette image loaded. I added it to /configs/pcx86/diskettes.json and I see it appear in the drop down box, but when I actually try to load it, the request is sent to diskettes.pcjs.org where it obviously does not exist.

@agr
Copy link
Author

agr commented Feb 20, 2022

Apparently, adding uncompiled="true" attribute to the machine tag in the appropriate machine.xml makes it include proper -uncompiled.js file that causes it to try to read locally, unfortunately now I am getting these errors:

[2022-02-19 17:18:29] ERROR `/diskettes/pcx86/sys/dos/compaq/3.31/COMPAQ-DOS331-DISK3.json' not found.
[2022-02-19 17:18:29] ERROR `/diskettes/pcx86/sys/dos/compaq/3.31/COMPAQ-DOS331-DISK2.json' not found.

The web page complains accordingly:
image

The file is present if looking from the repo root, so not sure what exactly Jekyll doesn't like.

@agr
Copy link
Author

agr commented Feb 20, 2022

OK, the diskettes directory is explicitly excluded by

- /diskettes

removing that line fixes the issue.

@jeffpar
Copy link
Owner

jeffpar commented Feb 20, 2022

Apologies for not checking on open issues more regularly. Glad you were persistent and found a resolution.

When I'm running locally, I'm usually doing it through VSCode, which I've configured to start Jekyll using the "bundle serve uncompiled" task in tasks.json, which includes _developer.yml and overrides _config.yml with, um, less exclusive excludes.

I've updated Running PCjs Locally with that small detail.

@agr
Copy link
Author

agr commented Feb 20, 2022

Thanks for the update! Unfortunately, simply adding _developer.yml config doesn't seem to work in my case. Jekyll reports that it reads it on startup, but I still see that compiled version of pcx86.js is loaded which causes the disk images to get downloaded from internet.

This is how I start it:

> bundle exec jekyll serve --config _config.yml,_developer.yml
Configuration file: _config.yml
Configuration file: _developer.yml
            Source: C:/Users/andre/source/repos/pcjs
       Destination: C:/Users/andre/source/repos/pcjs/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
       Jekyll Feed: Generating feed for posts
                    done in 86.796 seconds.
 Auto-regeneration: enabled for 'C:/Users/andre/source/repos/pcjs'
    Server address: http://127.0.0.1:4000/
  Server running... press ctrl-c to stop.

And then I go to http://localhost:4000/configs/pcx86/machine/compaq/deskpro386/vga/4096kb/machine.xml.
After trying a few other images, it seems the issue is specific to Compaq DeskPro386 based VMs. Everything else seem to load things locally.

@jeffpar jeffpar added the investigate More investigation is needed (eg, may be difficult to reproduce) label Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigate More investigation is needed (eg, may be difficult to reproduce)
Projects
None yet
Development

No branches or pull requests

2 participants