07th-mod / 07th-mod/python-patcher
First-Install detection and global.dat replacement
- Langage dominant
- JavaScript
- Étoiles
- 214
- Forks
- 12
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
> I wonder if we should try one suggestion I gave a long time ago, that was supplying our own configuration file during installation. Might be useful at least for the console arcs
### For windows
- when any higurashi game is installed, check the %appdata%\Mangagamer\higurashi04 folder (where the last part changes for each game)
- if there exists a `global.dat.backup` file, then this is a re-install/upgrade. Take no action
- if there is no `global.dat.backup` file, rename the old `global.dat` to `global.dat.backup` and copy in the desired `global.dat`
### For DRM Free mac:
same as above, but use path:
DRM Free Mac version saves to `~/Library/Application Support/unity.MangaGamer.Higurashi When They Cry - Ch.4 Himatsubushi/` but I'd feel better about reading the `CFBundleIdentifier` from the `Info.plist` to get that last directory's name. You can use `defaults read CFBundleIdentifier` to get this.
### For DRM Free Linux:
same as above, but use path:
DRM Free Linux version saves to `~/.config/unity3d/MangaGamer/` though I don't remember the exact capitalization used for the full game name
### For steam linux/mac:
For steam, I would guess Linux will be the same (it's based off a file in the game assets) but for the Mac one, since it sounds like they name the main application bundle differently, the may have changed the bundle identifier too. If someone with the mac steam version could upload the Info.plist files from some of their games (located at `gamename.app/Contents/Info.plist`) that would be helpful.
#### Actual code used in the game to access save files
https://github.com/07th-mod/higurashi-assembly/blob/tsumi-mg/Assets.Scripts.Core/MGHelper.cs#L181 idealpersona - "I think the Application class is Unity, so you may have to replace those references with new code according to their docs"
----
I'm writing this up for when/if we make a cross-platform python script. For now will jsut be implemented by modifying our existing windows only batch files.
NOTE to any other developers: feel free to edit this comment if some of the information is wrong.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Le problème décrit un script Python multiplateforme pour détecter les premières installations de jeux et remplacer les fichiers global.dat. Commencez par examiner les fichiers batch Windows existants dans le dépôt pour comprendre la logique actuelle. Examinez le fichier MGHelper.cs lié pour voir comment Unity accède aux chemins de sauvegarde. Pour chaque plateforme (Windows, Mac sans DRM, Linux sans DRM, Steam), implémentez la détection de chemin et la logique de sauvegarde/copie de fichiers comme spécifié. Les tests nécessiteront de simuler différents états d'installation.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python, shell
- Domaine
- cli, tooling
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100