Skip to content

Instantly share code, notes, and snippets.

@Desdaemon
Last active May 12, 2025 02:25
Show Gist options
  • Select an option

  • Save Desdaemon/63536edcc1b9dfbf63783742662849ea to your computer and use it in GitHub Desktop.

Select an option

Save Desdaemon/63536edcc1b9dfbf63783742662849ea to your computer and use it in GitHub Desktop.
Yume2kki sync scripts

あらすじ

既存のゆめ2っきのフォルダを、全体の zip ファイルをダウンロードせずに更新できるスクリプト集です。

Important

このスクリプトは、既存のファイルが全て上書きされてしまいますので、ゆめ2っきのツクーラーの方は大変ご注意ください。

使い方

コマンドライン

まず、rclone をインストールし、yumemiru.dev 用に設定する必要があります。
Win+R を押して PowerShell を開き(powershell と入力)、次のコマンドをコピーして貼り付け、Enter を押してください:

irm https://yumemiru.dev/sync-setup | iex

rclone config に関するメッセージが表示されるまで、このコマンドを繰り返してください。)

次に、同じ PowerShell プロンプトで以下のコマンドを実行します:

#「ゆめ2っき」フォルダを含むインストール先フォルダに移動してください
cd $env:USERPROFILE\Downloads\ゆめ2っきver0.127e
# 同期スクリプトを実行
irm https://yumemiru.dev/sync-2kki | iex

ゆめ2っきを更新したいときは、上記の手順を再度行ってください。

従来の方法

以下のファイルの内容をメモ帳にコピー&ペーストし、PowerShell スクリプト(*.ps1)として保存してください。

Configure-Yumemiru.ps1 は最初の一度だけ実行します。rclone をダウンロードし、ファイルを保存しているサーバーを設定します。 ファイルを右クリックして PowerShell で実行 を選び、指示に従ってください。

Sync-2kki.ps1 は「ゆめ2っき」フォルダの横に配置し、必要に応じて右クリックして PowerShell で実行 を選ぶことで、更新を取得できます。

What is this for?

These scripts can be run to update your local installation of Yume 2kki without having to download the entire zip file.

Important

If you are a developer for Yume 2kki, beware that this script will override all local changes!

Usage

Command-line

First, you need rclone installed and configured for yumemiru.dev. Open a PowerShell prompt by pressing Win+R, type in powershell, then copy in this command and hit Enter:

irm https://yumemiru.dev/sync-setup | iex

(Repeat this command until you see the message with rclone config.)

Then, while still in a PowerShell prompt, run these commands:

# Change directory to where your Yume 2kki installation is, i.e. the folder that contains the ゆめ2っき folder
cd $env:USERPROFILE\Downloads\ゆめ2っきver0.127e
# Run the sync script
irm https://yumemiru.dev/sync-2kki | iex

Repeat the above steps whenever you need to update Yume 2kki.

Traditional

Copy-paste the contents of these files into Notepad, and save them as a PowerShell script (*.ps1).

Configure-Yumemiru.ps1 should be run only once; it will download rclone and configure the server storing the files. Right-click on the file, select Run with Powershell and follow the instructions.

Copy Sync-2kki.ps1 next to your ゆめ2っき folder, then right-click on it and select Run with Powershell to pull updates as needed.

# Stop on error
$ErrorActionPreference = "Stop"
if (-not (Get-Command rclone -ErrorAction SilentlyContinue)) {
if (-not (Get-Command winget -ErrorAction SilentlyContinue)) {
Write-Host "winget not found. Attempting to install App Installer..."
Start-Process "ms-windows-store://pdp/?ProductId=9NBLGGH4NNS1"
Write-Host ""
Write-Host "Please install 'App Installer' from the Microsoft Store."
Read-Host "Press Enter to exit"
exit
}
Write-Host "Installing rclone via winget..."
winget install --id=Rclone.Rclone -e --silent
Write-Host "rclone has been installed. Close all PowerShell windows and rerun this script to continue with configuration."
Read-Host "Press Enter to exit"
exit
}
$rclonePath = Get-Command rclone -ErrorAction SilentlyContinue
if ($rclonePath) {
Write-Host "rclone is already installed. Launching 'rclone config'..."
rclone config create yumemiru webdav url "https://rclone.yumemiru.dev" vendor rclone
Read-Host "Done. Run `Sync-2kki.ps1` when you need to update your game."
exit
}
# Stop on error
$ErrorActionPreference = "Stop"
function Confirm-Action {
param (
[string]$message = "Are you sure you want to proceed? (Y/n)"
)
while ($true) {
$confirmation = Read-Host $message
switch -Regex ($confirmation) {
'^[Yy]$' {
return
}
'^[Nn]$' {
Read-Host "Operation canceled. Exiting script."
exit
}
default {
# nothing
}
}
}
}
$folderToCheck = "ゆめ2っき"
if (-not (Test-Path $folderToCheck)) {
Write-Host "The folder '$folderToCheck' is not found next to this script."
Write-Host "If this script is not run inside a 2kki installation, you WILL lose data."
Confirm-Action
} else {
Confirm-Action "Proceed with sync? Except for save files, all local changes will be lost. (Y/n)"
}
rclone sync yumemiru:2kki . --exclude "Sync-2kki.ps1" --exclude "*.lsd" --progress
Read-Host "Sync complete."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment