Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: phcode-dev/phoenix-desktop
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: bd219fbd39780da03ef4c88da1e9502551e28691
Choose a base ref
..
head repository: phcode-dev/phoenix-desktop
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dabfc0ddc9a0defa294242079b1bd823e3f06cc6
Choose a head ref
80 changes: 76 additions & 4 deletions .github/workflows/tauri-build-dev.yml
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
release_id: ${{ steps.create-release.outputs.result }}
upload_url: ${{ steps.create-release.outputs.upload_url }}

steps:
- uses: actions/checkout@v4
@@ -27,6 +28,13 @@ jobs:
uses: actions/github-script@v7
with:
script: |
const os = require("os")
const fs = require("fs")
function setOutput(key, value) {
// Temporary hack until core actions library catches up with github new recommendations
const output = process.env['GITHUB_OUTPUT']
fs.appendFileSync(output, `${key}=${value}${os.EOL}`)
}
const { data } = await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
@@ -37,6 +45,7 @@ jobs:
draft: true,
prerelease: true
})
setOutput('upload_url', data.upload_url);
return data.id
build-mac-m1-node-modules:
@@ -76,7 +85,7 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ macos-latest, ubuntu-latest, windows-latest ]
platform: [ macos-latest, ubuntu-22.04, windows-latest ]

runs-on: ${{ matrix.platform }}
steps:
@@ -99,7 +108,7 @@ jobs:
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
@@ -256,12 +265,75 @@ jobs:
args: --target aarch64-apple-darwin
tagName: ${{ env.GIT_TAG_NAME }}

build-linux-bins:
needs: [ create-release ]
permissions:
contents: write
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
platform: [ ubuntu-20.04, ubuntu-22.04]

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: get Git Tag
shell: bash
run: echo "GIT_TAG_NAME=dev-app-v$(node -p "require('./package.json').version")" >> $GITHUB_ENV
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20

- name: GLIBC version
run: |
ldd --version
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: install dependencies (ubuntu only)
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
sudo apt-get install -y libwebrtc-audio-processing-dev
sudo apt-get install -y libunwind-dev
sudo apt-get install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
- name: install frontend dependencies
run: |
npm ci
npm run _ci-release:dev
npm run _ci-disableBundleConfig
npm run tauri build
ls -alh ./src-tauri/target/release
mkdir ./src-tauri/target/release/binDist
cp ./src-tauri/target/release/phoenix-code-experimental-build ./src-tauri/target/release/binDist
cp ./src-tauri/target/release/phnode ./src-tauri/target/release/binDist
cp -r ./src-tauri/target/release/src-node ./src-tauri/target/release/binDist
ls -alh ./src-tauri/target/release/binDist
tar -cvzf binDist.tar.gz -C ./src-tauri/target/release binDist
ls -alh binDist.tar.gz
GLIBC_VER=$(ldd --version | head -n1 | awk '{print $NF}')
OUTPUT_FILENAME="binDist-needGLIBC-${GLIBC_VER}.tar.gz"
mv binDist.tar.gz "$OUTPUT_FILENAME"
echo "OUTPUT_FILENAME=$OUTPUT_FILENAME" >> $GITHUB_ENV
ls
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ${{ env.OUTPUT_FILENAME }}
asset_name: ${{ env.OUTPUT_FILENAME }}
asset_content_type: application/gzip

publish-release:
permissions:
contents: write
timeout-minutes: 15
runs-on: ubuntu-latest
needs: [ create-release, build-tauri ]
runs-on: ubuntu-22.04
needs: [ create-release, build-tauri, build-linux-bins ]

steps:
- uses: actions/checkout@v4
6 changes: 3 additions & 3 deletions .github/workflows/tauri-build-prod.yml
Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ macos-latest, ubuntu-latest, windows-latest ]
platform: [ macos-latest, ubuntu-22.04, windows-latest ]

