UMSBuilderV2: build any UMS branch

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Wolfgan
Posts: 370
Joined: Fri Feb 08, 2013 12:33 am

Re: UMSBuilderV2: build any UMS branch

Post by Wolfgan »

Quick question: is there anyway to only build the .jar file, download dependencies (ie new versions of mplayer and mediainfo) and save time by ignoring the exe packaging? Thx, Wolf
-- UMS serving PS3, WDTV, Samsung H6400 + J5500 and Kalemsoft renderers! (no video transcoding but remuxing accepted :D )
infidel
Developer
Posts: 571
Joined: Thu Jul 12, 2012 5:37 am

Re: UMSBuilderV2: build any UMS branch

Post by infidel »

Wolfgan wrote:is there anyway to save time by ignoring the exe packaging
This used to vex me a lot too :), the 'package' phase in pom.xml doesn't currently make an external distinction between 'jar' and 'exe' phases. My hacky solution was to just press CTRL C to interrupt maven as soon as the "jar-with dependencies" phase was over and the package-assembly messages started printing.
Dypsis
Posts: 38
Joined: Tue Aug 12, 2014 4:26 pm

Re: UMSBuilderV2: build any UMS branch

Post by Dypsis »

I have just tried this for the first time and went with the default settings.

I get this error message:
The system cannot find the file specified.
Dypsis
Posts: 38
Joined: Tue Aug 12, 2014 4:26 pm

Re: UMSBuilderV2: build any UMS branch

Post by Dypsis »

I selected "Choose another branch", and it seems to be working now.
The default option [1] didn't work.
Dypsis
Posts: 38
Joined: Tue Aug 12, 2014 4:26 pm

Re: UMSBuilderV2: build any UMS branch

Post by Dypsis »

Just a few more questions.

1. Can I delete the UniversalMediaServer folder that was created in the UMSBuilder folder?
2. I have 2 files ums-4.1.0-68f998c.jar and ums-4.1.0-68f998c.exe. Which one do I use? How do I use the .jar file?
3. I have Java 8 installed on my computer. Would it automatically be built for Java 8?
infidel
Developer
Posts: 571
Joined: Thu Jul 12, 2012 5:37 am

Re: UMSBuilderV2: build any UMS branch

Post by infidel »

Glad you sorted it out :).
Dypsis wrote:1. Can I delete the UniversalMediaServer folder that was created in the UMSBuilder folder?
You can, but if you leave it in place the repo won't need to be cloned all over again next time and things will go a little quicker.
Dypsis wrote:2. I have 2 files ums-4.1.0-68f998c.jar and ums-4.1.0-68f998c.exe. Which one do I use? How do I use the .jar file?
  • Double click the exe to do a full install, this will always work.
  • Or instead (most of the time, i.e. if external resources such as renderer confs haven't changed) you can also simply rename the jar to ums.jar and replace the old one in your UMS program folder.
Dypsis wrote:3. I have Java 8 installed on my computer. Would it automatically be built for Java 8?
It will be compatible.
Dypsis
Posts: 38
Joined: Tue Aug 12, 2014 4:26 pm

Re: UMSBuilderV2: build any UMS branch

Post by Dypsis »

Thanks for all the answers, infidel. :)
Wolfgan
Posts: 370
Joined: Fri Feb 08, 2013 12:33 am

Re: UMSBuilderV2: build any UMS branch

Post by Wolfgan »

Dypsis wrote:2. I have 2 files ums-4.1.0-68f998c.jar and ums-4.1.0-68f998c.exe. Which one do I use? How do I use the .jar file?
There's also an ums.bat created on installation that allows you to launch any ums*.jar built for testing, without disrupting your system too much (so you may install and launch the official versions via the official .exe, and then launch your .jar built files via the batch)
Wolf
-- UMS serving PS3, WDTV, Samsung H6400 + J5500 and Kalemsoft renderers! (no video transcoding but remuxing accepted :D )
infidel
Developer
Posts: 571
Joined: Thu Jul 12, 2012 5:37 am

Re: UMSBuilderV2: build any UMS branch

Post by infidel »

If you're constantly rebuilding UMS, the absolute fastest approach is to skip the jar building altogether and just run your "dev" UMS off the raw compiled .class files. This can coexist with a standard UMS installation.

SETUP

In your UMSBuilder directory:
  • Run buildv2.bat at least once to create the full jar, let's say ums-5.0.0-68f998c.jar.
  • Create a dev.bat file and double-click it to test:
    @echo off
    call buildv2.bat compile
In your UMS Program folder:
  • Create a file symlink called dev.jar to your jar in the UMSBuilder folder, e.g. in a cmd window (using the correct paths):

    Code: Select all

    mklink "C:\Program Files (x86)\Universal Media Server\dev.jar" "C:\UMSBuilder\ums-5.0.0-68f998c.jar"
  • Create a directory symlink to the UMSBuilder\UniversalMediaServer\target\classes subfolder similarly:

    Code: Select all

    mklink /d "C:\Program Files (x86)\Universal Media Server\classes" "C:\UMSBuilder\UniversalMediaServer\target\classes"
  • Create a umstest.bat file:
    @echo off
    cd "%~dp0"
    set classpath="classes;dev.jar;ums.jar"
    start java -Xmx768M -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8 -classpath %classpath% net.pms.PMS
USAGE
  • Double-click dev.bat to pull and compile.
  • Double-click umstest.bat to run the raw compiled code.
CAVEATS
  • You'll need to recreate your dev.jar from time to time as dependencies change.
  • You'll need to manage any changes in external resource files and binaries on your own.
infidel
Developer
Posts: 571
Joined: Thu Jul 12, 2012 5:37 am

Re: UMSBuilderV2: build any UMS branch

Post by infidel »

Update: V2.4 - fix pull requests, add rebuild + linux + quick-compile support.
Post Reply