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}`)); };