RasPlex / OpenPHT

OpenPHT is a community driven fork of Plex Home Theater
Other
596 stars 110 forks source link

Impossible to build this project as instructed #297

Open CollinChaffin opened 6 years ago

CollinChaffin commented 6 years ago

Referring also to approaching half-year old and still unacknowledged issue #191. Is anyone checking these open issues?

It is currently impossible to build OpenPHT using VS2012 (and I cannot find a version that will build it) and now with the recent commits to the critical issues we desperately need a new 1.9 win32 build please. The build doc is a mere paragraph and this needs to be properly documented as to the basic requirements including configurations to build if we need to do it ourselves. Simply saying run the script and point cmakegui at "the source" begins the issue because it does not even clarify which of the many source folders, how cmake needs to be configured, etc.

Requesting perhaps a mere one-page writeup with the steps required to build the required build environment and then the handful of build steps will make sense (and also be successful). TIA!

Kwiboo commented 6 years ago

The build instructions has not been updated since we forked from PHT and are not fully up to date but it should not have changed that much. Most notably is the switch to VS2013 starting from OpenPHT 1.6. https://github.com/RasPlex/OpenPHT/blob/openpht-1.9/README-BUILD-PLEX.md is pretty much correct aside from VS2012 being wrong.

  1. Install tools: VS2013, CMake, DirectX 9 SDK
  2. Run plex\scripts\fetch-depends-windows.bat from root folder to download build depends
  3. Create a build folder (<root>\build)
  4. Use CMakeGUI, press configure and generate buttons to create a Visual Studio 2013 solution (default options should be fine, some of the checkboxes can be disabled to speed up local dev builds) cmake-gui
  5. Open solution file and build OpenPHT

I hope these build instructions clarifies some things.

My code signing certificate has expired and I need to get a new one before I can make proper OpenPHT 1.9 builds.

Below is the steps I use to build Windows builds on jenkins.rasplex.tv (the scripts used may depend on WORKSPACE or other jenkins env vars).

win32-depends

Libraries needed by OpenPHT that is not already pre-compiled for Kodi, see https://github.com/RasPlex/win32-depends

call "%VS120COMNTOOLS%vsvars32.bat"
build.bat

