Sheerpower Logo

J.1  Building and Deploying


Deploying (or building) a SheerPower program is similar to compiling and linking. Deployment is optional—it’s used to protect your source code from being viewed or modified and does not affect how your program runs.

Note: Deploying your SheerPower program is optional and does not affect runtime performance. Deployment protects your source code from being viewed or modified and enables secure, portable distribution.

For example, deploying MyProgram.spsrc creates MyProgram.sprun. The .sprun file contains compressed, base64-encoded, and encrypted text that hides the program’s source code. To run a .sprun file, the receiver can either install SheerPower, or you can provide them with a copy of sp4gl.exe, renamed as desired (e.g., MyProgram.exe). Place this renamed file in the same folder as MyProgram.sprun. Running MyProgram.exe will then execute the deployed program.

How to create a .sprun file:

  • SPDEV: Open your source file and use the Deploy option.
  • VS Code: Press the F6 key.
  • Command line:
    sp4gl.exe myprogram /build
    For large projects, this is often included in a Windows batch file.

The SheerPower SPRUN File Format: A Comprehensive Overview

1. Overview

The SheerPower Portable Runnable Image (.sprun) is a deployment format purpose-built for commercial software. Far more than simple obfuscation, it’s a sophisticated container that provides robust source code protection, fast startup, and secure, flexible licensing.

2. Core Objectives of the SPRUN Format

  1. Source code protection
  2. Guaranteed portability
  3. Startup enhancement
  4. Secure and flexible licensing

3. The Three-Stage Creation Process

  1. Compress: The main source file and all files included with %include are first merged together, then the combined content is compressed to reduce file size.
  2. Encrypt: The compressed data is encrypted for full security.
  3. Base64 Encode: Encrypted data is encoded to 7-bit ASCII for safe transmission and storage.

4. Anatomy of a SPRUN File

A SPRUN file includes three main sections:

  • A header identifying the file format
  • A --required block for legal text and metadata
  • A --code block containing base64-encrypted data
*************************************************** ** SheerPower Portable Runable Image (SPRUN) ** *************************************************** --required ------------------------------------------------------------ Any attempt to reverse engineer this program is a violation of Copyright and License Agreements and is understood to cause extreme harm to the Copyright Holder. ------------------------------------------------------------ Deployment ID: 3234-3132-3331-3939-78 --end_required --code msfGXminJ40aWn6STdL1T7Kp9KzG4K+4tvV5Lruk2oBcqMQFsNS54ZutmVyMr3KouGgwK4tk xjUGNepSTeFg3LDWw=gZZOaR+mZPBo8tpS3wsZluXnZFek/x==hmZPf+SmLaBo8kJj8M2kvh oXJZm/9hgK0MtVsjamzPhq3tWkL+jikfXA+sqGcYI+n25ErtnmzaXb/Y2wSDQ= --end_code

5. Advanced Features and Implications

A. Performance Enhancement: The "Unity Build"

All %include files are bundled into a single in-memory buffer, eliminating file system latency. The runtime lexer benefits from uninterrupted, high-speed parsing. For large projects, SPRUN files often start faster than raw source code.

B. Security Feature 1: Active Tamper-Proofing

The --required block is hashed into the decryption key. Changing any character invalidates the hash, making the SPRUN file unusable.

C. Security Feature 2: Secure, Custom Metadata for Licensing

For licensing, developers can embed custom text into the tamper-proof --required section using the %compile "your text here" directive. This can include client names, license keys, expiration dates, or feature flags. Because it becomes part of the hashed block, any tampering will invalidate the file—making license enforcement secure and automatic.

%compile "Client: Acme Corp" %compile "LicenseKey: ABC123-XYZ789" %compile "Expires: 2026-12-31"

6. Conclusion

The SPRUN format is a cohesive, high-performance deployment solution that protects your code, accelerates startup, and enables secure commercial distribution—fully integrated with the SheerPower Virtual Machine.

Hide Description

    

       


      

Enter or modify the code below, and then click on RUN

Looking for the full power of Sheerpower?
Check out the Sheerpower website. Free to download. Free to use.