This guide explains how to set up and build the Windows application, including both the node-win
and drive-desktop
projects.
Before proceeding, ensure you have the following tools installed:
- Python (configured correctly).
- Node.js and yarn.
- node-gyp (global installation):
npm install -g node-gyp
- Visual Studio (not VS Code) for building native dependencies.
Clone the repositories into the following directory structure:
internxt
| - node-win
| - drive-desktop
- Open a terminal and navigate to the
node-win
directory. - Run the following command to build the project:
This step compiles the necessary native bindings for
yarn build
node-win
.
- Open a terminal and navigate to the
drive-desktop
directory. - Run the following command to build and start the project:
This will start the desktop application with the updated bindings.
yarn start:reload-bindings
- Ensure all dependencies are installed before running the build commands.
- If you encounter any issues, verify that your environment matches the prerequisites above.
With these steps, your Windows application setup will be complete and ready to use.
IMPORTANT: READ THE ENTIRE PROCESS CAREFULLY BEFORE PROCEEDING.
If you plan to manually sign a build for publication, follow these steps:
Run the command:
yarn package
This will generate an unsigned build and the following files:
Internxt Drive Setup 2.3.5.exe
Internxt Drive Setup 2.3.5.exe.blockmap
latest.yml
You need to sign the .exe
file using either DigiCert tools or the smctl
CLI.
- The
.p12
certificate - The
.p12
password - The API key
Follow the setup instructions in this guide: smctl Setup Guide.
-
Download and install smctl or DigiCert® KeyLocker.
- The MSI file can be requested from Fran, Sergio, or Jonathan.
-
If the DigiCert application does not open, navigate to:
C:\Program Files\DigiCert\Click to Sign
-
Open the Click to Sign application to configure the required environment variables.
Once configured, right-click on the .exe
file:
Show More Options -> DigiCert@ -> Sign Now
.
This will sign the application.
IMPORTANT: Signing the application will modify its SHA512 hash.
The latest.yml
file is critical for the auto-updater to function properly. It contains metadata about the latest release, including the SHA512 hash of the installer file. This hash ensures the integrity and authenticity of the application during the update process.
When the auto-updater checks for updates, it compares the file's hash with the one provided in latest.yml
. If they don't match, the update will fail or could raise security concerns, as it may indicate that the file has been tampered with.
Key Points:
- Integrity Verification: The SHA512 hash guarantees the installer hasn't been altered after signing.
- Update Success: Without an updated hash, the auto-updater cannot validate or complete the update process.
- Security Assurance: Prevents unauthorized or corrupted files from being installed on user systems.
The auto-updater in the application operates as follows:
- Checks for Updates:
- The application queries the server to fetch the
latest.yml
file, which contains metadata about the latest version.
- The application queries the server to fetch the
- Compares Versions:
- The current version installed on the user’s system is compared with the version specified in
latest.yml
.
- The current version installed on the user’s system is compared with the version specified in
- Validates File Integrity:
- The installer file's SHA512 hash is validated against the hash in
latest.yml
to ensure the file is authentic and unaltered.
- The installer file's SHA512 hash is validated against the hash in
- Downloads and Updates:
- If an update is available, the application downloads the new installer file and begins the update process seamlessly.
- Installs Update:
- The update is applied, and the application restarts with the new version.
To validate the new hash, use the following command:
CertUtil -hashfile ".\Internxt Drive Setup 2.3.5.exe" SHA512
This will output the new hash. You can compare the hash before and after signing to confirm the modification.
The latest.yml
file contains the SHA512 hash in Base64 format.
Here’s an example of the latest.yml
file structure:
version: 2.3.5
files:
- url: Internxt-Drive-Setup-2.3.5.exe
sha512: 19rbiabrWiNcfIC2l71wuP+boKwCnEFnxbnMry7ymJcOvOosRNqvUB5o3VMeAhubsxV3qdSOOP6mSNpjo9xGCQ==
size: 139542246
path: Internxt-Drive-Setup-2.3.5.exe
sha512: 19rbiabrWiNcfIC2l71wuP+boKwCnEFnxbnMry7ymJcOvOosRNqvUB5o3VMeAhubsxV3qdSOOP6mSNpjo9xGCQ==
releaseDate: '2025-01-23T15:42:56.531Z'
-
Convert the SHA512 hash to Base64: Use the script located at:
.erb\scripts\convert-hash.py
. -
Update the
sha512
field inlatest.yml
with the new Base64 hash value.
Finally, upload the following files to the release:
- The signed
.exe
file. - The
.blockmap
file. - The updated
latest.yml
file with the new hash.
By following these steps, you ensure that your release is signed, validated, and ready for publication.