diff --git a/gulp/.itch.toml b/gulp/.itch.toml new file mode 100644 index 00000000..2556ac9c --- /dev/null +++ b/gulp/.itch.toml @@ -0,0 +1,9 @@ +[[actions]] +name = "play" +path = "shapezio.exe" +platform = "windows" + +[[actions]] +name = "play" +path = "play.sh" +platform = "linux" diff --git a/gulp/standalone.js b/gulp/standalone.js index e8a1e9be..1c3d3748 100644 --- a/gulp/standalone.js +++ b/gulp/standalone.js @@ -121,6 +121,8 @@ function gulptasksStandalone($, gulp, buildFolder) { * @param {boolean=} isRelease */ function packageStandalone(platform, arch, cb, isRelease = false) { + const tomlFile = fs.readFileSync(path.join(__dirname, ".itch.toml")); + packager({ dir: tempDestBuildDir, appCopyright: "Tobias Springer", @@ -150,17 +152,28 @@ function gulptasksStandalone($, gulp, buildFolder) { fs.readFileSync(path.join(__dirname, "..", "LICENSE")) ); - const playablePath = appPath + "_playable"; - fse.copySync(appPath, playablePath); - fs.writeFileSync(path.join(playablePath, "steam_appid.txt"), "1134480"); - fs.writeFileSync( - path.join(playablePath, "play.bat"), - "start shapezio --dev --disable-direct-composition --in-process-gpu\r\n" - ); - fs.writeFileSync( - path.join(playablePath, "play_local.bat"), - "start shapezio --local --dev --disable-direct-composition --in-process-gpu\r\n" - ); + fs.writeFileSync(path.join(appPath, ".itch.toml"), tomlFile); + + if (platform === "linux" || platform === "darwin") { + fs.writeFileSync( + path.join(appPath, "play.sh"), + "#!/usr/bin/env bash\r\n./shapezio\r\n" + ); + fs.chmodSync(path.join(appPath, "play.sh"), 0o775); + } else if (platform === "win32") { + // Optional: Create a playable copy. Shouldn't be required + // const playablePath = appPath + "_playable"; + // fse.copySync(appPath, playablePath); + // fs.writeFileSync(path.join(playablePath, "steam_appid.txt"), "1134480"); + // fs.writeFileSync( + // path.join(playablePath, "play.bat"), + // "start shapezio --dev --disable-direct-composition --in-process-gpu\r\n" + // ); + // fs.writeFileSync( + // path.join(playablePath, "play_local.bat"), + // "start shapezio --local --dev --disable-direct-composition --in-process-gpu\r\n" + // ); + } }); cb(); diff --git a/src/js/changelog.js b/src/js/changelog.js index 81f2749a..6c058b51 100644 --- a/src/js/changelog.js +++ b/src/js/changelog.js @@ -1,7 +1,7 @@ export const CHANGELOG = [ { version: "1.1.2", - date: "unreleased", + date: "30.05.2020", entries: [ "The official trailer is now ready! Check it out here!", "The steam page is now live!",