From 1c47db70a09cdddda7e6901171c9fbee12c648da Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Fri, 3 Nov 2023 12:35:55 +0000 Subject: [PATCH] Doc: Automatically detect Apple silicon on Download page --- Assets/WebsiteAssets/images/BadgeMacOSM1.png | Bin 0 -> 18821 bytes Assets/WebsiteAssets/js/script.js | 47 ++++++++++++++++--- packages/tools/update-readme-download.ts | 14 ++++-- packages/tools/website/updateDownloadPage.ts | 20 +++++++- readme/download.md | 4 +- readme/install.md | 1 + 6 files changed, 71 insertions(+), 15 deletions(-) create mode 100644 Assets/WebsiteAssets/images/BadgeMacOSM1.png diff --git a/Assets/WebsiteAssets/images/BadgeMacOSM1.png b/Assets/WebsiteAssets/images/BadgeMacOSM1.png new file mode 100644 index 0000000000000000000000000000000000000000..3ce6cfee70f324f8a46b201fab62ad1cf4a28fcf GIT binary patch literal 18821 zcmaI7Wk8%w&o;aZ#ogT(cemm$OVL7s;;xIkQz%f}Demr8THM_oibIPRcfRd)-S_i; zKi=o%2b{Z1a?VULNhUcGp{gQ>hD?kM007Vwn2Gk*kc3 ztA?Y6tB0|(IY7e9(Zrlm!QR-?T;1H*%*$!m{4D?gOKYvEEv+3ysL#H4Qd3%+iBN0vf;qqtDRV1pd2eTP4Q~}qQ*T>S zK{IMGQOdWTLQn?w=B~z+p7wSQE<&Cn)c^1mf3h!6U@UPx+r8YUtaX%`Ak} zrDgx~F6bu_YAaV)h!8uwhldB72RECevn4yHpr9Z-2NydR7b|oGtBaR|tFb4mgA2`n zIY^tkm^xcST&*1)DF1RaHgR-w6`_XC^xq}eL;i=YgUf%m3A$nIp2iS%PBxCeOZx9X zF!=vH)ZYGoM!UGGoByBr{$ClpXnH}++11Tm9NnBvp@OrZ`THt}kd(8zv8$uArlX_X ze|J&U%F)%)#mW&v$;HXWMacj*Hnn#6`winiBw(#w3X{8-a-R#XBT>ndJ_J3$){#V++ z+F%cXzFFGb+1lOQOxD@ap7Nhn3t9i~bCLXC`Td91?0=t&)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aqw zF%(4TCgxk*syc#Wo#sh^T(jxDGYwHc2LkabpR{=h$FV+A*%r3UkRaG1pCaCi+keyM zFRNGJM|vGVhbIWm=zogVTnND`K6L~wZbkr!G+tULnTVoG+HE15QVaBL4ow|%F7!gF zkF1$I9;Rv?tpeY{YJ|w4hBO?yU5M?14s-w(-(^um%(-;GxEM|UfiI6xz4$R%Sp)z^ z4o{|HcwkkzBSFbB18R0bp>YHd>iM@+q7?*iig-v90EyeiFO!#-77{~VCpyo$$?`-? zZNlrdtv~D&vdbaEJgvq}C%UNjSyT=KdAzgpDY1DHHY*0C{4N2~$!SKNdU3CYlrsYN zRqe;>jPCN&M%hqPFAduk5BVv8iAQ?XXX)@&+87RBgk3D0%LfzcY6`D<`i7_=Y=KV1 zcZJNNB`Z-wx%P9e7?u6MZ4LSFsAs$Q{MZX+VKo+`+viIHWv&TJ-#;`epMDY#&aNmLK!%wd UvqkdqxKxbfv(L}7)Pq3%AF?MxLjV8( literal 0 HcmV?d00001 diff --git a/Assets/WebsiteAssets/js/script.js b/Assets/WebsiteAssets/js/script.js index 902ca8358..f61464fbb 100644 --- a/Assets/WebsiteAssets/js/script.js +++ b/Assets/WebsiteAssets/js/script.js @@ -1,6 +1,31 @@ -function getOs() { +async function getOs() { + + // The macOS release is available for Intel and Apple silicon processors, + // and the only way to get that info is through this new + // `getHighEntropyValues` function (which is not available on all browsers). + // So here we either return "macOs" for Intel or "macOsM1" for Apple + // Silicon. If we don't know which it is, we return "macOsUndefined". + // https://stackoverflow.com/a/75177111/561309 + + if (navigator.appVersion.indexOf("Mac")!=-1) { + let platformInfo = null; + try { + platformInfo = await navigator.userAgentData.getHighEntropyValues(['architecture']) + } catch (error) { + console.warn('Failed getting Mac architecture:', error); + return 'macOsUndefined'; + } + + console.info('Got platform info:', platformInfo); + + if (platformInfo.architecture === 'arm') { + return "macOsM1"; + } else { + return "macOs"; + } + } + if (navigator.appVersion.indexOf("Win")!=-1) return "windows"; - if (navigator.appVersion.indexOf("Mac")!=-1) return "macOs"; if (navigator.appVersion.indexOf("X11")!=-1) return "linux"; if (navigator.appVersion.indexOf("Linux")!=-1) return "linux"; return null; @@ -45,7 +70,7 @@ function setupMobileMenu() { }); } -function setupDownloadPage() { +async function setupDownloadPage() { if (!$('.page-download').length) return; const downloadLinks = {}; @@ -55,6 +80,7 @@ function setupDownloadPage() { if (href.indexOf('-Setup') > 0) downloadLinks['windows'] = href; if (href.indexOf('.dmg') > 0) downloadLinks['macOs'] = href; + if (href.endsWith('arm64.DMG')) downloadLinks['macOsM1'] = href; if (href.indexOf('.AppImage') > 0) downloadLinks['linux'] = href; }); @@ -70,8 +96,17 @@ function setupDownloadPage() { if (mobileOs) { $('.page-download .intro').hide(); } else { - const os = getOs(); - if (!os || !downloadLinks[os]) { + const os = await getOs(); + + if (os === 'macOsUndefined') { + // If we don't know which macOS version it is, we let the user choose. + $('.main-content .intro').html('

