Skip to content

Latest commit

 

History

History
159 lines (113 loc) · 8.86 KB

BUILD.md

File metadata and controls

159 lines (113 loc) · 8.86 KB

(This text has been extracted from the manual in XML format IrScrutinizer.xml. Do not edit this file.)

Building from sources

"IrScrutinizer" is one subproject within harctoolbox.org. It depends on several other subprojects within harctoolbox. The repository IrScrutinizer consists of this subproject.

The released versions are found on the download page. The development sources are maintained on my GitHub repository. Forking and pull requests are welcome!

I go to great lengths ensuring that the program runs equally well on all supported platforms. I do not care too much that all aspects of the build runs equally well on all platforms. I build with Linux (Fedora), the continuous integration build runs on GitHub Actions (deploying Ubuntu). Other platforms are treated step-motherly.

Dependencies

As any program of substantial size, IrScrutinizer uses a number of third-party components. All of these are also free software, carrying compatible licenses. The dependent packages need to be installed also in the host-local Maven repository in order for the build to work. In some cases (basically the ones with a version not ending with -SNAPSHOT), the packages are uploaded to the Maven central repository, and will be automatically downloaded to the local host by a Maven invocation.

There are some scripts to aid downloading and building, described next. It is assumed that git and Maven are installed and available as commands git and mvn respectively.

Of course, it is also possible to manually download or clone these packages from my Github repositories, then build and install them locally by mvn install.

IrpTransmogrifier, Girr, HarcHardware, Jirc

These are all Java packages that are required to build IrScrutinizer. HarcHardware requires nrjavaserial. They can be downloaded and built by the script common/scripts/build-harctoolbox-project.sh, using an argument of IrpTransmogrifier, Girr, HarcHardwar, or Jirc. See the file .github/workflows/maven.yml for the complete commands.

DevSlashLirc

This library is used to access /dev/lirc-hardware. It is used by the Linux version only. It is a Java JNI library, written in Java and C++. It is written by myself, and available here.

The subdirectories native/Linux-amd64, native/Linux-i386, and native/Linux-arm contain compiled versions for the x86_64, x86_32, and ARM processors respectively.

The package can be downloaded, and the Java part built, by the script common/scripts/build-harctoolbox-project.sh using the argument DevSlashLirc (see .travis.yml for an example).

nrjavaserial

This is a fork of the legacy RXTX library for serial communication with Java. Version 5.2.1 is currently used.

JCommander

Normally, this component is downloaded and installed automatically by Maven.

Tonto

Tonto can be downloaded and installed by the script common/scripts/build-tonto.sh. It requires the Apache ant build system to be installed as the command ant. Note that the shared library libjnijcomm, which is required by the Tonto program for communicating with a Pronto remote through a serial interface, is not required for use with IrScrutinizer, and can therefore be left out. Using the option -n to the script (see .travis.yml for an example), the script will not try to build and install the shared library.

Building

The Maven "software project management and comprehension tool" is used as building system. Modern IDEs like Netbeans and Eclips integrate Maven, so build etc can be initiated from the IDE. Of course, the shell command mvn install can also be used. It creates some artifacts which can be used to run IrScrutinizer in the IrScrutinizer/target directory.

Two additional shell tools are needed. These are:

  • The unix2dos and dos2unix utilities, typically in the dos2unix package.

  • The icotool utility, typically in the icoutils package.

Windows setup.exe creation

For building the Windows setup.exe, the Inno Installer version 6 is needed. To build the Windows setup.exe file, preferably the work area should be mounted on a Windows computer. Then, on the Windows computer, open the generated file IrScrutinizer/target/IrScrutinizer_inno.iss with the Inno installer, and start the compile. This will generate the desired file IrScutinizer-version.exe.

Alternatively, the "compatibility layer capable of running Windows applications" software application Wine (included in most Linux distributions) can run the ISCC compiler of Inno. The Maven file IrScrutinizer/pom.xml contains an invocation along these lines, conditional upon the existence of the file ../Inno Setup 6/ISCC.exe.

Mac OS X app creation

The Maven build creates a file IrScrutinizer-version-macOS.dmg. This file can be directly distributed to the users, to be installed according to these instructions.

The icon file IrScrutinizer.icns was produced from the Crystal-Clear icon babelfish.png in 128x128 resolution, using the procedure described here.

AppImage creation

To build the x86_64 AppImage, define bundledjdk_url_sans_file and bundledjdk in pom.xml to point to a suitable JDK distrubution file. If a file with name given by bundledjdk is not present in the top level directory, it can be downloaded by the script tools/get-jdk-tar.sh. Then the maven goal make-appimage (which will be invoked during a normal build) will build an appimage for x86_64.

Test invocation

For testing purposes, the programs can be invoked from their different target directories. IrScrutinizer can be invoked as

                $ java -jar target/IrScrutinizer-_version_-jar-with-dependencies.jar

or, if the shared libraries are required, with path-to-shared-libraries denoting the path to a directory containing the shared libraries.

                $ java -Djava.library.path=_path-to-shared-libraries_ -jar target/IrScrutinizer-_version_-jar-with-dependencies.jar

IrScrutinizer can also be started by double clicking the mentioned jar file, provided that the desktop has been configured to start executable jar with a Java virtual machine.

Installation

Maven does not support something like make install for deployment installing a recently build program on the local host. Instead, the supplied tools/Makefile can install the program to normal Linux locations (in the Makefile INSTALLDIR),

                sudo make -f tools/Makefile install

Equivalently, the just created generic-binary package IrScrutinizer/target/IrScrutinizer-*-bin.zip) can be installed using these instructions.