Build Java JDK for LibGDX packing - libgdx

I want to build my own java JDK so I can package my LibGDX game through launch4j or packr. This page suggests to use these prebuilt jdks, but that project has been discontinued. That page redirects to another github where I can get prebuilt jdks for Windows 64bit, however I need more builds for Mac and Linux (at least mac, because that's what I'm on).
I know there are other places to obtain built jdks for packing java applets and LibGDX games, but I rather just skip that hassle and build my own binaries with the jdk I'm using on my own computer.
If there are better ways to easily package my LibGDX game, I would love to know.
tl;dr: I want to build my own binary jdks so I can use packr or launch4j to package my LibGDX game for distribution across multiple platforms.

Building OpenJDK 8 yourself is not that hard. It's a bit tricky, but manageable once you figure out the important things.
First, you need to find the right version/tag of OpenJDK 8 to build. The current latest release appears to be u112-b16. You should clone the main 8-update repository and the subrepositories (corba jaxp jaxws langtools jdk hotspot nashorn):
hg clone https://hg.openjdk.java.net/jdk8u/jdk8u -u jdk8u112-b16 -r jdk8u112-b16
cd jdk8u
for repo in corba jaxp jaxws langtools jdk hotspot nashorn; do
hg clone https://hg.openjdk.java.net/jdk8u/jdk8u/$repo -u jdk8u112-b16 -r jdk8u112-b16
done
Then, take a look at the README-builds.html file that covers things like how to get all the dependencies you need for your platforms.
Once you have all the dependencies and everything you need to build, building itself looks like this:
cd jdk8u
mkdir build
cd build
bash ../configure \
--with-milestone="fcs" \
--with-update-version=112 \
--with-build-number=b16 \
# your other configure flags go here
make all
Once the build completes, the JDK is available under jdk8u/build/images/j2sdk-image/ and the JRE is available under jdk8u/build/images/j2re-image.
The AdoptOpenJDK folks have some fairly extensive docs that you might find useful: https://adoptopenjdk.gitbooks.io/adoptopenjdk-getting-started-kit/content/en/binaries/build_openjdk_8.html
If you run into issues, feel free to drop by #openjdk on irc.oft.net.

Related

How do I make Octave see installed Shogun libraries in Ubuntu 16.04?

