Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 25

Hybrid View

  1. #1
    Junior Member
    Join Date
    Dec 2007
    Posts
    2

    Is DirectX really required on Windows?

    I'm wondering if there's a specific reason that SDL was compiled with DirectX support on Windows. I managed to get Jive building and running without DirectX and it appears that everything works just fine.

    Installing the DirectX SDK is a pain, so I was hoping this dependency could be removed if it's really not required.

  2. #2
    NOT a Slim Devices Employee kdf's Avatar
    Join Date
    Apr 2005
    Posts
    9,493

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

    Building under windows hasn't been a priority with so many global
    issues to tackle in the software as a whole.
    Early on, a number of graphic library options were turned off for
    linux builds (the environ that is most used by the
    developers of Jive). I'd expect that DirectX isn't required for
    anything right now. In the future, however, Jive is planned to
    replace SoftSqueeze as the software client for music. DirectX might
    factor in when it comes to audio and the inevitable requests for
    visualisations.

    I know of only three people who have built on windows (including
    yourself). I already have done the hurdle for directX SDK on two
    systems
    so it's no big deal to me to keep it. But, if you have a patch, it
    might be an easier entry for folks who do wish to build for windows
    in the near term.
    I'm not sure how far in future the rest will be, so can't really say
    what the issues might be with removing directX support altogether or
    just temporarily.
    A patch can still be considered.

    -kdf

    On 5-Dec-07, at 3:37 PM, adamac wrote:

    >
    > I'm wondering if there's a specific reason that SDL was compiled with
    > DirectX support on Windows. I managed to get Jive building and running
    > without DirectX and it appears that everything works just fine.
    >
    > Installing the DirectX SDK is a pain, so I was hoping this dependency
    > could be removed if it's really not required.
    >
    >
    > --
    > adamac
    > ----------------------------------------------------------------------
    > --
    > adamac's Profile: http://forums.slimdevices.com/member.php?
    > userid=14296
    > View this thread: http://forums.slimdevices.com/showthread.php?t=40843
    >
    >

  3. #3
    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?

    Yes, please post the patch to remove the DirectX dependency!

    Ideally Jive applets would be platform independent and since DirectX
    is only Windows, removing it should be safe.

    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...



    On 5-Dec-07, at 3:37 PM, adamac wrote:

    >
    > I'm wondering if there's a specific reason that SDL was compiled with
    > DirectX support on Windows. I managed to get Jive building and running
    > without DirectX and it appears that everything works just fine.
    >
    > Installing the DirectX SDK is a pain, so I was hoping this dependency
    > could be removed if it's really not required.
    >
    >
    > --
    > adamac
    > ----------------------------------------------------------------------
    > --
    > adamac's Profile: http://forums.slimdevices.com/member.php?
    > userid=14296
    > View this thread: http://forums.slimdevices.com/showthread.php?t=40843
    >
    >

  4. #4
    Junior Member
    Join Date
    Dec 2007
    Posts
    2
    Patch attached.

    I haven't seen the other issue you mention.

  5. #5
    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?

    On Dec 6, 2007, at 2:05 PM, adamac wrote:
    > Patch attached.

    Thx!

    > I haven't seen the other issue you mention.

    Ah, did you try running the jive binary on another machine at another
    path? If it works for you, great!



  6. #6
    NOT a Slim Devices Employee kdf's Avatar
    Join Date
    Apr 2005
    Posts
    9,493

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

    On 6-Dec-07, at 10:39 PM, dean blackketter wrote:
    >
    >> I haven't seen the other issue you mention.

    > Ah, did you try running the jive binary on another machine at another
    > path? If it works for you, great!
    >

    I've never had any luck with this. However, I've never tried moving
    it between machines that have all the
    libraries installed that are required for building. I assume that
    the problem stems from libraries not being
    compiled as static, or a need for an installer that adds shared dlls
    that are needed.

    I've also never tried building a osx or linux binary then moving it
    to another system to run it. Although, an
    interesting idea once I get my macbook back from the shop. I'll have
    two osx machines then,

    -kdf

  7. #7
    Senior Software Engineer - Logitech/Slim Devices
    Join Date
    Apr 2005
    Location
    Ipswich, UK
    Posts
    1,394
    Quote Originally Posted by adamac View Post
    Patch attached.
    Thanks, committed in r1138.

  8. #8
    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...)

  9. #9
    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.



  10. #10
    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.

Posting Permissions

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