Compiling the SAFE_VAULT Windows Installer

I need help in compiling the SAFE_VAULT Windows installer:

I am running the MSVC version of Rust (stable) rather than the GNU version, and the free download from advancedinstaller.com, which is required by the build script referred to below:

I ran create_installer.ps1 (i.e., the Powershell script in the git depository) and (after commenting out the line that calls “strip”, which appears to be a GCC specific command), and everything went fine up to the point where compiling safe_vault.exe ended with an error message:

Resources referred by the project are missing:
C:\Users\User\Documents\Projects\Enter path to certificate.p12

I went looking for that file and it isn’t on my system. I see that it is referenced in safe_vault_ci_32_and_64_bit.aip but I don’t know enough to say whether it is a part of the project or of advanced installer.

Anyone?

OK, I solved that mystery:

certificate.p12 is a (self-signed) certificate file that is used to sign the executable being built. It is already supposed to be on the developer’s (my) system and is expected, by default, by the aip (build-settings) file in the safe_vault package.

I could have edited that option out in the AdvancedInstaller gui editor and saved the amended aip file, but I felt it might be a useful learning exercise to created my own certificate, and put the path to it into the aip file.

To create a certificate.p12 file:

  1. First install openssl: http://slproweb.com/products/Win32OpenSSL.html

  2. Add environment variables in order to make openssl available to the compiler:

    DEP_OPENSSL_INCLUDE=C:\OpenSSL-Win64\include
    OPENSSL_INCLUDE_DIR=C:\OpenSSL-Win64\include
    OPENSSL_LIB_DIR=C:\OpenSSL-Win64\lib\VC
    OPENSSL_LIBS=ssleay32MT:libeay32MT

  3. Go through steps 1 to 5 described here:
    https://www.ibm.com/support/knowledgecenter/SSWHYP_4.0.0/com.ibm.apimgmt.cmc.doc/task_apionprem_gernerate_self_signed_openSSL.html

I put the file in my home folder and configured that path into the aip file.

I ran the create_installer.ps1 script again and it completed without any errors, and dutifully signing the msi (Windows installation) file!

However, running the installation file did not produce a working vault:

The installation wizard ran and completed without error, but there were problems when I tried to run the safe_vault.exe:

  1. Files were not in the right places. (I’ll cut this explanation short though by not describing everything)

  2. Safe_vault.exe would only run when run as administrator because there was some file it could not otherwise access.

  3. I got the same error as when I installed safe_vault manually ( see Pre-Dev-Update Thread! Yay! :D ):

“Failed to start listening to peers.”

This is alpha software (just saying…) as stated in the source code comments. But I’m wondering if the core devs are aware of these issues and do they welcome patches, since I seem to be coming up to speed with hacking this stuff. Or do I content myself with experimenting with it on Linux?

1 Like