Our first course of action was to perform a detailed code review of the existing applet. Some issues made themselves evident almost immediately: the code base had a number of legacy components, and there were no build systems or dependency managers in place. At Redwerk, we like to keep our builds automated and our code clean and minimalistic – fewer lines means fewer bugs. Therefore, our obvious next step was to implement Gradle-based build scripts and use Maven repos to fetch dependencies. With just a few hours’ cleanup, we were able to shrink the code base by almost 15,000 lines. This also allowed us to execute the entire build process with a single console command.
After the initial setup, our Java developers began work on creating the application, writing installation scripts, and fixing the translation infrastructure, all simultaneously. As the applet was already written in Java, it took almost no time at all to retool the existing code into a standalone application. We wrote our package and installer scripts using NSIS, launch4j, fpm, pkgbuild, and packr. Our solution automatically installs Java on the user’s machine if necessary and registers a custom URI handler which lets users launch the application by clicking a link on the web page.
We also implemented a way to seamlessly deliver version updates to users: whenever a user starts a new screencast, the app communicates with the backend to check if there are any updates available and updates itself in the background if necessary.