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

Implement Launchpad functionality #1

Open
22 of 26 tasks
DaloLorn opened this issue Jun 4, 2021 · 3 comments
Open
22 of 26 tasks

Implement Launchpad functionality #1

DaloLorn opened this issue Jun 4, 2021 · 3 comments
Assignees

Comments

@DaloLorn
Copy link
Member

DaloLorn commented Jun 4, 2021

Copy-pasted from the original repo.

Each of the below screens should be placed on a separate tab. (Except "Shared UI", which appears outside the tab container.)

The tab order is shamelessly (if occasionally inaccurately) stolen from the FreeSpace SCP's "Knossos" launcher, but I have neither the technical nor the artistic proficiencies required to make it look that good. 😦 (Though if we're going with a more thematic name for the launcher, I suspect "Atrozal" or "Orathi" might be a decent choice. 😏)

  • Shared UI:
    • A button to start SR2 (obviously, disabled if SR2 couldn't be found)
    • Menu bar (containing whatever)
  • Manage Mods (default tab, unless SR2 couldn't be found):
    • Load mods.txt
    • Enumerate mods (using the same detection/naming rules as the ingame mod menu)
    • For each mod, add a checkbox and a label containing that mod's name (with its ID in parentheses): [ ] OpenSR Modpack (OpenSR)
    • Also add buttons to open the mod in the Install Mods tab, and to update the mod to the HEAD of the currently installed branch without any further messing around with the mod installer.
    • Save changes on exit (or before starting the game, whichever the user chooses)
  • Install Mods (The tab formerly known as SR2MM):
    • Multimod Repository Support
      • If the selected branch/tag of a mod repo contains multiple modinfos, add a new tab to the left pane of the mod manager:
        • List all folders containing modinfo.txt in the repository, and put them in a multi-select list (maybe add checkboxes if possible, to make it extra clear) containing the name of each folder.
        • Add a third tab to the bottom pane, containing the contents of the most recently selected modinfo.
      • An alternative UI layout might be to add a new list panel altogether, but I'm not sure where.
  • Manage OpenSR:
    • Similar structure to mod manager tab:
    • OpenSR installation process:
      • Initialize OpenSR (if not done yet - check if there's a repo in that folder, and check if it has OpenSRProject/OpenStarRuler-Data as a remote):
        • Move existing installation (if any) to a temporary folder. [This turned out to be unnecessary.]
        • Clone OSR-Data into the installation folder. (No checkout yet.)
        • Move existing installation (if any) back into the installation folder. Steam and GOG should both have mechanisms to validate or otherwise reinstall the game, so we don't need to keep backups. This is also the case for non-OpenSR OS builds, with the caveat that we mustn't move the Git directory back. (Otherwise it wouldn't be cloning OSR-Data, would it now?) [No moving was needed.]
      • Hard reset OSR-Data to the targeted release. (This won't affect untracked files, so music and installed mods should remain intact.)
      • Download OS-appropriate binaries for the targeted release.
      • Extract OS-appropriate binaries into the installation folder.
@DaloLorn
Copy link
Member Author

DaloLorn commented Jun 4, 2021

Wishlist item: The mod manager should check if a mod would conflict with any enabled mods (with the caveat that it would not treat the parents of a deriving mod as conflicting, nor would it show said mod as being disabled). If this is the case, it should display an error when the user tried to enable it.

@DaloLorn
Copy link
Member Author

DaloLorn commented Jun 4, 2021

Note: If a newly-selected game folder hasn't been upgraded to OpenSR, ask the user if they want to upgrade now. (The upgrade process should rename any existing SR2 executables in order to allow modders to run the Steam client and upload their mods to the Workshop.)

DaloLorn added a commit that referenced this issue Jun 4, 2021
@DaloLorn DaloLorn self-assigned this Jul 16, 2021
DaloLorn added a commit that referenced this issue Aug 5, 2021
- Did a major cleanup pass on the whole project.
  - Added nullable/not-nullable annotations just about everywhere.
  - Extracted each screen into its own FXML file with corresponding controllers.
  - Resolved a zillion issues IDEA and SonarLint were bugging me about.
- Added the option to install mods into the user folder. Pending UI support, this can only be enabled via config editing.
- Added the option to uninstall the currently active mod. (TODO: Maybe disable if the mod doesn't seem to be installed?)
- Should have replaced all references to SR2MM with the OpenSR Launchpad. Also removed the Patreon link for the same reason.
- Possibly fixed some bugs. It's been ages since I first did most of this commit, and I never committed it because it wasn't finished at the time. (And arguably still isn't, since I'm pretty sure I intended to commit working versions of the new screens!)
@DaloLorn
Copy link
Member Author

DaloLorn commented Nov 1, 2021

Regarding multimod support:

Instead of searching the repository for modinfo files, the Launchpad will check the metadata file for a new field, mods, which registers all mods in the repository. If the field (or the metadata file itself) does not exist, it will default to the current behavior of identifying the first modinfo in the repository at install time.

An example showing the new metadata structure, using a handful of the mods in my old SR2Mods repository:

{
	"mods": {
		"[OBSOLETE] ABEM Modding Toolkit": {
			"rootFolder": "ABEMTool"
		},
		"Jraenar Imperium": {
			"rootFolder": "Jraenar"
		},
		"Koprulu Emergency Coalition": {
			"rootFolder": "KECSet",
			"dependencies": [
				{
					"name": "Trader Emergency Coalition",
					"repository": "github.com/DaloLorn/SR2Mods",
					"branch": "TECSet"
				},
				{
					"name": "Koprulu Navy",
					"repository": "github.com/DaloLorn/SR2Mods",
					"branch": "TerranSet",
				}
			]
		}
		"Multiple Theme Enabler": {
			"rootFolder": "MultiTheme"
		},
		"Khalai Unity": {
			"rootFolder": "ProtossAdventSet",
			"dependencies": [
				{
					"name": "Unity of the Advent",
					"repository": "github.com/DaloLorn/SR2Mods",
					"branch": "All-Mods",
					"modName": "Unity of the Advent"
				},
				{
					"name": "The Firstborn",
					"repository": "github.com/DaloLorn/SR2Mods",
					"branch": "All-Mods",
					"modName": "The Firstborn"
				}
			]
		}
	}
}

DaloLorn added a commit that referenced this issue Jan 21, 2022
- Settings are now correctly loaded before the UI starts loading.
- On first run, user will be asked if they want to install OpenSR.
- Added more detailed progress tracking to Git/FS operations during mod installation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant