Page 2 of 6

Re: UMSBuilderV2: build any UMS branch

Posted: Mon Sep 01, 2014 3:36 am
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

Re: UMSBuilderV2: build any UMS branch

Posted: Mon Sep 01, 2014 11:55 am
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.

Re: UMSBuilderV2: build any UMS branch

Posted: Mon Sep 01, 2014 12:27 pm
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.

Re: UMSBuilderV2: build any UMS branch

Posted: Mon Sep 01, 2014 1:18 pm
by Dypsis
I selected "Choose another branch", and it seems to be working now.
The default option [1] didn't work.

Re: UMSBuilderV2: build any UMS branch

Posted: Mon Sep 01, 2014 1:21 pm
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?

Re: UMSBuilderV2: build any UMS branch

Posted: Mon Sep 01, 2014 3:00 pm
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.

Re: UMSBuilderV2: build any UMS branch

Posted: Mon Sep 01, 2014 3:26 pm
by Dypsis
Thanks for all the answers, infidel. :)

Re: UMSBuilderV2: build any UMS branch

Posted: Tue Sep 02, 2014 4:43 am
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

Re: UMSBuilderV2: build any UMS branch

Posted: Tue Sep 02, 2014 8:37 am
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.

Re: UMSBuilderV2: build any UMS branch

Posted: Wed Sep 24, 2014 8:43 am
by infidel
Update: V2.4 - fix pull requests, add rebuild + linux + quick-compile support.