From 9c40dd7cafb4acdd2d4800427d279e37ad5ce8a5 Mon Sep 17 00:00:00 2001 From: Matthew Toohey Date: Thu, 14 Apr 2022 11:46:16 -0400 Subject: [PATCH 1/4] Add desktop entry file Co-authored-by: NNB --- contrib/Helix.desktop | 89 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 contrib/Helix.desktop diff --git a/contrib/Helix.desktop b/contrib/Helix.desktop new file mode 100644 index 000000000000..844286f84546 --- /dev/null +++ b/contrib/Helix.desktop @@ -0,0 +1,89 @@ +[Desktop Entry] +Name=Helix +GenericName=Text Editor +GenericName[de]=Texteditor +GenericName[fr]=Éditeur de texte +GenericName[ru]=Текстовый редактор +GenericName[sr]=Едитор текст +GenericName[tr]=Metin Düzenleyici +Comment=Edit text files +Comment[af]=Redigeer tekslêers +Comment[am]=የጽሑፍ ፋይሎች ያስተካክሉ +Comment[ar]=حرّر ملفات نصية +Comment[az]=Mətn fayllarını redaktə edin +Comment[be]=Рэдагаваньне тэкставых файлаў +Comment[bg]=Редактиране на текстови файлове +Comment[bn]=টেক্স্ট ফাইল এডিট করুন +Comment[bs]=Izmijeni tekstualne datoteke +Comment[ca]=Edita fitxers de text +Comment[cs]=Úprava textových souborů +Comment[cy]=Golygu ffeiliau testun +Comment[da]=Redigér tekstfiler +Comment[de]=Textdateien bearbeiten +Comment[el]=Επεξεργασία αρχείων κειμένου +Comment[en_CA]=Edit text files +Comment[en_GB]=Edit text files +Comment[es]=Edita archivos de texto +Comment[et]=Redigeeri tekstifaile +Comment[eu]=Editatu testu-fitxategiak +Comment[fa]=ویرایش پرونده‌های متنی +Comment[fi]=Muokkaa tekstitiedostoja +Comment[fr]=Éditer des fichiers texte +Comment[ga]=Eagar comhad Téacs +Comment[gu]=લખાણ ફાઇલોમાં ફેરફાર કરો +Comment[he]=ערוך קבצי טקסט +Comment[hi]=पाठ फ़ाइलें संपादित करें +Comment[hr]=Uređivanje tekstualne datoteke +Comment[hu]=Szövegfájlok szerkesztése +Comment[id]=Edit file teks +Comment[it]=Modifica file di testo +Comment[ja]=テキストファイルを編集します +Comment[kn]=ಪಠ್ಯ ಕಡತಗಳನ್ನು ಸಂಪಾದಿಸು +Comment[ko]=텍스트 파일을 편집합니다 +Comment[lt]=Redaguoti tekstines bylas +Comment[lv]=Rediģēt teksta failus +Comment[mk]=Уреди текстуални фајлови +Comment[ml]=വാചക രചനകള് തിരുത്തുക +Comment[mn]=Текст файл боловсруулах +Comment[mr]=गद्य फाइल संपादित करा +Comment[ms]=Edit fail teks +Comment[nb]=Rediger tekstfiler +Comment[ne]=पाठ फाइललाई संशोधन गर्नुहोस् +Comment[nl]=Tekstbestanden bewerken +Comment[nn]=Rediger tekstfiler +Comment[no]=Rediger tekstfiler +Comment[or]=ପାଠ୍ଯ ଫାଇଲଗୁଡ଼ିକୁ ସମ୍ପାଦନ କରନ୍ତୁ +Comment[pa]=ਪਾਠ ਫਾਇਲਾਂ ਸੰਪਾਦਨ +Comment[pl]=Edytor plików tekstowych +Comment[pt]=Editar ficheiros de texto +Comment[pt_BR]=Edite arquivos de texto +Comment[ro]=Editare fişiere text +Comment[ru]=Редактирование текстовых файлов +Comment[sk]=Úprava textových súborov +Comment[sl]=Urejanje datotek z besedili +Comment[sq]=Përpuno files teksti +Comment[sr]=Уређујте текст фајлове +Comment[sr@Latn]=Izmeni tekstualne datoteke +Comment[sv]=Redigera textfiler +Comment[ta]=உரை கோப்புகளை தொகுக்கவும் +Comment[th]=แก้ไขแฟ้มข้อความ +Comment[tk]=Metin faýllary editle +Comment[tr]=Metin dosyaları düzenleyin +Comment[uk]=Редактор текстових файлів +Comment[vi]=Soạn thảo tập tin văn bản +Comment[wa]=Asspougnî des fitchîs tecses +Comment[zh_CN]=编辑文本文件 +Comment[zh_TW]=編輯文字檔 +TryExec=hx +Exec=hx %F +Terminal=true +Type=Application +Keywords=Text;editor; +Keywords[fr]=Texte;éditeur; +Keywords[ru]=текст;текстовый редактор; +Keywords[sr]=Текст;едитор; +Keywords[tr]=Metin;düzenleyici; +Icon=helix +Categories=Utility;TextEditor; +StartupNotify=false +MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; From 43d72f36df587227e4ffe3d7bcb45b6ec26be293 Mon Sep 17 00:00:00 2001 From: Matthew Toohey Date: Thu, 14 Apr 2022 11:49:31 -0400 Subject: [PATCH 2/4] Add placeholder icon for AppImage --- contrib/helix.png | Bin 0 -> 1838 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 contrib/helix.png diff --git a/contrib/helix.png b/contrib/helix.png new file mode 100644 index 0000000000000000000000000000000000000000..bef00b98418a3fefcf56a5d45fafb1403e26e996 GIT binary patch literal 1838 zcmYjRc{r478-L$1jWH^+WUFiDSQ4^?7-bAI#N@MOOV-MoEgH*_Wg1IlH%JP(n!|}m z_+-hTv7AC2bYvTyj9pA*$&8sZzVDxNZ@=gH-S>0ff85vgq}f`VA4A9@001~furR&K zN7A9gVf;upy3r2+U{U}cZ%e@AQFp>aeFK7g0N`wHTrS3fZhWf8bM%Uts{A+9*PQZ; zE~1hVW2zG6xZfqOM`*SD5H8kLRME&H2X=L3_f#dOH`E@lC8PGhuS-nolDraEQ@t_u z`;vOl)j>`uB4i zcN4NaF8H1AR2Cc3rZ=YPr&j6(CvF*qB}w`e>^+ShqY8^*!`%ZmzY%t7HyB$e`S zC|s_#ewZxrtq;RVto4+CgsT;kHaKZ}A2zX_$m`k&so``->!?TwwtAdeyd@1^hh!Gd z#Ud|R&p}yO0q2-0&ldtZWz_M>>p$R2Q!tI%sp5J;w{<|kCMD=YEwfUExz)**iL*Zm zpM_uo2N~Dd=r~|x%yAQjMnf+n^4r(Hudjb(a51AR8-g)e;Z+OtTxZ z_;8;aL?3TdQ~=Q*WlpfNb-sUG3ILA42&N_u(UadwUfq=^NT+xfiNC->O@hP7A1vI4 z1IdO_xvLuMOs;xvZkVz`l-SXTJoML;cXbjsMIGj+)0SHX)?dp(X7IZMTMkyiPT+yj zLEH>IyO2Nr-}3CX?#d>PjWlXfl6)0M{dvLD#vTgSU;6CU)2TVDK%#!r=h-MKIf_5G zD<2kIXx+~O`dC;{QC)FRaj*)7e~v3(On7q|ODq<)Jt89u!jP7-S6VgB|G;}k=joQd zsuY4WALI6Ns&HI+Dp(k9eB-LPH_R4F}&$b0%{=JeCHW7G^e2-_t#z8+IlOBEhPICUYs zuJB4!cv8&$5TV0o3-yxCA)tT{lIiv5Zv3S08qCBAXjmDV9rD{jYIddfyWj6eXnA*p znvq-|tyWghClcsYvy-)7dNTsFB)$Hq!e)FA(q^x^A1NN-#yH=vn4g$++Q~fa+wny8 zPH^w%DTLOY_Rt!Gzxt#=(azgHJ8sTyaA=(cgL=c>JL7E#6aca1u1>>(97#nrp3AQ9 zr1@oXp!LsR&YnY3lXOR5#f-rLc zY79Wp;1<2lb@OaVO(wD=WZzpMAIpG~0KQdHiiAIOO&&IWn&pzI;V60R zEHthOId<-^l{KT&-pb_F48*h1CrGNIy=ze}V0fVUv=sW+S!}qARY{3d-Gut6b@gs` z{oU|e^@a~SlrRJ1_I|E`<4EDM$4T8&ftGSEp^TRe!xM9?VvFS>*O^Kxx<;H4nLV;fue-%O2prY(QXmq|3V>56$A zPlS-YwM}%C0TFFv&16*)l>H`FgwJ^Vl~@=P)9fO0F6T?z-?MGgnf2NY!{yi6zfz5N2gUuSP!qeFbaqsHlcPZ=vtvNMz{H2bwR#F=9jdqavm# zjywH8S>mU*_JUED+k|<)W(L$TK9HOV6YWQfjrfmJ7U|NS%Z&tne~ Xz Date: Thu, 14 Apr 2022 11:51:46 -0400 Subject: [PATCH 3/4] Add AppImage step to release workflow --- .github/workflows/release.yml | 47 ++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7c265db8cde1..317636c3d1cb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -147,10 +147,51 @@ jobs: aarch64-linux-gnu-strip \ /target/${{ matrix.target }}/release/hx - - name: Build archive + - name: Build AppImage shell: bash + if: matrix.build == 'x86_64-linux' run: | mkdir dist + + name=dev + if [[ $GITHUB_REF == refs/tags/* ]]; then + name=${GITHUB_REF:10} + fi + + export VERSION="$name" + export ARCH=x86_64 + export APP=helix + export OUTPUT="helix-$VERSION-$ARCH.AppImage" + export UPDATE_INFORMATION="gh-releases-zsync|$GITHUB_REPOSITORY_OWNER|helix|latest|$APP-*-$ARCH.AppImage.zsync" + + mkdir -p "$APP.AppDir"/usr/{bin,lib/helix} + + cp "target/${{ matrix.target }}/release/hx" "$APP.AppDir/usr/bin/hx" + cp -r runtime "$APP.AppDir/usr/lib/helix/runtime" + + cat << 'EOF' > "$APP.AppDir/AppRun" + #!/bin/sh + + APPDIR="$(dirname "$(readlink -f "${0}")")" + HELIX_RUNTIME="$APPDIR/usr/lib/helix/runtime" exec "$APPDIR/usr/bin/hx" "$@" + EOF + chmod 755 "$APP.AppDir/AppRun" + + curl -Lo linuxdeploy-x86_64.AppImage \ + https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage + chmod +x linuxdeploy-x86_64.AppImage + + ./linuxdeploy-x86_64.AppImage \ + --appdir "$APP.AppDir" -d contrib/Helix.desktop \ + -i contrib/helix.png --output appimage + + mv "$APP-$VERSION-$ARCH.AppImage" \ + "$APP-$VERSION-$ARCH.AppImage.zsync" dist + + - name: Build archive + shell: bash + run: | + mkdir -p dist if [ "${{ matrix.os }}" = "windows-2019" ]; then cp "target/${{ matrix.target }}/release/hx.exe" "dist/" else @@ -212,6 +253,10 @@ jobs: mv bins-$platform/hx$exe $pkgname chmod +x $pkgname/hx$exe + if [[ "$platform" = "x86_64-linux" ]]; then + mv bins-$platform/helix-*.AppImage* dist/ + fi + if [ "$exe" = "" ]; then tar cJf dist/$pkgname.tar.xz $pkgname else From 1064260b6f511bd5335920d1b99633d985798eb4 Mon Sep 17 00:00:00 2001 From: Matthew Toohey Date: Thu, 14 Apr 2022 11:58:56 -0400 Subject: [PATCH 4/4] Exclude grammar sources from AppImage --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 317636c3d1cb..30f8ccc78653 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -167,6 +167,7 @@ jobs: mkdir -p "$APP.AppDir"/usr/{bin,lib/helix} cp "target/${{ matrix.target }}/release/hx" "$APP.AppDir/usr/bin/hx" + rm -rf runtime/grammars/sources cp -r runtime "$APP.AppDir/usr/lib/helix/runtime" cat << 'EOF' > "$APP.AppDir/AppRun" @@ -197,7 +198,9 @@ jobs: else cp "target/${{ matrix.target }}/release/hx" "dist/" fi - rm -rf runtime/grammars/sources + if [ -d runtime/grammars/sources ]; then + rm -rf runtime/grammars/sources + fi cp -r runtime dist - uses: actions/upload-artifact@v3