From e4a8e72edd85eaa063bbe820ce138cf2dc351fe7 Mon Sep 17 00:00:00 2001
From: tobspr <>
Date: Sat, 30 May 2020 20:25:46 +0200
Subject: [PATCH] Add .itch.toml file
---
gulp/.itch.toml | 9 +++++++++
gulp/standalone.js | 35 ++++++++++++++++++++++++-----------
src/js/changelog.js | 2 +-
3 files changed, 34 insertions(+), 12 deletions(-)
create mode 100644 gulp/.itch.toml
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!",