Commit graph

34 commits

Author SHA1 Message Date
David Baker
3c8650065c
Use app-builder-lib to get electron version (#288)
So we can get it the same way electron-builder does and not need
electronVersion in package.json
2021-12-13 21:15:17 +00:00
David Baker
ba0dd9e2a6 Use pacote to fetch native modules
Fact: 8 out of 10 native node module packages published to npm are broken.
Actual fact: npm has a library called pacote that handles resolving the
package specifier you put in your dependencies to files on disk, and it's
actually really nice.

Change hak to use that library so now it's much simpler, handles
versions correctly and supports git / github etc. urls so we can
specify dependencies from git when a package author only publishes
half of the package to npm.
2021-07-16 23:38:04 +01:00
David Baker
d82377e2de Fix not specifying a target
ie. it should use whatever's detected
2021-07-07 21:38:09 +01:00
David Baker
3dd611b5d5
Address macos properly
Co-authored-by: J. Ryan Stinnett <jryans@gmail.com>
2021-07-07 11:01:45 +01:00
David Baker
e07bfc1d6a Support universal builds
Hopefully adequately documented in the README
2021-07-06 23:52:19 +01:00
J. Ryan Stinnett
b8cb53e11b Fix Windows target arch in native build 2021-06-25 13:10:08 +01:00
J. Ryan Stinnett
3aff9cb9eb Add generated file warning 2021-06-24 15:20:24 +01:00
J. Ryan Stinnett
6579ba80b4 More copyright headers 2021-06-24 15:11:57 +01:00
J. Ryan Stinnett
c5dd6195f2 Fix copy command log 2021-06-23 16:18:10 +01:00
J. Ryan Stinnett
f3c1db3313 Cross-compile SQLCipher for aarch64-apple-darwin 2021-06-23 16:18:09 +01:00
J. Ryan Stinnett
c57a173649 Check for Rust host and target support 2021-06-23 16:18:09 +01:00
J. Ryan Stinnett
48dc1ab396 Print rejections that reach the root handler 2021-06-23 16:18:09 +01:00
J. Ryan Stinnett
997f2c21bf Use targets in hak environment for cross-compiling
This arranges the hak environment target info around target IDs that come from
the builder, which simplifies cross-compiling. The `target.js` module is a
generated copy of the builder's `target.ts`.
2021-06-23 16:18:09 +01:00
J. Ryan Stinnett
a171fa417b Borrow target definition from electron-builder
A bit hacky, but for now we paste in the JS generated version of the builder's
`target.ts` module. It's quite unlikely to change often, so this is perhaps
enough for now.
2021-06-23 16:18:09 +01:00
J. Ryan Stinnett
115f25165a Rename hak target to runtime version
The hak environment's `target` is more like a runtime version, so this renames
to call it that, especially since we're about to add more traditional target
strings. `npm_config_target` remains, since that's what `npm` expects.
2021-06-23 16:18:09 +01:00
J. Ryan Stinnett
1455687384 Auto-fix lint errors 2021-05-27 14:45:06 +01:00
David Baker
466a871094 Rebrand step 1: s/riot/element/ in the places where it's reasonably simple 2020-07-01 15:30:53 +01:00
David Baker
de1090cc18 Actually pass a function 2020-02-27 21:43:19 +00:00
David Baker
8b8203cea8 Exit with exit code on exception
Otherwise running the check script will just exit with 0 which is
pointless.
2020-02-27 21:37:07 +00:00
David Baker
90913256f5 Add our native modules separately into the files
And also the package.json which, for reasons I'm not going to spend
the next two hours of my life wading through the electron-builder
source to discover, is no longer automatically included after adding
the files pattern. The node_modules folder is handled automatically
though, so is redundant.

Change the output directory structure so we have one directory with
all the built native modules under that we can just add to the files,
rather than having to add each one separately.

NB. electron-builder add its own filters to node_modules so that only
runtime (ie. not devDependencies) are copied. These seem to apply
even for manually specified path within node_modules. We can copy *to*
the node_modules directory, however...
2020-02-21 10:57:52 +00:00
David Baker
7b8ae78038 More comment 2020-02-19 10:07:02 +00:00
David Baker
cb96b41645 Merge remote-tracking branch 'origin/master' into dbkr/hak_win_x86 2020-02-19 10:01:18 +00:00
David Baker
da5a0e63ec
Merge pull request #22 from vector-im/dbkr/hak_linux
Build seshat on Linux
2020-02-19 10:00:07 +00:00
David Baker
3b642389f2 First attempt at 32 bit windows building 2020-02-18 11:01:34 +00:00
David Baker
c6784f829a
Apply suggestions from code review
More fixes under, 'typing is hard'

Co-Authored-By: poljar <poljar@termina.org.uk>
2020-02-18 09:59:09 +00:00
David Baker
13c627ff64
Typing
Co-Authored-By: poljar <poljar@termina.org.uk>
2020-02-18 09:58:09 +00:00
David Baker
52032aac14 Docker powered linux building 2020-02-17 20:10:58 +00:00
David Baker
0bfc970619 Document more awfulness 2020-02-17 17:31:01 +00:00
David Baker
0ccc29e504 missed the script 2020-02-17 15:52:41 +00:00
David Baker
19ee3d4aff Add some checks for the tools we need
May not be exhastive, but useful on Windows where you need to
remember to install stuff.
2020-02-17 15:44:06 +00:00
David Baker
5fc72e8f73 Lint scripts dir 2020-02-17 14:49:26 +00:00
David Baker
046170e3ec Less hacky fix for yarnrc 2020-02-15 20:17:35 +00:00
David Baker
a0d9359ef0 Working seshat building on Windows 2020-02-15 16:52:41 +00:00
David Baker
0258d456e6 Initial commit of native dependency building. 2020-02-13 23:52:16 +00:00