AppImage created using OBS

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
raptor
Space Squid
Posts: 87
Joined: Sat Jun 02, 2012 11:29 pm

AppImage created using OBS

#1 Post by raptor »

Hi,

I successfully created an AppImage for freeorion 0.4.9. It uses the Open Build Service (OBS) with its AppImage integration. The AppImage file itself is found here:

https://download.opensuse.org/repositor ... /AppImage/

and the OBS package page is here:

https://build.opensuse.org/package/show ... /freeorion

The OBS build basically uses an old version of openSUSE (42.3 I think) to build the software and then bundles it and runs AppImage packaging commands triggered by the appimage.yml script found on the package page.

Note that the AppImage is linked against a libstdc++ library that uses GLIBCXX_3.4.21 (gcc 5.3) so you need one at least as new.

raptor
Space Squid
Posts: 87
Joined: Sat Jun 02, 2012 11:29 pm

Re: AppImage created using OBS

#2 Post by raptor »

Turns out this doesn't quite work in some cases and I am trying to tackle the python runtime issues.

Is a full python runtime (executable and all) bundled with freeorion or is it just library API calls? I'm also getting the usual

Code: Select all

ImportError: No module named site
when running, which suggests a $PYTHONPATH problem.

raptor
Space Squid
Posts: 87
Joined: Sat Jun 02, 2012 11:29 pm

Re: AppImage created using OBS

#3 Post by raptor »

I fixed the bundled python issues and the AppImage runs fine on a fresh install of Ubuntu 18.04 now. I noticed a bug with loading some resources that I mention here: https://github.com/freeorion/freeorion/issues/2800

raptor
Space Squid
Posts: 87
Joined: Sat Jun 02, 2012 11:29 pm

Re: AppImage created using OBS

#4 Post by raptor »

Continuing my monologue...

I successfully built a new AppImage with python3 integration as 0.4.10 is maturing but I had trouble getting an appropriate source package that mimics the release ones. Is there a script that builds the release tar.gz?

The CMake 'make package' and make 'package_source' didn't produce a tarball with the src-tarball sub-directory.

User avatar
Vezzra
Release Manager, Design
Posts: 6090
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: AppImage created using OBS

#5 Post by Vezzra »

raptor wrote: Tue Apr 14, 2020 12:50 amIs there a script that builds the release tar.gz?
I've written a small Python script that generates the release tarball, which takes care of a few peculiarities:

Code: Select all

#!/usr/bin/python


import sys
from os import getcwd, chdir, remove
from os.path import exists
from shutil import rmtree
from subprocess import check_call, check_output


EXCLUDE_ITEMS = [
    r"Installer/*",
    r"msvc2010/*",
    r"msvc2013/*",
    r"msvc2015/*",
    r"msvc2017/*",
    r"Xcode/*",
    r".git/*",
    r".*",
    r"*.pyc",
]
WC_DIR = "src-tarball"


if len(sys.argv) != 2:
    print "Usage: make_src_tarball.py branch"
    exit(1)
branch = sys.argv[1]

original_dir = getcwd()
try:
    print "Cloning FO repo into '%s'..." %  WC_DIR
    check_call("git clone https://github.com/freeorion/freeorion.git %s" % WC_DIR, shell=True)
    chdir(WC_DIR)
    print "Checkout %s..." % branch
    check_call("git checkout %s" % branch, shell=True)

    if sys.platform == "darwin":
        print "Remove OSX specific garbage..."
        check_call("dot_clean -m .", shell=True)

    print "Determine FO version & build..."
    r = check_output(r"cmake/make_versioncpp.py . CMake", shell=True)
    print r
    build_no = r.splitlines()[-1].split(" ")[-1]
    fname = "FreeOrion_" + build_no + "_Source.tar.gz"

    cmd = ["tar", "-czf", fname]
    for exclude_item in EXCLUDE_ITEMS:
        cmd.append("--exclude='" + exclude_item + "'")
    cmd.append(getcwd().split(r"/")[-1])

    chdir("..")
    if exists(fname):
        print "Delete existing '%s'..." %fname
        remove(fname)
    print "Create source tarball '%s'..." % fname
    r = check_output(" ".join(cmd), shell=True)
    print r

finally:
    chdir(original_dir)
    if exists(WC_DIR):
        print "Removing temporary folder '%s'..." % WC_DIR
        rmtree(WC_DIR)
Needs a few updates because of recent changes.

raptor
Space Squid
Posts: 87
Joined: Sat Jun 02, 2012 11:29 pm

Re: AppImage created using OBS

#6 Post by raptor »

With the release of 0.4.10.1, the python3 and relative data directory problems have been fixed. An updated AppImage is here (and it works!):

https://download.opensuse.org/repositor ... /AppImage/

The last remaining bug is how to get the version number in the filename :)

Post Reply