Skip to content

Commit

Permalink
Update to build for arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
John Kleinschmidt committed Mar 14, 2018
1 parent 560bf60 commit 58b1432
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 6 deletions.
42 changes: 42 additions & 0 deletions Dockerfile.arm64v8
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM arm64v8/ubuntu:16.04

RUN groupadd --gid 114 jenkins \
&& useradd --uid 110 --gid jenkins --shell /bin/bash --create-home jenkins

# Set up TEMP directory
ENV TEMP=/tmp
RUN chmod a+rwx /tmp

RUN apt-get update && apt-get install -y\
curl \
dpkg \
fakeroot \
git \
gcc \
libasound2 \
libgconf-2-4 \
libgtk2.0-0 \
libgtk-3-0 \
libsecret-1-dev \
libnss3 \
libxss1 \
libxtst6 \
make \
python-setuptools \
rpm \
wget \
xz-utils \
xorriso \
xvfb \
zsync

# Install node.js
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get install -y nodejs

USER jenkins
WORKDIR /home/jenkins

# Install yarn
RUN curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.3.2
RUN export PATH=$HOME/.yarn/bin:$PATH
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"codemirror-mode-elixir": "1.1.1",
"deep-equal": "^1.0.1",
"dexie": "^2.0.0",
"dugite": "1.58.0",
"dugite": "1.60.0",
"electron-window-state": "^4.0.2",
"event-kit": "^2.0.0",
"file-uri-to-path": "0.0.2",
Expand Down
6 changes: 3 additions & 3 deletions app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,9 @@ dom-matches@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/dom-matches/-/dom-matches-2.0.0.tgz#d2728b416a87533980eb089b848d253cf23a758c"

dugite@1.58.0:
version "1.58.0"
resolved "https://registry.yarnpkg.com/dugite/-/dugite-1.58.0.tgz#55e2772251a0cdac6c6dbf6331aa267517041aa1"
dugite@1.60.0:
version "1.60.0"
resolved "https://registry.yarnpkg.com/dugite/-/dugite-1.60.0.tgz#1cde744e6e7e9b62db2737be38d181a8efdbbd2b"
dependencies:
checksum "^0.1.1"
mkdirp "^0.5.1"
Expand Down
2 changes: 1 addition & 1 deletion script/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function packageApp(
const options: packager.Options & IPackageAdditionalOptions = {
name: getExecutableName(),
platform: toPackagePlatform(process.platform),
arch: 'x64',
arch: process.env.TARGET_ARCH || 'x64',
asar: false, // TODO: Probably wanna enable this down the road.
out: getDistRoot(),
icon: path.join(projectRoot, 'app', 'static', 'logos', 'icon-logo'),
Expand Down
3 changes: 2 additions & 1 deletion script/dist-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

const path = require('path')
const fs = require('fs')
const os = require('os')

const packageInfo = require('../app/package-info')
const productName = packageInfo.getProductName()
Expand All @@ -16,7 +17,7 @@ function getDistRoot() {
function getDistPath() {
return path.join(
getDistRoot(),
`${getExecutableName()}-${process.platform}-x64`
`${getExecutableName()}-${process.platform}-${os.arch()}`
)
}

Expand Down
6 changes: 6 additions & 0 deletions script/install-arm64-deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export TARGET_ARCH=arm64
yarn install --force --ignore-scripts
npm rebuild --arch=arm64 --target_arch=arm64
cd app && yarn install --force --ignore-scripts
npm rebuild --arch=arm64 --target_arch=arm64
cd .. && git submodule update --recursive --init && yarn compile:tslint

0 comments on commit 58b1432

Please sign in to comment.