PMS Build Script

Discuss issues related to PS3 Media Server development (only for programmers)

PMS Build Script

Postby innot » Thu Aug 19, 2010 6:12 pm

Hi,

if you like to try out the numerous patches for PMS floating around in this forum and the issue tracker, but don't know or don't want to set up a Java development system, then this script might be just right for you.

To use it download the file and unzip it somewhere. Then drop any patch files to the 'pms.patches' folder and any additional files into 'pms.additions'. Finally start 'build.bat' from the command line and watch how the skript will
  • download the complete PMS source code form the SVN repository,
  • apply all patches in the 'pms.patches' folder (patch files need a '.patch' file extension),
  • integrate any file in the 'pms.additions' folder to the source folder,
  • build PMS and generate the distribution packages (to be found in 'dist')

Please note: I have only tested the build script on a WindowsXP system. It should work with Linux, but I haven't tested it yet. It probably won't work on 64bit Windows systems, but I could fix that if required. Download link remains the same.


You need a real 'Java Development Kit' (JDK) for the script to work. A 'Java Runtime Environment' (JRE) is not sufficient. You can download the JDK here.

As a little bonus my build script comes with a few patches. My logging patch (Issue 829), a patch to fix a ClassCastException in headless mode (Issue 808) and the bugfixes by 'tsp' from this thread. Note that I haven't tested any of the fixes by 'tsp', I just tweaked them enough to get them to apply and compile.

Feedback on this script is welcome, but please don't bug me about any patches not working. Use at your own risk!

Cheers,

Thomas


[Edit] 28.Sep.2010 15:40utc
I have updated the script, fixed a few bugs and successfully tested it with winXP (32bit), win7 (64bit) and Linux (Ubuntu/64bit). The new version also has a patch.exe included, so no need to download it separatly on Windows systems.
Last edited by innot on Tue Sep 28, 2010 4:42 pm, edited 1 time in total.
innot
 
Posts: 8
Joined: Thu Jul 29, 2010 2:52 pm

Re: PMS Build Script

Postby Cybermax » Tue Aug 24, 2010 3:38 pm

Was not able to get this script to run under Windows 7 x86. (Some complaint about tools.jar..)

I did however get it to run under Windows XP.. It ended in an error:
Code: Select all
The current Java Development Kit is 1.6
JAVA_HOME is C:\Java\jdk1.6.0_21
Starting ANT Build
Buildfile: C:\New\PMS_Builder\build.xml

clean:
   [delete] Deleting directory C:\New\PMS_Builder\build\ps3mediaserver_patched

download.pms.source:
      [svn] <Checkout> started ...
      [svn] <Checkout> finished.

copy.pms:
     [copy] Copying 805 files to C:\New\PMS_Builder\build\ps3mediaserver_patched

insert.add.libs:
     [copy] Copying 4 files to C:\New\PMS_Builder\build\ps3mediaserver_patched

apply.patches:
     [echo] Appying patch file C:\New\PMS_Builder\pms.patches\innot\Issue_808_ClassCastException_fix.patch

BUILD FAILED
C:\New\PMS_Builder\build.xml:114: The following error occurred while executing t
his line:
C:\New\PMS_Builder\build.xml:120: java.io.IOException: Cannot run program "patch
" (in directory "C:\New\PMS_Builder\build\ps3mediaserver_patched"): CreateProces
s error=2, The system cannot find the file specified
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
        at java.lang.Runtime.exec(Runtime.java:593)
        at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Exec
ute.java:827)
        at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:445)
        at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:459)
        at org.apache.tools.ant.taskdefs.Patch.execute(Patch.java:200)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.jav
a:398)
        at net.sf.antcontrib.logic.ForTask.doSequentialIteration(ForTask.java:25
9)
        at net.sf.antcontrib.logic.ForTask.doToken(ForTask.java:268)
        at net.sf.antcontrib.logic.ForTask.doTheTasks(ForTask.java:324)
        at net.sf.antcontrib.logic.ForTask.execute(ForTask.java:244)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
        at org.apache.tools.ant.Main.runBuild(Main.java:801)
        at org.apache.tools.ant.Main.startAnt(Main.java:218)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find th
e file specified
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
        at java.lang.ProcessImpl.start(ProcessImpl.java:30)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
        ... 39 more

Total time: 19 seconds

Tips?

One other thing im also wondering is if i try to use a newer version of mencoder.exe and mencoder_mt.exe, it does not seem to work at all.. (still to try with the latest patches/svn version tho). Is there some trick to it? Is the mencoder (0.9.0 version) included in the svn a "special compile" of some sort?

Sorry for the n00bish questions here, but any hints to this is very much appreciated :)

C

PS. Reason for newer mencoder version for me is to try to get coreavc usage when using mencoder.. Supposed to only work with a newer version as per some description found on the forum, but as said, i cant get a newer mencoder to work at all...
Cybermax
 
