07th-mod / 07th-mod/python-patcher
First-Install detection and global.dat replacement
- 主要語言
- JavaScript
- 星號
- 214
- 分支
- 12
- PR 合併指標
- 30 天內沒有已合併 PR
描述
> 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.
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
該 issue 描述了一個用於偵測首次遊戲安裝並替換 global.dat 檔案的跨平台 Python 腳本。首先檢查儲存庫中現有的 Windows 批次檔,以了解當前的邏輯。查看連結的 MGHelper.cs 檔案,了解 Unity 如何存取儲存路徑。針對每個平台(Windows、Mac 無 DRM、Linux 無 DRM、Steam),按照說明實作路徑偵測和檔案備份/複製邏輯。測試需要模擬不同的安裝狀態。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python, shell
- 領域
- cli, tooling
- Issue 類型
- 功能
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100