How to create an ambience manually (without SDK)?

what im trying to do:

  • i want to create some ambiences (image, sound files, text files) by hand and package (?) them
  • i also want to offer them somewhere for download later on.

what i know so far:

  • i can create ambiences by using the SDK, but for some reasons i cant use that at the moment.
  • ive seen somewhere a while ago images should 2048*2048 px but i cant find a source anymore (and the xperia 10 II already has a higher resolution than that…)
  • ambiences are installed in /usr/share/ambience/

what information im looking for

  1. where is a spec for ambiences? (what files are required/possible, filetypes, sizes etc? how does a valid .ambience file look like?) - i couldnt find anything in the sailfish wiki
  2. are there any communication channels better suited than this forum where i could inquire for help?
  3. where can i read about packaging my newly made ambience, so users could easily download and install it?

thanks for any help :slight_smile:

Maybe helpful…

https://together.jolla.com/question/16673/howto-ambiences/

Q1 - You can take a look at source files from one of mine.

Q3 - Here is an RPM packaging guide.

OpenRepos is a nice place to release your ambiences. :wink:

1 Like

Picture size 2048x2048 might give optimum result, but I assume any size works. My current wall paper is 1850x3264.

  1. create a build directory
  2. place all the files as they should end up on the device in there
  3. place a .spec file in there.
  4. run rpmbuild --quiet --buildroot=$PWD --build-in-place -bb --noclean foo.spec
Name:          ambience-Awesome
Version:       0.1
Release:       4
Summary:       Awesome Ambience
Group:         System/GUI/Other
BuildArch:     noarch
License:       GPL

%description
This is an awesome Ambience


%prep

%build

%install

%post
systemctl-user restart ambienced.service ||:

%postun
if [ $1 = 0 ]; then
    #Do stuff specific to uninstalls
    echo "It's an uninstall"    
else
  if [ $1 = 1 ]; then
    #Do stuff specific to upgrades
    echo "It's just an upgrade"
  fi
fi

%files
%defattr(-,root,root,-)
%dir /usr/share/ambience/Awesome
/usr/share/ambience/Awesome/*

%changelog

Shameless plug: or you can use my app ThemeColor to do it for you:

3 Likes

thanks for the answers so far.

the lack of answers regardign the actual spec of the ambience files lead me to believe there isnt actually any proper spec for it. i wonder if its possible to publish an ambience (wallpaper) that will look the same on different screen sizes (sailfish scales the image to the correct resolution for hte device) or if it will just crop the image so smaller screens will jsut not see the whole picture… in that case one would have to publish different versions of the ambinece for different devices…

thanks to @eson for your sources! at least there i can see how i can add the ringtones - and i never knew i could pack several ambiences in 1

@Levone1 the problem with the old TJC wiki is that i think its horribly outdated… especially the parts about the resolutions

thanks for everyones help… i gues ill jsut have to experiment a bit

The .ambience schema is not documented AFAIK, but it’s a JSON file that’s rather wasy to understand.
Just look at some existing ambiences.

About scaling:

Scaling isn’t an issue as such. Ambience images should be square(!) and lipstick will center/letterbox them on screen, scaled to device height.

What’s more problematic is display aspect ratio. Different devices have differently shaped displays, so the same image’s content will not always be shown in the same ‘width’.

The same applies to height in landscape mode.