Compare commits

...

16 Commits

Author SHA1 Message Date
Felix Rieseberg 3bd800d296 1.0.6 2020-08-02 13:13:29 -07:00
Felix Rieseberg 5e9570023b build: Allow Windows cert failure 2020-08-02 13:05:34 -07:00
Felix Rieseberg 64d8f4a382 build: Trying to fix GH actions 2020-08-02 12:58:02 -07:00
Felix Rieseberg de601111f9 build: Run on push to master 2020-08-02 12:55:30 -07:00
Felix Rieseberg 5c83088633 build: Only attempt to create code signature if secrets are set 2020-08-02 12:54:47 -07:00
Felix Rieseberg c73331bf6a feat: Handle toast and dsk images 2020-08-01 22:56:14 +00:00
Felix Rieseberg 9a1bbd40fb Merge pull request #45 from meeh0w/patch-1
Update README.md
2020-08-01 15:40:08 -07:00
Michał Leszczyk 1861b3b818 Update README.md 2020-07-31 18:34:59 +02:00
Felix Rieseberg 99c4e2e31c Merge pull request #43 from jonathanpotts/master
Update README with current download links
2020-07-31 09:16:45 -07:00
Jonathan Potts ec32c63b29 Update README.md 2020-07-30 22:52:05 -07:00
Jonathan Potts 09f4a9a3ed Update README.md 2020-07-30 22:51:35 -07:00
Felix Rieseberg d86d40f90d build: Icon for debian 2020-07-30 11:58:54 -07:00
Felix Rieseberg 7e32d63415 1.0.5 2020-07-30 11:49:50 -07:00
Felix Rieseberg 13f8d8bd7b Merge pull request #30 from jonathanpotts/master
Proposed fix for issue #6
2020-07-30 11:48:28 -07:00
Jonathan Potts 473033ba7b Update input.js
Make change according to https://github.com/felixrieseberg/macintosh.js/issues/6#issuecomment-665981700
2020-07-29 19:20:03 -07:00
Felix Rieseberg 5a4e6e6b37 docs: Update links 2020-07-29 12:15:03 -07:00
7 changed files with 44 additions and 23 deletions
+2 -1
View File
@@ -1 +1,2 @@
* text eol=lf
text eol=lf
rom -text
+3 -1
View File
@@ -3,7 +3,7 @@ name: Build & Release
on:
push:
branches:
# - master
- master
tags:
- v*
pull_request:
@@ -63,6 +63,7 @@ jobs:
MACOS_CERT_PASSWORD: ${{ secrets.MACOS_CERT_PASSWORD }}
- name: Set Windows signing certificate
if: matrix.os == 'windows-latest'
continue-on-error: true
id: write_file
uses: timheuer/base64-to-file@v1
with:
@@ -105,6 +106,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
files: |
out/**/*.deb
out/**/*.dmg
+3 -3
View File
@@ -8,8 +8,8 @@ This is Mac OS 8, running in an [Electron](https://electronjs.org/) app pretendi
| | Windows | macOS | Linux |
|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Standalone Download | 📦[Standalone, 32-bit](https://github.com/felixrieseberg/macintosh.js/releases/download/v1.0.3/macintosh.js-win32-ia32-1.0.3.zip) <br /> 📦[Standalone, 64-bit](https://github.com/felixrieseberg/macintosh.js/releases/download/v1.0.3/macintosh.js-win32-x64-1.0.3.zip) | 📦[Standalone](https://github.com/felixrieseberg/macintosh.js/releases/download/v1.0.3/macintosh.js-darwin-x64-1.0.3.zip) | |
| Installer | 💽[Setup, 64-bit](https://github.com/felixrieseberg/macintosh.js/releases/download/v1.0.3/macintoshjs-1.0.3-setup-x64.exe) <br /> 💽[Setup, 32-bit](https://github.com/felixrieseberg/macintosh.js/releases/download/v1.0.3/macintoshjs-1.0.3-setup-ia32.exe) | | 💽[deb, 64-bit](https://github.com/felixrieseberg/macintosh.js/releases/download/v1.0.3/macintosh.js_1.0.3_amd64.deb) <br /> 💽[rpm, 64-bit](https://github.com/felixrieseberg/macintosh.js/releases/download/v1.0.3/macintosh.js-1.0.3-1.x86_64.rpm) |
| Standalone Download | 📦[Standalone, 32-bit](https://github.com/felixrieseberg/macintosh.js/releases/download/v1.0.5/macintosh.js-win32-ia32-1.0.5.zip) <br /> 📦[Standalone, 64-bit](https://github.com/felixrieseberg/macintosh.js/releases/download/v1.0.5/macintosh.js-win32-x64-1.0.5.zip) | 📦[Standalone](https://github.com/felixrieseberg/macintosh.js/releases/download/v1.0.5/macintosh.js-darwin-x64-1.0.5.zip) | |
| Installer | 💽[Setup, 64-bit](https://github.com/felixrieseberg/macintosh.js/releases/download/v1.0.5/macintoshjs-1.0.5-setup-x64.exe) <br /> 💽[Setup, 32-bit](https://github.com/felixrieseberg/macintosh.js/releases/download/v1.0.5/macintoshjs-1.0.5-setup-ia32.exe) | | 💽[deb, 64-bit](https://github.com/felixrieseberg/macintosh.js/releases/download/v1.0.5/macintosh.js_1.0.5_amd64.deb) <br /> 💽[rpm, 64-bit](https://github.com/felixrieseberg/macintosh.js/releases/download/v1.0.5/macintosh.js-1.0.5-1.x86_64.rpm) |
## 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.
@@ -36,7 +36,7 @@ Probably not. This is a toy - it's not the best nor the most performant way to e
## Credits
Please check out the [CREDITS](CREDITS.md)! This app wouldn't be possible with the hard work of [Christian Bauer](https://www.cebix.net/) and [James Friend](https://jamesfriend.com.au/), who did everything that seems like computing magic here.
Please check out the [CREDITS](CREDITS.md)! This app wouldn't be possible without the hard work of [Christian Bauer](https://www.cebix.net/) and [James Friend](https://jamesfriend.com.au/), who did everything that seems like computing magic here.
## License
+9 -1
View File
@@ -75,7 +75,15 @@ module.exports = {
},
{
name: '@electron-forge/maker-deb',
platforms: ['linux']
platforms: ['linux'],
options: {
maintainer: 'Felix Rieseberg',
homepage: 'https://github.com/felixrieseberg/macintosh.js',
categories: [
'Education',
],
icon: path.resolve(__dirname, 'assets', 'icon.png')
}
},
{
name: '@electron-forge/maker-rpm',
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "macintosh.js",
"productName": "macintosh.js",
"version": "1.0.4",
"version": "1.0.6",
"description": "Macintosh's System 8 in an Electron app. I'm sorry.",
"main": "src/main/index.js",
"scripts": {
+23 -14
View File
@@ -1,6 +1,5 @@
const fs = require("fs");
const path = require("path");
const { error } = require("console");
const homeDir = require("os").homedir();
const macDir = path.join(homeDir, "macintosh.js");
@@ -13,6 +12,24 @@ function getUserDataDiskPath() {
return path.join(userDataPath, "disk");
}
// File type utilities
function isFile(v = "") {
return fs.statSync(path.join(macDir, v)).isFile();
}
function isHiddenFile(filename = '') {
return filename.startsWith('.');
}
function isCDImage(filename = '') {
return filename.endsWith('.iso') || filename.endsWith('.toast');
}
function isDiskImage(filename = '') {
return filename.endsWith('.img') || filename.endsWith('.dsk');
}
function cleanupCopyPath() {
try {
if (fs.existsSync(macintoshCopyPath)) {
@@ -60,7 +77,7 @@ function preloadFilesAtPath(module, initalSourcePath) {
}`;
const files = fs.readdirSync(sourcePath).filter((v) => {
// Remove hidden, iso, and img files
return !v.startsWith(".") && !v.endsWith(".iso") && !v.endsWith(".img");
return !isHiddenFile(v) && !isDiskImage(v) && !isCDImage(v);
});
(files || []).forEach((fileName) => {
@@ -192,9 +209,9 @@ function writePrefs(userImages = []) {
if (userImages && userImages.length > 0) {
console.log(`writePrefs: Found ${userImages.length} user images`);
userImages.forEach(({ name }) => {
if (name.endsWith(".iso")) {
if (isCDImage(name)) {
prefs += `\ncdrom ${name}`;
} else if (name.endsWith(".img")) {
} else if (isDiskImage(name)) {
prefs += `\ndisk ${name}`;
}
});
@@ -208,14 +225,6 @@ function writePrefs(userImages = []) {
}
}
function isMacDirFileOfType(extension = "", v = "") {
const isType = v.endsWith(`.${extension}`);
const isMatch = isType && fs.statSync(path.join(macDir, v)).isFile();
console.log(`isMacDirFileOfType: ${v} is file and ${extension}: ${isMatch}`);
return isMatch;
}
function getUserImages() {
const result = [];
@@ -227,8 +236,8 @@ function getUserImages() {
}
const macDirFiles = fs.readdirSync(macDir);
const imgFiles = macDirFiles.filter((v) => isMacDirFileOfType("img", v));
const isoFiles = macDirFiles.filter((v) => isMacDirFileOfType("iso", v));
const imgFiles = macDirFiles.filter((v) => isFile(v) && isDiskImage(v));
const isoFiles = macDirFiles.filter((v) => isFile(v) && isCDImage(v));
const isoImgFiles = [...isoFiles, ...imgFiles];
console.log(`getUserImages: iso and img files`, isoImgFiles);
+3 -2
View File
@@ -43,8 +43,9 @@ function tryToSendInput() {
switch (inputEvent.type) {
case "mousemove":
hasMouseMove = true;
mouseMoveX += inputEvent.dx;
mouseMoveY += inputEvent.dy;
// Make change according to https://github.com/felixrieseberg/macintosh.js/issues/6#issuecomment-665981700
mouseMoveX = inputEvent.dx;
mouseMoveY = inputEvent.dy;
break;
case "mousedown":
case "mouseup":