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

Port to Odin sandboxed SDK #74

Closed
hanaral opened this issue Apr 25, 2021 · 10 comments
Closed

Port to Odin sandboxed SDK #74

hanaral opened this issue Apr 25, 2021 · 10 comments

Comments

@hanaral
Copy link
Contributor

hanaral commented Apr 25, 2021

I presume you could quite easily write a flatpak manifest that uses the odin SDK (which is now fully funcitonal and available for installing with flatpak remote-add --if-not-exists elementary https://flatpak.elementary.io/elementary.flatpakrepo
I'll see if I can make one myself and add it here

@hanaral
Copy link
Contributor Author

hanaral commented Apr 25, 2021

This is the current YAML manifest I'm using:

app-id: com.github.phase1geo.outliner
runtime: io.elementary.Platform
runtime-version: 'daily' #change this to release version (currently 0.1.0) once they fix the lack of inherited GL extensions bug
sdk: io.elementary.Sdk
command: builder-test
finish-args:
  - '--filesystem=host'

  - '--socket=fallback-x11'
  - '--socket=wayland'
  - '--filesystem=xdg-run/dconf'
  - '--talk-name=org.gnome.SettingsDaemon'
  - '--talk-name=ca.desrt.dconf'
  - '--env=DCONF_USER_CONFIG_DIR=.config/dconf'
cleanup:
  - '/include'
  - '/lib/pkgconfig'
  - '/man'
  - '/share/gtk-doc'
  - '/share/man'
  - '/share/pkgconfig'
  - '/share/vala'
  - '*.a'
  - '*.la'
modules:

  - name: discount
    buildsystem: simple
    cleanup:
        '*.a'

    build-commands:
      - ./configure.sh --prefix=/app --enable-all-features --github-checkbox --with-fenced-code --shared
      - sed -e 's|/sbin/ldconfig|/sbin/ldconfig -n|' -i librarian.sh
      - make install

    sources:
      - type: archive
        url: http://www.pell.portland.or.us/~orc/Code/discount/discount-2.2.6.tar.bz2
        sha256: ae68a4832ff8e620286304ec525c1fe8957be4d8f1e774588eb03d1c3deb74a7

  - name: Outliner
    buildsystem: meson
    config-opts:
     - '--libdir=lib'
    sources:
      - type: dir
        path: .

It runs fine until the appstream-compose part, at which point it fails with the error:

Running appstream-compose
Processing application com.github.phase1geo.outliner
Error loading AppData file: failed to parse /app/share/appdata/com.github.phase1geo.outliner.appdata.xml: Error on line 284 char 119: <li> already set 'Added new' and tried to replace with ' keyboard shortcut for positioning currently selected row at the top of the window.'

@phase1geo
Copy link
Owner

I can clear up the appdata errors...

@phase1geo
Copy link
Owner

Just pushed an update to appdata.xml if you want to pull it and give it another try.

@hanaral
Copy link
Contributor Author

hanaral commented Apr 26, 2021

Oops I forgot to try this morning, I’ll give it a shot later

@hanaral
Copy link
Contributor Author

hanaral commented Apr 26, 2021

OK I opened pull #75 which adds the new manifest (yaml) and removes the old one (json)
Edit: forgot to mention, the styling is quite broken:
スクリーンショット 2021-04-26 16 13 07
also not sure if this actually flatpak specific but it seems quite laggy when resizing

@phase1geo
Copy link
Owner

The pull request has been merged.

I have an opened issue related to the resizing lagginess (although I don't know if this is an actual issue with my codebase as the Debian and source versions run just fine).

In regards to the styling, what is wrong?

@hanaral
Copy link
Contributor Author

hanaral commented Apr 26, 2021

Thanks for the merge!
The most obvious styling issues I found were:

  • The window’s corners are all sharp squares
  • The window’s semi-transparent dark outline is missing
  • The shadow below the headerbar isn’t there
  • The headerbar’s gradient isn’t applied for some reason
  • Headerbar icons have more than one shadow

@almereyda
Copy link

The command to install the elementary flatpak repo is now

-flatpak remote-add --if-not-exists elementary https://flatpak.elementary.io/elementary.flatpakrepo
+flatpak remote-add --if-not-exists elementary https://flatpak.elementary.io/repo.flatpakrepo

due to them changing a path.

It then builds and runs fine after running:

flatpak install io.elementary.Sdk/x86_64/daily
flatpak install io.elementary.Platform/x86_64/daily
flatpak-builder --user --install --force-clean build-dir com.github.phase1geo.outliner.yml
flatpak run com.github.phase1geo.outliner

What a beauty! And how well it accompagnies Minder. In comparison here on Fedora 33 the visual differences that I can recognise are:

  • both have rounded corners in the top left and right
  • Outliner has a flat, black border which is not shaded
  • the light gray on yellow is hard to read in the window title when it doesn't have focus
  • toolbar icons are all boxed in dark gray

Bildschirmfoto von 2021-05-18 18-28-40

@hanaral
Copy link
Contributor Author

hanaral commented May 18, 2021

@almereyda The issue there is that the elementary stylesheet isn't being forced for whatever reason. I thought the PRA was merged to force in the platform it but maybe it isn't?
edit: yep the PR is still waiting to be merged

@phase1geo
Copy link
Owner

I believe that the 1.5.1 version of Outliner is packaged properly with the appropriate styling now. Closing issue.

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

No branches or pull requests

3 participants