Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update support for Linux installers #1731

Merged
merged 33 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
621a43b
test linux build on ubuntu 22
mholtzman Jan 28, 2025
053d561
fix build flow
mholtzman Jan 28, 2025
98e489b
add image
mholtzman Jan 28, 2025
31bdcb9
update image
mholtzman Jan 29, 2025
c0cc9da
update script
mholtzman Jan 29, 2025
1bd39e4
Merge branch 'build-linux' of github.com:floating/frame into build-linux
mholtzman Jan 29, 2025
80515ed
more updates
mholtzman Jan 29, 2025
ee1edf3
try to revert electron builder
mholtzman Jan 29, 2025
b848fed
remove notarize property
mholtzman Jan 29, 2025
deda7ff
update package lock
mholtzman Jan 29, 2025
b33ac7f
put builder back
mholtzman Jan 29, 2025
9bc4d8f
try deb only
mholtzman Jan 29, 2025
bbd1a24
revert builder config
mholtzman Jan 29, 2025
2d5674a
remove windows and mac targets
mholtzman Jan 29, 2025
bcbeea7
remove tar and snap
mholtzman Jan 29, 2025
d82f894
put tar back
mholtzman Jan 29, 2025
262d544
tar without arm
mholtzman Jan 29, 2025
df8886a
put snap back
mholtzman Jan 29, 2025
66635a3
put it all back except arm
mholtzman Jan 29, 2025
ecbaf9e
do it on ubuntu 22
mholtzman Jan 29, 2025
dabef53
move images to dev tools
mholtzman Jan 29, 2025
23b2343
try arm build
mholtzman Jan 29, 2025
49bb21f
add debug
mholtzman Jan 29, 2025
860d1b5
add line number
mholtzman Jan 29, 2025
9432b10
try arm again
mholtzman Jan 29, 2025
835b7f6
break up config files
mholtzman Jan 29, 2025
1bd39ac
update workflow
mholtzman Jan 29, 2025
5154b1e
fix syntax
mholtzman Jan 29, 2025
01ab2e6
put it all together
mholtzman Jan 29, 2025
cb40d73
clean up build scripts
mholtzman Jan 30, 2025
62da898
put notarize back
mholtzman Jan 30, 2025
e5045b1
fix postinstall script
mholtzman Jan 30, 2025
64938a4
revert package lock
mholtzman Jan 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-latest
- ubuntu-20.04
- ubuntu-22.04-arm
include:
- os: macos-13
cert_key: APPLE_DEVELOPER_SIGNING_CERTIFICATE
Expand Down Expand Up @@ -64,12 +65,12 @@ jobs:
node-version: 18.12.1
cache: 'npm'
- name: install Linux dev tools
if: matrix.os == 'ubuntu-latest'
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt update -y
sudo apt install -y libudev-dev
- name: install Macos dev tools
if: matrix.os == 'macos-13'
if: startsWith(matrix.os, 'macos')
run: |
sudo -H pip install setuptools
- name: create NPM config file
Expand All @@ -82,4 +83,9 @@ jobs:
- name: Sleep for 4 seconds
shell: bash
run: sleep 4
- run: npm run publish
- name: Publish
if: ${{ startsWith(matrix.os, 'ubuntu') && endsWith(matrix.os, 'arm') }}
run: npm run publish:linux:arm64
- name: Publish
if: ${{ !startsWith(matrix.os, 'ubuntu') || !endsWith(matrix.os, 'arm') }}
run: npm run publish
7 changes: 7 additions & 0 deletions build/electron-builder-base.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const config = {
appId: 'sh.frame.app',
productName: 'Frame',
files: ['compiled', 'bundle', '!compiled/main/dev']
}

module.exports = config
21 changes: 21 additions & 0 deletions build/electron-builder-linux-arm64.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// build config for linux arm64

const baseConfig = require('./electron-builder-base.js')

const config = {
...baseConfig,
linux: {
target: [
{
target: 'AppImage',
arch: ['arm64']
},
{
target: 'tar.gz',
arch: ['arm64']
}
]
}
}

module.exports = config
46 changes: 46 additions & 0 deletions build/electron-builder-standard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// build config for every platform and architecture EXCEPT linux arm64

const baseConfig = require('./electron-builder-base.js')

const config = {
...baseConfig,
afterSign: './build/notarize.js',
linux: {
target: [
{
target: 'AppImage',
arch: ['x64']
},
{
target: 'deb',
arch: ['x64']
},
{
target: 'snap',
arch: ['x64']
},
{
target: 'tar.gz',
arch: ['x64']
}
]
},
mac: {
target: {
target: 'default',
arch: ['x64', 'arm64']
},
notarize: false,
hardenedRuntime: true,
gatekeeperAssess: false,
entitlements: 'build/entitlements.mac.plist',
requirements: 'build/electron-builder-requirements.txt'
},
win: {
publisherName: 'Frame Labs, Inc.',
signAndEditExecutable: true,
icon: 'build/icons/icon.png'
}
}

module.exports = config
42 changes: 0 additions & 42 deletions electron-builder.json

This file was deleted.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frame",
"version": "0.6.10",
"version": "0.6.11",
"description": "System-wide web3",
"main": "compiled/main",
"scripts": {
Expand Down Expand Up @@ -37,10 +37,11 @@
"prod": "npm run compile && npm run bundle && npm run launch",
"compile": "npm run copy-assets && tsc --project tsconfig.build.json",
"compile:watch": "npm run copy-assets && tsc --project tsconfig.build.json -w",
"build": "npm run compile && sleep 4 && npm run bundle && sleep 4 && electron-builder",
"build": "npm run compile && sleep 4 && npm run bundle && sleep 4 && electron-builder --config=build/electron-builder-standard.js",
"copy-assets": "shx mkdir -p ./compiled/main/windows && shx cp ./main/windows/*.png ./compiled/main/windows",
"parcel:build": "parcel build --no-autoinstall --public-url .",
"publish": "electron-builder -c.snap.publish=github",
"publish": "electron-builder -c.snap.publish=github --config=build/electron-builder-standard.js",
"publish:linux:arm64": "electron-builder -c.snap.publish=github --config=build/electron-builder-linux-arm64.js",
"release": "npm run compile && sleep 4 && npm run bundle && sleep 4 && npm run publish",
"postinstall": "electron-builder install-app-deps",
"test": "npm run test:unit && npm run test:e2e",
Expand Down
Loading