Add .itch.toml file

This commit is contained in:
tobspr 2020-05-30 20:25:46 +02:00
parent 704b6e14b8
commit e4a8e72edd
3 changed files with 34 additions and 12 deletions

9
gulp/.itch.toml Normal file
View File

@ -0,0 +1,9 @@
[[actions]]
name = "play"
path = "shapezio.exe"
platform = "windows"
[[actions]]
name = "play"
path = "play.sh"
platform = "linux"

View File

@ -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();

View File

@ -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 <a href='https://www.youtube.com/watch?v=KyorY1uIqiQ' target='_blank'>here</a>!",
"The <a href='https://steam.shapez.io' target='_blank'>steam page</a> is now live!",