32bit-64bit Installer Help - 32bit-64bit

Looking for help to build a 32/64 bit installer. I've looked for help here already, found some from Mithriel but unfortunately I'm very new to editing registry keys.
I replied to his answer and posted my script but a Mod removed it. I apologize for any gap in etiquette.
I'm using InnoIDE to develop my installer. Essentially I just want it to be able to detect the chipset architecture and then load in the appropriate registry values.
From what I understand it looks like many are creating a parent installer that runs two other installer (one for 32 and 64 respectively). That's great but the files I will be copying to the install directory are about a GB. I can't really have those files
duplicated obviously.
I'm also looking for a way to delete a folder on install as well.
I can post script/email it to anyone willing to help me out.
J.

A little bit on "why" there is a need for a 32/64-bit installer. This doesn't answer the question, but has evolved too large for a comment. See the other comments in the original post.
The "problem" with using a 32-bit installer for a 64-bit application (and vice-versa) is due to Windows Registry Virtualization.
A 32-bit installer will (unless it uses special flags when writing to the registry write to the "32-bit view" of the registry and the application will see the "64-bit view"). If the application itself only runs in 32-bit then this doesn't matter and only a 32-bit installer is needed, of course. Like wise, if it only runs in 64-bit then only a 64-bit version of the installer is needed.
Happy coding.

while using inno setup i found a problem to writte to the 64 bits registery it seems that is differnet instruction while writting on 32 bits.
so it need more search and i will not got stocked for this.

Without being more specific with the question, the registry section of the documentation includes specific constants for 32- and 64-bit registry options. For example, see this section:
The values may have a suffix of 32 or 64. Root key values with a
suffix of 32 (for example, HKLM32) map to the 32-bit view of the
registry; root key values with a suffix of 64 (for example, HKLM64)
map to the 64-bit view of the registry.
Make a set of registry entries for each bit-ness, and in each entry, specify the the 32- or 64-bit registry root, and add a Check: IsWin64 parameter for the 64-bit registry entries. You should be able to invert that check on the 32-bit entries.

Related

Choosing which runtimes to support

I'm working on a .net core library/application (it's more of a plugin of sorts) that will run on windows x64 and a few flavours of linux. I have a few very large native dlls that will need to also be included in the release and I'd like to choose wisely which to include (windows x64, ubuntu and osx only). This is how bin/Release/net6.0/runtimes looks like:
I'd like to only distribute a couple of these (for size reasons), but if I delete any one them the application fails to start, even if they are not relevant at all. There seems to be some dependency check. Is there any way to tell it to either not do that check and trust me that the needed files are there, or let me select which ones to include? I know there is a RuntimeIdentifiers property but it doesn't seem to limit the distributions in any way
NOTE: For reasons I don't want to get into I can't make separate builds for each OS. It has to be a single deploy that works on all targeted systems.

How do I install pglogical extension on Windows machine?

I need to migrate an enterprise production database from a Windows source machine running Postgres 9.5 to an Ubuntu destination machine running Postgres 11.6 with < 15 mins downtime. I plan to do this with pglogical, which requires the extension being loaded on both source and destination. I am having trouble with the source side because it is Windows.
I have very little Postgres-Windows experience and can neither find any helpful literature on the specific situation nor can I figure out for myself how to presumably install from source.
I've dug and dug and so far the only answer I've been able to find is "ugh... Windows". It seems like the only way to build from source is using Visual Studio, which I don't have or know how to use.
Sources:
https://www.2ndquadrant.com/en/blog/compiling-postgresql-extensions-visual-studio-windows/
https://postgrespro.ru/list/thread-id/1835275
Alex, the 2ndQuadrant article you link to in your own comment solves this. A few of the project or build options noted there have moved a little bit in the newer VisualStudio Community editions, so I can see where you got hung-up.
Just for kicks I compiled 32-bit DLL on my oldest Windows instance. I included the /Release path so you can grab my DLL & see if it works for you. It's (a) 32-bit because I'm assuming worst-case for an old v9.5 install, and (b) targets Postgres 9.6 because that's what I had installed. Unless there were major API changes though, it should connect to v9.5 without any issues:
https://github.com/mbijon/winpglogical/tree/master
If you find you need a version that entirely matches Postgres 9.5, grab my solution files & VS Community 20xx. Load the project & update the Additional Include Directories in Project Config to target your v9.5 paths. That should be all that's needed to link v9.5 Postgres libs.

Create R Windows Binary from .tar.gz linux