I copied the commands (from these instructions: http://www.shogun-toolbox.org/install#ubuntu) into the terminal and they seem to have worked, but there is no documentation on how to make Octave find the libraries. I have tried modshogun and init_shogun but Octave cannot find them. I do have the libraries in usr/lib, and I have put that directory on PATH. I have even set usr/lib as my working directory in Octave and that did not help. As far as I have found, there is no Shogun documentation on what to do at this point.
I have also tried compiling Shogun from source, but configure couldn't find GCC. Apparently, this is a known problem with newer versions of GCC. I decided to ask for help with the former method because at least I have the libraries with that.
Edit: I am following the instructions here http://www.shogun-toolbox.org/install#manual-basics
When i do cd build and then "cmake -DINTERFACE_OCTAVE=ON" it tells me there is no cmakelists.txt. There is one in in the above folder, but when I go to that directory and do "cmake -DINTERFACE_OCTAVE=ON" again, it tells me "Shogun can only be built with GPL codes if the source files are in /home/derose/shogun/src/shogun/src/gpl. Please download or disable with LICENSE_GPL_SHOGUN=OFF."
However, when I add -LICENSE_GPL_SHOGUN=OFF as an option, i get the error "CMake Error: The source directory "/home/derose/shogun/src/shogun/-LICENSE_GPL_SHOGUN=OFF" does not exist."
You've linked to the Ubuntu install instructions. From there
These currently do contain the C++ library and Python bindings..
No word that this would include the GNU Octave binding. See below on the same page:
The native C++ interface is always included. The cmake options for building interfaces are -DINTERFACE_PYTHON=ON -DINTERFACE_R .. etc. For example, replace the cmake step above by cmake -DINTERFACE_PYTHON=ON...
So you have to grab the source and fire up cmake with something like -DINTERFACE_OCTAVE=ON
Steps to build the bleeding edge of shogun (the github repo) and the Octave interface:
git clone https://github.com/shogun-toolbox/shogun && cd shogun
git submodule update --init
mkdir build && cd build
cmake .. -DINTERFACE_OCTAVE=ON
make -j4

Missing dependencies for dev branch

I'm trying to get minko dev branch to work on linux Mint 17.1 using gcc 4.9.2. While compiling the project created with the master branch I got some missing dependencies.
I had to install glm 0.9.6.3-1 because the version in my repositories didn't have matrix_decompose.hpp.
Now, Provider.hpp includes sparsehash/forward.h. I couln't find any version of sparsehash with this file.
I find minko to be an incredibly good and practical library but it lacks documentation.
Also, the informations in the README and other files in the dev branch are wrong or outdated.
Two questions:
Where do I get the right sparsehash?
Is there a dependencies list somewhere?
Thank you for your efforts and help.
I'm trying to get minko dev branch to work on linux Mint 17.1 using
gcc 4.9.2. While compiling the project created with the master branch
I got some missing dependencies.
I had to install glm 0.9.6.3-1 because the version in my repositories
didn't have matrix_decompose.hpp.
The 'master' branch does not use GLM (nor sparsehashmap). So you're probably on the 'dev' branch. Or worse, a mix of both. Try re-cloning the repo from scratch and properly checkout the 'dev' branch.
Also make sure you're following the documentation to build Minko:
Compiling the SDK for Windows
Compiling the SDK for OS X
Compiling the SDK for Linux
Compiling the SDK for HTML5
Compiling the SDK for iOS
Compiling the SDK for Android
You should not have to download/setup any extra dependency (except some very specific stuff for Linux and the html-overlay plugin).

As a project user, what do I need to do to make a project with Cmake?

I'm working with a project that [used to] support both Autotools and Cmake. In the past, I would:
cd project/build
...
../llvm/configure --enable-optimized --enable-cxx11 $OTHER_OPTIONS --prefix=/usr/local
make -j2
sudo make install
The project has kind of abandoned it support for Autotools, so I have to use Cmake now. Using Cmake to configure seems like it should be relatively easy.
Unfortunately, Mac OS X lacks man pages for Cmake, so I can't RTFM. And the search hits I am finding discuss how to build Cmake packages (and other stuff package maintainers would do), and not how to use it as a dumb project user.
I tried to simply use Cmake in place of Configure, but it did not work:
$ cd project/build
$ OTHER_OPTIONS=" --enable-libcpp"; cmake ../llvm --enable-optimized --enable-cxx11 "$OTHER_OPTIONS" --prefix=/usr/local
CMake Error: The source directory ".../clang-3.6/build/--prefix=/usr/local" does not exist.
Why is Cmake treating a configuration option like a directory (--prefix=/usr/local)?
How do I configure and build a project that uses Cmake as a dumb project user?
You're trying to configure a CMake project like it was autotools. The syntax of the command is;
cmake -Doptions -Dmore_options src_dir
src directory is the last argument, which is why it treats --prefix that way. You will need to know the name of the parameters available to you though. If you're new to CMake, your best bet is to run, either the Qt gui or the curses gui ( ccmake /path/to/src while your in the build directory ). Those gui tools will let you pick your options, configure then generate. Then all you need is to type make ....
Note
cmake --help
does provide info even if your man pages aren't installed. Also, if you have access to google and the internet, searching "cmake man page" should give you access the your missing man pages.

how to build hxselect with mingw?

I downloaded html-xml-utils-6.5.tar.gz and started compiling hxselect.c with mingw. I need a makefile, but the package is designed to generate the makefile. The build instructions are in a configure script, config.h.in file and makefile.in.
Is there a mingw-compatible tool to help generate the makefile? I am considering making a linux machine so I can run the configuration to get the generic makefile, and then bring that back for mingw to start chewing on...
Is there an easier way?
Thanks !
Assuming you've downloaded and installed mingw from [1], launch the MinGW Shell
from the start menu and then cd to directory containing the configure script and proceed as you typically do with autotools based projects:
./configure
make
make install
The purpose of MinGW is in fact to make available to Windows a minimalistic GNU environment (meaning shell and other tools) which allow you to work (mostly) as you would in an operating system with a full-fledged GNU userland (such as GNU/Linux). Occasionally it seems that MinGW is used to denote the windows port of the gcc compiler, but it should be empathized that MinGW actually denotes the Windows port of a (minimalistic) GNU environment.
[1] http://www.mingw.org/

Using travis-ci.org with a pure as3 project

Does anyone know if it is possible to use travis-ci.org for a pure-as3 project (using FlexUnit) ?
Thanks.
This GitHub Travis-CI ActionScript Demo project is a great starting place to get up and running with UnitTesting a Flash project with Travis-CI.
Much like in FlashBuilder the UnitTest suites and libraries are utilizing Flex; however, your project can be 'pure-as3' project. The demo utilizes OSX Travis worker. The Flash Player will be downloaded from the Adobe website at runtime. All build dependencies (flex sdk, flex unit) will be resolved by Maven with flex-mojos
Many of the Flex-Mojos resources are drying up; however, if you are utilizing the Apache-FlexSDK's you'll want to look here for the latest version.
We do not have built in support for ActionScript, but if it's possible to run on Ubuntu, then it should be possible to test on Travis.
You can install any dependencies as part of the build process with apt-get:
before_install:
- sudo apt-get -qq update
- sudo apt-get -qq install some-package another-package
Looking at the FlexUnit docs, it looks like you need a frame buffer available. You may have some luck using xvfb. We have some docs on that, although aimed towards browsers, it may work for you too.