Skip to content

Commit

Permalink
🐛 Fix .itch.toml, package it separately for each platform
Browse files Browse the repository at this point in the history
Closes #222
  • Loading branch information
CosmoMyzrailGorynych committed Aug 24, 2020
1 parent f00de1a commit 3ba237a
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 22 deletions.
22 changes: 0 additions & 22 deletions app/.itch.toml

This file was deleted.

3 changes: 3 additions & 0 deletions buildAssets/linux.itch.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[[actions]]
name = "play"
path = "ctjs"
3 changes: 3 additions & 0 deletions buildAssets/mac.itch.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[[actions]]
name = "play"
path = "ctjs.app"
3 changes: 3 additions & 0 deletions buildAssets/windows.itch.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[[actions]]
name = "play"
path = "ctjs.exe"
20 changes: 20 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`));
};

Expand Down

2 comments on commit 3ba237a

@JulianWebb
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not going to keep the

[[actions]]
name = "manual"
path = "https://docs.ctjs.rocks/"

[[actions]]
name = "Discord"
path = "https://discord.gg/CggbPkb"

in the toml files?

@CosmoMyzrailGorynych
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JulianWebb yes, it should save an extra click for users to actually run the app.
Another question is why the heck I still can't see .itch.toml in ct.js nightly. 😩

Please sign in to comment.