This is sort of related to a previous post of mine. I have the need to use the bigmemory library on my 32bit Windows PC to do some ugly matrix calculations. Unfortunately, it appears that the maintainers have temporarily ceased production of Windows binaries. I have Ubuntu on my home PC. I would really like to take the .tar.gz file and build it into a Windows binary that I can actually run at work. I realize there are more efficient ways, like installing RTools on the Windows device. However, our IT keeps our admin rights on lockdown, so I can never edit my PATH enviro variable. Could anyone provide some general guidance for doing this? Are there any tools I need to install on my Ubuntu PC above and beyond R?
I found similar questions, but nothing that thoroughly answered my questions.
Unless the package source is incompatible with current versions of R, you could use the R project's win-builder site to build a Windows binary. Quoting from the linked site, win-builder is a service:
intended for useRs who do not have Windows available for checking and building Windows binary packages.
As a convenience, Hadley Wickham's devtools package includes a utility function, build_win(), that you can use for this purpose. From ?build_win:
Works by building source package, and then uploading to http://win-builder.r-project.org/>. Once building is complete you'll receive a link to the built package in the email address listed in the maintainer field. It usually takes around 30 minutes.
Windows has four sets of environment variables (system, user, volatile and process sets). The first three sets are stored in the registry but the process set is not so even if they have locked down the registry its typically still possible to set the process environment variables (including the PATH) in a local process, i.e. on a temporary basis, so you might double check your assumptions that you can't modify anything. Its more likely that you can't modify the system variables and registry but can still modify the set in your local process. To check this from the Windows cmd line enter this:
set mytest=123
set mytest
and if the second line shows that mytest has the value 123 then you likely have all the permissions you need.
Furthermore anything you need to set is all handled automatically for you by R.bat in the batchfiles distribution so you don't have to set anything yourself.
Just ensure that Rtools and R are installed into the standard locations (you can tell them to skip the setting of any registry keys during the installation process), ensure R.bat is on your path or in current directory and run:
R.bat CMD INSTALL mypackage.tar.gz
without setting environment variables, registry keys or path.
If that does not work try Rpathset.bat also from the batchfiles which is not automatic like R.bat but on the other hand is extremely flexible since you must modify the SET statments in it to whatever you want.
There is a PDF document that comes with the batchfiles which gives more info.

deploying a Qt application

In a nutshell, the question is: I just finished my first application using Qt Creator on a computer running under Linux Ubuntu, now how do I make this available for everyone. Now follows the more detailed version ;)
I must apologize for asking this, I am aware that this question has probably been asked many times and that there is official documentation that I can read. I am just completely new to programming and I am very confused by everything I've read so far. If you are kind enough to help, please assume I know absolutely nothing :)
Here we go: I've just finished designing my first application (a scientific program) with Qt creator on my laptop which runs under Linux Ubuntu. It works fine and I'm very proud of it ;)
Here's what my project consists of: 40 header files, 42 source files, 1 pro file, 1 qrc file, 1 html file and 7 png files. In the code, I use #include for a bunch of fairly standard Qt classes (QWidget, QTextBrowser and so forth, maybe like 40 of those).
Now I'd like to make it available to other people. For Linux and Mac users, I've figured a way to do that: I can compress the folder containing my project, tell them to install Qt on their computer, then download and extract the files on their hard disk, open a terminal in the folder and run
qmake myProject.pro
qmake
make
That seems to work fine (by the way, does it matter that this is not precisely what Qt creator does? The qmake step there is qmake-qt4 myProject.pro -r -spec linux-g++ and the make step is make -w). Now, I assume there is a solution where I don't ask them to download and install something like 200Mo of Qt material. As for Microsoft Windows users, I don't have a clue.
I would be very grateful if you could explain to me in a very concrete way what I need to do. Needless to say, I'll go for the best and easiest solution, I don't need to understand everything about deployment. Many thanks in advance!
Edit: In case that's useful : I've been using Qt Creator 2.5.0 based on Qt 4.8.1 (64 bit), I'm working on a laptop with Ubuntu 12.04 64bits
For Linux and Mac users, I would compile the software for them in 32 and 64bit formats - no-one likes compiling unknown software from source. Obviously keep the source code option for those on more unusual architectures/OSs (and provide a shell script for them that mimics the commands Qt Creator calls!). As Qt runtimes are available from package managers on just about every distro (and come pre-installed on most anyway, KDE requires them for example), by not asking them to compile from source your users will have a much smaller download (if any) and won't require them to download software from a website potentially unknown to them. Of course the best way would be to try to get your software added as a package into the major distros' repositories, but that may take some time to organise.
Compile your software for Windows users for both 32 and 64bit formats. It's generally frowned upon to ask users to download runtime libraries they potentially don't know, and put them into their system32 folder... So most applications bundle all the libraries they need with their application. Qt-based applications are no different, and so put the runtimes into the folder where the executable is. Also it is much more professional to create a proper installer, there are a few free installer applications for Windows, a web search will give you the most popular (I think I saw a thread on SO about it as well).
As you can see the platforms aren't too dissimilar, the main point I would make is: Do not force people to compile from source! The vast majority of people on Earth do not even know what compiling is, so provide for the major arrchitectures/OSs yourself.

Installing software on Solaris

I'd like to install several unix utilities (incl. xmlstarlet, wget) on a solaris 10 machine which I don't have root access to (obviously, I have a user account). I'm not that experienced with solaris and am wondering if I can simply get hold of an uber binary for each utility I need and just place this in my home directory? Is this feasible?
Many thanks
wget is installed by default on Solaris 10 in /usr/sfw/bin/wget.
xmlstarlet requires four libraries that aren't included in Solaris 10 so it's going to be trickier but of course, you can build them and then xmlstarlet from their respective source code.
Have a look there for information about what is needed: http://www.opencsw.org/packages/xmlstarlet
If you really don't want to compile the binaries, there is certainly a way to manually install the files stored on these Solaris packages elsewhere and patch/fix them to make the whole work. I did that already.
Finally, don't underestimate the willingness of the system administrator to help.
As long as the binary doesn't try to do something that requires superuser privileges and the binary is compiled for your platform, you should be ok.

Resources