Skip to content

Build & Deploy

How to build the application, what it depends on, how it is configured, and how it lands on a store PC. Everything here is Windows-only.

Building the application

Windows-only, no dotnet CLI

The build depends on Crystal Reports, COM interop (SQLDMO), and skinning DLLs. There is no cross-platform build and no modern dotnet path. You need Windows + Visual Studio 2008 (or a matching MSBuild) + the external dependencies.

The solution

smartsoft_inventory/INVENTORY.sln contains two projects:

Project Output Builds with
INVENTORY\SmartSoft.vbproj WinExe (the app) Visual Studio 2008 or MSBuild
SetupInventory\SetupInventory.vdproj Installer Visual Studio IDE only (not MSBuild)

Command-line build (the app project)

msbuild INVENTORY.sln /p:Configuration=Release /p:Platform="Any CPU"

Prerequisites on the build machine

  • Visual Studio 2008 (required for the setup project).
  • .NET Framework 3.5 SDK.
  • Crystal Reports (design + runtime).
  • The SmartSoft FrameWork DLLs at their expected HintPath locations (below).
  • COM/interop + skinning DLLs (SQLDMO, IrisSkin/Skinner, ChartFX.Lite, MessagingToolkit.QRCode, MyControl).

The external DLL dependency (most common build failure)

The app references the FrameWork via relative HintPaths pointing outside the repo..\..\FrameWork\..., ..\..\..\DLL\..., ..\..\..\1.JMS\.... The build fails unless those sibling directories and DLLs exist next to the checkout.

flowchart TB
    subgraph Machine["Build machine folder layout"]
        direction TB
        R["…\pos-system\smartsoft_inventory\INVENTORY\SmartSoft.vbproj"]
        A["…\FrameWork\*.dll"]
        B["…\DLL\*.dll"]
        C["…\1.JMS\*.dll"]
    end
    R -.->|"..\..\FrameWork"| A
    R -.->|"..\..\..\DLL"| B
    R -.->|"..\..\..\1.JMS"| C
    style A fill:#fff3e0,stroke:#fb8c00
    style B fill:#fff3e0,stroke:#fb8c00
    style C fill:#fff3e0,stroke:#fb8c00

The FrameWork source is in framework_smartsoft/ so you can rebuild the DLLs, but the app consumes them as compiled binaries at those paths.

Build fails? Check these four, in order

  1. Visual Studio 2008 / .NET 3.5 present? 2. FrameWork DLLs at their HintPaths?
  2. Crystal Reports installed? 4. COM/interop DLLs (SQLDMO, skinning) available/registered?

Configuration (Windows Registry)

The app reads its configuration from the Windows Registry at startup — there is no app.config for connection details.

Key: HKCU\Software\VB and VBA Program Settings\SmartSoft\SystemSetting\<AppName>

Value Meaning
ServerName SQL Server host / instance
DataBaseName Database name
UID / Password SQL Server login
DataBaseNameBackup Backup database name
Skin UI skin name
H2HServerName / H2HUserID / H2HPassword / H2HTID Host-to-host (payment) settings

All values are obfuscated

Every value is stored with the reversible CharToPass cipher and decoded with PassToChar on read. The connection string is then built at runtime with SQL authentication. See Security.

The settings UI (frmSystemSetting) is shown automatically when config is missing or the DB is unreachable.

Startup sequence on a client PC

flowchart TD
    A["Launch EXE → Sub Main"] --> B["Read registry config"]
    B --> C["Licence / expiry check<br/>(REF_SYSTEM + cloud API)"]
    C --> D["Build ConnStr, test connection"]
    D --> E["Version check (EXE timestamp)"]
    E --> F["Sync clock + locale to SQL Server"]
    F --> G["Validate DB structure"]
    G --> H["Show MenuUtama → login"]
    style F fill:#fff3e0,stroke:#fb8c00

See Session State & Globals for the full bootstrap detail.

Deployment topology

flowchart TB
    subgraph Branch["Each store / branch"]
        T1["Till PC<br/>(app + receipt printer + scanner)"]
        T2["Till PC"]
        BO["Back-office PC<br/>(reports, admin, closing)"]
    end
    SRV[("SQL Server<br/>store or HQ")]
    T1 & T2 & BO -->|ADO.NET / SQL| SRV
    SRV -.->|"closing / FTP / email sync"| HQ[("HQ / other branches")]
    style SRV fill:#e0f2f1,stroke:#00897b
  • Each PC runs the full fat client; there is no app server.
  • The installer (SetupInventory.vdproj) produces a per-PC install; config is seeded into the registry.
  • Branches exchange data through closing/sync processes (FTP / email via FrameWork.SmartSoft.Net), not services.

Runtime checklist (per client PC)

  • Windows + .NET Framework 3.5 runtime.
  • Crystal Reports runtime.
  • Network route to SQL Server.
  • Registry config seeded under the SmartSoft\SystemSetting\<AppName> key.
  • Peripherals (receipt printer, scanner, cash drawer) for till PCs — note the app may remap LPT1 via NET USE for receipt printing.