I have an installer script for my product, let's say, project.xml. This installer works for 3 platforms that we need: windows, linux, osx. We generate <linux-install>.run, <win-install>.exe and <mac-install>.app. Also, there is a selection at runtime, whether we need to pull in 32-bit libs or 64-bit libs for our product depending on the underlying OS.
Now, we are asked to add linux natives <linux-install>.rpm, and <linux-install.deb>.
Inside the main script, project.xml, I have logic that differentiates between 32 bit and 64 bit underlying OS, and selects libs components, accordingly. For example, to generate <linux-install>.run, if we detect linux-32, we will select "linuxfiles32" component; similar, for 64-bit. This logic on checking underlying OS, and doing "componnetSelection" lives under "preInstallationActionList" entry.
Now, according to BitRock's answers to RPM and DEB generation, this step is NOT executed for RPM and DEB.
My initial solution was to create two separate installer scripts for RPM/DEB, one for each bit-ness (32 and 64). Then we would generate "pre-canned" installers for our users, without determining OS bit-ness at runtime.
But I wonder if there is a way to still stay with original project.xml and be able to know which components to pull based on underlying OS-bitness, if we are doing RPM or DEB? If so, where within the script should I do "componentselection" provided that " preInstallationActionList" is not executed for DEB/RPM?
Please sign in to leave a comment.