Alien::SDL2 - updated libs

2013-08-17 Thread kmx

I have commited the patch to 'master' see
https://github.com/PerlGameDev/Alien-SDL2/commit/f796a3d

Needs testing

--
kmx


Re: SDL 2.0.0 has finally been released

2013-08-14 Thread kmx


On 13.8.2013 22:24, Kartik Thakore wrote:

Yeah read this! Hey kmx, anyway you can update the packs? or FROGGS


If you mean urls in Alien::SDL2 - 
https://github.com/PerlGameDev/Alien-SDL2/blob/master/inc/My/Utility.pm#L58 
- I can do it.


Just SDL2_xxx packages or should I update also zlib, png, freetype ... to 
the latest versions?


--
kmx



Re: Packaging with strawberry perl

2013-03-07 Thread kmx

Kartik,

Try this special edition:
http://strawberryperl.com/beta/spp-spec-minimal-5.16.3.1-32bit-portable.zip

Simply:
- unzip into e.g. c:\strawberry-portable
- install SDL + all other required modules
- remove c:\strawberry-portable\c (the whole directory)
- clean c:\strawberry-portable\cpan\*
- clean c:\strawberry-portable\data\*
- zip (after SDL installation should be approx 23MB)
- distribute

--
kmx



Re: Packaging with strawberry perl

2013-03-06 Thread kmx
It isn't gonna work as 'Portable' module is loaded behind the scene for 
example every time you 'use Config;'


During the weekend I can prepare a strawberry perl 'Portable Mini Edition' 
for you (no external libraries, no extra modules, just perl core + dmake + 
gcc toolchain) - it is easier for me than to elaborate 
what-if-I-delete-this :)


--
kmx

On 5.3.2013 23:31, Kartik Thakore wrote:

hmm what if I cpan install that? Where is the 'script' that runs the
portable thing?


On Tue, Mar 5, 2013 at 4:38 PM, kmx k...@volny.cz wrote:


Interesting idea.

My guess is that for portable strawberry you will need to keep at least
perl\vendor\lib\Portable\*
perl\vendor\lib\Portable.pm
+ perhaps File::HomeDir and other Portable's prereqs

--
kmx


On 5.3.2013 20:54, Kartik Thakore wrote:


Could I delete all of perl/vendor and install SDL using cpan. Then remove
the cpan stuff?


On Tue, Mar 5, 2013 at 2:31 PM, kmx k...@volny.cz wrote:

  In theory you can delete whatever in perl/vendor you only cannot be sure

if some of SDL dependencies is not using it.

--
kmx


On 5.3.2013 17:54, Kartik Thakore wrote:

  What about stuff inside perl\vendor and what not. It has a lot of the

stuff
that is not needed (DBI, BerkelyDB, etc )


On Tue, Mar 5, 2013 at 10:53 AM, kmx k...@volny.cz wrote:

   On 5.3.2013 15:18, Kartik Thakore wrote:


   Hey so,


I was trying to send a friend a simple SDL script with strawberry perl
to
play around with. But strawberry perl seemed huge! Especially with the
DBI/Pg and what not in it. How can i get a vanilla version of
portable strawberry perl with no extra libraries installed with it. I
will
then jsut cpan install SDL (or SDL2) and package a 'game' that way.

ideas?

   There is no such thing as strawberry perl portable minimal edition


What you can do:
1/ take strawberry portable
2/ install SDL + all necessary modules
3/ move all c:\portable-strawberry\c\bin\***.dll to
c:\portable-strawberry\perl\**bin\


4/ delete
  c:\portable-strawberry\c
  c:\portable-strawberry\cpan\*
  c:\portable-strawberry\data\*
5/ now you still have fully working perl (but without possibility to
install anything from cpan)

--
kmx








DirectX - Failed loading D3DX9_*.dll

2013-03-05 Thread kmx

Hi Kartik and Tobias,

ad our last discussion on IRC.

I have investigated the warning Failed loading D3DX9_*.dll and come up 
with the enclosed patch (please forward it to relevant SDL2 mailing 
list/bugtracker).


The warning has gone and DirectX seems to be loaded but I was not able to 
test it more.


New binaries:
http://strawberryperl.com/package/kmx/sdl/32bit_SDL2_20130305.zip
http://strawberryperl.com/package/kmx/sdl/64bit_SDL2_20130305.zip

Alien-SDL2 on github was also updated

