Skip to content

Commit 7943eda

Browse files
committed
WIP: content: usage: installation: add download links
1 parent a18611b commit 7943eda

File tree

1 file changed

+49
-1
lines changed

1 file changed

+49
-1
lines changed

content/usage/installation.md

+49-1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,53 @@ Once installed, updating to a new Cockpit version can be done via the "Installed
2727

2828
## Self-Contained Application
2929

30-
In future, Cockpit will also be available as a self-contained Electron application, which can be stored on a Control Station
30+
Cockpit is also available as a self-contained Electron application, which can be stored on a Control Station
3131
Computer and started up for connection to a vehicle.
32+
33+
Download the latest version for your operating system here:
34+
35+
<a id="mac-x86_64">macOS Download Test</a>
36+
37+
{% horizontal_scroll(width="750px") %}
38+
| Operating System | x86_64 | arm64 |
39+
| --- | --- | --- |
40+
| Windows | [Cockpit.exe](https://github.com/bluerobotics/cockpit/releases/latest/download/Cockpit-win-x64.exe) | Not available |
41+
| macOS | [Cockpit-Intel.dmg](https://github.com/bluerobotics/cockpit/releases/latest/download/Cockpit-mac-x64.dmg) | Not yet available, use x86_64 version |
42+
| iOS / iPadOS | N/A | use the BlueOS Extension in a browser |
43+
| Linux | [Cockpit-x86_64.AppImage](https://github.com/bluerobotics/cockpit/releases/latest/download/Cockpit-linux-x86_64.AppImage)<br>[Cockpit-x86_64.flatpak](https://github.com/bluerobotics/cockpit/releases/latest/download/Cockpit-linux-x86_64.flatpak) | [Cockpit-arm64.AppImage](https://github.com/bluerobotics/cockpit/releases/latest/download/Cockpit-linux-arm64.AppImage)<br>[Cockpit-arm64.flatpak](https://github.com/bluerobotics/cockpit/releases/latest/download/Cockpit-linux-arm64.flatpak) |
44+
| Android | N/A | use the BlueOS Extension in a browser |
45+
{% end %}
46+
47+
or check the [releases](https://github.com/bluerobotics/cockpit/releases), for a list of all available versions, and the main changes between them.
48+
49+
<script type="text/javascript">
50+
const linkBase = "https://github.com/bluerobotics/cockpit/releases/latest/download/";
51+
52+
/*
53+
function fetchAndApplyDownloadLink(yamlURL, fileExtension, aID) {
54+
const re = new RegExp(" - url: ([-a-zA-Z0-9\.])" + fileExtension + "\n");
55+
fetch(yamlURL)
56+
.then(res => res.blob())
57+
.then(blob => blob.text())
58+
.then(yamlAsString => {
59+
document.getElementById(aID).setAttribute("href", linkBase + yamlAsString.match(re)[0] + fileExtension);
60+
})
61+
}
62+
63+
fetchAndApplyDownloadLink(linkBase + yamlURL, ".dmg", "mac-x86_64");
64+
*/
65+
66+
const yamlURL = linkBase + "latest-mac.yml"
67+
const fileExtension = ".dmg"
68+
const re = new RegExp(" - url: ([-a-zA-Z0-9\.])" + fileExtension + "\n");
69+
fetch(yamlURL, {mode: 'no-cors'})
70+
.then(res => res.blob())
71+
.then(blob => blob.text())
72+
.then(yamlAsString => {
73+
console.log("Test");
74+
console.log(yamlAsString);
75+
})
76+
77+
78+
document.getElementById("mac-x86_64").setAttribute("href", yamlURL)
79+
</script>

0 commit comments

Comments
 (0)