Programming Leftovers
-
Jussi Pakkanen: Looking at LibreOffice's Windows installer
There has long been a desire to get rid of Cygwin as a build dependency on LibreOffice. In addition to building dependencies it is also used to create the Windows MSI installer. Due to reasons I don't remember any more I chose to look into replacing just that bit with some modern tooling. This is the tragedy that followed.
The first step to replacing something old is to determine what and how the old system works. Given that it is an installer one would expect it to use WiX, NSIS or maybe even some lesser know installer tool. But of course you already guessed that's not going to be the case. After sufficient amounts of digging you can discover that the installer is invoked by this (1600+ line) Perl script. It imports 50+ other internal Perl modules. This is not going to be a fun day.
-
Qt's CMake deployment API
Say you have just started with Qt. You installed a recent version with the Qt online installer, found your way through the C++ and QML API, and now have a nice desktop application that works for you ™. Now you want to share your precious marvel with others, for eternal fame and/or profit! But you don’t want to share just your code but a binary that also end-users can install and run without installing a compiler, Qt ... How do you do this?
A popular approach is to create a folder that contains both your application executable, but also the Qt libs and plugins, in the right structure, so that the executable finds everything it needs in the folder. Qt does help you in setting up such a folder with several command line tools, named windeployqt, and macdeployqt, and androiddeployqt. But how do you use them from CMake? Enter Qt’s CMake deployment API!
[...]
This generates a CMake script file that calls macdeployqt or windeployqt on our application target. The file name of the generated script file is stored in deploy_script. With the install(SCRIPT) call we instruct CMake to run the script on installation.
-
String to Number in JavaScript – Convert a String to an Int in JS
When you're programming, you'll often need to switch between data types. For example, you may need to convert a string into a number.
The ability to convert one data type to another gives you great flexibility when working with information.
-
Wave SaaS Starter Kit
Wave is a free and open source starter kit for building SaaS (Software-as-a-Service) platform. It comes with all the required features to saves developers time, and resources and ensure their SaaS is ready for enterprise.
Wave is built on top of Laravel the popular PHP framework, Voyager, and TailwindCSS.
-
Match Anything, Quickly -- Revision 1 | Tom Wyant [blogs.perl.org]
My previous blog post, Match Anything, Quickly, brought a number of responses which are worth reading in their own right. The one that triggered this post, though, was from Nerdvana and Devin of Cincinnati Perl Mongers, who pointed out an error in my benchmark script. I had left off the intended /smx from the qr/ ... / version of the test, which meant that the regular expression did not in fact match.