runs-on: ${{ matrix.platform }}
steps:
@@ -99,7 +99,7 @@ jobs:
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
@@ -260,7 +260,7 @@ jobs:
publish-release:
permissions:
contents: write
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [ create-release, build-tauri ]

steps:
6 changes: 3 additions & 3 deletions .github/workflows/tauri-build-staging.yml
Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ macos-latest, ubuntu-latest, windows-latest ]
platform: [ macos-latest, ubuntu-22.04, windows-latest ]

runs-on: ${{ matrix.platform }}
steps:
@@ -99,7 +99,7 @@ jobs:
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
@@ -260,7 +260,7 @@ jobs:
permissions:
contents: write
timeout-minutes: 15
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [ create-release, build-tauri ]

steps:
45 changes: 43 additions & 2 deletions .github/workflows/updateNotification.js
Original file line number Diff line number Diff line change
@@ -80,6 +80,41 @@ function _extractSmallReleaseNotes(releaseNotes, releaseTitle) {
return releaseTitle;
}

function getCurrentVersion(latestJsonPath) {
try{
return JSON.parse(fs.readFileSync(latestJsonPath, 'utf8')).version || '0.0.0';
} catch (e) {
console.error("Error getting current version from path: ", latestJsonPath, e);
return '0.0.0';
}
}

/**
* Checks if new version is higher or equal than the current version
* @param currentVersion
* @param newVersion
* @return {boolean}
*/
function isHigherOrEqualVersion(currentVersion, newVersion) {
if(currentVersion === newVersion){
return true;
}
const currentParts = currentVersion.split('.').map(Number);
const newParts = newVersion.split('.').map(Number);

for (let i = 0; i < currentParts.length; i++) {
if (newParts[i] > currentParts[i]) {
return true; // New version is higher
} else if (newParts[i] < currentParts[i]) {
return false; // New version is not higher
}
// If they are equal, move to the next part
}

// If all parts are equal, the versions are the same, so return false
return false;
}

export default async function printStuff({github, context, githubWorkspaceRoot}) {
console.log(github, context, "yo");
const fullRepoName = context.payload.repository.full_name;
@@ -110,6 +145,12 @@ export default async function printStuff({github, context, githubWorkspaceRoot})
const latestJSON = JSON.parse(await _getLatestJson(releaseAssets));
latestJSON.notes = _extractSmallReleaseNotes(releaseNotes, releaseTitle);
const latestJsonPath = `${githubWorkspaceRoot}/docs/${_identifyUpdateJSONPath(releaseAssets)}`;
console.log("writing latest json to path: ", latestJsonPath, " contents: ", latestJSON)
fs.writeFileSync(latestJsonPath, JSON.stringify(latestJSON, null, 4));
const currentVersion = getCurrentVersion(latestJsonPath);
const latestVersion = latestJSON.version;
if(isHigherOrEqualVersion(currentVersion, latestVersion)){
console.log("writing latest json to path: ", latestJsonPath, " contents: ", latestJSON)
fs.writeFileSync(latestJsonPath, JSON.stringify(latestJSON, null, 4));
} else {
console.warn("Current version: ", currentVersion, " is higher than the new release version ", latestVersion, " . Ignoring this release update!");
}
}
27 changes: 22 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -70,8 +70,8 @@ If you want to generate the release builds locally directly while you are editin
```bash
cd phoenix-desktop
# To generate debug builds:
npm run releaseSrcDebug
# OR to generate release builds, just run `npm run releaseSrc`
npm run releaseSrc
# OR to generate debug builds, just run `npm run releaseSrcDebug`
```
This is the easiest way to quickly debug issues directly from the phoenix source folder.

@@ -86,12 +86,29 @@ npm run build
npm run release:prod
# Other release options are `npm run release:dev` and `npm run release:staging`

