├── .gitignore ├── settings.psd1 ├── README.md ├── LICENSE └── create.ps1 /.gitignore: -------------------------------------------------------------------------------- 1 | Data/BasicData 2 | Data/MapData 3 | データ集 4 | *.exe 5 | GuruguruSMF4.dll 6 | WOLF RPGエディター公式サイト.url 7 | WOLF RPGエディター説明書.url -------------------------------------------------------------------------------- /settings.psd1: -------------------------------------------------------------------------------- 1 | @{ 2 | URL = 'https://silversecond.com/WolfRPGEditor/Download.shtml' 3 | DIRNAME = 'WOLF_RPG_Editor3' 4 | } 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WOLF RPGエディター 自動ダウンロード&セットアップスクリプト 2 | 3 | このリポジトリは、WOLF RPGエディターの最新版を自動でダウンロード・展開し、初期設定ファイル(Editor.ini)を自動生成するPowerShellスクリプトを提供します。 4 | 5 | ## 特徴 6 | 7 | - 公式サイトから最新バージョンのフルパッケージまたはプログラムのみを自動取得 8 | - zipファイルの展開(7z.exeがあれば日本語ファイル名も安全) 9 | - Editor.iniの自動生成 10 | - .gitignoreの自動コピーとgitリポジトリ初期化 11 | - 設定ファイル(settings.psd1)でURLやディレクトリ名を柔軟に変更可能 12 | 13 | ## 使い方 14 | 15 | 1. 必要ファイルを配置 16 | - `create.ps1` 17 | - `settings.psd1` 18 | - `.gitignore` 19 | 2. PowerShellを開き、スクリプトのあるディレクトリに移動 20 | 3. 実行: 21 | ```powershell 22 | .\create.ps1 23 | ``` 24 | 1. 画面の指示に従い、ダウンロード種別や保存ファイル名を選択 25 | 26 | ## 設定ファイル(settings.psd1)例 27 | 28 | ```powershell 29 | @{ 30 | URL = 'https://silversecond.com/WolfRPGEditor/Download.shtml' 31 | DIRNAME = 'WOLF_RPG_Editor3' 32 | } 33 | ``` 34 | 35 | ## 注意事項 36 | 37 | - 7z.exe(7-Zip)がインストールされていれば日本語ファイル名の文字化けを防げます。 38 | - スクリプトはコマンドラインから実行してください(ダブルクリック実行は推奨しません)。 39 | - .gitignoreがスクリプトと同じ場所に無い場合、コピーとgit initはスキップされます。 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 irokaru 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /create.ps1: -------------------------------------------------------------------------------- 1 | 2 | # settings.psd1 から設定を読み込む 3 | $settingsFile = "settings.psd1" 4 | if (-not (Test-Path $settingsFile)) { 5 | Write-Host "settings.psd1 が見つかりません。" 6 | exit 1 7 | } 8 | $settings = Import-PowerShellDataFile -Path $settingsFile 9 | $url = $settings.URL 10 | $targetDirName = $settings.DIRNAME 11 | $html = Invoke-WebRequest -Uri $url -UseBasicParsing 12 | 13 | 14 | # =============================== 15 | # WOLF RPGエディター 自動DLスクリプト 16 | # =============================== 17 | Write-Host "" 18 | Write-Host "===============================" 19 | Write-Host " WOLF RPGエディター 自動DLスクリプト" 20 | Write-Host "===============================" 21 | Write-Host "" 22 | 23 | # 2. zipのダウンロードURL抽出(HTML内容を直接パース) 24 | $content = $html.Content 25 | 26 | # フルパッケージURL 27 | $fullPattern = 'href="(https://www\.silversecond\.com/WolfRPGEditor/Data/WolfRPGEditor_[\d.]+\.zip)".*?フルパッケージ' 28 | $fullMatch = [regex]::Match($content, $fullPattern) 29 | $fullUrl = if ($fullMatch.Success) { $fullMatch.Groups[1].Value } else { $null } 30 | 31 | # プログラムのみURL 32 | $progPattern = 'href="(https://www\.silversecond\.com/WolfRPGEditor/Data/WolfRPGEditor_[\d.]+mini\.zip)".*?プログラムのみ' 33 | $progMatch = [regex]::Match($content, $progPattern) 34 | $progUrl = if ($progMatch.Success) { $progMatch.Groups[1].Value } else { $null } 35 | 36 | if (-not $fullUrl -or -not $progUrl) { 37 | Write-Host "ダウンロードリンクが見つかりません。" 38 | exit 1 39 | } 40 | 41 | Write-Host "【ダウンロード種別を選択してください】" 42 | Write-Host "" 43 | Write-Host " 1: フルパッケージ" 44 | Write-Host " $fullUrl" 45 | Write-Host "" 46 | Write-Host " 2: プログラムのみ" 47 | Write-Host " $progUrl" 48 | Write-Host "" 49 | $choice = Read-Host "番号を入力してください (1/2)" 50 | 51 | if ($choice -eq "1") { 52 | $dlUrl = $fullUrl 53 | $dlType = "フルパッケージ" 54 | } elseif ($choice -eq "2") { 55 | $dlUrl = $progUrl 56 | $dlType = "プログラムのみ" 57 | } else { 58 | Write-Host "無効な選択です。" 59 | exit 1 60 | } 61 | 62 | Write-Host "" 63 | Write-Host "【保存ファイル名の指定】" 64 | Write-Host "" 65 | $saveName = Read-Host "保存するファイル名(.zip拡張子含む、空欄で元ファイル名)を入力してください" 66 | if ([string]::IsNullOrWhiteSpace($saveName)) { 67 | $saveName = [System.IO.Path]::GetFileName($dlUrl) 68 | Write-Host "→ ファイル名が未入力のため、$saveName で保存します。" 69 | } 70 | if (-not $saveName.EndsWith(".zip")) { 71 | $saveName += ".zip" 72 | } 73 | Write-Host "" 74 | 75 | Write-Host "【ダウンロード開始】" 76 | Write-Host " $dlUrl" 77 | Write-Host "" 78 | Invoke-WebRequest -Uri $dlUrl -OutFile $saveName 79 | 80 | # 5. zip展開&ディレクトリ名リネーム 81 | $extractDir = [System.IO.Path]::GetFileNameWithoutExtension($saveName) 82 | 83 | # 7z.exeのパスを探す 84 | $sevenZipCandidates = @( 85 | "C:\\Program Files\\7-Zip\\7z.exe", 86 | "C:\\Program Files (x86)\\7-Zip\\7z.exe", 87 | "7z.exe" 88 | ) 89 | $sevenZip = $sevenZipCandidates | Where-Object { Test-Path $_ } | Select-Object -First 1 90 | 91 | Write-Host "【展開処理】" 92 | if ($sevenZip) { 93 | Write-Host " 7z.exe を使用して展開します(日本語ファイル名対応)" 94 | & "$sevenZip" x "$saveName" "-o$extractDir" -y | Out-Null 95 | } else { 96 | Write-Host " 7z.exe が見つかりません。PowerShell標準のExpand-Archiveで展開します。" 97 | Write-Host " ※日本語ファイル名が文字化けする可能性があります。" 98 | Expand-Archive -Path $saveName -DestinationPath $extractDir -Force 99 | } 100 | Write-Host "" 101 | 102 | # 6. Editor.ini生成先ディレクトリを自動判別 103 | $subDir = Join-Path $extractDir $targetDirName 104 | if (Test-Path $subDir) { 105 | $iniTarget = $subDir 106 | Write-Host "WOLF_RPG_Editor3 ディレクトリが見つかりました。Editor.iniをその中に生成します。" 107 | } else { 108 | $iniTarget = $extractDir 109 | Write-Host "WOLF_RPG_Editor3 ディレクトリが見つかりません。Editor.iniを展開直下に生成します。" 110 | } 111 | $iniPath = Join-Path $iniTarget "Editor.ini" 112 | Write-Host "" 113 | Write-Host "【Editor.ini生成】" 114 | Write-Host " $iniPath" 115 | Write-Host "" 116 | @" 117 | [ProgramData] 118 | AutoTxtOutput_Folder=Data_AutoTXT 119 | AutoTxtOutput=11111 120 | "@ | Set-Content -Encoding UTF8 $iniPath 121 | 122 | Write-Host "===============================" 123 | Write-Host " 完了しました!" 124 | Write-Host "===============================" 125 | Write-Host "" 126 | 127 | # --- .gitignoreコピーとgit init --- 128 | $gitignoreSrc = Join-Path $PSScriptRoot ".gitignore" 129 | if (Test-Path $gitignoreSrc) { 130 | $gitignoreDst = Join-Path $iniTarget ".gitignore" 131 | Copy-Item $gitignoreSrc $gitignoreDst -Force 132 | Write-Host ".gitignore を $iniTarget にコピーしました。" 133 | # git init(エラー時も続行) 134 | try { 135 | Push-Location $iniTarget 136 | git init | Out-Null 137 | Pop-Location 138 | Write-Host "git init を $iniTarget で実行しました。" 139 | } catch { 140 | Write-Host "git init 実行時にエラーが発生しました。gitがインストールされているかご確認ください。" 141 | } 142 | } else { 143 | Write-Host ".gitignore がスクリプトと同じ場所に見つかりません。コピーとgit initはスキップします。" 144 | } 145 | 146 | Read-Host "続行するにはEnterを押してください" 147 | --------------------------------------------------------------------------------