Page 3 of 6

Re: UMSBuilderV2: build any UMS branch

Posted: Sat Oct 04, 2014 11:50 pm
by Wolfgan
Quick question: is there any way to build an specific version of UMS via UMSbuilder? (ie tag 4.1.3-WindowsLinux-Java8 or up to commit 1338a57)
Thx, Wolf

Re: UMSBuilderV2: build any UMS branch

Posted: Sun Oct 05, 2014 3:44 am
by infidel
Wolfgan wrote:is there any way to build an specific version of UMS via UMSbuilder? (ie tag 4.1.3-WindowsLinux-Java8 or up to commit 1338a57)
Create the buildx.bat (disclaimer: untested :)) below in your UMSBuilder directory:
@echo off
:: usage: buildx <tag or commit>
:: requirements:
:: --- msysgit should be in your system path.
:: --- the target branch should be up to date (i.e. build it once before running this)


for /d %%d in ("%CD%\JDK*") do set JAVA_HOME=%%d
for /d %%d in ("%CD%\Maven*") do set M2_HOME=%%d
set PATH=%M2_HOME%\bin;%JAVA_HOME%\bin;%PATH%

cd UniversalMediaServer
git checkout %1
mvn package
git checkout master
and run it from a command window in your UMSBuilder directory like so:

Code: Select all

buildx 1338a57
or

Code: Select all

buildx 4.1.3-WindowsLinux-Java8
The 2 key commands are the 'checkout' and 'mvn' commands, which you could also run directly from a console if you've set up a build environment.

Edit: added missing path command.

Re: UMSBuilderV2: build any UMS branch

Posted: Sun Oct 05, 2014 7:04 am
by Wolfgan
Thx Infidel, I appreciate your prompt reply. I run the script but somehow it seems to build a different .jar than the full UMSbuider script. Maybe a lack of dependencies somehow? (just guessing as I compared the code to the full script)
Do you think this functionality can be included as an extra option in a UMSbuilder v2.4 somehow to avoid using 2 diff scripts?
Thanks, Wolf.

Re: UMSBuilderV2: build any UMS branch

Posted: Sun Oct 05, 2014 7:24 am
by infidel
Wolfgan wrote:somehow it seems to build a different .jar
Wolf, I'm assuming you're looking for the jars in UniversalMediaServer\target\? If that's not the problem then it's probably my bad for reeling this off the top of my head :). I'll roll it into the buildv2 properly with error checking, etc, as you suggest.

Re: UMSBuilderV2: build any UMS branch

Posted: Sun Oct 05, 2014 9:23 am
by Wolfgan
infidel wrote:
Wolfgan wrote:somehow it seems to build a different .jar
Wolf, I'm assuming you're looking for the jars in UniversalMediaServer\target\? If that's not the problem then it's probably my bad for reeling this off the top of my head :). I'll roll it into the buildv2 properly with error checking, etc, as you suggest.
Yes, I'm looking for the resulting file at the folder you mentioned. UMSbuilder produces 2 jar files, one small (~4MB) and a bigger one with dependencies (~22MB) which is the one I use for manual launch and testing. Somehow this bigger jar is the one that buildx doesn't output.
I hope it helps, Wolf.

Re: UMSBuilderV2: build any UMS branch

Posted: Sun Oct 05, 2014 10:45 am
by infidel
@Wolf try this, same command (e.g. 'buildv2 1338a57') and I'll put it on the front page if it's working ok.

[attachment removed]

Re: UMSBuilderV2: build any UMS branch

Posted: Mon Oct 06, 2014 12:00 am
by Wolfgan
Thanks infidel! It worked perfectly. Couple of questions thou:
-You opted for passing the intended commit # as a command line argument, any reason for not to be requested as part of the interactive menu process? (ie like branches, but just with a manual entry prompt instead of selector)

-What's the difference between building for windows, linux (previous options) and the new compile option? it just generated an extra.nsh file in my target folder, but nothing else

Thanks again, Wolf

Re: UMSBuilderV2: build any UMS branch

Posted: Mon Oct 06, 2014 5:02 am
by infidel
Wolfgan wrote:You opted for passing the intended commit # as a command line argument, any reason for not to be requested as part of the interactive menu process?
Mainly I didn't want to write support for user text input (batch files are primitive beasts, one needs to write all this stuff from scratch). I realize this interferes with double-click startup convenience, though :).
Wolfgan wrote:What's the difference between ... the new compile option? it just generated an extra.nsh file in my target folder, but nothing else
It should have also created compiled .class files in your target\classes folder. It's for use with a 'dev' setup, where you run ums straight from these raw compiled files and skip the time-consuming jar and exe stages.

Re: UMSBuilderV2: build any UMS branch

Posted: Mon Oct 06, 2014 5:58 am
by Wolfgan
Great, thanks for the explanations!

Re: UMSBuilderV2: build any UMS branch

Posted: Tue Oct 07, 2014 10:14 am
by infidel
Update: V2.5a - Build specific commits/tags + add 'compile' option to platform menu