Skip to content

Commit

Permalink
Added fixes to mojave related kernel elf files
Browse files Browse the repository at this point in the history
  • Loading branch information
ganeshrvel committed Dec 1, 2022
1 parent 484c7bc commit a023a89
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/helpers/binaries.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const mtpCliPath = path.resolve(
export const kalamDebugReportCli = path.resolve(
path.join(
binariesPath({ includeArchDirectory: true }),
'./kalam-debug-report'
'./kalam_debug_report'
)
);

Expand Down
Binary file modified build/mac/bin/amd64/kalam.dylib
Binary file not shown.
Binary file modified build/mac/bin/amd64/kalam_debug_report
Binary file not shown.
Binary file modified build/mac/bin/amd64/libusb.dylib
Binary file not shown.
Binary file modified build/mac/bin/arm64/kalam.dylib
Binary file not shown.
Binary file modified build/mac/bin/arm64/kalam_debug_report
Binary file not shown.
Binary file modified build/mac/bin/arm64/libusb.dylib
Binary file not shown.
27 changes: 15 additions & 12 deletions ffi/kalam/native/scripts/build.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/usr/bin/env zx

/* eslint-disable */

import 'zx/globals';
import fs from 'fs-extra';
import { packageDirectory } from 'pkg-dir';
import replace from 'replace';

Expand All @@ -16,21 +19,21 @@ const KALAM_NATIVE_DIR = `${PKG_ROOT_DIR}/ffi/kalam/native`;

// find the brew bottle hashes here: https://github.com/Homebrew/homebrew-core/blob/master/Formula/libusb.rb
const LIBUSB_BREW_BOTTLES = {
f9b75776c0b3b7fa44eb9876e4b102efdefffd432f019bc6a526e28d82eec991: {
sha256: `f9b75776c0b3b7fa44eb9876e4b102efdefffd432f019bc6a526e28d82eec991`,
d9121e56c7dbfad640c9f8e3c3cc621d88404dc1047a4a7b7c82fe06193bca1f: {
sha256: `d9121e56c7dbfad640c9f8e3c3cc621d88404dc1047a4a7b7c82fe06193bca1f`,
arch: `arm64`,
os: `darwin`,
osName: `mac`,
osVersion: `big_sur`,
libusbVersion: `1.0.25`,
libusbVersion: `1.0.26`,
},
'1318e1155192bdaf7d159562849ee8f73cb0f59b0cb77c142f8be99056ba9d9e': {
sha256: `e202da5a53b0955b4310805b09e9f4af3b73eed57de5ae0d44063e84dca5eafd`,
sha256: `1318e1155192bdaf7d159562849ee8f73cb0f59b0cb77c142f8be99056ba9d9e`,
arch: `amd64`,
os: `darwin`,
osName: `mac`,
osVersion: `catalina`,
libusbVersion: `1.0.25`,
osVersion: `mojave`,
libusbVersion: `1.0.24`,
},
};

Expand Down Expand Up @@ -99,7 +102,7 @@ $`chmod -R +w ${LIBUSB_BOTTLE_TEMP_DIR}`;
// downloading the 'libusb' Brew bottles
console.info(`downloading the 'libusb' Brew bottles...\n`);

for await (let bottleKey of Object.keys(LIBUSB_BREW_BOTTLES)) {
for await (const bottleKey of Object.keys(LIBUSB_BREW_BOTTLES)) {
const bottle = LIBUSB_BREW_BOTTLES[bottleKey];
const bottlePath = getLibusbBottleCachePath({ bottle });

Expand All @@ -109,7 +112,7 @@ for await (let bottleKey of Object.keys(LIBUSB_BREW_BOTTLES)) {
// extracting the 'libusb' Brew bottles
console.info(`extracting the 'libusb' Brew bottles...\n`);

for await (let bottleKey of Object.keys(LIBUSB_BREW_BOTTLES)) {
for await (const bottleKey of Object.keys(LIBUSB_BREW_BOTTLES)) {
const bottle = LIBUSB_BREW_BOTTLES[bottleKey];
const bottlePath = getLibusbBottleCachePath({ bottle });

Expand All @@ -127,7 +130,7 @@ await $`sleep 1`;
// processing the 'libusb' Brew bottles
console.info(`processing the 'libusb' Brew bottles...\n`);

for await (let bottleKey of Object.keys(LIBUSB_BREW_BOTTLES)) {
for await (const bottleKey of Object.keys(LIBUSB_BREW_BOTTLES)) {
const bottle = LIBUSB_BREW_BOTTLES[bottleKey];
const bottlePath = getLibusbBottleCachePath({ bottle });

Expand Down Expand Up @@ -167,7 +170,7 @@ for await (let bottleKey of Object.keys(LIBUSB_BREW_BOTTLES)) {
await $`sleep 1`;

// building binairies
for await (let bottleKey of Object.keys(LIBUSB_BREW_BOTTLES)) {
for await (const bottleKey of Object.keys(LIBUSB_BREW_BOTTLES)) {
const bottle = LIBUSB_BREW_BOTTLES[bottleKey];
const bottlePath = getLibusbBottleCachePath({ bottle });

Expand All @@ -183,8 +186,8 @@ for await (let bottleKey of Object.keys(LIBUSB_BREW_BOTTLES)) {
-o ${bottlePath.kalamDylibInBuildDir} -buildmode=c-shared ./*.go
)`;

// building kalam-debug-report
console.info(`building kalam-debug-report...\n`);
// building kalam_debug_report
console.info(`building kalam_debug_report...\n`);
await $`(
cd ${KALAM_NATIVE_DIR} && CGO_ENABLED=1 \
PKG_CONFIG_PATH=${bottlePath.pkgconfigBaseDir} \
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "openmtp",
"productName": "OpenMTP",
"version": "3.2.0",
"version": "3.2.1",
"description": "OpenMTP | Android File Transfer for macOS",
"scripts": {
"build": "yarn lint && concurrently \"yarn build-main\" \"yarn build-renderer\"",
Expand Down

0 comments on commit a023a89

Please sign in to comment.