Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AppImageBuilder #80

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Conversation

lulol
Copy link

@lulol lulol commented Jun 26, 2022

Builds an AppImage executable package with the mlnet+gui executable. #65 (comment)

git clone https://github.com/ygrek/mldonkey.git
cd mldonkey
./configure --enable-batch --disable-directconnect --disable-fasttrack --disable-gnutella --disable-gnutella2 --enable-gui=newgui2 --prefix=/usr
make

wget https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.0.3/appimage-builder-1.0.3-x86_64.AppImage
chmod +x appimage-builder-1.0.3-x86_64.AppImage
ln -s packages/appimage/AppImageBuilder.yml AppImageBuilder.yml
./appimage-builder-1.0.3-x86_64.AppImage

To run the optional appimage-builder tests you need docker installed and permissions.

lulol added 6 commits June 26, 2022 16:34
Builds an appimage with mlnet+gui executable. ygrek#65 (comment)

git clone https://github.com/ygrek/mldonkey.git
cd mldonkey
./configure --enable-batch --disable-directconnect --disable-fasttrack --disable-gnutella --disable-gnutella2 --enable-gui=newgui2 --prefix=/usr
make
wget https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.0.3/appimage-builder-1.0.3-x86_64.AppImage
appimage-builder-1.0.3-x86_64.AppImage

To run the optional appimage-builder tests you need docker installed and permissions.
Copy opam to ocamlformat.opam to fix ocaml-ci workflow?
@ygrek
Copy link
Owner

ygrek commented Jul 30, 2024

thanks!
this needs a fix - since safe-string was merged the batch compilation of ocaml together with mldonkey is not working anymore, it was finally removed from configure script in aa29c83
The fix should be as simple as adding ocaml ocaml-findlib and liblablgtk2-ocaml-dev to the apt-get install and let CI verify

Copy link
Owner

@ygrek ygrek left a comment

Choose a reason for hiding this comment

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

  • as mentioned above need to apt install ocaml

packages/appimage/AppImageBuilder.yml Outdated Show resolved Hide resolved
packages/appimage/AppImageBuilder.yml Outdated Show resolved Hide resolved
packages/appimage/AppImageBuilder.yml Outdated Show resolved Hide resolved
.github/workflows/appimage.yml Outdated Show resolved Hide resolved
@lulol
Copy link
Author

lulol commented Jul 30, 2024

I'll take a look at my archives this weekend to try to remember how this works and implement the requested changes. Meanwhile my current replies are from memory.

Add ocaml ocaml-findlib and liblablgtk2-ocaml-dev to the apt-get install
@lulol
Copy link
Author

lulol commented Jul 31, 2024

Seems that ocaml-ci still is having the same issues not finding the opam files. ❓

lulol added 4 commits August 1, 2024 17:32
Update to 22.04 jammy repo, add app version from env and remove commented code
Update functions and build system versions.
Add new dependencies.
Create a VERSION file.
Pack artifacts more logically.
And requested changes.
@lulol lulol requested a review from ygrek August 9, 2024 14:57
lulol added 2 commits August 10, 2024 16:44
Add version, arch and os labels to generated artifacts.
Remove now unneeded VERSION file.
appimage-builder is currently only released for x86_64
@ygrek ygrek force-pushed the master branch 8 times, most recently from 338d5c9 to a7d5906 Compare August 27, 2024 00:37
@ygrek ygrek force-pushed the master branch 6 times, most recently from 28754fe to 05908f6 Compare August 27, 2024 01:28
lulol added 2 commits October 20, 2024 14:36
Add HEAD commit short hash to artifacts version when mlnet version includes the git string
Copy link
Owner

@ygrek ygrek left a comment

Choose a reason for hiding this comment

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

please fix version extraction and it is ready to merge (the rest can improve later)
thanks a lot for this

run: sudo apt-get install -y --no-install-recommends autoconf ocaml ocaml-findlib liblablgtk2-ocaml-dev camlp4 libnum-ocaml-dev libminiupnpc-dev libnatpmp-dev libbz2-dev librsvg2-dev libmagic-dev libgtk2.0-dev liblablgtk2-ocaml-dev liblablgtk2-gl-ocaml-dev liblablgtk2-gnome-ocaml-dev libgd-dev

- name: Configure options
run: ./configure --enable-batch --enable-upnp-natpmp --disable-directconnect --disable-fasttrack --disable-gnutella --disable-gnutella2 --enable-gui=newgui2
Copy link
Owner

Choose a reason for hiding this comment

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

i think directconnect module is in good shape, enable it?


- name: Save version
run: |
VERSION=$(./mlnet -v 2>&1 | sed -ne "1s#^.*Starting MLDonkey \([^ ]\+\) .*#\1#p")
Copy link
Owner

Choose a reason for hiding this comment

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

there should be better way to get version without running the binary. Worst case can grep configure log, or actually this :

$ ocaml -e '#use "src/utils/lib/autoconf.ml";; print_endline current_version'
3.2.1.git

see ocaml/ocaml#13637 for why less ugly methods don't work

APPIMAGEBUILDER_SHA1SUM: 6f83a789f6c47a745b97d1b0b3f1df2e7eea7a09

jobs:
build:
Copy link
Owner

Choose a reason for hiding this comment

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

i think ideally this build part of pipeline should be move to main pipeline, and then here keep only appimage (and use artifacts produced by main build pipeline)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants