![]() |
Re: Help me to code for Sailfish OS
Hi, I need to install rpmrebuild to continue messing about with building/editing apps. I would like to install it to '/home/nemo' not 'root'. How do i install to '/home/nemo'?, thanks
|
Re: Help me to code for Sailfish OS
Quote:
|
Re: Help me to code for Sailfish OS
Quote:
Rather than set up those folders manually in /home/nemo, I want to install rpmbuild to home/nemo, so that when I build apps, I find my RPMs in /home/nemo/rpmbuild/* instead of the root rpmbuild directory. |
Re: Help me to code for Sailfish OS
|
Re: Help me to code for Sailfish OS
Quote:
Could you remind me of what I need to put in the file? Thanks for the link regarding RPMMacros ~ I'm just unsure of the contents of the macro file...? I found some notes I'd made referring to macro files, but did not list the macro file contents :( |
Re: Help me to code for Sailfish OS
_rpmdir iirc
|
Re: Help me to code for Sailfish OS
Okay, thanks, I will google/play around and work it out.
Meanwhile, I'm going round to punch my neighbours lights out and his fkin dogs, for repeated fkin barking!, day and fkin night!, for fkin months!, bsstsds! ...I've asked nicely several times, enough is enough!, I may not be back and may end up languishing in a Spanish prison for assault! Regards |
Re: Help me to code for Sailfish OS
Quote:
That's it, get building!, I just ran a build and the resulting file was found in 'rpmbuild/RPMS/noarch' as expected. Directions on 'how to' taken from here; http://ftp.rpm.org/max-rpm/s1-rpm-an...uild-area.html |
Re: Help me to code for Sailfish OS
I've been thinking about trying to port SDL app to Sailfish OS. Is that achievable? Because i have a SDL app source, i firstly modified it to use libSDL2 but i'm having problems on importing SDL.h libs in it as i might also need source for SDL. Does anyone know what could help me?
|
Re: Help me to code for Sailfish OS
Quote:
SDL2-devel SDL2_gfx-devel SDL2_image-devel SDL2_mixer-devel SDL2_net-devel SDL2_sound-devel SDL2_ttf-devel But don't now if it is still valid, names could have changed. |
Re: Help me to code for Sailfish OS
there a lot of opensource SDL apps and games in openrepos you can check for inspiration
|
Re: Help me to code for Sailfish OS
Quote:
Thanks, thanks so much! It compiled now and i only have to fix touch and also possibly orientation. I don't really know now how, but i'll maybe find something. |
Re: Help me to code for Sailfish OS
I've been thinking, as i fixed my SDL app to work now with touch, how can i put it to rpm format with .desktop and icon like creating an app in Qt Creator?
|
Re: Help me to code for Sailfish OS
you can always RTFM: https://sailfishos.org/wiki/Tutorial...kages_manually
|
Re: Help me to code for Sailfish OS
how difficult is it to port an open source android app to sailfish? Not a lot of apps available so as this has not been done yet, I guess very difficult?
For example, porting over K9 email or even a better browser.... |
Re: Help me to code for Sailfish OS
Quote:
The difficulty lies in the fact that Android applications are implemented with their own UI framework and the insides of the applications is done in java, and on Sailfish the UI framework is Silica and QT while the program logic is (usually) c++. It is most often easier to implement the whole shebang from scratch than try porting. |
Re: Help me to code for Sailfish OS
Quote:
(duck'n'cover) |
Re: Help me to code for Sailfish OS
Quote:
If I modify a system qml, (say "glassBackground.qml", for example), then I can't apply any patch that works with that file, (I guess the patch script detects that the file was changed, and assumes some other patch is applied). Is there any way to reset that info, and cause the patch to apply anyway? I notice in Patchmanager log, that there is a line that says, "apply patch anyway? no". Can that be overridden? Thanks |
Re: Help me to code for Sailfish OS
no-no. open patch file in text editor and look. it matches lines before and after lines to be changed. if you change these matches then patch cannot be applied.
|
Re: Help me to code for Sailfish OS
Quote:
|
Re: Help me to code for Sailfish OS
Quote:
The way to learn is to read the file and see what changes the patch is making, just like @coderus said. :) |
Re: Help me to code for Sailfish OS
Hi all,
I've made myself a basic weather application, it uses the OpenWeatherMap.org API for data. I would like to know how to enter my Weather API URL to my `weather.js` file using Dialog, but I'm unsure how to do it. I have played around with the example from Jolla, but I don't know quite what I'm doing......help! :) The weather.js file uses XmlHttpRequest to fetch the data. Code:
function requestWeatherData(cntr) { |
Re: Help me to code for Sailfish OS
is your API key embedded to url? Then you can just do this:
Code:
let url = 'https.//www.example.com?api_key=' + API_key; I would then use fetch api to get the response: Code:
let response = await fetch(url); |
Re: Help me to code for Sailfish OS
Quote:
|
Re: Help me to code for Sailfish OS
Ah, right. Didn't know that. I suggested fetch because it's so easy. Let me check how to do it with xmlhttprequest...
|
Re: Help me to code for Sailfish OS
Found from here: https://openweathermap.org/forecast5#call
Code:
api.openweathermap.org/data/2.5/forecast?zip={zip code},{country code}&appid={your api key} EDIT: I had to check, but XMLHttpRequest doesn't allow cross-site requests, so it wont work without modifications. With a short look, it seems there's CORS and JSONP to circumvent the restriction, but I don't know if they're supported on SFOS, and this is also something I have no experience implementing. I would try it anyways, though. Maybe there's no restrictions when using it when you are not actually doing this js stuff with a browser attached. |
Re: Help me to code for Sailfish OS
1 Attachment(s)
Is there a way to force a ListModel to refresh, when the database records have been changed?
I have a page, where the ListModel is filled by a JS function getting a SELECT from a SQLite database. It is a list of letters, with a possible value, e.g. A="3", B="". After some experiments with TextFields I chose for Buttons. Then a Dialog opens, where the value can be changed. However, after the change, the Button does not show the new value of the letter. Can I force an update? Maybe by a signal from the PageStack that the current page has become visible again? The Button is now configured like: Code:
Button { |
Re: Help me to code for Sailfish OS
how do you work with model?
|
Re: Help me to code for Sailfish OS
Thanks for helping, coderus!
The simplified code looks like this. Code:
import QtQuick 2.0 On clicking the button, the Dialog in "LetterPage.qml" provides the possibility to enter a value for the letter. Then onDone, the value is stored in the database. After the pop() I don't know how to update the ListModel from the updated database. This morning I thought of a work-around, but a proper method would be nice. |
Re: Help me to code for Sailfish OS
Hm. Work-around is not working.
|
Re: Help me to code for Sailfish OS
i dont know a way to do this in pure qml without c++ code
|
Re: Help me to code for Sailfish OS
2 Attachment(s)
Alright. Well, I looked at c++ and didn't know how to implement it. So I just leave it for now.
Another question then. The first page looks awful in Landscape. It seems the height is still as high as in Portrait. One level deeper is normal behavior, but one level deeper it is also strange. First page is here: https://github.com/cow-n-berg/harbou...CachesPage.qml I think I don't mess around with any height, only for the ListItem. How can it happen? |
Re: Help me to code for Sailfish OS
Quote:
|
Re: Help me to code for Sailfish OS
Quote:
|
Re: Help me to code for Sailfish OS
I have a similar problem with landscape with regard to positioning items.
This is editing directly on the device not in SDK, where I know Lipstick is not allowed. A few years back, we could do the following for rotating items when in landscape; HTML Code:
import QtQuick 2.0 Code:
[W] unknown:10 - file:///usr/share/wind-dash/qml/pages/Labels.qml:10: ReferenceError: Lipstick is not defined |
Re: Help me to code for Sailfish OS
you want rotation but dont want to rotate page? use rotation sensor.
|
Re: Help me to code for Sailfish OS
Quote:
|
Re: Help me to code for Sailfish OS
correct [10 chars]
|
Re: Help me to code for Sailfish OS
Quote:
The problem is, my row and column spacings are not changing position when turned to landscape. The code I posted previously allowed me to do just that, now it does not work. |
Re: Help me to code for Sailfish OS
2 Attachment(s)
Okay,
I've found another way to achieve my goal. I took a good look in `/usr/lib/qt5/qml/Sailfish/Lipstick` and found some code pertaining to rotation/rotating items; `isLandscape` does the job, so the code now looks like this; Code:
import QtQuick 2.0 |
All times are GMT. The time now is 15:19. |
vBulletin® Version 3.8.8