--
kmx
--- /z/strawberry_libs/SDL2-hg20130301/src/render/direct3d/SDL_render_d3d.c 
2013-02-28 17:11:04 +
+++ 
/z/strawberry_libs/SDL2-hg20130301_patched/src/render/direct3d/SDL_render_d3d.c 
2013-03-05 09:38:04 +
@@ -477,7 +477,9 @@
 
 for (d3dxVersion=50;d3dxVersion0;d3dxVersion--) {
 SDL_snprintf(d3dxDLLFile, 49, D3DX9_%02d.dll, d3dxVersion);
-data-d3dxDLL = SDL_LoadObject(d3dxDLLFile);
+LPTSTR tmpstr = WIN_UTF8ToString(d3dxDLLFile);
+data-d3dxDLL = (void *)LoadLibrary(tmpstr); /* not using 
SDL_LoadObject() as we want silently fail - no error message */
+SDL_free(tmpstr);
 if (data-d3dxDLL) {
 HRESULT (WINAPI *D3DXCreateMatrixStack) (DWORD Flags, 
LPD3DXMATRIXSTACK*  ppStack);
 D3DXCreateMatrixStack = (HRESULT (WINAPI *) (DWORD, 
LPD3DXMATRIXSTACK*)) SDL_LoadFunction(data-d3dxDLL, D3DXCreateMatrixStack);


Re: DirectX - Failed loading D3DX9_*.dll

2013-03-05 Thread kmx


On 5.3.2013 13:11, Kartik Thakore wrote:
Awesome. What is the difference (besides muting the error?) for the load 
there?


Just muting the error message. To be honest I do not know how to measure 
whether HW acceleration was really utilised or not. Perhaps some of your 
benchmark scripts can tell us :)


--
kmx



Re: Packaging with strawberry perl

2013-03-05 Thread kmx
In theory you can delete whatever in perl/vendor you only cannot be sure if 
some of SDL dependencies is not using it.


--
kmx

On 5.3.2013 17:54, Kartik Thakore wrote:

What about stuff inside perl\vendor and what not. It has a lot of the stuff
that is not needed (DBI, BerkelyDB, etc )


On Tue, Mar 5, 2013 at 10:53 AM, kmx k...@volny.cz wrote:


On 5.3.2013 15:18, Kartik Thakore wrote:


Hey so,
I was trying to send a friend a simple SDL script with strawberry perl to
play around with. But strawberry perl seemed huge! Especially with the
DBI/Pg and what not in it. How can i get a vanilla version of
portable strawberry perl with no extra libraries installed with it. I will
then jsut cpan install SDL (or SDL2) and package a 'game' that way.

ideas?


There is no such thing as strawberry perl portable minimal edition

What you can do:
1/ take strawberry portable
2/ install SDL + all necessary modules
3/ move all c:\portable-strawberry\c\bin\***.dll to
c:\portable-strawberry\perl\**bin\
4/ delete
c:\portable-strawberry\c
c:\portable-strawberry\cpan\*
c:\portable-strawberry\data\*
5/ now you still have fully working perl (but without possibility to
install anything from cpan)

--
kmx






Re: Packaging with strawberry perl

2013-03-05 Thread kmx

Interesting idea.

My guess is that for portable strawberry you will need to keep at least
perl\vendor\lib\Portable\*
perl\vendor\lib\Portable.pm
+ perhaps File::HomeDir and other Portable's prereqs

--
kmx

On 5.3.2013 20:54, Kartik Thakore wrote:

Could I delete all of perl/vendor and install SDL using cpan. Then remove
the cpan stuff?


On Tue, Mar 5, 2013 at 2:31 PM, kmx k...@volny.cz wrote:


In theory you can delete whatever in perl/vendor you only cannot be sure
if some of SDL dependencies is not using it.

--
kmx


On 5.3.2013 17:54, Kartik Thakore wrote:


What about stuff inside perl\vendor and what not. It has a lot of the
stuff
that is not needed (DBI, BerkelyDB, etc )


On Tue, Mar 5, 2013 at 10:53 AM, kmx k...@volny.cz wrote:

  On 5.3.2013 15:18, Kartik Thakore wrote:

  Hey so,

I was trying to send a friend a simple SDL script with strawberry perl
to
play around with. But strawberry perl seemed huge! Especially with the
DBI/Pg and what not in it. How can i get a vanilla version of
portable strawberry perl with no extra libraries installed with it. I
will
then jsut cpan install SDL (or SDL2) and package a 'game' that way.

ideas?

  There is no such thing as strawberry perl portable minimal edition

What you can do:
1/ take strawberry portable
2/ install SDL + all necessary modules
3/ move all c:\portable-strawberry\c\bin\*.dll to
c:\portable-strawberry\perl\bin\

4/ delete
 c:\portable-strawberry\c
 c:\portable-strawberry\cpan\*
 c:\portable-strawberry\data\*
5/ now you still have fully working perl (but without possibility to
install anything from cpan)

--
kmx







Re: Alien::SLD2

2013-03-03 Thread kmx
I have cloned the good old Alien::SDL into 
https://github.com/PerlGameDev/Alien-SDL2


Nearly all patches + some parts that I considered conected to SDL-1.x were 
removed but overall idea + interface style is the same.


I have tested only on strawberry perl (pre-built binaries) and one of my 
Linux box (building from source), so it is far from release quality.


--
kmx


Re: Alien::SLD2

2013-03-01 Thread kmx


On 1.3.2013 5:34, Kartik Thakore wrote:

And then this.



Well it a collision of SDL2.dll (which comes from SDL2 binaries) vs. 
SDL2.dll which is the output of compiling SDL2.xs


Grrr, somebody should propose a fix to p5p to produce something like 
SDL2.xs.dll


Anyway I can prepare new binaries with renamed DLL's (will do over the 
weekend) or you can move your XS testing to e.g. SDL2::TestOnly module 
(which will produce TestOnly.dll not SDL2.dll)


