dsyleixa123
Posts: 81
Joined: Mon Jun 11, 2018 11:22 am

Re: Stretch: how to install latest openVG version with Dot() function?

Thu Jul 12, 2018 6:40 am

thanks, I think I'll stay with windowsave then.
About my question how to install it:
After that, just a new git checkout <branch>, or should I instead clean remove everything and fresh install?


dsyleixa123
Posts: 81
Joined: Mon Jun 11, 2018 11:22 am

Re: Stretch: how to install latest openVG version with Dot() function?

Fri Jul 13, 2018 4:15 pm

no one here to explain how the correct and clean way for a downgrade is from screenshot to windowsave?

User avatar
Paeryn
Posts: 2010
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Stretch: how to install latest openVG version with Dot() function?

Fri Jul 13, 2018 6:35 pm

dsyleixa123 wrote:
Fri Jul 13, 2018 4:15 pm
no one here to explain how the correct and clean way for a downgrade is from screenshot to windowsave?
Yes, but I have a life outside of helping on here. Whilst I do (generally) check these fora several times a day I may end up spending what time I have trying to help other people.

You could have looked at the Makefile to see what is involved in installing, backed up the files that would get overwritten (just incase you need to restore them if anything goes wrong) and gone ahead with the install. That's the great thing about Linux and the RPi, just about everything is there for anybody to look at. There have been numerous times when I've had a problem with a program, the manuals haven't helped and nor has searching online, so I've either tried winging it and see what happens or I've download the source code and figured out what is going on and what needs to be done to get it to do what I want. It may take longer than asking online or it may not, either way it sticks in my mind a lot better for having worked through it myself and I'm more likely to be able to work things out quicker in the future.

Anyway, rant over. Sorry, it's been a long afternoon in the shop and a long bus ride home on a hot, stuffy day (it started so well with a nice cooling shower but spoilt itself by the sun coming out).

Installing whichever branch should copy over the correct files for that branch.

The headers of the newly installed branch will overwrite any previous headers, the library will copy over usually as a separate library (I think I remembered to increment the revision numbers each time) so that any previously compiled program will still have the correct version to load. The linked name of the library will be overwritten so that it points to the newly installed one so that when you compile against it your program will be linked to whatever you installed last.
She who travels light — forgot something.

dsyleixa123
Posts: 81
Joined: Mon Jun 11, 2018 11:22 am

Re: Stretch: how to install latest openVG version with Dot() function?

Sat Jul 14, 2018 7:02 am

thank you very much for your help. Unfortunately I never use Makefiles, so I have no idea what make, sudo make install, make all, and make test really do in detail. I am used to simple IDEs like Arduino or Geany which handle that magic stuff for me. I only wanted to be sure not to get orphans or duplicates or wrong file version.

so I rolled back but got some warnings, just to let you know for bug fixing, but eventually there are again some errors about Dot():
cd openvg
make

Code: Select all

libshapes.c: In function ‘WindowSaveAsPng’:
libshapes.c:1317:8: warning: variable ‘width’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
  VGint width = *w;
        ^~~~~
libshapes.c:1318:8: warning: variable ‘height’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
  VGint height = *h;
        ^~~~~~
libshapes.c:1337:68: warning: argument ‘w’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
 bool WindowSaveAsPng(const char *filename, VGint x, VGint y, VGint w, VGint h, int zlib_level) {
                                                                    ^
libshapes.c:1337:77: warning: argument ‘h’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
 dowSaveAsPng(const char *filename, VGint x, VGint y, VGint w, VGint h, int zlib_level) {
                                                                     ^
make install

Code: Select all

install -m 755 -p font2openvg /usr/bin/
install: das Entfernen von '/usr/bin/font2openvg' ist nicht möglich: Keine Berechtigung
Makefile:55: die Regel für Ziel „install“ scheiterte
make: *** [install] Fehler 1
so I took
sudo make install.
no further errors.


and after
cd client
make all:

Code: Select all

dot.c: In function ‘drawScene’:
dot.c:27:28: warning: implicit declaration of function ‘rand’ [-Wimplicit-function-declaration]
         float xp = (float)(rand() & 0x3ff);
                            ^~~~
dot.c: In function ‘main’:
dot.c:49:17: warning: implicit declaration of function ‘atoi’ [-Wimplicit-function-declaration]
         count = atoi(argv[1]);
                 ^~~~
make test worked, the test demo worked in general, but I can't see a Dot sub-test though.




And also for my own program and Dot():
Although my programs compiles, my Dot test does not show any Dots at all:

Code: Select all

int   _fontsize_ = 10;
  
inline void lcdprintxy(VGfloat x, VGfloat y, char * buf) {
   Text( (x+_fontsize_), (y+_fontsize_*1.2), buf, MonoTypeface , _fontsize_);   
}

void display() {
  Fill(255, 255, 255, 1);
  lcdprintxy(0,0,"Test");
  // StrokeWidth(1.0); // doesn't make a difference with or without
  Dot(50,10,false); Dot(52,10,false); Dot(54,10,false); Dot(56,10,false); Dot(58,10,false);
  Dot(50,20,false); Dot(52,20,false); Dot(54,20,false); Dot(56,20,false); Dot(58,20,false);  
  End();
}  
 
"Test" is shown, but no Dots at all, so Dot() does not seem to work ! :(
Is the Dot function broken?

Return to “OpenVG”

Who is online

Users browsing this forum: No registered users and 1 guest