Skip to content

Commit

Permalink
fix: download x64 portable and fix running neuron locally (#2686)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanguoyu authored May 26, 2023
1 parent 99dbd96 commit 600dbc5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion packages/neuron-wallet/src/services/ckb-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ const ckbPath = (): string => {

const ckbBinary = (): string => {
const binary = app.isPackaged ? path.resolve(ckbPath(), './ckb') : path.resolve(ckbPath(), `./${platform()}`, './ckb')
return platform() === 'win' ? binary + '.exe' : binary
switch (platform()) {
case 'win':
return binary + '.exe'
case 'mac':
return `${binary}-${process.arch === 'arm64' ? 'arm64' : 'x64'}`
default:
return binary
}
}

const initCkb = async () => {
Expand Down
4 changes: 2 additions & 2 deletions scripts/download-ckb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function download_macos() {

function download_macos_x86_64() {
# for macOS x64
CKB_FILENAME="ckb_${CKB_VERSION}_x86_64-apple-darwin"
CKB_FILENAME="ckb_${CKB_VERSION}_x86_64-apple-darwin-portable"
cd $ROOT_DIR/packages/neuron-wallet/bin/mac

curl -O -L "${GITHUB_RELEASE_URL}/${CKB_VERSION}/${CKB_FILENAME}.zip"
Expand All @@ -23,7 +23,7 @@ function download_macos_x86_64() {

function download_macos_aarch64() {
# for macOS arm64
CKB_FILENAME="ckb_${CKB_VERSION}_aarch64-apple-darwin"
CKB_FILENAME="ckb_${CKB_VERSION}_aarch64-apple-darwin-portable"
cd $ROOT_DIR/packages/neuron-wallet/bin/mac

curl -O -L "${GITHUB_RELEASE_URL}/${CKB_VERSION}/${CKB_FILENAME}.zip"
Expand Down

2 comments on commit 600dbc5

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 5091692770

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 5100298560

Please sign in to comment.