The macOS release is available for Intel processors or for Apple Silicon (M1) processors. Please select your version:

'); + const macOsLink = $('.download-link-macOs'); + const macOsM1Link = $('.download-link-macOsM1'); + $('.macos-m1-info').after('

To find out what processor you have, click on the Apple logo in the macOS menu bar, choose About This Mac from the dropdown menu. If you have an Apple silicon it should say"Apple M1" under "Chip". Otherwise you have an Intel processor.

'); + $('.macos-m1-info').after(macOsM1Link); + $('.macos-m1-info').after(macOsLink); + } else if (!os || !downloadLinks[os]) { // If we don't know, display the section to manually download the app $('.page-download .get-it-desktop').show(); } else if (os === 'linux') { @@ -89,5 +124,5 @@ function setupDownloadPage() { $(function () { setupMobileMenu(); - setupDownloadPage(); + void setupDownloadPage(); }); diff --git a/packages/tools/update-readme-download.ts b/packages/tools/update-readme-download.ts index a00e115b9..1d8f818c0 100644 --- a/packages/tools/update-readme-download.ts +++ b/packages/tools/update-readme-download.ts @@ -13,6 +13,7 @@ async function msleep(ms: number) { export enum OS { MacOs = 'macos', + MacOsM1 = 'macosm1', Windows = 'windows', Android = 'android', Android32 = 'android32', @@ -31,7 +32,11 @@ export const downloadUrl = (release: GitHubRelease, os: OS, portable = false) => const githubUrl = 'github.com/laurent22/joplin/releases/download/'; const joplinDomain = 'objects.joplinusercontent.com/'; - if (ext === 'dmg' && os === OS.MacOs) return asset.browser_download_url.replace(githubUrl, joplinDomain); + if (name.endsWith('arm64.DMG') && os === OS.MacOsM1) { + return asset.browser_download_url.replace(githubUrl, joplinDomain); + } else if (ext === 'dmg' && os === OS.MacOs) { + return asset.browser_download_url.replace(githubUrl, joplinDomain); + } if (ext === 'exe' && os === OS.Windows) { if (portable) { @@ -81,29 +86,28 @@ async function main(argv: any) { const androidRelease = await gitHubLatestRelease('joplin-android'); - // const android32Url = downloadUrl(androidRelease, OS.Android32); const androidUrl = downloadUrl(androidRelease, OS.Android); const winUrl = downloadUrl(release, OS.Windows); const winPortableUrl = downloadUrl(release, OS.Windows, true); const macOsUrl = downloadUrl(release, OS.MacOs); + const macOsM1Url = downloadUrl(release, OS.MacOsM1); const linuxUrl = downloadUrl(release, OS.Linux); console.info('Windows: ', winUrl); console.info('Windows Portable: ', winPortableUrl); console.info('macOS: ', macOsUrl); + console.info('macOSM1: ', macOsM1Url); console.info('Linux: ', linuxUrl); console.info('Android: ', androidUrl); - // console.info('Android 32: ', android32Url); let content = readmeContent(); if (winUrl) content = content.replace(/(https:\/\/objects.joplinusercontent.com\/v\d+\.\d+\.\d+\/Joplin-Setup-.*?\.exe)/, winUrl); if (winPortableUrl) content = content.replace(/(https:\/\/objects.joplinusercontent.com\/v\d+\.\d+\.\d+\/JoplinPortable.exe)/, winPortableUrl); if (macOsUrl) content = content.replace(/(https:\/\/objects.joplinusercontent.com\/v\d+\.\d+\.\d+\/Joplin-.*?\.dmg)/, macOsUrl); + if (macOsM1Url) content = content.replace(/(https:\/\/objects.joplinusercontent.com\/v\d+\.\d+\.\d+\/Joplin-.*?arm64\.DMG)/, macOsM1Url); if (linuxUrl) content = content.replace(/(https:\/\/objects.joplinusercontent.com\/v\d+\.\d+\.\d+\/Joplin-.*?\.AppImage)/, linuxUrl); - if (androidUrl) content = content.replace(/(https:\/\/objects.joplinusercontent.com\/v\d+\.\d+\.\d+\/joplin-v\d+\.\d+\.\d+\.apk)/, androidUrl); - // if (android32Url) content = content.replace(/(https:\/\/objects.joplinusercontent.com\/v\d+\.\d+\.\d+\/joplin-v\d+\.\d+\.\d+-32bit\.apk)/, android32Url); setReadmeContent(content); } diff --git a/packages/tools/website/updateDownloadPage.ts b/packages/tools/website/updateDownloadPage.ts index c06af73d1..7a6d48e10 100644 --- a/packages/tools/website/updateDownloadPage.ts +++ b/packages/tools/website/updateDownloadPage.ts @@ -1,7 +1,7 @@ import { readFile } from 'fs-extra'; import { rootDir, insertContentIntoFile } from '../tool-utils'; -async function getReadmeMd() { +async function getInstallMd() { return readFile(`${rootDir}/readme/install.md`, 'utf8'); } @@ -9,25 +9,28 @@ async function createDownloadButtonsHtml(readmeMd: string): Promise = {}; output['windows'] = readmeMd.match(/()/)[0]; output['macOs'] = readmeMd.match(/()/)[0]; + output['macOsM1'] = readmeMd.match(/()/)[0]; output['linux'] = readmeMd.match(/()/)[0]; output['android'] = readmeMd.match(/(', '', desktopButtonsHtml.join(' ')); await insertContentIntoFile(`${rootDir}/readme/download.md`, '', '', mobileButtonsHtml.join(' ')); } + +const main = async () => { + await updateDownloadPage(); +}; + +if (require.main === module) { + // eslint-disable-next-line promise/prefer-await-to-then + main().catch((error) => { + console.error('Fatal error'); + console.error(error); + process.exit(1); + }); +} diff --git a/readme/download.md b/readme/download.md index 95c33c66b..038c2e098 100644 --- a/readme/download.md +++ b/readme/download.md @@ -10,7 +10,7 @@ Your download of Joplin is in progress. Access your notes on Windows, macOS or Linux. -Get it on Windows Get it on macOS Get it on Linux +Get it on Windows Get it on macOS Get it on macOS M1 (Silicon) Get it on Linux @@ -22,7 +22,7 @@ To synchronise your notes on all your devices, whether it's on desktop, mobile o Access your notes on your phone or tablet from the Android and iOS apps. -Get it on Google Play Get it on the App Store +Get it on Google Play Get it on the App Store ## More Joplin Versions diff --git a/readme/install.md b/readme/install.md index 1235fac83..2f0a04429 100644 --- a/readme/install.md +++ b/readme/install.md @@ -12,6 +12,7 @@ Operating System | Download ---|--- Windows (32 and 64-bit) | Get it on Windows macOS | Get it on macOS +macOS M1 (Apple Silicon) | Get it on macOS M1 (Silicon) Linux | Get it on Linux **On Windows**, you may also use the Portable version. The [portable application](https://en.wikipedia.org/wiki/Portable_application) allows installing the software on a portable device such as a USB key. Simply copy the file JoplinPortable.exe in any directory on that USB key ; the application will then create a directory called "JoplinProfile" next to the executable file.