We have moved to a new Sailfish OS Forum. Please start new discussions there.
13

How to create an Ambience RPM using template from TOH-Dev-Kit?

asked 2014-02-08 16:05:06 +0200

Eische gravatar image

updated 2014-02-13 22:14:27 +0200

eric gravatar image

Hello,

I'm not a developer, so my experience level in creating RPM packages is very low. Can someone explain how to create ambience RPMs using the template provided in the TOH-Dev-Kit?

I already installed the Sailfish-SDK and opened the template ambience in Qt-Creator. But what are the next steps? It would be nice if someone can post/point me to a detailed step-by-step idiot-proof instruction to create an ambience RPM.

edit retag flag offensive close delete

Comments

Hi Eische, (I'm not a developer either). I'm interested in this as well. The TOH Dev Kit does contain some rather garbled, poorly laid out information, but still doesn't tell you how to actually package an RPM. I tried formatting and cleaning the notes up to make them understandable, I understand many of the terms used but concise instructions would be better - I think we will have a bit of a wait on this one. I found a few websites giving a 'how-to' create RPM packages, but many were for Fedora (but similar logic may well apply, but I don't know for sure) and I'm also not using the Sailfish SDK - the GUI is 'overload' for me aka steep learning curve!

Spam Hunter ( 2014-02-08 18:32:27 +0200 )edit

I voted this question up because I think creating good ambiences is totally different from creating good software; it takes other people to do it, and therefore should be supported through other means (like, for example, a fool-proof RMP-builder that only takes image and sounds as input...) See also the discussion at: https://together.jolla.com/question/14852/jolla-store-extension-section-for-ambiences/

ossi1967 ( 2014-02-09 13:26:37 +0200 )edit

Hi, I'm also interested in this. So far, I have:

  • the template is suited for Qt Creator, but on Linux I get an RPM build error (Run -> Deploy As an RPM Package)
  • on Windows, the same project does build - in the shadow build directory, RPMs are placed
  • after deploying, often the ambience doesn't show up in the Gallery
  • when it did, I haven't yet managed to figure out how it works
  • the procedure seems to have a connection to the jolla store
  • files are placed in /usr/share/ambience/
wickwire ( 2014-02-19 23:44:08 +0200 )edit

2 Answers

Sort by » oldest newest most voted
1

answered 2014-02-23 22:10:09 +0200

wickwire gravatar image

updated 2014-03-13 02:03:24 +0200

Update:

Please check the public repos in the other answer, both versions Windows and Linux.

Hi,

Ok I think I have something:

Though I'm unsure if it makes any difference, I'm using GNU/Linux Mint 15 x64 to do the Ambiance and at the time, I'm being successful deploying the RPM and applying the Ambiance:

  • I updated the SDK:
    • SailfishOS option on the left, Update Engine
    • Qt Creator main window, bottom right, update button
  • I modified the template.spec file
  • manually created the "translations" directory in the shadow build directory that is defined in the project settings
  • the template builds properly with Qt Creator
  • I'm using Release > Deploy as RPM Package - a coherent popup shows up in Qt Creator claiming there's no executable to run, close that
  • connecting to the phone over SSH:
    • I check the /usr/share/ambience directory on the Jolla mobile and no update
    • I turn the phone off, then on again and /usr/share/ambience (it's actually spelled with an "e") has the directory there
  • I'm able to select the ambiance from the Gallery and apply it

Next, Removing and adding again:

  • I swap the template back to another ambiance
  • I remove the template from the pulley menu options
  • /usr/share/ambience files remain there, I manually remove them
  • I re-deploy the template after a clean on Qt Creator
  • I deploys, same as before, no new files in /usr/share/ambience, turn the phone off, on again, ambiance is available again.

Please test and see if it works for you as well.

full template project on bitbucket:

https://bitbucket.org/wickwire/sailfishos-jolla-ambience-linux

template.spec file below (the only file I changed, apart from the jpg background)


Name:       ambience-template

Summary:    Template ambience
Version:    0.0.1
Release:    1
Group:      System/GUI/Other
License:    TBD
Source0:    %{name}-%{version}.tar.bz2
BuildRequires:  qt5-qttools
BuildRequires:  qt5-qttools-linguist
BuildRequires:  qt5-qmake

Requires:   ambienced

%description
This is a template ambience description

%package ts-devel
Summary:   Translation source for template ambience
License:   TBD
Group:     System/GUI/Other

%description ts-devel
Translation source for a template ambience

%prep
%setup -q -n %{name}-%{version}

# >> setup
# << setup

%build
# >> build pre
# << build pre

%qtc_qmake5

%qtc_make %{?_smp_mflags}

# >> build post
# << build post

%install
rm -rf %{buildroot}
# >> install pre
# << install pre
%qmake5_install

# >> install post
# << install post



%files
%defattr(-,root,root,-)
%{_datadir}/ambience/ambience-template/ambience-template.ambience
%{_datadir}/ambience/ambience-template/sounds.index
%{_datadir}/ambience/ambience-template/images/*
%{_datadir}/ambience/ambience-template/sounds/*
%{_datadir}/translations/ambience-template_eng_en.qm

%files -n ambience-template-ts-devel
%defattr(-,root,root,-)
%{_datadir}/translations/source/ambience-template.ts

edit flag offensive delete publish link more

Comments

Hi, I would love to get this to work either, but my basic goal is to just getting a rpm file created, but all I get are build errors when using the ambience-template. I tried to build/deploy the tutorial app (Hello Sailors) and got it successfully displayed and installed in the SailfishOS VM. But I cannot find the rpm file anywhere. So do I miss something? All I want is creating a rpm file built from my *.spec file and that's all. Any help is greatly appreciated.

J4ZZ ( 2014-02-27 19:40:30 +0200 )edit

Have you tried the modified versions from the links below, depending on whether you're using Windows or Linux...?

wickwire ( 2014-03-03 11:20:12 +0200 )edit
0

answered 2014-02-26 15:21:40 +0200

wickwire gravatar image

updated 2014-03-12 13:56:24 +0200

Hi, testing this between windows and linux got to these two public repositories:

https://bitbucket.org/emanuele_tido/sailfishos-jolla-ambience-windows https://bitbucket.org/wickwire/sailfishos-jolla-ambience-linux

Please comment on this, if either/neither work, etc... thanks.

edit flag offensive delete publish link more

Comments

Thanks for this. I am able to deplay a rpm, but i am not able to use custom sounds. After installing and rebooting, only the default jolla sounds are set. How can i use custom sounds?

holgern ( 2014-03-12 11:23:10 +0200 )edit

Hi, thanks for testing - which version are you using - Windows or Linux?

I haven't tested the custom sounds but will do as soon as possible.

Also, please describe how you've attempted to include the custom sounds in the ambience, and then use them on the device.

wickwire ( 2014-03-12 15:26:17 +0200 )edit

I am using the Linux version, but there were missing the translation files. Then, i copied them from the windows version and i am able to compile my ambience. My new sounds where copied to /usr/share/ambience/ambiance-name/sounds. After rebooting, only the default sounds where used. I was not able to change the sounds at all.

holgern ( 2014-03-15 10:00:17 +0200 )edit

I get ...\ambience-template-ts no such file or directory

mariano ( 2014-03-18 22:07:20 +0200 )edit
Login/Signup to Answer

Question tools

Follow
5 followers

Stats

Asked: 2014-02-08 16:05:06 +0200

Seen: 1,244 times

Last updated: Mar 13 '14