├── .gitignore ├── .gitmodules ├── readme.md ├── readGameVersion.js └── .github └── workflows └── Build-Html-Package.yml /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "DOL"] 2 | path = DOL 3 | url = https://gitgud.io/Vrelnir/degrees-of-lewdity.git 4 | branch = master 5 | [submodule "ModLoader"] 6 | path = ModLoader 7 | url = ../sugarcube-2-ModLoader.git 8 | branch = master 9 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | 2 | # 附带"[ModLoader](https://github.com/Lyoko-Jeremie/sugarcube-2-ModLoader)"的"[Degrees of Lewdity](https://gitgud.io/Vrelnir/degrees-of-lewdity)"预构建发布项目 3 | 4 | 本仓库用于自动构建附带ModLoader的DoL游戏。您可以在Release页面下载构建好的版本。 5 | 6 | 如果您需要在Android上游玩,您可以使用任意文件浏览器解压并点击html文件,使用任何您喜欢的浏览器打开html文件。 7 | 如果出现图片无法显示的问题,请加载 `GameOriginalImagePack.mod.zip` ,这个 `GameOriginalImagePack` mod 包含原始游戏的所有原版图片,请始终使其在mod列表的最后加载。 8 | 9 | --- 10 | 11 | ### en 12 | 13 | # Pre-built Release of "[Degrees of Lewdity](https://gitgud.io/Vrelnir/degrees-of-lewdity)" with "[ModLoader](https://github.com/Lyoko-Jeremie/sugarcube-2-ModLoader)" 14 | 15 | This repository is for automatic building of the DoL game with ModLoader included. You can download the built version on the Release page. 16 | 17 | If you wish to play on Android, you can use any file explorer to unzip and click the html file, and open the html file with any browser you prefer. 18 | If you encounter issues with images not displaying, please load `GameOriginalImagePack.mod.zip`. This `GameOriginalImagePack` mod contains all the original images from the base game and should always be loaded last in the mod list. 19 | 20 | --- 21 | 22 | ### Update Submodules (ModLoader & DoL) / 更新模组管理器和游戏本体源码 23 | ```shell 24 | git submodule update --init --remote --recursive 25 | ``` 26 | 27 | -------------------------------------------------------------------------------- /readGameVersion.js: -------------------------------------------------------------------------------- 1 | const os = require("os"); 2 | const fs = require("fs"); 3 | const util = require("util"); 4 | 5 | function setOutput(key, value) { 6 | // Temporary hack until core actions library catches up with github new recommendations 7 | const output = process.env['GITHUB_OUTPUT'] 8 | fs.appendFileSync(output, `${key}=${value}${os.EOL}`) 9 | } 10 | 11 | ;(async () => { 12 | // game/01-config/sugarcubeConfig.js 13 | 14 | console.log('process.argv.length', process.argv.length); 15 | console.log('process.argv', process.argv); 16 | const GameSugarCubeConfigJsFilePath = process.argv[2]; 17 | console.log('GameSugarCubeConfigJsFilePath', GameSugarCubeConfigJsFilePath); 18 | if (!GameSugarCubeConfigJsFilePath) { 19 | console.error('no GameSugarCubeConfigJsFilePath'); 20 | process.exit(1); 21 | return; 22 | } 23 | const GameSugarCubeConfigJsF = await (util.promisify(fs.readFile)(GameSugarCubeConfigJsFilePath, {encoding: 'utf-8'})); 24 | 25 | const findR = RegExp(/version: {0,}"([^"]+)"/).exec(GameSugarCubeConfigJsF); 26 | if (!findR) { 27 | console.error('cannot find version reg'); 28 | process.exit(1); 29 | return; 30 | } 31 | 32 | const version = findR[1]; 33 | if (!version) { 34 | console.error('cannot find version string'); 35 | process.exit(1); 36 | return; 37 | } 38 | console.log('GameVersionString:', version); 39 | 40 | setOutput("GameVersionString", version); 41 | 42 | process.exit(0); 43 | })().catch(E => { 44 | console.error(E); 45 | process.exit(1); 46 | }); 47 | 48 | -------------------------------------------------------------------------------- /.github/workflows/Build-Html-Package.yml: -------------------------------------------------------------------------------- 1 | name: Build ModLoader 2 | 3 | run-name: Build ModLoader ${{ inputs.version }} 4 | 5 | on: 6 | # push: 7 | # branches: 8 | # - "master" 9 | # - "*test*" 10 | # pull_request: 11 | # branches: 12 | # - "master" 13 | workflow_dispatch: 14 | inputs: 15 | version: 16 | description: "手动设定版本" 17 | 18 | 19 | env: 20 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 21 | 22 | permissions: 23 | contents: write 24 | 25 | jobs: 26 | build: 27 | runs-on: ${{ matrix.os }} 28 | 29 | strategy: 30 | # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. 31 | fail-fast: false 32 | 33 | matrix: 34 | # https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs 35 | os: [ windows-latest ] 36 | #os: [ ubuntu-latest, windows-latest ] 37 | node-version: [ 18.x ] 38 | 39 | steps: 40 | 41 | - name: Use Node.js ${{ matrix.node-version }} 42 | uses: actions/setup-node@v6 43 | with: 44 | node-version: ${{ matrix.node-version }} 45 | 46 | - name: corepack enable 47 | run: corepack enable 48 | 49 | - uses: actions/checkout@v6 50 | with: 51 | submodules: true 52 | # token: ${{ secrets.GITGUD_TOKEN }} # vrelnir/degrees-of-lewdity 53 | 54 | - name: SugarCube-2 55 | uses: actions/checkout@v6 56 | with: 57 | repository: Lyoko-Jeremie/sugarcube-2_Vrelnir 58 | path: SC2 59 | ref: TS2 60 | #submodules: recursive 61 | 62 | - name: init ModLoader 63 | working-directory: ${{ github.workspace }}/ModLoader 64 | run: git submodule update --init --recursive 65 | 66 | # - name: ModLoader 67 | # uses: actions/checkout@v4 68 | # with: 69 | # repository: Lyoko-Jeremie/sugarcube-2-ModLoader 70 | # path: ModLoader 71 | # ref: master 72 | # submodules: recursive 73 | 74 | # - name: DoL 75 | # uses: actions/checkout@v4 76 | # with: 77 | # repository: Vrelnir/degrees-of-lewdity.git 78 | # path: DoL 79 | # ref: master 80 | # github-server-url: 'https://gitgud.io' 81 | # submodules: recursive 82 | 83 | 84 | # /ModLoader Init ========================================= 85 | 86 | - name: Build ModLoader 87 | working-directory: ${{ github.workspace }}/ModLoader 88 | run: | 89 | yarn install 90 | yarn run ts:BeforeSC2 91 | yarn run webpack:BeforeSC2 92 | yarn run webpack:BeforeSC2-comp 93 | yarn run ts:ForSC2 94 | yarn run webpack:insertTools 95 | yarn run tras:babel 96 | 97 | - name: Build ModSubUiAngularJs 98 | working-directory: ${{ github.workspace }}/ModLoader/mod/ModSubUiAngularJs 99 | run: | 100 | yarn install 101 | yarn run build:ts 102 | yarn run build:webpack 103 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 104 | - name: Copy ModSubUiAngularJs 105 | uses: Lyoko-Jeremie/js-copy-github-action@master 106 | with: 107 | srcBase: ${{ github.workspace }}/ModLoader/ 108 | source: ${{ github.workspace }}/ModLoader/mod/ModSubUiAngularJs/ModSubUiAngularJs.mod.zip 109 | destBase: ${{ github.workspace }}/ModLoader/out 110 | target: ${{ github.workspace }}/ModLoader/out 111 | 112 | - name: Build ModLoaderGui 113 | working-directory: ${{ github.workspace }}/ModLoader/mod/ModLoaderGui 114 | run: | 115 | yarn install 116 | yarn run build:ts 117 | yarn run build:webpack 118 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 119 | - name: Copy ModLoaderGui 120 | uses: Lyoko-Jeremie/js-copy-github-action@master 121 | with: 122 | srcBase: ${{ github.workspace }}/ModLoader/ 123 | source: ${{ github.workspace }}/ModLoader/mod/ModLoaderGui/ModLoaderGui.mod.zip 124 | destBase: ${{ github.workspace }}/ModLoader/out 125 | target: ${{ github.workspace }}/ModLoader/out 126 | 127 | - name: Build ImageLoaderHook 128 | working-directory: ${{ github.workspace }}/ModLoader/mod/ImageLoaderHook 129 | run: | 130 | yarn install 131 | yarn run build:ts 132 | yarn run build:webpack 133 | yarn run build-core:webpack 134 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 135 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot-core.json" 136 | - name: Copy ImageLoaderHook 137 | uses: Lyoko-Jeremie/js-copy-github-action@master 138 | with: 139 | srcBase: ${{ github.workspace }}/ModLoader/ 140 | source: ${{ github.workspace }}/ModLoader/mod/ImageLoaderHook/ModLoader DoL ImageLoaderHook.mod.zip 141 | destBase: ${{ github.workspace }}/ModLoader/out 142 | target: ${{ github.workspace }}/ModLoader/out 143 | - name: Copy ImageLoaderHook 144 | uses: Lyoko-Jeremie/js-copy-github-action@master 145 | with: 146 | srcBase: ${{ github.workspace }}/ModLoader/ 147 | source: ${{ github.workspace }}/ModLoader/mod/ImageLoaderHook/ModLoader ImageLoaderHookCore.mod.zip 148 | destBase: ${{ github.workspace }}/ModLoader/out 149 | target: ${{ github.workspace }}/ModLoader/out 150 | 151 | - name: Build CheckGameVersion 152 | working-directory: ${{ github.workspace }}/ModLoader/mod/CheckGameVersion 153 | run: | 154 | yarn install 155 | yarn run build:ts 156 | yarn run build:webpack 157 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 158 | - name: Copy CheckGameVersion 159 | uses: Lyoko-Jeremie/js-copy-github-action@master 160 | with: 161 | srcBase: ${{ github.workspace }}/ModLoader/ 162 | source: ${{ github.workspace }}/ModLoader/mod/CheckGameVersion/CheckGameVersion.mod.zip 163 | destBase: ${{ github.workspace }}/ModLoader/out 164 | target: ${{ github.workspace }}/ModLoader/out 165 | 166 | - name: Build Diff3WayMerge 167 | working-directory: ${{ github.workspace }}/ModLoader/mod/Diff3WayMerge 168 | run: | 169 | yarn install 170 | yarn run build:ts 171 | yarn run build:webpack 172 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 173 | - name: Copy Diff3WayMerge 174 | uses: Lyoko-Jeremie/js-copy-github-action@master 175 | with: 176 | srcBase: ${{ github.workspace }}/ModLoader/ 177 | source: ${{ github.workspace }}/ModLoader/mod/Diff3WayMerge/Diff3WayMerge.mod.zip 178 | destBase: ${{ github.workspace }}/ModLoader/out 179 | target: ${{ github.workspace }}/ModLoader/out 180 | 181 | - name: Build DoLTimeWrapperAddon 182 | working-directory: ${{ github.workspace }}/ModLoader/mod/DoLTimeWrapperAddon 183 | run: | 184 | yarn install 185 | yarn run build:ts 186 | yarn run build:webpack 187 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 188 | - name: Copy DoLTimeWrapperAddon 189 | uses: Lyoko-Jeremie/js-copy-github-action@master 190 | with: 191 | srcBase: ${{ github.workspace }}/ModLoader/ 192 | source: ${{ github.workspace }}/ModLoader/mod/DoLTimeWrapperAddon/DoLTimeWrapperAddon.mod.zip 193 | destBase: ${{ github.workspace }}/ModLoader/out 194 | target: ${{ github.workspace }}/ModLoader/out 195 | 196 | - name: Build ModdedClothesAddon 197 | working-directory: ${{ github.workspace }}/ModLoader/mod/ModdedClothesAddon 198 | run: | 199 | yarn install 200 | yarn run build:ts 201 | yarn run build:webpack 202 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 203 | - name: Copy ModdedClothesAddon 204 | uses: Lyoko-Jeremie/js-copy-github-action@master 205 | with: 206 | srcBase: ${{ github.workspace }}/ModLoader/ 207 | source: ${{ github.workspace }}/ModLoader/mod/ModdedClothesAddon/ModdedClothesAddon.mod.zip 208 | destBase: ${{ github.workspace }}/ModLoader/out 209 | target: ${{ github.workspace }}/ModLoader/out 210 | 211 | - name: Build ModdedFeatsAddon 212 | working-directory: ${{ github.workspace }}/ModLoader/mod/ModdedFeatsAddon 213 | run: | 214 | yarn install 215 | yarn run build:ts 216 | yarn run build:webpack 217 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 218 | - name: Copy ModdedFeatsAddon 219 | uses: Lyoko-Jeremie/js-copy-github-action@master 220 | with: 221 | srcBase: ${{ github.workspace }}/ModLoader/ 222 | source: ${{ github.workspace }}/ModLoader/mod/ModdedFeatsAddon/ModdedFeatsAddon.mod.zip 223 | destBase: ${{ github.workspace }}/ModLoader/out 224 | target: ${{ github.workspace }}/ModLoader/out 225 | 226 | - name: Build ModdedHairAddon 227 | working-directory: ${{ github.workspace }}/ModLoader/mod/ModdedHairAddon 228 | run: | 229 | yarn install 230 | yarn run build:ts 231 | yarn run build:webpack 232 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 233 | - name: Copy ModdedHairAddon 234 | uses: Lyoko-Jeremie/js-copy-github-action@master 235 | with: 236 | srcBase: ${{ github.workspace }}/ModLoader/ 237 | source: ${{ github.workspace }}/ModLoader/mod/ModdedHairAddon/ModdedHairAddon.mod.zip 238 | destBase: ${{ github.workspace }}/ModLoader/out 239 | target: ${{ github.workspace }}/ModLoader/out 240 | 241 | - name: Build ConflictChecker 242 | working-directory: ${{ github.workspace }}/ModLoader/mod/ConflictChecker 243 | run: | 244 | yarn install 245 | yarn run build:ts 246 | yarn run build:webpack 247 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 248 | - name: Copy ConflictChecker 249 | uses: Lyoko-Jeremie/js-copy-github-action@master 250 | with: 251 | srcBase: ${{ github.workspace }}/ModLoader/ 252 | source: ${{ github.workspace }}/ModLoader/mod/ConflictChecker/ConflictChecker.mod.zip 253 | destBase: ${{ github.workspace }}/ModLoader/out 254 | target: ${{ github.workspace }}/ModLoader/out 255 | 256 | - name: Build SweetAlert2Mod 257 | working-directory: ${{ github.workspace }}/ModLoader/mod/SweetAlert2Mod 258 | run: | 259 | yarn install 260 | yarn run build:ts 261 | yarn run build:webpack 262 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 263 | - name: Copy SweetAlert2Mod 264 | uses: Lyoko-Jeremie/js-copy-github-action@master 265 | with: 266 | srcBase: ${{ github.workspace }}/ModLoader/ 267 | source: ${{ github.workspace }}/ModLoader/mod/SweetAlert2Mod/SweetAlert2Mod.mod.zip 268 | destBase: ${{ github.workspace }}/ModLoader/out 269 | target: ${{ github.workspace }}/ModLoader/out 270 | 271 | - name: Build I18nTweeList 272 | working-directory: ${{ github.workspace }}/ModLoader/mod/I18nTweeList 273 | run: | 274 | yarn install 275 | yarn run build:ts 276 | yarn run build:webpack 277 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 278 | - name: Copy I18nTweeList 279 | uses: Lyoko-Jeremie/js-copy-github-action@master 280 | with: 281 | srcBase: ${{ github.workspace }}/ModLoader/ 282 | source: ${{ github.workspace }}/ModLoader/mod/I18nTweeList/I18nTweeList.mod.zip 283 | destBase: ${{ github.workspace }}/ModLoader/out 284 | target: ${{ github.workspace }}/ModLoader/out 285 | 286 | - name: Build I18nScriptList 287 | working-directory: ${{ github.workspace }}/ModLoader/mod/I18nScriptList 288 | run: | 289 | yarn install 290 | yarn run build:ts 291 | yarn run build:webpack 292 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 293 | - name: Copy I18nScriptList 294 | uses: Lyoko-Jeremie/js-copy-github-action@master 295 | with: 296 | srcBase: ${{ github.workspace }}/ModLoader/ 297 | source: ${{ github.workspace }}/ModLoader/mod/I18nScriptList/I18nScriptList.mod.zip 298 | destBase: ${{ github.workspace }}/ModLoader/out 299 | target: ${{ github.workspace }}/ModLoader/out 300 | 301 | - name: Build ReplacePatch 302 | working-directory: ${{ github.workspace }}/ModLoader/mod/ReplacePatch 303 | run: | 304 | yarn install 305 | yarn run build:ts 306 | yarn run build:webpack 307 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 308 | - name: Copy ReplacePatch 309 | uses: Lyoko-Jeremie/js-copy-github-action@master 310 | with: 311 | srcBase: ${{ github.workspace }}/ModLoader/ 312 | source: ${{ github.workspace }}/ModLoader/mod/ReplacePatch/ReplacePatcher.mod.zip 313 | destBase: ${{ github.workspace }}/ModLoader/out 314 | target: ${{ github.workspace }}/ModLoader/out 315 | 316 | - name: Build TweePrefixPostfixAddon 317 | working-directory: ${{ github.workspace }}/ModLoader/mod/TweePrefixPostfixAddon 318 | run: | 319 | yarn install 320 | yarn run build:ts 321 | yarn run build:webpack 322 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 323 | - name: Copy TweePrefixPostfixAddon 324 | uses: Lyoko-Jeremie/js-copy-github-action@master 325 | with: 326 | srcBase: ${{ github.workspace }}/ModLoader/ 327 | source: ${{ github.workspace }}/ModLoader/mod/TweePrefixPostfixAddon/TweePrefixPostfixAddon.mod.zip 328 | destBase: ${{ github.workspace }}/ModLoader/out 329 | target: ${{ github.workspace }}/ModLoader/out 330 | 331 | # TweeReplacerLinker must build before `TweeReplacer` and `I18nTweeReplacer` 332 | - name: Build TweeReplacerLinker 333 | working-directory: ${{ github.workspace }}/ModLoader/mod/TweeReplacerLinker 334 | run: | 335 | yarn install 336 | yarn run ts:type 337 | yarn run build:ts 338 | yarn run build:webpack 339 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 340 | - name: Copy TweeReplacerLinker 341 | uses: Lyoko-Jeremie/js-copy-github-action@master 342 | with: 343 | srcBase: ${{ github.workspace }}/ModLoader/ 344 | source: ${{ github.workspace }}/ModLoader/mod/TweeReplacerLinker/TweeReplacerLinker.mod.zip 345 | destBase: ${{ github.workspace }}/ModLoader/out 346 | target: ${{ github.workspace }}/ModLoader/out 347 | 348 | - name: Build TweeReplacer 349 | working-directory: ${{ github.workspace }}/ModLoader/mod/TweeReplacer 350 | run: | 351 | yarn install 352 | yarn run build:ts 353 | yarn run build:webpack 354 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 355 | - name: Copy TweeReplacer 356 | uses: Lyoko-Jeremie/js-copy-github-action@master 357 | with: 358 | srcBase: ${{ github.workspace }}/ModLoader/ 359 | source: ${{ github.workspace }}/ModLoader/mod/TweeReplacer/TweeReplacer.mod.zip 360 | destBase: ${{ github.workspace }}/ModLoader/out 361 | target: ${{ github.workspace }}/ModLoader/out 362 | 363 | - name: Build I18nTweeReplacer 364 | working-directory: ${{ github.workspace }}/ModLoader/mod/I18nTweeReplacer 365 | run: | 366 | yarn install 367 | yarn run build:ts 368 | yarn run build:webpack 369 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 370 | - name: Copy I18nTweeReplacer 371 | uses: Lyoko-Jeremie/js-copy-github-action@master 372 | with: 373 | srcBase: ${{ github.workspace }}/ModLoader/ 374 | source: ${{ github.workspace }}/ModLoader/mod/I18nTweeReplacer/I18nTweeReplacer.mod.zip 375 | destBase: ${{ github.workspace }}/ModLoader/out 376 | target: ${{ github.workspace }}/ModLoader/out 377 | 378 | - name: Build CheckDoLCompressorDictionaries 379 | working-directory: ${{ github.workspace }}/ModLoader/mod/CheckDoLCompressorDictionaries 380 | run: | 381 | yarn install 382 | yarn run build:ts 383 | yarn run build:webpack 384 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 385 | - name: Copy CheckDoLCompressorDictionaries 386 | uses: Lyoko-Jeremie/js-copy-github-action@master 387 | with: 388 | srcBase: ${{ github.workspace }}/ModLoader/ 389 | source: ${{ github.workspace }}/ModLoader/mod/CheckDoLCompressorDictionaries/CheckDoLCompressorDictionaries.mod.zip 390 | destBase: ${{ github.workspace }}/ModLoader/out 391 | target: ${{ github.workspace }}/ModLoader/out 392 | 393 | - name: Build ModuleCssReplacer 394 | working-directory: ${{ github.workspace }}/ModLoader/mod/ModuleCssReplacer 395 | run: | 396 | yarn install 397 | yarn run build:ts 398 | yarn run build:webpack 399 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 400 | - name: Copy ModuleCssReplacer 401 | uses: Lyoko-Jeremie/js-copy-github-action@master 402 | with: 403 | srcBase: ${{ github.workspace }}/ModLoader/ 404 | source: ${{ github.workspace }}/ModLoader/mod/ModuleCssReplacer/ModuleCssReplacer.mod.zip 405 | destBase: ${{ github.workspace }}/ModLoader/out 406 | target: ${{ github.workspace }}/ModLoader/out 407 | 408 | - name: Build BeautySelectorAddon 409 | working-directory: ${{ github.workspace }}/ModLoader/mod/BeautySelectorAddon 410 | run: | 411 | yarn install 412 | yarn run build:ts 413 | yarn run build:webpack 414 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 415 | - name: Copy BeautySelectorAddon 416 | uses: Lyoko-Jeremie/js-copy-github-action@master 417 | with: 418 | srcBase: ${{ github.workspace }}/ModLoader/ 419 | source: ${{ github.workspace }}/ModLoader/mod/BeautySelectorAddon/BeautySelectorAddon.mod.zip 420 | destBase: ${{ github.workspace }}/ModLoader/out 421 | target: ${{ github.workspace }}/ModLoader/out 422 | 423 | - name: Build DoLHookWidget 424 | working-directory: ${{ github.workspace }}/ModLoader/mod/DoLHookWidget 425 | run: | 426 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 427 | - name: Copy DoLHookWidget 428 | uses: Lyoko-Jeremie/js-copy-github-action@master 429 | with: 430 | srcBase: ${{ github.workspace }}/ModLoader/ 431 | source: ${{ github.workspace }}/ModLoader/mod/DoLHookWidget/DoLHookWidget.mod.zip 432 | destBase: ${{ github.workspace }}/ModLoader/out 433 | target: ${{ github.workspace }}/ModLoader/out 434 | 435 | - name: Build DoLLinkButtonFilter 436 | working-directory: ${{ github.workspace }}/ModLoader/mod/DoLLinkButtonFilter 437 | run: | 438 | yarn install 439 | yarn run build:ts 440 | yarn run build:webpack 441 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 442 | - name: Copy DoLLinkButtonFilter 443 | uses: Lyoko-Jeremie/js-copy-github-action@master 444 | with: 445 | srcBase: ${{ github.workspace }}/ModLoader/ 446 | source: ${{ github.workspace }}/ModLoader/mod/DoLLinkButtonFilter/DoLLinkButtonFilter.mod.zip 447 | destBase: ${{ github.workspace }}/ModLoader/out 448 | target: ${{ github.workspace }}/ModLoader/out 449 | 450 | - name: Build HookMacroRng 451 | working-directory: ${{ github.workspace }}/ModLoader/mod/HookMacroRng 452 | run: | 453 | yarn install 454 | yarn run build:ts 455 | yarn run build:webpack 456 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 457 | - name: Copy HookMacroRng 458 | uses: Lyoko-Jeremie/js-copy-github-action@master 459 | with: 460 | srcBase: ${{ github.workspace }}/ModLoader/ 461 | source: ${{ github.workspace }}/ModLoader/mod/HookMacroRng/HookMacroRng.mod.zip 462 | destBase: ${{ github.workspace }}/ModLoader/out 463 | target: ${{ github.workspace }}/ModLoader/out 464 | 465 | - name: Build ImageLoaderHook2BeautySelectorAddon 466 | working-directory: ${{ github.workspace }}/ModLoader/mod/ImageLoaderHook2BeautySelectorAddon 467 | run: | 468 | yarn install 469 | yarn run build:ts 470 | yarn run build:webpack 471 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 472 | - name: Copy ImageLoaderHook2BeautySelectorAddon 473 | uses: Lyoko-Jeremie/js-copy-github-action@master 474 | with: 475 | srcBase: ${{ github.workspace }}/ModLoader/ 476 | source: ${{ github.workspace }}/ModLoader/mod/ImageLoaderHook2BeautySelectorAddon/ImageLoaderHook2BeautySelectorAddon.mod.zip 477 | destBase: ${{ github.workspace }}/ModLoader/out 478 | target: ${{ github.workspace }}/ModLoader/out 479 | 480 | # ========= make GameOriginalImagePack ========= 481 | - name: Checkout GameOriginalImagePack 482 | uses: actions/checkout@v6 483 | with: 484 | repository: Lyoko-Jeremie/GameOriginalImagePackMod 485 | path: ${{ github.workspace }}/ModLoader/mod/GameOriginalImagePack 486 | ref: master 487 | #submodules: recursive 488 | - name: Build GameOriginalImagePack 489 | if: runner.os == 'Windows' 490 | working-directory: ${{ github.workspace }}/ModLoader/mod/GameOriginalImagePack 491 | run: | 492 | yarn install 493 | yarn run build:ts 494 | yarn run build:webpack 495 | yarn run build:tools 496 | # copy game img , change boot.json GameVersion 497 | - name: Copy img (Win) 498 | if: runner.os == 'Windows' 499 | working-directory: ${{ github.workspace }}/ModLoader/mod/GameOriginalImagePack 500 | run: copy -Path "${{ github.workspace }}/DoL/img" -Destination "${{ github.workspace }}/ModLoader/mod/GameOriginalImagePack" -Recurse -Force 501 | - name: ReadGameVersion 502 | id: ReadGameVersion 503 | working-directory: ${{ github.workspace }} 504 | run: | 505 | node "${{ github.workspace }}/readGameVersion.js" "${{ github.workspace }}/DOL/game/01-config/sugarcubeConfig.js" 506 | # now we get the ${{ steps.ReadGameVersion.outputs.GameVersionString }} 507 | - name: Make GameOriginalImagePack 508 | if: runner.os == 'Windows' 509 | working-directory: ${{ github.workspace }}/ModLoader/mod/GameOriginalImagePack 510 | run: | 511 | node "${{ github.workspace }}/ModLoader/mod/GameOriginalImagePack/dist-tools/bootJsonFillTool.js" "bootTemplate.json" "img" "${{ steps.ReadGameVersion.outputs.GameVersionString }}" 512 | node "${{ github.workspace }}/ModLoader/dist-insertTools/packModZip.js" "boot.json" 513 | - name: MKDIR 514 | run: | 515 | mkdir ${{ github.workspace }}/out-GameOriginalImagePack 516 | - name: Copy GameOriginalImagePack 517 | if: runner.os == 'Windows' 518 | uses: Lyoko-Jeremie/js-copy-github-action@master 519 | with: 520 | srcBase: ${{ github.workspace }}/ModLoader/mod/GameOriginalImagePack/ 521 | source: ${{ github.workspace }}/ModLoader/mod/GameOriginalImagePack/GameOriginalImagePack.mod.zip 522 | destBase: ${{ github.workspace }}/out-GameOriginalImagePack 523 | target: ${{ github.workspace }}/out-GameOriginalImagePack 524 | # ========= make GameOriginalImagePack ok ========= 525 | 526 | - name: Copy dist-BeforeSC2 527 | uses: Lyoko-Jeremie/js-copy-github-action@master 528 | with: 529 | source: ${{ github.workspace }}/ModLoader/dist-BeforeSC2/**/* 530 | target: ${{ github.workspace }}/ModLoader/out/dist-BeforeSC2/ 531 | - name: Copy dist-BeforeSC2-comp 532 | uses: Lyoko-Jeremie/js-copy-github-action@master 533 | with: 534 | source: ${{ github.workspace }}/ModLoader/dist-BeforeSC2-comp/**/* 535 | target: ${{ github.workspace }}/ModLoader/out/dist-BeforeSC2-comp/ 536 | - name: Copy dist-BeforeSC2-comp-babel 537 | uses: Lyoko-Jeremie/js-copy-github-action@master 538 | with: 539 | source: ${{ github.workspace }}/ModLoader/dist-BeforeSC2-comp-babel/**/* 540 | target: ${{ github.workspace }}/ModLoader/out/dist-BeforeSC2-comp-babel/ 541 | - name: Copy dist-ForSC2 542 | uses: Lyoko-Jeremie/js-copy-github-action@master 543 | with: 544 | source: ${{ github.workspace }}/ModLoader/dist-ForSC2/**/* 545 | target: ${{ github.workspace }}/ModLoader/out/dist-ForSC2/ 546 | - name: Copy dist-insertTools 547 | uses: Lyoko-Jeremie/js-copy-github-action@master 548 | with: 549 | source: ${{ github.workspace }}/ModLoader/dist-insertTools/**/* 550 | target: ${{ github.workspace }}/ModLoader/out/dist-insertTools/ 551 | 552 | - name: Copy README.md 553 | uses: Lyoko-Jeremie/js-copy-github-action@master 554 | with: 555 | source: ${{ github.workspace }}/ModLoader/README.md 556 | target: ${{ github.workspace }}/ModLoader/out 557 | 558 | # /ModLoader OK ========================================= 559 | 560 | # /SC2 Init ========================================= 561 | - name: Build SC2 562 | working-directory: ${{ github.workspace }}/SC2 563 | run: | 564 | npm install 565 | node build.js -d -u -b 2 566 | # /SC2 OK ========================================= 567 | 568 | - name: Copy SC2 format.js 569 | uses: Lyoko-Jeremie/js-copy-github-action@master 570 | with: 571 | one: "true" 572 | srcBase: ${{ github.workspace }}/SC2/build/twine2/sugarcube-2/ 573 | source: ${{ github.workspace }}/SC2/build/twine2/sugarcube-2/format.js 574 | destBase: ${{ github.workspace }}/DoL/devTools/tweego/storyFormats/sugarcube-2/ 575 | target: ${{ github.workspace }}/DoL/devTools/tweego/storyFormats/sugarcube-2/ 576 | 577 | # /DoL Init ========================================= 578 | 579 | - name: Build DoL (Linux) 580 | if: runner.os != 'Windows' 581 | working-directory: ${{ github.workspace }}/DoL 582 | run: ./compile.sh 583 | 584 | - name: Build DoL (Win) 585 | if: runner.os == 'Windows' 586 | working-directory: ${{ github.workspace }}/DoL 587 | run: ./compile.bat 588 | 589 | # /DoL OK ========================================= 590 | 591 | # - name: Upload debug 592 | # uses: actions/upload-artifact@v3 593 | # with: 594 | # name: Html debug-${{ github.sha }} 595 | # path: | 596 | # ${{ github.workspace }}/DoL/devTools/tweego/storyFormats/sugarcube-2/format.js 597 | # ${{ github.workspace }}/ModLoader/out/ 598 | 599 | - name: Inject ModLoader 600 | working-directory: ${{ github.workspace }}/ModLoader/out 601 | run: | 602 | node "${{ github.workspace }}/ModLoader/out/dist-insertTools/insert2html.js" "${{ github.workspace }}/DoL/Degrees of Lewdity VERSION.html" "modList.json" "${{ github.workspace }}/ModLoader/out/dist-BeforeSC2/BeforeSC2.js" 603 | 604 | - name: Inject ModLoader-compatibility 605 | working-directory: ${{ github.workspace }}/ModLoader/out 606 | run: | 607 | node "${{ github.workspace }}/ModLoader/out/dist-insertTools/insert2html-polyfill.js" "${{ github.workspace }}/DoL/Degrees of Lewdity VERSION.html" "modList.json" "${{ github.workspace }}/ModLoader/out/dist-BeforeSC2-comp/BeforeSC2.js" "${{ github.workspace }}/ModLoader/out/dist-BeforeSC2-comp/polyfillWebpack.js" "ManualPolyfill.js" 608 | 609 | # make package Init ========================================= 610 | - name: MKDIR 611 | run: | 612 | mkdir ${{ github.workspace }}/output 613 | 614 | - name: Copy html 615 | uses: Lyoko-Jeremie/js-copy-github-action@master 616 | with: 617 | srcBase: ${{ github.workspace }}/DoL/ 618 | source: ${{ github.workspace }}/DoL/Degrees of Lewdity VERSION.html.mod.html 619 | target: ${{ github.workspace }}/output 620 | - name: Copy html-compatibility 621 | uses: Lyoko-Jeremie/js-copy-github-action@master 622 | with: 623 | srcBase: ${{ github.workspace }}/DoL/ 624 | source: ${{ github.workspace }}/DoL/Degrees of Lewdity VERSION.html.mod-polyfill.html 625 | target: ${{ github.workspace }}/output 626 | # - name: Copy style 627 | # uses: Lyoko-Jeremie/js-copy-github-action@master 628 | # with: 629 | # srcBase: ${{ github.workspace }}/DoL/ 630 | # source: ${{ github.workspace }}/DoL/style.css 631 | # target: ${{ github.workspace }}/output 632 | # - name: Copy img 633 | # uses: Lyoko-Jeremie/js-copy-github-action@master 634 | # with: 635 | # srcBase: ${{ github.workspace }}/DoL/ 636 | # source: ${{ github.workspace }}/DoL/img/**/* 637 | # target: ${{ github.workspace }}/output 638 | - name: Copy img (Win) 639 | if: runner.os == 'Windows' 640 | run: copy -Path "${{ github.workspace }}/DoL/img" -Destination "${{ github.workspace }}/output" -Recurse 641 | 642 | - name: Archive Release (Artifact) 643 | uses: thedoctor0/zip-release@0.7.6 644 | with: 645 | type: 'zip' 646 | filename: DoL-ModLoader-${{ github.sha }}.zip 647 | directory: ${{ github.workspace }}/output 648 | 649 | # make package OK ========================================= 650 | 651 | - name: Upload GameOriginalImagePack.mod.zip 652 | uses: actions/upload-artifact@v5 653 | with: 654 | name: GameOriginalImagePack-mod-${{ github.sha }} 655 | path: ${{ github.workspace }}/out-GameOriginalImagePack/GameOriginalImagePack.mod.zip 656 | 657 | - name: Upload 658 | uses: actions/upload-artifact@v5 659 | with: 660 | name: Html Package-${{ github.sha }} 661 | path: ${{ github.workspace }}/output/DoL-ModLoader-${{ github.sha }}.zip 662 | 663 | - name: Get Current Time 664 | id: time 665 | uses: nanzm/get-time-action@master 666 | with: 667 | timeZone: UTC+8 668 | format: 'YYYY-MM-DD-HH-mm-ss' 669 | 670 | - name: Rename Archive (Manually) 671 | if: ${{ github.event_name == 'workflow_dispatch' }} 672 | run: | 673 | mv "output/DoL-ModLoader-${{ github.sha }}.zip" "output/DoL-ModLoader-${{ github.event.inputs.version }}-${{ github.sha }}.zip" 674 | 675 | - name: Archive Release (Releases Manually) 676 | uses: softprops/action-gh-release@v1 677 | if: ${{ github.event_name == 'workflow_dispatch' }} 678 | with: 679 | files: | 680 | output/DoL-ModLoader-${{ github.event.inputs.version }}-${{ github.sha }}.zip 681 | out-GameOriginalImagePack/GameOriginalImagePack.mod.zip 682 | name: Release v${{ github.event.inputs.version }} 683 | tag_name: v${{ github.event.inputs.version }}-${{ github.sha }} 684 | body: Release v${{ github.event.inputs.version }}-${{ github.sha }} 685 | 686 | - name: Archive Release (Releases Auto) 687 | uses: softprops/action-gh-release@v1 688 | if: ${{ github.event_name != 'workflow_dispatch' }} 689 | with: 690 | files: | 691 | output/DoL-ModLoader-${{ github.sha }}.zip 692 | out-GameOriginalImagePack/GameOriginalImagePack.mod.zip 693 | name: Auto Release on ${{ steps.time.outputs.time }} (${{ github.sha }}) 694 | tag_name: auto-${{ github.sha }}-${{ steps.time.outputs.time }} 695 | body: Auto Release on ${{ steps.time.outputs.time }} (${{ github.sha }}) 696 | prerelease: true 697 | --------------------------------------------------------------------------------