Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25
  1. #11
    Gadfly, Former Founder Slim Devices dean's Avatar
    Join Date
    Apr 2005
    Location
    San Francisco, CA
    Posts
    4,427

    [SlimDevices: Jive] Is DirectX really required on Windows?

    I tested this a few days ago and found that the audio seemed to be a
    little delayed, but wasn't sure if it was my windows VM or the
    directx change. Not sure if we should revert, but something to keep
    an eye on.


    On Dec 13, 2007, at 4:00 AM, rtitmuss wrote:

    >
    > adamac;247423 Wrote:
    >> Patch attached.

    >
    > Thanks, committed in r1138.
    >
    >
    > --
    > rtitmuss
    > ----------------------------------------------------------------------
    > --
    > rtitmuss's Profile: http://forums.slimdevices.com/member.php?userid=36
    > View this thread: http://forums.slimdevices.com/showthread.php?t=40843
    >
    >

  2. #12
    Junior Member
    Join Date
    Dec 2007
    Posts
    20
    Quote Originally Posted by dean blackketter View Post
    Also, since it seems that you have some Windows skills, do you have
    an idea why the built binary isn't portable across machines? Fixing
    that would let us create a nightly Jive for Windows build...
    I took a look at that project after stalling on trying to build the Jive Hardware Platform stuff. At least I know my way around Windows...

    One very real possibility of why this doesn't work on other machines except where it's built is that it links dynamically to the C runtime DLLs (like glibc.so). These runtime DLLs are not part of the OS, but are available as a redist. (and the manifest that Ben mentioned plays into version checking between C runtime and exe).

    There are basically three solutions:

    1. Switch to use static linking. This makes the Windows port self-contained and "just work" without any extra overhead apart from just copying the SDL DLLs and the exe. The drawback is that every single part carries its own partial copy of the C runtime (as much as is needed), the benefit is that there's nothing 'extra' necessary.

    2. Switch to use dynamic linking, add an installer that includes the VC redist. The installer would essentially ensure that the C runtime is installed on the system.

    3. Switch to static linking, AND make all the parts that are built as a DLL into libs, linking everything into one fat exe.

    One of the problems (in general with the Windows build) is that it includes pre-built libraries (for example the freetype library) that were built with different compiler versions/options. This is a potentially iffy situation that can result in all sorts of strange behavior (the library expects a C runtime that's "compatible enough" with the current compiler - and we're about 10 years in difference between the pre-built library's toolchain and the currently active toolchain. It "seems" to work right now but I be too confident that it doesn't just collapse like a house of cards some time.

    Solving this would mean re-building the pre-built libs with VC8 and the proper options whenever a new toolchain is used.

    Do you guys have any preference which way this should go? Is there any reason for keeping a dynamically linked setup that requires an installer to work on "any" machine as opposed to "works for me (TM)"?

    (I guess this makes me person #4 to attempt building this on Windows...)

  3. #13
    Gadfly, Former Founder Slim Devices dean's Avatar
    Join Date
    Apr 2005
    Location
    San Francisco, CA
    Posts
    4,427

    [SlimDevices: Jive] Is DirectX really required on Windows?

    Thanks, tomb, for looking at this!

    On Dec 20, 2007, at 4:13 PM, tomb wrote:
    > 1. Switch to use static linking. This makes the Windows port
    > self-contained and "just work" without any extra overhead apart from
    > just copying the SDL DLLs and the exe. The drawback is that every
    > single part carries its own partial copy of the C runtime (as much as
    > is needed), the benefit is that there's nothing 'extra' necessary.

    Can you elaborate on what "every single part" means? Is this just
    the jive.exe?

    > 3. Switch to static linking, AND make all the parts that are built
    > as a
    > DLL into libs, linking everything into one fat exe.
    >
    > One of the problems (in general with the Windows build) is that it
    > includes pre-built libraries (for example the freetype library) that
    > were built with different compiler versions/options. This is a
    > potentially iffy situation that can result in all sorts of strange
    > behavior (the library expects a C runtime that's "compatible enough"
    > with the current compiler - and we're about 10 years in difference
    > between the pre-built library's toolchain and the currently active
    > toolchain. It "seems" to work right now but I be too confident that it
    > doesn't just collapse like a house of cards some time.
    >
    > Solving this would mean re-building the pre-built libs with VC8 and
    > the
    > proper options whenever a new toolchain is used.

    I thought that we were building everything in the pkg directory from
    scratch. Which pre-built libs are you talking about?


    > Do you guys have any preference which way this should go? Is there any
    > reason for keeping a dynamically linked setup that requires an
    > installer to work on "any" machine as opposed to "works for me (TM)"?

    The goal here is to have a version of the jive.exe that we can
    include with the SqueezeCenter installer (and possibly with other
    installers) to be run later. Personally, I don't like the idea of
    _requiring_ an installer to make an executable work.



  4. #14
    Senior Software Engineer - Logitech/Slim Devices
    Join Date
    Apr 2005
    Location
    Ipswich, UK
    Posts
    1,394
    Quote Originally Posted by tomb View Post
    Do you guys have any preference which way this should go? Is there any reason for keeping a dynamically linked setup that requires an installer to work on "any" machine as opposed to "works for me (TM)"?
    Well I don't know my way around windows, so I just did enough to get Jive compiling and running with minimal effort. A lot of the Visual studio project files came from the SDL and lua distributions, including those pre-built binaries. Is static linking normally used for windows apps? I don't see any problems changing to static linking, and really we should get rid of the pre-built binaries.

    Quote Originally Posted by tomb View Post
    (I guess this makes me person #4 to attempt building this on Windows...)
    I know of a few more, we may be in double figures now

    Richard

  5. #15
    Junior Member
    Join Date
    Dec 2007
    Posts
    20
    Quote Originally Posted by dean blackketter View Post
    [static linking]
    > The drawback is that every
    > single part carries its own partial copy of the C runtime (as much as
    > is needed), the benefit is that there's nothing 'extra' necessary.[/color]
    Can you elaborate on what "every single part" means? Is this just
    the jive.exe?
    I should have been more precise. "Every single part" means "every output of the linker" (I guess you could could call it "linking unit" in reference to "compilation unit").

    In this particular case, this is jive.exe and all the DLLs that are built. The linker, when producing an exe or dll with 'static linking' will pull in all the used parts from the C runtime into the binary. It'll do this independently for jive.exe as well as the DLLs.

    Quote Originally Posted by dean blackketter View Post
    I thought that we were building everything in the pkg directory from
    scratch. Which pre-built libs are you talking about?
    Well, there's a few DLLs for jpeg/png handling - http://svn.slimdevices.com/repos/jiv.../graphics/lib/ - going by their DLL imports, they were compiled with VC6 - and then there's Freetype that's linked into SDL_ttf (http://svn.slimdevices.com/repos/jiv.../FreeType/lib/) which was compiled with VC6 with static linking (I think). Yeah, there is a freetype source in there, but it's not used in the SDL_ttf build.

    Quote Originally Posted by dean blackketter View Post
    The goal here is to have a version of the jive.exe that we can
    include with the SqueezeCenter installer (and possibly with other
    installers) to be run later. Personally, I don't like the idea of
    _requiring_ an installer to make an executable work.
    OK, I understand. If I get some time, I'll see if I can get it to be "neat", play around with various configurations. I'll let you guys know.

  6. #16
    Junior Member
    Join Date
    Dec 2007
    Posts
    20
    Thanks for your comments, Richard.

    Quote Originally Posted by rtitmuss View Post
    Is static linking normally used for windows apps? I don't see any problems changing to static linking, and really we should get rid of the pre-built binaries.
    "It depends". There's a size tradeoff, since the C runtime adds another 2 or 3 MB of download size (and probably 10 MB of disk space). If an app is "large enough" - especially if it has lots of different parts - dynamic linking is usually used. But as mentioned, it pretty much requires an installer to dump the C runtime redists.

    In my daytime job, we've gone from dynamic linking (stuff based on the VC6 toolchain) to static linking (when we were doing VC7.1 (2003), mainly for download size, and now we're going back to dynamic linking. For some situations (such as if you use MFC *and* MFC "extension DLLs"), you don't have an option - it has to be dynamic linking.

  7. #17
    Ben Sandee
    Guest

    [SlimDevices: Jive] Is DirectX really required on Windows?

    On Dec 21, 2007 10:55 AM, tomb <
    tomb.31yaxz1198256402 (AT) no-mx (DO...limdevices.com> wrote:

    >
    > Thanks for your comments, Richard.
    >
    > rtitmuss;250515 Wrote:
    > > Is static linking normally used for windows apps? I don't see any
    > > problems changing to static linking, and really we should get rid of
    > > the pre-built binaries.

    > "It depends". There's a size tradeoff, since the C runtime adds another
    > 2 or 3 MB of download size (and probably 10 MB of disk space). If an app
    > is "large enough" - especially if it has lots of different parts -
    > dynamic linking is usually used. But as mentioned, it pretty much
    > requires an installer to dump the C runtime redists.
    >
    > In my daytime job, we've gone from dynamic linking (stuff based on the
    > VC6 toolchain) to static linking (when we were doing VC7.1 (2003),
    > mainly for download size, and now we're going back to dynamic linking.
    > For some situations (such as if you use MFC *and* MFC "extension
    > DLLs"), you don't have an option - it has to be dynamic linking.



    Another case where dynamic linking is better is in the case of security
    updates. If a the C runtime (or MFC, etc) has a vulnerability then the
    updates can be applied globally, whereas using static linking it will
    absolutely require the application be recompiled.

    The addition of the new manifest functionality, while painful, will go a
    long ways to eliminate 'DLL hell'. Unfortunately the Windows toolchain
    diverges even further from UNIX.... There's always MinGW and/or cygwin....

    Ben


  8. #18
    Senior Software Engineer - Logitech/Slim Devices
    Join Date
    Apr 2005
    Location
    Ipswich, UK
    Posts
    1,394
    Quote Originally Posted by Ben Sandee View Post
    There's always MinGW and/or cygwin....
    I choose Visual C in the hope it would attract some Windows developers to our community. I still think given a little tlc this is still the best option to support Jive on Windows.

    MinGW is a possibility, but cygwin is not compatible due to licenses.

    Richard

  9. #19
    Ben Sandee
    Guest

    [SlimDevices: Jive] Is DirectX really required on Windows?

    On Dec 21, 2007 2:14 PM, rtitmuss <
    rtitmuss.31yjz11198268103 (AT) no-mx...limdevices.com> wrote:

    >
    > Ben Sandee;250628 Wrote:
    > > There's always MinGW and/or cygwin....

    >
    > I choose Visual C in the hope it would attract some Windows developers
    > to our community. I still think given a little tlc this is still the
    > best option to support Jive on Windows.



    I wasn't suggesting you migrate Jive and I fully understand why you would
    use Visual C++. Although if someone were to use either MinGW or cygwin for
    their own development efforts would you want to stop them? I write this
    from my main development machine which is Linux... :-)

    Ben


  10. #20
    Senior Software Engineer - Logitech/Slim Devices
    Join Date
    Apr 2005
    Location
    Ipswich, UK
    Posts
    1,394
    Quote Originally Posted by Ben Sandee View Post
    Although if someone were to use either MinGW or cygwin for
    their own development efforts would you want to stop them? I write this
    from my main development machine which is Linux... :-)
    No I wouldn't want to stop them, as always patches welcome

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •