How to Compile Filebot?

Support for Ubuntu and other Desktop Linux distributions
Post Reply
bassmadrigal
Posts: 10
Joined: 04 Jun 2015, 13:13

How to Compile Filebot?

Post by bassmadrigal »

rednoah, thank you for an amazing program. You've helped me in the past with some tags, but I'm hoping to get some additional help.

I would love to have this program available on slackbuilds.org (SBo), which is a popular repo for Slackware (Linux) users to install software. However, the OS does not support .deb packages out of the box and they need to be converted to a Slackware package. This isn't recommended when stuff is hosted on SBo. They highly prefer programs to be compiled for the computers they'll be installed on (a SlackBuild is just a shell script to compile the program and create a Slackware package from the results.

Do you have any instructions available to compile Filebot? I did a lot of searching and came up empty. Any help you can provide would be greatly appreciated. Thanks!
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to Compile Filebot?

Post by rednoah »

FileBot itself is platform independent, so there's no reason why you couldn't just distribute the compiled jar for all platforms.

External native dependencies like libmediainfo or fpcalc need to be compiled from source for the current platform, but for those tools there should already be existing packages.

Here's how the Arch Linux people do it: https://aur.archlinux.org/packages/filebot/
:idea: Please read the FAQ and How to Request Help.
bassmadrigal
Posts: 10
Joined: 04 Jun 2015, 13:13

Re: How to Compile Filebot?

Post by bassmadrigal »

Yeah, I already looked at the Arch stuff hoping they were compiling, but they were just packaging up pre-compiled binaries. While that isn't against SBo's policies to repackage binaries, it is preferred to compile it from source.

Any possibility in getting the compile instructions?
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to Compile Filebot?

Post by rednoah »

1.
Compiling from source makes sense because you'll compile with all the CPU optimizations that are available on the current machine. Compiling from source is recommended because only the source code is platform independent.

Compiling java source to jar files makes no sense in that respect. Think of jar files as binary resources like png or jpg files.


2.
You can build FileBot with ant:

Code: Select all

ant
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: How to Compile Filebot?

Post by kim »

1. I download the https://github.com/filebot/filebot/archive/master.zip
2. Installed ant from https://chocolatey.org/packages/ant
3. run ant and then get this:
C:\Temp\Filebot>ant
Buildfile: C:\Temp\Filebot\build.xml

init:
[mkdir] Created dir: C:\Temp\Filebot\build
[mkdir] Created dir: C:\Temp\Filebot\dist
[taskdef] Could not load definitions from resource net/filebot/ant/spk/antlib.xml. It could not be found.
[taskdef] Could not load definitions from resource org/vafer/jdeb/ant/antlib.xml. It could not be found.

revision:
[echo] Revision: 5149

build:

BUILD FAILED
C:\Temp\Filebot\build.xml:731: C:\Temp\Filebot\lib\ivy\jar does not exist.
4. run
If I put the ivy.jar file here C:\Temp\Filebot\lib\ivy\jar\ivy.jar, then
C:\Temp\Filebot\build.xml:731: C:\Temp\Filebot\lib\ivy\bundle does not exist.
5. I'm stock and need help, what am I doing wrong ?


EDIT: ivy was not installed correctly
AND
BUILD FAILED
C:\Temp\Filebot2\build.xml:164: The archive slf4j-api.jar doesn't exist
fixed with manual copy to C:\Temp\Filebot2\lib\ivy\jar from here:
https://mvnrepository.com/artifact/org. ... api/1.7.25
pratiksinghal48
Posts: 2
Joined: 29 Dec 2018, 09:32

Re: How to Compile Filebot?

Post by pratiksinghal48 »

Hello

I am getting 'java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory' after compiling and running jar file.
Do you have any idea what might be causing it?
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to Compile Filebot?

Post by rednoah »

Unfortunately, creating functional builds from source is not officially supported anymore. The source is there primarily for education and advanced users who want to know how it works.
:idea: Please read the FAQ and How to Request Help.
Post Reply