diff --git a/.github/images/linux.png b/.github/images/linux.png new file mode 100644 index 0000000..6d9e0c0 Binary files /dev/null and b/.github/images/linux.png differ diff --git a/.github/images/macos.png b/.github/images/macos.png new file mode 100644 index 0000000..0ea4bfd Binary files /dev/null and b/.github/images/macos.png differ diff --git a/.github/images/windows.png b/.github/images/windows.png new file mode 100644 index 0000000..b8673e8 Binary files /dev/null and b/.github/images/windows.png differ diff --git a/README.md b/README.md index bb1d6a6..c889495 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,101 @@ This is Mac OS 8, running in an [Electron](https://electronjs.org/) app pretendi ## Downloads -| | Windows | macOS | Linux | -|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Standalone Download | 📦[Standalone, 32-bit](https://github.com/felixrieseberg/macintosh.js/releases/download/v1.0.6/macintosh.js-win32-ia32-1.0.6.zip)
📦[Standalone, 64-bit](https://github.com/felixrieseberg/macintosh.js/releases/download/v1.0.6/macintosh.js-win32-x64-1.0.6.zip) | 📦[Standalone](https://github.com/felixrieseberg/macintosh.js/releases/download/v1.0.6/macintosh.js-darwin-x64-1.0.6.zip) | | -| Installer | 💽[Setup, 64-bit](https://github.com/felixrieseberg/macintosh.js/releases/download/v1.0.6/macintoshjs-1.0.6-setup-x64.exe)
💽[Setup, 32-bit](https://github.com/felixrieseberg/macintosh.js/releases/download/v1.0.6/macintoshjs-1.0.6-setup-ia32.exe) | | 💽[deb, 64-bit](https://github.com/felixrieseberg/macintosh.js/releases/download/v1.0.6/macintosh.js_1.0.6_amd64.deb)
💽[rpm, 64-bit](https://github.com/felixrieseberg/macintosh.js/releases/download/v1.0.6/macintosh.js-1.0.6-1.x86_64.rpm) | + + + + + + + + + + + + + + + + +
+
+ Windows +
+ 32-bit + + 💿 Installer + | + + 📦 Standalone Zip + +
+ 64-bit + + 💿 Installer + | + + 📦 Standalone Zip +
+ ARM64 + + 💿 Installer + | + + 📦 Standalone Zip +
+ + ❓ Don't know what kind of chip you have? Hit start, enter "processor" for info. + +
+
+ macOS +
+ Intel Processor + + 📦 Standalone Zip +
+ Apple M1 Processor + + 📦 Standalone Zip +
+ + ❓ Don't know what kind of chip you have? Learn more at apple.com. + +
+
+ Linux +
+ 32-bit + + 💿 rpm + | + + 💿 deb +
+ 32-bit + + 💿 rpm + | + + 💿 deb +
+ ARM64 + + 💿 rpm + | + + 💿 deb +
+ ARMv7 (armhf) + + 💿 rpm + | + + 💿 deb + +
+ +
## Does it work? Yes! Quite well, actually - on macOS, Windows, and Linux. Bear in mind that this is written entirely in JavaScript, so please adjust your expectations. The virtual machine is emulating a 1991 Macintosh Quadra 900 with a Motorola CPU, which Apple used before switching to the PowerPC architecture (Apple/IBM/Motorola) in the mid 1990s. diff --git a/package.json b/package.json index b4c3fe6..d514549 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,9 @@ "package": "electron-forge package", "make": "electron-forge make", "publish": "electron-forge publish", - "lint": "npx prettier --check src/{main,renderer}/*.{js,css}", - "fix": "npx prettier --write src/{main,renderer}/*.{js,css}" + "lint": "npx prettier --check src/{main,renderer}/*.{js,css} && npm run check-links", + "fix": "npx prettier --write src/{main,renderer}/*.{js,css}", + "check-links": "node tools/check-links.js" }, "keywords": [], "author": { @@ -31,6 +32,7 @@ "@electron-forge/maker-rpm": "6.0.0-beta.54", "@electron-forge/maker-squirrel": "6.0.0-beta.54", "@electron-forge/maker-zip": "6.0.0-beta.54", - "electron": "11.1.1" + "electron": "11.1.1", + "node-fetch": "^2.6.1" } } diff --git a/tools/check-links.js b/tools/check-links.js new file mode 100644 index 0000000..40cd8cb --- /dev/null +++ b/tools/check-links.js @@ -0,0 +1,38 @@ +const fs = require('fs/promises') +const path = require('path') +const fetch = require('node-fetch') + +const LINK_RGX = /(http|ftp|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?/g; + +async function main() { + const readmePath = path.join(__dirname, '../README.md') + const readme = await fs.readFile(readmePath, 'utf-8') + const links = readme.match(LINK_RGX) + let failed = false + + for (const link of links) { + try { + const response = await fetch(link, { method: 'HEAD' }) + + if (!response.ok) { + // If we're inside GitHub's release asset server, we just ran into AWS not allowing + // HEAD requests, which is different from a 404. + if (!response.url.startsWith('https://github-production-release-asset')) { + throw new Error (`HTTP Error Response: ${response.status} ${response.statusText}`) + } + } + + console.log(`✅ ${link}`); + } catch (error) { + failed = true + + console.log(`❌ ${link}\n${error}`) + } + } + + if (failed) { + process.exit(-1); + } +} + +main() diff --git a/yarn.lock b/yarn.lock index daa7714..02b37f5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2119,7 +2119,7 @@ node-addon-api@^1.6.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-1.7.2.tgz#3df30b95720b53c24e59948b49532b662444f54d" integrity sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg== -node-fetch@^2.6.0: +node-fetch@^2.6.0, node-fetch@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==