# 快速上手

👤XIAOYI12 | 🕑2023-10-21 |


本页文档将教您如何快速使用OpenEX写出一个可以执行的脚本

# 下载

您可以通过OpenEX的GitHub存储库来下载到OpenEX的

  • *.jar Java应用程序
  • *.exe VCRuntime Win32 应用程序

GitHUB Releases (opens new window) 下载到我们的各个版本

提示

我们强烈建议您下载最新版OpenEX,因为最新版本修复了各种解析上的BUG. 您在将源代码拷贝下来的时候也不会因为解析BUG而自己手动修复

# 运行

# Java应用程序 Beta

对于JAVA应用程序,我们一般用于嵌入其他JAVA程序中,充当您的脚本解析器

# 运行环境

  • 操作系统:

    Windows10 或 11

    Ubuntu Linux LTS 18.04及以上

    MacOS Intel x86_64AArch64

  • Java 环境:

    OpenJDK 17.0.1 及以上版本

    GraalVM OpenJDK 17.0.8 及以上版本

# 命令行

Windows PowerShell

PS C:\Users\user_name> java -jar ./OpenEX-Pro-<version>.jar
1

Linux Terminal

[username@localhost ~]$ java -jar OpenEX-Pro-<version>.jar 
1

您会在您的终端看到类似以下输出

OpenEX Pro <version>
Runtime: MSVC SubstrateVM

Usage:
   -filename <filename>      Compile the file(Please separate multiple file names with ',')
   -compile                  Enable StamonVM compilation mode.
   -concur                   Enable concurrent compilation mode.
   -help                     Print help info about openex commands.
   -version                  Print version info.
   -debug                    Enable debug model.
1
2
3
4
5
6
7
8
9
10

命令参数详细功能讲解请往下翻

  • 目前为止您的OpenEX Java应用程序就算启动成功

# VCRuntime Win32 应用程序

# 运行环境

  • 操作系统: Windows10 或 11
  • MSVC Runtime: 2015-2022

# 命令行

在此之前,如果您打算使用OpenEX编写程序,那么我们建议您设置您的PATH系统变量以便您能在命令行中快速启动它

Windows PowerShell

PS C:\Users\user_name> openex
1

您会在您的终端看到类似以下输出

OpenEX Pro <version>
Runtime: MSVC SubstrateVM

Usage:
   -filename <filename>      Compile the file(Please separate multiple file names with ',')
   -compile                  Enable StamonVM compilation mode.
   -concur                   Enable concurrent compilation mode.
   -help                     Print help info about openex commands.
   -version                  Print version info.
   -debug                    Enable debug model.
1
2
3
4
5
6
7
8
9
10

# 命令行参数

参数 兼容版本 子参数 说明
-filename All v0.0.1 <文件名>, <文件名>... 编译并执行一个或多个脚本文件
-version All v0.0.1 empty 输出OpenEX版本号
-help All v0.0.1 empty 输出命令帮助信息
-debug All v0.1.5 empty 显示编译/运行时的Debug信息
-loadlib Plus v0.1.5 <扩展库>, <扩展库>... 加载外部扩展库
-compile Plus Pro v0.1.0 empty 开启StamonVM编译模式
-concur Pro v0.1.2 empty 开启并发编译模式
-language Plus Pro v0.1.5 <zh-CN|en-US> 切换输出语言