plex-depends-*.7z is collected and pushed to Azure Storage (http://sources.openpht.tv/build-deps/win32/plex-depends-v120.7z)

OpenPHT-WIN-32 (depends)

Downloads pre-compiled Kodi/PHT packages and builds ffmpeg, creates a single package for simplified rebuild of OpenPHT

plex/scripts/CollectWindowsDeps.bat

windows-i386-xbmc-*.tar.gz is collected and pushed to Azure Storage (http://sources.openpht.tv/build-deps/plex-dependencies/windows-i386-xbmc-vc120.tar.gz)

OpenPHT-WIN-32

Will download and unpack build depends from http://sources.openpht.tv/build-deps/plex-dependencies/windows-i386-xbmc-vc120.tar.gz

plex/scripts/build_window_release.bat

upload\OpenPHT-* is then collected and used for the release

CollinChaffin commented 6 years ago

Excellent thanks for the write-up! I think there are still a lot of folks waiting for someone to build 1.9 that probably don't have the resources or know-how to perform the above. If I get a bit of time I can try to get it built but you're right about the signing it should probably be redist with your signature so the sooner the better on that!

CollinChaffin commented 6 years ago

I'd really love to be able to build this thing and work on a few needed fixes myself to help in the effort but unfortunately have to return just to say that tiny little phrase "Use CMakeGUI, press configure and generate buttons to create a Visual Studio 2013 solution (default options should be fine, some of the checkboxes can be disabled to speed up local dev builds)" is where the whole thing falls apart.

I have literally WORLDWIDE not found another living soul other than you that has successfully build this windows client and it's very frustrating. You mentioned code signing almost a year ago and cited that as the reason that you couldn't take your working config and click the build button and simply post the binary for 1.9 but I guess I'm not clear on what signing you're referring to. I think we all just need a new binary executable built for release, right? I have now spent I don't know how many hours going in circles with broken dep batch files, and a repo that is clearly missing many of the required pieces to build - and I still have not a single build to show for it.

So I'll ask again can't you simply do a 10 minute standard release build using your setup and post it? We would all greatly appreciate it! If not, how about at the very least an updated build doc that you have actually followed from scratch (not on your magic working dev box) or even a simple video screencast of this build with all dependencies etc. so someone, anyone, (hopefully me) can release the fixed 1.9 binary until a 2.0 repo becomes available. TIA!

seitzbg commented 5 years ago

Would be nice to have this especially since it shouldn't be hard to rev ffmpeg and fix a ton of issues / add more hw decode support.

jimmypooh commented 4 years ago

I'll jump in here too. I couldn't get this to build and would like to make a few changes, but can't get this to build. Unfortunately I don't know enough to figure this out on my own. Anyone able to get this running in vs?

jimmypooh commented 4 years ago

Ok, for anyone who still might want to build this...

I did get it to [almost] build in Visual Studios Express 2013 for Windows Desktop. I followed the instructions by Kwiboo above word for word.

I only ran into 1 hiccup. When installing Activex 9, I had to uninstall C++ 2010 redistibutable pack before installing since Activex 9 installs that and fails if it's already installed.

Once I ran through the steps I get 7 build errors all pretty similar: Error 8 error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in Win32DelayedDllLoad.obj C:\Work\Projects\OpenPHT-openpht-1.9\build\plex\breakpad_client.lib(guid_string.cc.obj) OpenPHT

I ran through all of the project files and made sure they were set to Properties->Config Properties->C/C++->Code Generation-> Runtime Library= Multi-threaded Debug DLL (/MDd)

Still can't quite build it but it's close. Any help would be appreciated

lucypjohn commented 4 years ago

Did you get this to work in the end? I want to make a few changes, then compile this - then get it into the Embedded OpenPHT

CollinChaffin commented 4 years ago

Nope - still find it impossible to build.

Spark-NV commented 4 years ago

@Kwiboo instructions were correct, but there are a few things thats needed to build. So here is my write up on building for anyone that cares and wants to mess with this. (note: ive only messed with the windows non embedded version)

Instructions to build:

Download source and extract somewhere (i used the desktop) rename the folder to "OpenPHTSource" Create a folder called "build" somewhere (i also used the desktop)

Download and install "Visual Studio 2013" Download and install "Cmake" Download and install the june 2010 DirectX 9 SDK Download and install from sourceforge "NSIS"

I believe thats it for anything you need to install. Now we need to add a plugin to NSIS that openpht relies on

Download "NSIS Simple Firewall Plugin" and extract the SimpleFC.dll to the NSIS install directory plugins\x86-ansi folder (i installed mine here C:\Program Files (x86)\NSIS\Plugins\x86-ansi)

Now go into the OpenPHTSource folder and navigate to and run both the bat files "plex\scripts\CollectWindowsDeps.bat" "plex\scripts\fetch-depends-windows.bat" (idk is collectwindowsdeps is needed but i did it anyways)

Now run Cmake-gui and set the source code folder"OpenPHTSource) and the binary folder(build), click generate and on the popup make sure to specify "Visual Studio 12 2013" then click finish

now when opening the solution in Visual studio you need to make 2 changes. 1 change the Solution Configuration from degub to release(at the top of the screen under the "WINDOW" option ). the other change you must right click OPENPHT solution within the solution explorer on the right and click properties, then configuration properties. make sure each item has a checkmark in it.

From here i would assume the project SHOULD build but i was having 2 errors involving 2 commands, 1 is creating symbols(which i havnt looked into fixing) the other error was involving textures. the textures one was a major error and would cause the build to fail i looked at the build command and tried running the commands myself and seen the TexturePacker.exe wasnt in the folders for the command to work so i copied the exe to all the folders it was referencing (OpenPHTSource\tools\TexturePacker) + (OpenPHTSource\tools\TexturePacker\MinSizeRel) + (build\tools\TexturePacker) +(build\tools\TexturePacker\MinSizeRel)

i doubt it needs to be in each of those folders but i didnt feel like going threw the entire thing figuring out which place it needed to be exactly

now after copying the exe to those folders the command tried to run the exe but then popped the error it was missing dll's, so i had to download the 1.2.8 versions(newer versions error out) of SDL and SDL_image files from here https://www.libsdl.org/release/ I placed those in all 4 directories alongside the TexturePacker.exe

After that the project builds with the only 1 error and it involves the symbols thing which doesnt seem to affect anything, though probably should be looked at and find why its erroring.

Hope that helps someone thats interested in building and hopefully someone will take up the mantle and maybe maintain this.

CollinChaffin commented 3 years ago

A few things? With as many years as this project has been sitting here I would NOT say the build instructions, or batch files, are anywhere near complete. Which is why there is not more active development, when the build dependencies are only never included from the one developer that has them manually dropped into place on his system. I guarantee if you didn't need a slide-rule to build this, more would contribute.