Skip to content

Commit d073dcf

Browse files
authored
Add AppImage binary instructions
1 parent d968123 commit d073dcf

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,50 @@ To add screenshots:
3333
* Screenshots must be generally 16x9 and no larger than 1600px by 900px.
3434
* Add the screenshot to `org.sugarlabs.MusicBlocks.appdata.xml`.
3535
* 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)