--
kmx



Re: SDL2.0 Dev

2013-02-28 Thread kmx


On 28.2.2013 2:09, Kartik Thakore wrote:

Hey Froggs,

I am in windows lappy lately :(. How do you compile SDL1.2 and can you
compile SDL2.0 for strawberry perl?


Hi Kartik,

Check these:
http://strawberryperl.com/package/kmx/sdl/32bit_SDL-2.0.0-6921_20130228.zip
http://strawberryperl.com/package/kmx/sdl/64bit_SDL-2.0.0-6921_20130228.zip

(just unpack them into c:\strawberry)

If you decide to go for Alien:SDL2 I just want you to know that I am ready :)

It is quite a long time since I was hacking on Alien::SDL

--
kmx


Re: SDL2.0 Dev

2013-02-28 Thread kmx

Hi Kartik  Tobias,

1/ as for building strawberry perl binaries:
- I use MSYS shell + gcc included in straberry perl
- it builds fine without any patching simply by running: ./configure  make

it seems like DirectX headers included in strawberry's gcc (I am using the 
latest 5.16.2) play well with SDL2

checking d3d9.h usability... yes
checking d3d9.h presence... yes
checking for d3d9.h... yes
checking ddraw.h usability... yes
checking ddraw.h presence... yes
checking for ddraw.h... yes
checking dsound.h usability... yes
checking dsound.h presence... yes
checking for dsound.h... yes
checking dinput.h usability... yes
checking dinput.h presence... yes
checking for dinput.h... yes

2/ as for Alien::SDL2
what libraries do we want to include?
how does SLD2 work with SDL_gfx, SDL_mixer, ... ? are they still needed?
what I want to avoid (if possible) is SDL_Pango (huge GTK dependency chain)

--
kmx


Re: SDL2.0 Dev

2013-02-28 Thread kmx


On 28.2.2013 23:23, Kartik Thakore wrote:
I couldn't do ./configure in the portable strawberry perl .bat file 
shell. What shell do you use?


MSYS - you can get it from 
http://sourceforge.net/projects/perlmingw/files/MSYS%20Environment%20for%20End%20Users/




Alien::SDL2 will just have SDL2 for now. The other libraries don't work 
with SDL2 as of yet.


OK, could you create a repo like https://github.com/PerlGameDev/Alien-SDL2 ?

--
kmx


Re: Alien::SLD2

2013-02-28 Thread kmx


Alien::SDL2 will just have SDL2 for now. The other libraries don't work 
with SDL2 as of yet.



It is better than you might expect - in fact all of them work with SDL2

All these (latest SNV/Mercurial exports) tarballs build without any troubles:
SDL2-hg20130301.tar.gz
SDL2_gfx-svn20130301.tar.gz
SDL2_image-hg20130301.tar.gz
SDL2_mixer-hg20130301.tar.gz
SDL2_net-hg20130301.tar.gz
SDL2_sound-hg20130301.tar.gz
SDL2_ttf-hg20130301.tar.gz

