H3VR-Modding / Mason

Compiles project directories into BepInEx plugins that utilize Stratum asset loading.
https://h3vr-modding.github.io/Mason
MIT License
4 stars 0 forks source link

Standalone: Pack command inserts empty manifest.json #9

Open noghiri opened 2 years ago

noghiri commented 2 years ago

Platform:

Windows 10 Pro build 19042 x64 Mason 1.0.4

Summary:

When running mason pack, the manifest.json placed in mod.zip is empty and does not have the contents of the manifest.json inside the project folder. Expected behavior: The manifest.json inside the mod.zip should match the manifest.json inside the project folder.

Steps to reproduce:

  1. Set up project folder as in image. image
  2. Insert contents of manifest.json, like so:
    "name": "BB_ModulAR18",
    "version_number": "1.0.0",
    "website_url": "",
    "description": "Adds an AR-18.",
    "dependencies": [
    "WFIOST-H3VRUtilities-8.0.3"
    ]
    }
  3. Set up config.yaml thusly, according to the documentation:
    directories:
    bepinex: C:\Users\<USERNAME>\AppData\Roaming\r2modmanPlus-local\H3VR\profiles\testing_modul\BepInEx
    managed: C:\Program Files (x86)\Steam\steamapps\common\H3VR\h3vr_Data\Managed
    ...
  4. Set up project.yaml like so (yes, I'm aware my dependencies aren't set up right but it runs and it shouldn't impact this bug):
    
    version: 1
    dependencies:
    hard:
    h3vr.otherloader: 1.0.0
    assets:
    runtime:
    nested:
    - assets:
      - path: any_modular18-core
        plugin: h3vr.otherloader
        loader: item_unordered

...


5. Add icon.png, README.md, and the virtualobject in resources like normal.
6. Open command line at project root, and run `mason pack`, which provides this output:

PS D:\unitymodding\STAGING\noghiri-BB_ModulAR18> mason pack Parsed commandline arguments Parsed config Constructed compiler warning at manifest.json(0,0): [C10] The author of the mod was infered by the directory name. Consider adding an 'author' property. Compiled noghiri-BB_ModulAR18-1.0.0 with 1 warnings Creating package Added bootstrap DLL Added minified manifest Added Thunderstore-required files Added resources Created package Acquired output file Wrote content to disk


7. Open resulting mod.zip in 7zip, and open the manifest.json to read the version in the zip file:
![image](https://user-images.githubusercontent.com/4451169/140187221-fa115ac8-8824-43d2-ba4e-249bcc08919d.png)

Notably, the README.md is perfectly fine, it's been added correctly to the zip file.  It's not a big deal to simply work around, but really doesn't conform to the behavior I'd expect from the standalone compiler.
noghiri commented 2 years ago

Update: Bug persists with the following manifest.json, which includes an Author field and thus doesn't trigger missing author-related code:

{
  "name": "BB_ModulAR18",
  "author": "noghiri",
  "version_number": "1.0.2",
  "website_url": "",
  "description": "Adds an AR-18.",
  "dependencies": [
    "WFIOST-H3VRUtilities-8.6.2",
    "devyndamonster-OtherLoader-1.1.1"
  ]
}