Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » U++ video control to come soon
Re: U++ video control to come soon [message #29987 is a reply to message #29922] Thu, 02 December 2010 11:13 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11835
Registered: November 2005
Ultimate Member
koldo wrote on Tue, 30 November 2010 05:17

Zbych wrote on Tue, 30 November 2010 08:50

Can you publish this "preliminary" version?

Uuuf, I would do it only if somebody would have a really urgent need. The code is changing so much that most of the testing effort would not be useful.


Well, perhaps you might need some help with that... Puttin code to Bazaar (or, if you do not feel like that, to uppdev) would expose it to more eyes, correct?
Re: U++ video control to come soon [message #29992 is a reply to message #29987] Thu, 02 December 2010 12:08 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 2944
Registered: August 2008
Veteran
luzr wrote on Thu, 02 December 2010 11:13

koldo wrote on Tue, 30 November 2010 05:17

Zbych wrote on Tue, 30 November 2010 08:50

Can you publish this "preliminary" version?

Uuuf, I would do it only if somebody would have a really urgent need. The code is changing so much that most of the testing effort would not be useful.


Well, perhaps you might need some help with that... Puttin code to Bazaar (or, if you do not feel like that, to uppdev) would expose it to more eyes, correct?


Hello Mirek

Weeks ago MediaPLayer had an important crisis... However now coding goes fast, so in few time it will be uploaded to Bazaar.

Meanwhile SDLCtrl can be checked. All feedback is acknowledged.


Best regards
Iñaki
Re: U++ video control to come soon [message #32137 is a reply to message #29992] Tue, 26 April 2011 23:06 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 933
Registered: July 2009
Location: Germany
Experienced Contributor
Hi Koldo,

i've been tackling the SDL compile issue.. the one with WinMain reference hack. found it to work in SDLExample in examples, just check it out. it does not need the WinMain() { return main(); } hack anymore.

i thought it might be a good way to do the same for SDL package. tried it but MSC version crashes during compile in release mode. debug mode works fine. i did not dare to commit such stuff so i give it out here, maybe we can finally find the reason why ide crashes when compile.

there is also a compile.txt on the environment howto setup, which i used in my case.

EDIT: have tested it again, seems to compile without crash. kinda weired. so maybe this can be commited..
  • Attachment: SDL.rar
    (Size: 43.08KB, Downloaded 137 times)

[Updated on: Wed, 27 April 2011 13:40]

Report message to a moderator

Re: U++ video control to come soon [message #32148 is a reply to message #32137] Thu, 28 April 2011 10:14 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 2944
Registered: August 2008
Veteran
Hello Konstantin

Preparing SDL package was a bad experience for me.

Finally to put the things simple to programmers, I decided to prepare an special package for U++ in Windows. It is explained here. With this setup MSC and MinGW compiling has to be very easy and simple.

What are the problems you find with actual package?


Best regards
Iñaki
Re: U++ video control to come soon [message #32150 is a reply to message #32148] Thu, 28 April 2011 10:32 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 933
Registered: July 2009
Location: Germany
Experienced Contributor
my problem was to get through all that dll mess, and make it compilable both mingw and msc, both static and shared. while mingw worked out pretty fine msc only provides for shared linkage.

thats why i enhanced the install instructions inside, to point to some pain generators. tried to touch as little as possible with the provided sdl packages, so user does not have to bother there.
i think my instructions are more straight forward in this way. this is actually like i install other libs in upp as well.

as of pain generators, especially the #define main SDL_main issue was boggling me. but still, the sdl guys have reasons for it (since one can specify some commandline goodies to SDL apps) which will be processed by the own main in SDLmain. so i tried to make this work too, without the need to #undef main. now it kinda works.

i noticed that MSC compilation first was making trouble, when using blitz in optimal. but this is known issue. but disabling blitz crashed the ide during compile. and couldnt figure out why. but now it works. maybe there was some recompile problems. could you check that package if the errors occure with you as well?
just msc shared, debug with blitz and optimal without.

i didnt want to mess up things from others. so it's up to you to take that one. but i think it's bit better in terms of installations and handling. more sdl native.
Re: U++ video control to come soon [message #32151 is a reply to message #32150] Thu, 28 April 2011 11:22 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 2944
Registered: August 2008
Veteran
Hello Konstantin

I have found problems in DrawPixel() and GetPixelPos() that avoid to compile in MinGW-Speed only. They are now solved and will be uploaded today.

With this, without any change, package works well for MSC and MINGW, Debug and Speed.

SDL official binaries/prebuilt packages AFAIK come only for shared. Anyway I have not done any effort in compiling statically (although original SDL is supplied with MSC project files to compile it statically) because the shared one is the more general focus (SDL is LGPL).

As I have indicated before, there is a compilation in https://sourceforge.net/projects/upp/files/GPL-sources/SDL%2 0plugin_LGPL.7z/download just to avoid any problem to U++ programmers.

Of course, forget about SDL_main or libSDLmain.a.


Best regards
Iñaki

[Updated on: Thu, 28 April 2011 11:24]

Report message to a moderator

Re: U++ video control to come soon [message #32153 is a reply to message #32151] Thu, 28 April 2011 11:59 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 933
Registered: July 2009
Location: Germany
Experienced Contributor
which package are we talkin about? Smile the one with my changes?

Of course, forget about SDL_main or libSDLmain.a.

why do you want to spare this out? i think it's got its due.
thats why i wanted to have an installation with least instrusion into sdl original packages..

so you do plan to keep your bazaar/SDL package as is? just to make up my mind..

[Updated on: Thu, 28 April 2011 12:00]

Report message to a moderator

Re: U++ video control to come soon [message #32156 is a reply to message #32153] Thu, 28 April 2011 13:57 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 2944
Registered: August 2008
Veteran
Hello Konstantin

I preferred to be intrusive with original packages because they are a nightmare for U++ programmers.

With the rebuilt package a programmer will have the demo up and running in less than 5 minutes.

SDL project does releases very slowly. Actual 1.2.14 was released 18 months ago.

However if you find a way - very simple for an U++ beginner - to use original SSL packages, I will be interested Smile.



Best regards
Iñaki
Re: U++ video control to come soon [message #32158 is a reply to message #32156] Thu, 28 April 2011 14:35 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 933
Registered: July 2009
Location: Germany
Experienced Contributor
well, basicly its downloading the 2 original devel archives from SDL page and placing them in say C:\, 2 because mingw and msc.. if one uses one of em only, well it's one. editing build methods to point to the location and done..

that's what inside the SDL package i posted. it's actually as easy as your package, but the sdl stuff remains untouched.

if you're alright with it i can commit it.. or you can, if you prefer.

the installer instructions are in the package as well.
here for short.

Quote:


Medium

Linux
install the SDL 1.2.x package of your distro, dont forget to install the SDL-devel package for headers.

Windows
download binaries / prebuilt packages for msc and mingw
(http://www.libsdl.org/download-1.2.php)

http://www.libsdl.org/release/SDL-devel-1.2.14-VC8.zip
http://www.libsdl.org/release/SDL-devel-1.2.14-mingw32.tar.g z

unzip the stuff into 2 separate locations, e.g

C:\SDL-devel-1.2.14-VC8\SDL-1.2.14
C:\SDL-devel-1.2.14-mingw32\SDL-1.2.14

the build methods need to access those respective folders

MSC build method, add to

PATH: C:\SDL-devel-1.2.14-VC8\SDL-1.2.14\lib
INCLUDE: C:\SDL-devel-1.2.14-VC8\SDL-1.2.14\include
LIB: C:\SDL-devel-1.2.14-VC8\SDL-1.2.14\lib

MINGW/TDMGCC build method, add to

PATH: C:\SDL-devel-1.2.14-mingw32\SDL-1.2.14\lib
C:\SDL-devel-1.2.14-mingw32\SDL-1.2.14\bin
INCLUDE: C:\SDL-devel-1.2.14-mingw32\SDL-1.2.14\include
LIB: C:\SDL-devel-1.2.14-mingw32\SDL-1.2.14\lib
C:\SDL-devel-1.2.14-mingw32\SDL-1.2.14\bin

the MSC libraries only come in shared linkage flavor, while the mingw flavor can be linked both shared and staticly.
the mingw SDL.dll.a is needed for static linkage and has got that weired name. who knows why. the SDL.dll comes in bin folder, thats why double folder specification is needed fir MINGW build method

the WinMain@16 compile problem for mingw (google for it) makes the change of lib link order obligatory, thats why mingw32 is specified explicitly last. this makes the
WINAPI WinMain(...) { return main(); }
hack obsolete and enables the native usage of SDL means to handle entry point. because SDL redefines your own main to be SDL_main (see SDL.h), and provides own main, the signature is critical.it must be (which in Upp is matched as well)
int main(int argc, char* argv[]);
so no need to take care of that

Re: U++ video control to come soon [message #32937 is a reply to message #32158] Wed, 22 June 2011 15:03 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 933
Registered: July 2009
Location: Germany
Experienced Contributor
i've seen that you have updated the SDL doc, so i just tested it again with non-intusive, means withouth the #undef main hack. and it works quite fine, but needs a bit more setup in the upp file. so here they come. i think it is better to have as little changes as possbile. esp. in SDL case, where the runtime will check for some environment variables in it's own main.

if you're ok with it, just commit.

cheers

PS: some helpful links

See:
http://www.digitalmars.com/d/archives/digitalmars/D/12078.ht ml
http://msdn.microsoft.com/en-us/library/aa267384(v=vs.60).aspx
  • Attachment: SDL.rar
    (Size: 0.57KB, Downloaded 138 times)

[Updated on: Wed, 22 June 2011 15:04]

Report message to a moderator

Re: U++ video control to come soon [message #32940 is a reply to message #32937] Wed, 22 June 2011 23:32 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 2944
Registered: August 2008
Veteran
Hello kohait

Have you tested successfully the changes with Gcc, MinGW and MSC, compiling in Debug and Speed mode?

If yes, you can upload it.

I suffered SDLMain once. It is enough Smile.


Best regards
Iñaki
Re: U++ video control to come soon [message #32941 is a reply to message #32940] Wed, 22 June 2011 23:58 Go to previous message
kohait00 is currently offline  kohait00
Messages: 933
Registered: July 2009
Location: Germany
Experienced Contributor
tested with tdmgcc and msc, both debug and optimal, speed not yet.
will test it tomorrow with gcc under linux.

yes, SDL is weired.. had to deal with it in my thesis some years ago, was a nightmare..
Previous Topic: Testing framework in U++.
Next Topic: Porting Upp to SDL first ? (cause of MacOSX & framebuffer)
Goto Forum:
  


Current Time: Tue Apr 23 05:56:59 CEST 2019

Total time taken to generate the page: 0.01370 seconds