Skip to content

Commit 1f6e69b

Browse files
authored
Add diff patches for creating binaries
1 parent d073dcf commit 1f6e69b

File tree

1 file changed

+34
-47
lines changed

1 file changed

+34
-47
lines changed

README.md

Lines changed: 34 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,40 @@ Music Blocks Launcher
33

44
This repository contains the files needed to build the Flatpak application for Music Blocks.
55

6+
### Creating AppImage Binaries
7+
1. Clone the [musicblocks-app](https://github.com/srevinsaju/musicblocks-app) GitHub repository and clone [musicblocks](https://github.com/sugarlabs/musicblocks.git) into the musicblocks-app directory (`musicblocks` should be nested insided `musicblocks-app`).
8+
9+
2. Ensure that the correct version of musicblocks is downloaded (however specified in the the metadata files for the flatpak app). To change versions, use the corresponding tag (while in the musicblocks directory):
10+
11+
```
12+
$ git checkout tags/[tag_name]
13+
```
14+
15+
3. Apply `musicblocks-app.patch` and `musicblocks.patch` to the respective directories:
16+
17+
```
18+
$ git apply patches/musicblocks-app.patch
19+
$ cd musicblocks
20+
$ git apply ../patches/musicblocks.patch
21+
```
22+
23+
4. Enter the following commands into a command line window in the `musicblocks-app` directory:
24+
25+
```
26+
$ npm install
27+
$ npm install -g electron-builder
28+
$ electron-builder build --linux --armv7l
29+
$ electron-builder build --linux --arm64
30+
$ electron-builder build --linux x64
31+
```
32+
33+
5. Rename the create AppImage files (found in the `dist` folder) to:
34+
* MusicBlocks-[version]-aarch64.AppImage (for --armv7l)
35+
* MusicBlocks-[version]-arm.AppImage (for --arm64)
36+
* MusicBlocks-[version]-x86_64.AppImage (for --x64)
37+
38+
6. Create a release in this repository with the binaries attached.
39+
640
### Installation
741
1. Install `flatpak-builder`, the freedesktop runtime and SDK, and the electron baseapp:
842

@@ -33,50 +67,3 @@ To add screenshots:
3367
* Screenshots must be generally 16x9 and no larger than 1600px by 900px.
3468
* Add the screenshot to `org.sugarlabs.MusicBlocks.appdata.xml`.
3569
* Screenshots should follow [AppStream specifications](https://www.freedesktop.org/software/appstream/docs/sect-Metadata-Application.html#tag-dapp-screenshots).
36-
37-
### Creating AppImage Binaries
38-
1. Clone the [musicblocks-app](https://github.com/srevinsaju/musicblocks-app) GitHub repository and clone [musicblocks](https://github.com/sugarlabs/musicblocks.git) into the musicblocks-app directory.
39-
40-
(The following are patch fixes that I'll create actual diff patches for – for now these are the changes)
41-
42-
2. As of 2020-08-14, musicblocks-app has a bug that creates an infinite loop when closing the app. To fix this, comment out the following code in `main.js`:
43-
44-
```
45-
mainWindow.on('close', function(e){
46-
var choice = require('electron').dialog.showMessageBoxSync(this,
47-
{
48-
type: 'question',
49-
buttons: ['Yes', 'No'],
50-
title: 'Confirm',
51-
message: 'Are you sure you want to quit? You might have unsaved changes.'
52-
});
53-
if (choice == 1) {
54-
e.preventDefault();
55-
}
56-
});
57-
```
58-
59-
3. You'll also have to add the following line underneath `mainWindow.loadFile('musicblocks/index.html')`:
60-
61-
```
62-
mainWindow.removeMenu()
63-
```
64-
65-
4. Next, set `filename` to `defaultfilename` at line 87 in `musicblocks/js/SaveInterface.js` and comment out the `window.onbeforeunload` function at the end of the file.
66-
67-
5. Enter the following commands into a command line window in the `musicblocks-app` directory:
68-
69-
```
70-
$ npm install
71-
$ npm install -g electron-builder
72-
$ electron-builder build --linux --armv7l
73-
$ electron-builder build --linux --arm64
74-
$ electron-builder build --linux x64
75-
```
76-
77-
6. Rename the create AppImage files (found in the `dist` folder) to:
78-
* MusicBlocks-[version]-aarch64.AppImage (for --armv7l)
79-
* MusicBlocks-[version]-arm.AppImage (for --arm64)
80-
* MusicBlocks-[version]-x86_64.AppImage (for --x64)
81-
82-
7. Create a release in this repository with the binaries attached.

0 commit comments

Comments
 (0)