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

Ability to install directories and files into GameRoot directories #2992

Open
linuxgurugamer opened this issue Feb 7, 2020 · 5 comments
Open
Labels
Core (ckan.dll) Issues affecting the core part of CKAN Discussion needed Enhancement Schema Issues affecting the schema Spec Issues affecting the spec

Comments

@linuxgurugamer
Copy link
Contributor

linuxgurugamer commented Feb 7, 2020

This is needed for the SoundtrackEditorForked (see KSP-CKAN/NetKAN#7666). It needs to put a few directories in the game root, as well as one directory/file into the KSP_Data/ (or KSP_x64_Data)

See also KSP-CKAN/NetKAN#5953, in which the original fork of this mod was found to be installed wrong and frozen.

@HebaruSan HebaruSan added Core (ckan.dll) Issues affecting the core part of CKAN Discussion needed Schema Issues affecting the schema Spec Issues affecting the spec labels Feb 7, 2020
@HebaruSan
Copy link
Member

This was done deliberately to discourage installation of files into GameRoot:

#83 (comment)

image


Relevant bits of the spec:

  • GameRoot (which should be used sparingly, if at all).
  • A path to a given subfolder location can be specified only under GameData (v1.2);
  • Subfolder paths under a matched directory will be preserved, but directories will only be created when installing to GameData, Tutorial, or Scenarios.

@DasSkelett
Copy link
Member

I see two clean solutions for this:

  1. Create a special handling for KSP_Data.
    For a stanza like "install_to": "KSP_Data/Mono" CKAN automatically decides based on which OS it is run on whether it should go into KSP_Data/Mono or KSP_x64_Data/Mono. This assumes the folder structure in this two directories is the same (I hope so).
  2. Create a os property.
    CKAN installs mods with this property set only if it matches the current OS (and always if it's not set at all).

@HebaruSan
Copy link
Member

This mod's current release structure could not be indexed correctly anyway (same version number assigned to two different downloads for different game versions):

https://github.com/linuxgurugamer/SoundtrackEditorForked/releases/tag/4.6.1.2

image

image


Also the ZIP files appear to be misbuilt, every top level folder contains a copy of itself with duplicated contents:

image


Before we make any changes here, I think we should dig in and understand what this mod is doing and make sure that it has to be done this way.

Could these DLLs simply be installed to the root of GameRoot?

    {
      "find": "KSP_Data",
      "install_to": "GameRoot"
    },
    {
      "find": "KSP_x64_Data",
      "install_to": "GameRoot"
    },

For reference, AdvancedFlyByWire installs two DLLs directly into GameRoot in what looks like a similar situation:

https://github.com/KSP-CKAN/NetKAN/blob/master/NetKAN/AdvancedFlyByWire.netkan

    "install": [ {
        "file":       "SDL2.dll",
        "install_to": "GameRoot"
    }, {
        "file":       "SDL_LICENSE",
        "install_to": "GameRoot"
    }, {
        "file":       "XINPUTDOTNET_LICENSE",
        "install_to": "GameRoot"
    }, {
        "file":       "XInputInterface.dll",
        "install_to": "GameRoot"

And do these folders need to be in GameRoot, or could they be in GameData? It looks like Music contains audio assets used by the mod and Playlists contains some .cfg files, and it's not clear why those would need to live outside GameData.

    {
      "find": "Music",
      "install_to": "GameRoot"
    },
    {
      "find": "Playlists",
      "install_to": "GameRoot"
    }

@linuxgurugamer
Copy link
Contributor Author

The reason for both the KSP_Data and KSP_x64_Data is to support Linux & Macs, which don't use the x64 folder. The intention is to only install one depending on the system, but I hadn't gotten that far.

Second, the DLLs need to be installed where they go because that is the only way they will work. I don't pretend to understand the reasons behind that right now.

Finally, the folders "Licenses". "Music", & "Playlists" could certainly be moved, if that was the only thing stopping this from being done.

This is actually a very old mod, and those folders are there because there wasn't a GameData directory when originally written. I have no problem rework that if requested and needed

@JonnyOThan
Copy link
Contributor

This would help with KerbalVR too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core (ckan.dll) Issues affecting the core part of CKAN Discussion needed Enhancement Schema Issues affecting the schema Spec Issues affecting the spec
Projects
None yet
Development

No branches or pull requests

4 participants