You can get them from http://strawberryperl.com/package/kmx/sdl/src/

--
kmx


Re: Baffling SegFault in windows 64 with strawberry 12.1

2010-08-24 Thread kmx
 Dne 7.8.2010 1:49, Kartik Thakore napsal(a):
 So CSJewell was testing the lastest code on win64 with our packed
 binaries.  This is what he gets.

  http://pastebin.com/7r2c9RdB

 Any clues?

Hi Kartik,

I have just uploaded new Win64 SDL binaries + commited necessary changes to
Alien-SDL github repo.

The trouble was likely the same as the one we (me + FROGGS) have dealt with
building 32bit SDL.dll binary some time ago.

--
kmx



Re: [glib Solution] Frozen Bubble Server Windows

2010-07-06 Thread kmx
Dne 3.7.2010 20:41, Kartik Thakore napsal(a):
 Hi kmx,

 I remember you saying we had trouble getting glib on windows working.
 And that this prevent the frozen-bubble server from compiling on windows.
No, you do not understand exactly my point (or I failed to explai it :)

In fact we already have glib Windows binaries (both 32/64 bit) included
in Win binaries installed by Alien::SDL (thanks to pango) - I have
just a minute ago fixed one missing header file (no idea why it is
missing), so for working glib install latest Alien::SDL from hithub.

To use glib from Alien::SDL (!!beware: works only on Windows and is only
a side effect!!):

my $inc = '-I' . Alien::SDL-config('prefix') . '/include/glib-2.0';
my $lib = '-L' . Alien::SDL-config('prefix') . '/lib';
system('gcc', 'test.c', $inc, $lib, '-lglib-2.0');

In the end do not forget to grab necessary DLLs from:
Alien::SDL-config('prefix') . '/bin'

My objection against using glib was that it is (incl. all prereqs) quite
a massive bundle of *.dll + *.a + *.h which is not easy to build on
Windows box.  And if you want to make in long term frozen-bubble more
multiplatform that it is today my suggestion is get rid of glib. It is
not a criticism, I know that FB was originally designed for Linux / UNIX
systems and having glib already installed is quite common.  From obvious
reasons it makes troubles on Windows box (and confider some even more
obscure perl platforms in the future e.g. mobile devices/phones).

 Recently on #sdl we have a volunteer (mathnerd314) who points out that
 we could just use the binaries provided by gtk.

 http://www.gtk.org/download-windows.html
I know about these but they are only 32bit (AFAIK) whereas we support
both 32/64bit

 Can you provide insight if this would work with our frozen-bubble
 Build.PL?

 http://github.com/kthakore/frozen-bubble/blob/master/inc/My/Builder.pm#L90

Technically they are usable, but IIRC there more gotchas with porting
fb-server to Windows then just having glib.

 Instead of putting this in Alien::SDL we can just have a dependency
 with it for Frozen-Bubble windows. Another alternative is to have
 mathnerd314 compile this server for us and just package it with FB
 windows.
I have one more option - star a new module Games::FrozenBubble::Server
and find a volunteer who implement it as a pure-perl or
not-pure-but-easily-portable :)

--
kmx


Re: [glib Solution] Frozen Bubble Server Windows

2010-07-06 Thread kmx
Dne 5.7.2010 0:02, Kartik Thakore napsal(a):
 Hi kmx,

 I saw your work in Alien::SDL this morning! MathNerd was able to fix the
 windows server in a github branch. See

 http://github.com/kthakore/frozen-bubble/tree/windows_server

 It compiles now on both linux and windows. However now we have to fix the
 perl Build for the server on windows. Here is the subroutine I reserved for
 that. Can you see if it will work with Alien::SDL glib?
   
As for glib I guess that latest github version of Alien::SDL should be
good enough so that we do not need to download another glib binaries.

However I am not sure about -lregex

--
kmx


Re: win 64 pango build on strawberry is broken

2010-05-10 Thread kmx
Hi,

To my bug surprise the first try to rebuild Win64 binaries was successful:

1/ binaries are available here
http://strawberryperl.com/package/kmx/sdl/Win64_SDL-1.2.14-extended-bin_20100510.zip

2/ necessary Alien::SDL changes committed to github repo

3/ briefly tested with SDL-2.405 + Games-FrozenBubble-2.202 (works nice
on my Win7 + strawberry perl 5.12.0.1/64bit)

--
kmx