From 3ba237a7b436b2e16019fa5f78a889d2bce58db5 Mon Sep 17 00:00:00 2001 From: Cosmo Myzrail Gorynych Date: Mon, 24 Aug 2020 16:50:21 +1200 Subject: [PATCH] :bug: Fix .itch.toml, package it separately for each platform Closes #222 --- app/.itch.toml | 22 ---------------------- buildAssets/linux.itch.toml | 3 +++ buildAssets/mac.itch.toml | 3 +++ buildAssets/windows.itch.toml | 3 +++ gulpfile.js | 20 ++++++++++++++++++++ 5 files changed, 29 insertions(+), 22 deletions(-) delete mode 100644 app/.itch.toml create mode 100644 buildAssets/linux.itch.toml create mode 100644 buildAssets/mac.itch.toml create mode 100644 buildAssets/windows.itch.toml diff --git a/app/.itch.toml b/app/.itch.toml deleted file mode 100644 index dbe88a0d1..000000000 --- a/app/.itch.toml +++ /dev/null @@ -1,22 +0,0 @@ -[[actions]] -name = "play" -path = "ctjs.exe" -platform = "windows" - -[[actions]] -name = "play" -path = "ctjs" -platform = "linux" - -[[actions]] -name = "play" -path = "ctjs.app" -platform = "osx" - -[[actions]] -name = "manual" -path = "https://docs.ctjs.rocks/" - -[[actions]] -name = "Discord" -path = "https://discord.gg/CggbPkb" \ No newline at end of file diff --git a/buildAssets/linux.itch.toml b/buildAssets/linux.itch.toml new file mode 100644 index 000000000..8701c7114 --- /dev/null +++ b/buildAssets/linux.itch.toml @@ -0,0 +1,3 @@ +[[actions]] +name = "play" +path = "ctjs" \ No newline at end of file diff --git a/buildAssets/mac.itch.toml b/buildAssets/mac.itch.toml new file mode 100644 index 000000000..1d714bf2d --- /dev/null +++ b/buildAssets/mac.itch.toml @@ -0,0 +1,3 @@ +[[actions]] +name = "play" +path = "ctjs.app" \ No newline at end of file diff --git a/buildAssets/windows.itch.toml b/buildAssets/windows.itch.toml new file mode 100644 index 000000000..a5dafe36e --- /dev/null +++ b/buildAssets/windows.itch.toml @@ -0,0 +1,3 @@ +[[actions]] +name = "play" +path = "ctjs.exe" \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index e8c858b60..835759603 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -414,6 +414,26 @@ const bakePackages = async () => { macIcns: nightly ? './buildAssets/nightly.icns' : './buildAssets/icon.icns' }); await nw.build(); + + // Copy .itch.toml files for each target platform + await Promise.all(platforms.map(platform => { + if (platform.indexOf('win') === 0) { + return fs.copy( + './buildAssets/windows.itch.toml', + path.join(`./build/ctjs - v${pack.version}`, platform, '.itch.toml') + ); + } + if (platform === 'osx64') { + return fs.copy( + './buildAssets/mac.itch.toml', + path.join(`./build/ctjs - v${pack.version}`, platform, '.itch.toml') + ); + } + return fs.copy( + './buildAssets/linux.itch.toml', + path.join(`./build/ctjs - v${pack.version}`, platform, '.itch.toml') + ); + })); console.log('Built to this location:', path.join('./build', `ctjs - v${pack.version}`)); };