Posts: 19
Joined: Fri Sep 25, 2009 12:29 pm

Re: PMS Build Script

Postby innot » Tue Aug 24, 2010 6:08 pm

Cybermax wrote:Was not able to get this script to run under Windows 7 x86. (Some complaint about tools.jar..)


Your Window7 does not have a Java Development Kit installed. Install a JDK and at the beginning of the file 'build.bat' add a line like 'set JAVA_HOME=path\to\your\JDK'. This is a workaround to the auto-JDK-detection in the bat file, which won't work on 64bit Windows.

Cybermax wrote:
Code: Select all
...
C:\New\PMS_Builder\build.xml:120: java.io.IOException: Cannot run program "patch
" (in directory "C:\New\PMS_Builder\build\ps3mediaserver_patched"): CreateProces
s error=2, The system cannot find the file specified
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
...

This is due to a missing 'patch' program. You can find one at http://gnuwin32.sourceforge.net/packages/patch.htm

Regarding your question about mencoder versions it is probably better to ask this question in a separate thread, as I have no idea.

Thomas
innot
 
Posts: 8
Joined: Thu Jul 29, 2010 2:52 pm

Re: PMS Build Script

Postby Cybermax » Tue Aug 24, 2010 6:34 pm

innot wrote:
Cybermax wrote:Was not able to get this script to run under Windows 7 x86. (Some complaint about tools.jar..)


Your Window7 does not have a Java Development Kit installed. Install a JDK and at the beginning of the file 'build.bat' add a line like 'set JAVA_HOME=path\to\your\JDK'. This is a workaround to the auto-JDK-detection in the bat file, which won't work on 64bit Windows.

Well.. as i write here, its x86, and not 64bit..

I have ofc installed JDK + i have added the "JAVA_HOME" environment variable aswell (before i did, it gave the error that java was not installed). I also tried to install java in c:\java as sometimes batch files may have troubles with the "program files" (folders with spaces) and such.. to no avail. The reason i can test this "so fast" is cos i am running vmware with several setups.. Winxp/win7x86/x64 and so on.. I have not tested this in Win7 x64 yet tho..

Nevertheless, it started without a hitch once i installed the exact same jdk-6u21-windows-i586.exe in windowsxp as i used in windows7. Downloading the patch program made the compile complete :)

Sweet :) Thanks for the help :)

C
Cybermax
 
Posts: 19
Joined: Fri Sep 25, 2009 12:29 pm

Re: PMS Build Script

Postby mikulator » Wed Sep 15, 2010 8:41 am

If I were to run the script in windows could i the use the complied files in linux?

Cheers for the good initiative - I read that a lot have hope for the project to continue, but sadly it seems dieing

Mik
mikulator
 
Posts: 4
Joined: Mon Dec 28, 2009 12:57 am

Re: PMS Build Script

Postby eomcam » Sat Sep 18, 2010 5:13 am

Thomas,

Thanks for the compile script.

While waiting for next official beta (r411?) I plan to compile my own custom Win7-x64 version with select patches and the latest available 3rd party Apps. You mentioned
...patches for PMS floating around in this forum and the issue tracker.

How can I see what patches are available from the issue tracker?

Thanks,
Moe.
eomcam
 
Posts: 4
Joined: Mon Aug 02, 2010 5:20 am

Re: PMS Build Script

Postby chocolateboy » Sat Sep 18, 2010 5:11 pm

eomcam wrote:How can I see what patches are available from the issue tracker?


https://code.google.com/p/ps3mediaserve ... =2&q=patch
chocolateboy
Project Member
 
Posts: 2577
Joined: Wed Sep 16, 2009 10:05 am

Re: PMS Build Script

Postby innot » Tue Sep 28, 2010 4:44 pm

mikulator wrote:If I were to run the script in windows could i the use the complied files in linux?

Yes, when run on Windows the script produces both a windows installer and a Linux .tar.gz file.
innot
 
Posts: 8
Joined: Thu Jul 29, 2010 2:52 pm

Re: PMS Build Script

Postby innot » Tue Sep 28, 2010 4:47 pm

I have updated the script, fixed a few bugs and successfully tested it with winXP (32bit), win7 (64bit) and Linux (Ubuntu/64bit).

The new version also has a patch.exe included, so no need to download it separatly on Windows systems.

Download location remains the same.
innot
 
Posts: 8
Joined: Thu Jul 29, 2010 2:52 pm

Re: PMS Build Script

Postby lightglitch » Tue Sep 28, 2010 4:54 pm

You also have this viewtopic.php?f=14&t=7844 that simplifies a little your work.
lightglitch a.k.a Mário Franco
lightglitch
Project Member
 
Posts: 113
Joined: Mon Jun 22, 2009 2:58 pm

Next

Return to Developers

Who is online

Users browsing this forum: No registered users and 2 guests