Re: [pygame] Movies in .exe

2009-01-03 Thread pymike
I think what he's wanting is bundling his data files in the .exe. ie

[game files]
Game/Source.py
Game/Data/Mpeg.mpg

[run setup]
python setup.py

You get this exe with all the data files included into it:
Game.exe

The stuff above looks like its only for including source files and such.

On Sat, Jan 3, 2009 at 12:58 AM, Charlie Nolan funnyman3...@gmail.comwrote:

 You can use py2exe's bundle my files parameter.  That adds the zip
 file to the exe.  Browse around in the py2exe docs and examples, it'll
 tell you how to do it and how to get a file pointer back out.

 -FM

 On Fri, Jan 2, 2009 at 4:45 PM, Noah Kantrowitz n...@coderanger.net
 wrote:
 
  On Jan 2, 2009, at 5:39 PM, Ian Mallett wrote:
 
  Yes, I've gotten it to work that way, but I want the file to be inside
 the
  .exe itself, not just in the same folder ;)
 
  http://code.google.com/p/pefile/ can access the resource fields of an
  executable. You will either need to buffer the data in a temp file or a
  stringio buffer though. You could also use the same library to add the
 movie
  into the executable. This does seem a good bit harder that just putting
 it
  in the zip though.
 
  --Noah
 




-- 
- pymike
Python eggs me on.


Re: [pygame] Movies in .exe

2009-01-03 Thread Ian Mallett
I tried the py2exe thing with the bundle files parameter, but it doesn't
include the .mpg, for some reason.  I think pymike states what I'm after
best--better than I did originally.  Sorry--I've been feeling under the
weather recently...


[pygame] Movies in .exe

2009-01-02 Thread Ian Mallett
Hi,

I have a .mpg movie that I want to play in a .exe, but I also want the movie
file to be included inside the .exe itself.  I came up with two solutions:
1. Supposedly, this is possible with py2exe, but I don't know how.  I looked
at http://www.py2exe.org/index.cgi/CustomDataInExe, I couldn't figure it
out.
2. The alternative is storing the movie file in the .py file itself as a
string.  I tried this, but I don't know how to transform the string into a
suitable object for pygame.movie.Movie().

Ideas, anyone?
Ian


Re: [pygame] Movies in .exe

2009-01-02 Thread leo kirotawa
first sorry for my english.


you can put the file .mpg in folder dist created by py2exe, and in your code
you call the movie.  Will be that?

On Fri, Jan 2, 2009 at 6:49 PM, Ian Mallett geometr...@gmail.com wrote:

 Hi,

 I have a .mpg movie that I want to play in a .exe, but I also want the
 movie file to be included inside the .exe itself.  I came up with two
 solutions:
 1. Supposedly, this is possible with py2exe, but I don't know how.  I
 looked at http://www.py2exe.org/index.cgi/CustomDataInExe, I couldn't
 figure it out.
 2. The alternative is storing the movie file in the .py file itself as a
 string.  I tried this, but I don't know how to transform the string into a
 suitable object for pygame.movie.Movie().

 Ideas, anyone?
 Ian




-- 


[DesenvolvedorWeb/CEFET/RN]
[Ciências da Computação/UFRN]
[Estudante de japonês nível 6]
[Desenvolvedor em python, pygame]
blog: corecode.wordpress.com/

Mais sábio é aquele que sabe que não sabe (Sócrates)


Re: [pygame] Movies in .exe

2009-01-02 Thread Ian Mallett
Yes, I've gotten it to work that way, but I want the file to be inside the
.exe itself, not just in the same folder ;)


Re: [pygame] Movies in .exe

2009-01-02 Thread Noah Kantrowitz


On Jan 2, 2009, at 5:39 PM, Ian Mallett wrote:

Yes, I've gotten it to work that way, but I want the file to be  
inside the .exe itself, not just in the same folder ;)


http://code.google.com/p/pefile/ can access the resource fields of an  
executable. You will either need to buffer the data in a temp file or  
a stringio buffer though. You could also use the same library to add  
the movie into the executable. This does seem a good bit harder that  
just putting it in the zip though.


--Noah


Re: [pygame] Movies in .exe

2009-01-02 Thread Charlie Nolan
You can use py2exe's bundle my files parameter.  That adds the zip
file to the exe.  Browse around in the py2exe docs and examples, it'll
tell you how to do it and how to get a file pointer back out.

-FM

On Fri, Jan 2, 2009 at 4:45 PM, Noah Kantrowitz n...@coderanger.net wrote:

 On Jan 2, 2009, at 5:39 PM, Ian Mallett wrote:

 Yes, I've gotten it to work that way, but I want the file to be inside the
 .exe itself, not just in the same folder ;)

 http://code.google.com/p/pefile/ can access the resource fields of an
 executable. You will either need to buffer the data in a temp file or a
 stringio buffer though. You could also use the same library to add the movie
 into the executable. This does seem a good bit harder that just putting it
 in the zip though.

 --Noah