Packaging for Windows
Three bindings, three packaging paths. Each one ties back to a working build script in the respective Console Example.
C++ (Visual Studio)
- 1
- 2
Wire Visual Studio
Project properties, Release | x64:
- C/C++ → General → Additional Include Directories - add the folder holding
Atlas.h. - Linker → General → Additional Library Directories - same folder.
- Linker → Input → Additional Dependencies - add
Atlas Auth.lib;. The filename contains a space; include it as-is.
- C/C++ → General → Additional Include Directories - add the folder holding
- 3C++#include <Atlas.h>#include <iostream>int main() {Atlas::API_KEY = "YOUR_API_KEY";Atlas::Startup();std::string key = prompt_user_for_license();if (!Atlas::License::Login(key)) {std::cerr << Atlas::Data::GetErrorMessage();return 1;}run_my_application(); // authenticatedreturn 0;}
- 4
JavaScript (Node + pkg)
- 1
- 2
- 3
Require it and call Startup()
The DLL is loaded once at
require()time - the binding probesprocess.resourcesPath(Electron),dirname(process.execPath), and finally__dirname/..in that order.ATLAS_DLL_PATHwins. Under pkg the bundled DLL is extracted to a temp file at launch.JavaScriptconst atlas = require('@atlassecurity/auth');atlas.API_KEY = process.env.ATLAS_KEY;atlas.Startup();const key = promptUserForLicense();if (!atlas.License.Login(key)) {console.log(atlas.Data.GetErrorMessage());process.exit(1);}runMyApplication(); // authenticated - 4
Python (PyInstaller)
- 1
pip install the wheel (or vendor it)
Install
atlas-authfrom PyPI or vendor it into your project. On 1.0.3 and earlier a pip install putsAtlas.dllatsys.prefixwhile the binding looked besidesite-packages- update, or see Troubleshooting.pyproject.tomldeclares the package nameatlas-auth, Python>=3.9, x64.Terminal# From PyPI:$ pip install atlas-auth# Or vendor it - Python looks beside the atlas/ package:myapp/├── atlas/ ← the Python package├── Atlas.dll ← the runtime sidecar└── main.py - 2
Set the API key and call Startup()
The DLL is loaded once at
import atlastime. The probe order:ATLAS_DLL_PATHenv var, then besidesys.executable, then beside the package.Pythonimport atlas, sys, osatlas.API_KEY = os.environ["ATLAS_KEY"]atlas.Startup()key = input("License: ")if not atlas.License.Login(key):print(atlas.Data.GetErrorMessage())sys.exit(1)run_my_application() # authenticated - 3
After you ship
Drop your final .exe into Dashboard → Settings → Builds (Add hash) - the dashboard computes the SHA-256 for you. See Executable Hash Whitelist for what to whitelist in each binding.