Skip to content

Installing the Miva Merchant Compiler#


Now that you’ve set up your Miva Merchant Developer Store and have access to the Admin, FTP, and Database, the next step is to install the Miva Merchant Compiler.

Downloading the Compiler#

  1. Visit Miva.com:

    • Download the Miva Merchant Compiler from miva.com.
  2. Choose Your Operating System:

    • Select the appropriate version for your operating system (FreeBSD, Linux, or Windows).
  3. Run the Installer:

    • Execute the downloaded executable file (.exe on Windows).

Understanding the Compiler#

Upon installation, the Miva Merchant Compiler is set up on your computer. Let’s explore its components:

  • Installation Folder:

    • The compiler is installed in a designated folder (e.g., “msc”).
    • Within this folder, you’ll find subfolders such as API, BIN, BUILTINS, and EXAMPLES, along with license and release notes.
  • Executable Files:

    • The main executable file is MVC.exe, used for compiling MivaScript files (*.mv to *.mvc).
    • Additional utilities include mvcov.exe for code coverage and mvprof.exe for code profiling.
  • Path Configuration:

    • To use the compiler from any directory, add its location to the system’s PATH environment variable.
    • This ensures you can execute mvc commands from any directory without specifying the full path to the compiler executable.

Compiling MivaScript Files#

To compile MivaScript files, follow these steps:

  1. Open Command Prompt (Windows) or Terminal (Unix).

  2. Navigate to the Directory Containing Your MivaScript File.

  3. Compile the File:

    • Use the command mvc filename.mv to compile the MivaScript file.
    • The compiler will generate a compiled MivaScript file (filename.mvc) in the same directory.

Compiler Options#

The Miva Merchant Compiler offers various options:

  • -0 allows specifying the output file name.
  • --version displays the compiler version.
  • Use mvc --help to view all available options and commands.

Error Handling#

  • Syntax errors in MivaScript files are reported during compilation.
  • Compiler output provides details on errors, helping you debug and fix issues.

Conclusion#

The Miva Merchant Compiler is essential for developing Miva Merchant Modules. It converts uncompiled MivaScript files into executable .mvc files, which are integral to the Miva Merchant architecture.