# Now generate the tauri debug builds:
# Now generate the tauri release builds:
cd ../phoenix-desktop
npm run releaseDistDebug
# OR to generate release builds, just run `npm run releaseDist`
npm run releaseDist
# OR to debug, just run `npm run releaseDistDebug`
```

#### Generating installers/AppImage and DMGs locally from `phoenix/dist` folder
To generate the installers, use the commands
```bash
# You should first build the appropriate release build in `phoenix`.
cd phoenix
npm install
npm run build
npm run release:prod
# Other release options are `npm run release:dev` and `npm run release:staging`

# Now generate the bundles
cd ../phoenix-desktop
npm run releaseDistBundle
# will generate appimages/DMGs or nsix windows installers in target/release/bundle
```


## Building release binaries and installers in GitHub actions
The npm commands that begin with `_ci-*` are exclusively designed to execute in a GitHub Actions environment.
These commands are not typically executed on your local machine unless you're actively working on the GitHub
40 changes: 39 additions & 1 deletion docs/linux/installer.sh
Original file line number Diff line number Diff line change
@@ -5,11 +5,49 @@ APPIMAGE_DIR=$HOME/.local/bin
DESKTOP_DIR=$HOME/.local/share/applications
NEW_APPIMAGE=phcode
ICON=phoenix_icon.png
GITHUB_REPO="charlypa/phoenix-desktop"
GITHUB_REPO="phcode-dev/phoenix-desktop"
API_URL="https://api.github.com/repos/$GITHUB_REPO/releases/latest"
ICON_URL="https://updates.phcode.io/icons/phoenix_icon.png"
check_and_install_libfuse() {
# Identify the Linux distribution
if [ -f /etc/os-release ]; then
. /etc/os-release
DISTRO=$ID
else
echo "Cannot identify the operating system."
exit 1
fi

echo "Checking for FUSE library..."

if [ "$DISTRO" = "ubuntu" ]; then
# Check and install libfuse2 on Ubuntu
if ! dpkg -s libfuse2 &> /dev/null; then
echo "libfuse2 not found, installing..."
sudo apt-get update && sudo apt-get install -y libfuse2 || { echo "Failed to install libfuse2"; exit 1; }
else
echo "libfuse2 is already installed."
fi
elif [ "$DISTRO" = "fedora" ]; then
# Check and install fuse-libs on Fedora
if [ "$DISTRO" = "fedora" ]; then
# Check and install fuse-libs on Fedora
if ! rpm -q fuse-libs &> /dev/null; then
echo "fuse-libs not found, installing..."
sudo dnf install -y fuse-libs || { echo "Failed to install fuse-libs"; exit 1; }
else
echo "fuse-libs is already installed."
fi
fi

else
echo "Unsupported distribution: $DISTRO"
exit 1
fi
}

install() {
check_and_install_libfuse
# Fetch the latest release data from GitHub
echo "Fetching latest release from $GITHUB_REPO..."
wget -qO- $API_URL > latest_release.json || { echo "Failed to fetch latest release info"; exit 1; }
26 changes: 13 additions & 13 deletions docs/tauri/update-latest-experimental-build.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"version": "3.2.3",
"notes": "<replace this text to show a 1 line **Release Notes** to the user in the notification dialogue ![image](https://github.com/abose/phoenix-desktop/assets/5336369/c747898a-29ef-43c7-b74e-dddd5104a56c). Wait for a new pull request in the repo.>",
"pub_date": "2023-07-28T17:25:10.800Z",
"version": "3.3.3",
"notes": "test release",
"pub_date": "2024-02-11T16:49:29.809Z",
"platforms": {
"darwin-x86_64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVUVTVEdXJNVyttWnI3Z1dYREV4Yi9NNGpRVGdKTVdERXpwSlJCaEtOYUY2NSszRCszQUFMemVVVlJUZlNDUVRRMndlUm9FWE1td2xsMHBuQ0pUODdPWGo0UHBLUVlVNWdJPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNjkwNTY0Njg1CWZpbGU6UGhvZW5peCBDb2RlIEV4cGVyaW1lbnRhbCBCdWlsZC5hcHAudGFyLmd6Cko1WU5NbXA2M0Y0cCtNZmpwT05ZQjFNNmJFUTB0eUpoeGdhekIvN05Tb29TTDRGZjBDNldOWkJaMVBhNFNOaDJBcHBBOFZtalpHV0JvZktOOUMyQUJnPT0K",
"url": "https://github.com/phcode-dev/phoenix-desktop/releases/download/dev-app-v3.2.3/Phoenix.Code.Experimental.Build_x64.app.tar.gz"
"windows-x86_64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVUVTVEdXJNVyttWmk5amY0UEh6TGdQdFo5MDl2TFNoVlhETlU5U1VGa0pNdVBrVDY0dFhWU0Vvbit1Q2JnekFGeWxDL3J4ZnVkMUovdThPa0s3ajZGOExneWlVY1B4bUFNPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzA3NjY5MzEyCWZpbGU6UGhvZW5peCBDb2RlIEV4cGVyaW1lbnRhbCBCdWlsZF8zLjMuM194NjQtc2V0dXAubnNpcy56aXAKK0FBZkc1K0pMZUF0ejIzTEpXNkFKQjdJNGZiUURnUWRtWXdXR0crTEVqVDdwZVMrbjdLQ2JVVmRLYTRwczEvd0wyekVZVG5vU21ZaWo4dk5ZNTlmRHc9PQo=",
"url": "https://github.com/phcode-dev/phoenix-desktop/releases/download/dev-app-v3.3.3/Phoenix.Code.Experimental.Build_3.3.3_x64-setup.nsis.zip"
},
"linux-x86_64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVUVTVEdXJNVyttWnNjaTdSb1pOeXBNUnVEcFpydkJFRXJJbTVCQjlYYk1pUFd1dnl6N0d4cEdaaU1xT2tUencybytHa2hwTWlBdDJ0VC9TeFpIZFFIWWl6clFBSnRJRGc0PQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNjkwNTY0NzA5CWZpbGU6cGhvZW5peC1jb2RlLWV4cGVyaW1lbnRhbC1idWlsZF8zLjIuM19hbWQ2NC5BcHBJbWFnZS50YXIuZ3oKblN1bHlSQkd1OHgwOHZEOStxOVVZMUQzU1ZXSVB4ZlJWaTZFbzVaR3k2c1Q1bDJwRnk1WC93cGw3ZFc3Tm00WUxsa3pUTG5LNldwYnVyaUVtdlkxRFE9PQo=",
"url": "https://github.com/phcode-dev/phoenix-desktop/releases/download/dev-app-v3.2.3/phoenix-code-experimental-build_3.2.3_amd64.AppImage.tar.gz"
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVUVTVEdXJNVyttWmcwOWpvSGk4K0svRzhXaXAzc2ZBcmZIQy9YRng4dEllNHJaOXYzRzdlaWdlRnplazd5aUhyTnZZcTlORzBXSTc5ajk0UGN6N3ZRczc1eXJZNzRhK2dFPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzA3NjY5MzQ2CWZpbGU6cGhvZW5peC1jb2RlLWV4cGVyaW1lbnRhbC1idWlsZF8zLjMuM19hbWQ2NC5BcHBJbWFnZS50YXIuZ3oKVDFBZzFTL2ZNVHVzTTVJbi80a0NLeTV6bFA5NDZRUTA1aUR0Rll4YkFpaDVoWnh0YWt6aUtLTTc3NTVPVm83aGsreDBySFM1VDVxaVZaYzlzZFN5REE9PQo=",
"url": "https://github.com/phcode-dev/phoenix-desktop/releases/download/dev-app-v3.3.3/phoenix-code-experimental-build_3.3.3_amd64.AppImage.tar.gz"
},
"windows-x86_64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVUVTVEdXJNVyttWmppRXlabWh5TkZVR29xa2p5c3hFYmxTclRmYXZGRFFicmdmaEprNE5Fem1pczgwVkx6aEVhL3dCWGQ1RTV1cDBtY0NFdlFWRStvZW5UOXJDVVhpYncwPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNjkwNTY0NzY0CWZpbGU6UGhvZW5peCBDb2RlIEV4cGVyaW1lbnRhbCBCdWlsZF8zLjIuM194NjQtc2V0dXAubnNpcy56aXAKNGNjckI4TWtJM3NKV2YxMzdoaURwSzMrQ20xblVxZ2ZjMitCdzR2blJMREJ3ai94WkFaM3ZJNzNJcjVMM1dXWGV3VnViaEVWRForRGxYK3Mrb0Z3Q0E9PQo=",
"url": "https://github.com/phcode-dev/phoenix-desktop/releases/download/dev-app-v3.2.3/Phoenix.Code.Experimental.Build_3.2.3_x64-setup.nsis.zip"
"darwin-x86_64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVUVTVEdXJNVyttWm9JL01UaTN3VDdSY1Q1ZGZVNG00YjRKWUoxZitITXROVUxTZGxoZnlwbXdNV0tBcEwvbUJUeURQTnBLbGJhdktUQXR0YlUydWd3UldoR3J3OXdrK0FrPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzA3NjY5NjQzCWZpbGU6UGhvZW5peCBDb2RlIEV4cGVyaW1lbnRhbCBCdWlsZC5hcHAudGFyLmd6CnRxTFVuM1V0cnYxT0FHYnBwY0IzYTcvRWsxMjcwcTlyUlUvOUY5NDNEWWZhS3JadWM5MFd5Z1VXRWVJUjNybThnOUZ6a0YwQ3o2KzJ2NHhyNmVZRkRBPT0K",
"url": "https://github.com/phcode-dev/phoenix-desktop/releases/download/dev-app-v3.3.3/Phoenix.Code.Experimental.Build_x64.app.tar.gz"
},
"darwin-aarch64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVUVTVEdXJNVyttWm9uU3pxVEZsU3puWEJDMGphL1ZQQ3duVnEwdXFLcHZNVmE1YW5nVjlna1I5ays5M1VBdENIVWUreUZOdHFrRVBEclhYcXFzaS9YZXhBN0hsbGdKZkFZPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNjkwNTY1MTA1CWZpbGU6UGhvZW5peCBDb2RlIEV4cGVyaW1lbnRhbCBCdWlsZC5hcHAudGFyLmd6CndSMnhwY1pNc09NdzBnRkFhRlNBRFRRcmV2bHRNVFNCeGVjbWRvZGpSbG9qRGw1K2lVODZoRElpa2JNdmp4MUVFUTR0Q3psQkw4NXhzTEtBNjFCaUJBPT0K",
"url": "https://github.com/phcode-dev/phoenix-desktop/releases/download/dev-app-v3.2.3/Phoenix.Code.Experimental.Build_aarch64.app.tar.gz"
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVUVTVEdXJNVyttWm1MZksyditmcWR2TVNCbmVrQk9Hd2gxMHI0UDE4aHRtaVdJdytOVGlkb0N6dkFXcE1Rd0J5YnJ1NFJ1UzZwN3NDTFptTDJnQWJ6TUt5MG9NVlVTZHdnPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzA3NjcwMTYwCWZpbGU6UGhvZW5peCBDb2RlIEV4cGVyaW1lbnRhbCBCdWlsZC5hcHAudGFyLmd6Clc2bks5WTNMRVgvZkc1YWV5Tnc1UURHMlRLa3I5Zm11Y29TWXkyZ291RitGOTlrN3JTUjlCRW5vazZCRFBKaDJFc0t5K1UwSWwrMkIxbElqbzVnRkNnPT0K",
"url": "https://github.com/phcode-dev/phoenix-desktop/releases/download/dev-app-v3.3.3/Phoenix.Code.Experimental.Build_aarch64.app.tar.gz"
}
}
}
Loading