Compare commits
20 Commits
vB-5
..
49a1c41905
| Author | SHA1 | Date | |
|---|---|---|---|
| 49a1c41905 | |||
| 323462f13d | |||
| 1f1405391c | |||
| dd1a3468dd | |||
| 95d1496e5c | |||
| 7108402b13 | |||
| 61987d94f8 | |||
| 3046d2be62 | |||
| e8c10266ba | |||
| fa15b3c01d | |||
| 9e2d6057a7 | |||
| 7f6465437b | |||
| e322068640 | |||
| 1cf0104ae3 | |||
| cb4ec28be3 | |||
| 2fc5e98791 | |||
| c306074c07 | |||
| 3be81145da | |||
| 2089d28529 | |||
| 17fa158db4 |
Binary file not shown.
+102
@@ -0,0 +1,102 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Oraset Debian Package Builder
|
||||||
|
# This script packages Oraset into a .deb file for Debian/Ubuntu
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
PACKAGE_NAME="oraset"
|
||||||
|
VERSION="1.0.0"
|
||||||
|
ARCH="all"
|
||||||
|
MAINTAINER="Oraset Developer"
|
||||||
|
DESCRIPTION="A simple cross-platform programming language"
|
||||||
|
LICENSE="GPL-3.0"
|
||||||
|
|
||||||
|
# Get the directory where the script is located
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
cd "${SCRIPT_DIR}"
|
||||||
|
|
||||||
|
# Build directory
|
||||||
|
BUILD_DIR="orasetdeb"
|
||||||
|
PACKAGE_DIR="${BUILD_DIR}/${PACKAGE_NAME}_${VERSION}_${ARCH}"
|
||||||
|
|
||||||
|
echo "=== Oraset Debian Package Builder ==="
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Clean previous build
|
||||||
|
echo "[1/6] Cleaning previous build..."
|
||||||
|
rm -rf ${BUILD_DIR}
|
||||||
|
mkdir -p ${PACKAGE_DIR}
|
||||||
|
|
||||||
|
# Install PyInstaller if not present
|
||||||
|
echo "[2/6] Checking PyInstaller..."
|
||||||
|
if ! command -v pyinstaller &> /dev/null; then
|
||||||
|
echo "Installing PyInstaller..."
|
||||||
|
pip install --break-system-packages pyinstaller
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create binary with PyInstaller
|
||||||
|
echo "[3/6] Building binary with PyInstaller..."
|
||||||
|
pyinstaller --onefile --name oraset oraset.py
|
||||||
|
|
||||||
|
# Copy binary to package directory
|
||||||
|
echo "[4/6] Copying files..."
|
||||||
|
mkdir -p ${PACKAGE_DIR}/usr/bin
|
||||||
|
cp dist/oraset ${PACKAGE_DIR}/usr/bin/
|
||||||
|
|
||||||
|
# Create DEBIAN directory and control file
|
||||||
|
echo "[5/6] Creating package metadata..."
|
||||||
|
mkdir -p ${PACKAGE_DIR}/DEBIAN
|
||||||
|
|
||||||
|
cat > ${PACKAGE_DIR}/DEBIAN/control << EOF
|
||||||
|
Package: ${PACKAGE_NAME}
|
||||||
|
Version: ${VERSION}
|
||||||
|
Section: interpreters
|
||||||
|
Priority: optional
|
||||||
|
Architecture: ${ARCH}
|
||||||
|
Depends: python3
|
||||||
|
Maintainer: ${MAINTAINER}
|
||||||
|
Description: ${DESCRIPTION}
|
||||||
|
A simple cross-platform programming language written in Python.
|
||||||
|
Supports Windows and Linux, with features like variables,
|
||||||
|
functions, classes, conditional statements, loops, and more.
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Create copyright file
|
||||||
|
mkdir -p ${PACKAGE_DIR}/usr/share/doc/${PACKAGE_NAME}
|
||||||
|
cat > ${PACKAGE_DIR}/usr/share/doc/${PACKAGE_NAME}/copyright << EOF
|
||||||
|
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
|
Upstream-Name: ${PACKAGE_NAME}
|
||||||
|
Upstream-Contact: ${MAINTAINER}
|
||||||
|
Source: https://github.com/oraset/oraset
|
||||||
|
|
||||||
|
Files: *
|
||||||
|
Copyright: ${LICENSE}
|
||||||
|
License: GPL-3.0
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License.
|
||||||
|
.
|
||||||
|
On a Debian system, you can find the complete text of the GPL-3.0
|
||||||
|
license in /usr/share/common-licenses/GPL-3.
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Build the .deb package
|
||||||
|
echo "[6/6] Building .deb package..."
|
||||||
|
dpkg-deb --build ${PACKAGE_DIR}
|
||||||
|
|
||||||
|
# Move package to current directory
|
||||||
|
mv ${PACKAGE_DIR}.deb ${BUILD_DIR}/
|
||||||
|
|
||||||
|
# Clean up PyInstaller build files
|
||||||
|
rm -rf build dist
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "=== Build Complete ==="
|
||||||
|
echo "Package created: ${BUILD_DIR}/${PACKAGE_NAME}_${VERSION}_${ARCH}.deb"
|
||||||
|
echo ""
|
||||||
|
echo "To install the package, run:"
|
||||||
|
echo " sudo dpkg -i ${BUILD_DIR}/${PACKAGE_NAME}_${VERSION}_${ARCH}.deb"
|
||||||
|
echo ""
|
||||||
|
echo "To uninstall the package, run:"
|
||||||
|
echo " sudo dpkg -r ${PACKAGE_NAME}"
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
Hello, Oraset!
|
||||||
|
This is a test file.
|
||||||
@@ -34,11 +34,13 @@
|
|||||||
<h2>最新版本:B-5</h2>
|
<h2>最新版本:B-5</h2>
|
||||||
<p class="version-note">构建日期: 2026.7.22 | 全新升级版本</p>
|
<p class="version-note">构建日期: 2026.7.22 | 全新升级版本</p>
|
||||||
|
|
||||||
<h2>Windows <span class="version-badge">B-5</span></h2>
|
<h2>源码下载</h2>
|
||||||
<p><strong>EXE 可执行文件</strong></p>
|
<p>如果您想从源码编译 Oraset:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="download/exe/Oraset-B-5.exe">Oraset-B-5.exe</a></li>
|
<li><a href="download/source/Oraset-B5-source.tar.gz">Oraset-B5-source.tar.gz</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<p>编译方法:</p>
|
||||||
|
<pre>make</pre>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -1,26 +0,0 @@
|
|||||||
CC = gcc
|
|
||||||
CFLAGS = -Wall -Wextra -O2 -std=c11
|
|
||||||
BINDIR = bin
|
|
||||||
|
|
||||||
TARGET = $(BINDIR)/oraset
|
|
||||||
|
|
||||||
SRCS = src/main.c
|
|
||||||
|
|
||||||
all: $(TARGET)
|
|
||||||
|
|
||||||
$(TARGET): $(SRCS)
|
|
||||||
@mkdir -p $(BINDIR)
|
|
||||||
$(CC) $(CFLAGS) -o $(TARGET) $(SRCS)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f $(TARGET)
|
|
||||||
rm -rf $(BINDIR)
|
|
||||||
|
|
||||||
pkg: all
|
|
||||||
rm -rf pkg-root
|
|
||||||
mkdir -p pkg-root/usr/local/bin
|
|
||||||
cp bin/oraset pkg-root/usr/local/bin/oraset
|
|
||||||
chmod +x pkg-root/usr/local/bin/oraset
|
|
||||||
pkgbuild --root pkg-root --identifier com.oraset.lang --version B-5 --install-location / Oraset-B5.pkg
|
|
||||||
|
|
||||||
.PHONY: all clean pkg
|
|
||||||
File diff suppressed because it is too large
Load Diff
+13
-30
@@ -33,46 +33,29 @@
|
|||||||
<p>Version: <strong>B-5</strong></p>
|
<p>Version: <strong>B-5</strong></p>
|
||||||
|
|
||||||
<h2>关于</h2>
|
<h2>关于</h2>
|
||||||
<p>Oraset 是一个现代化的 C++ 风格脚本语言,功能强大且易于使用。</p>
|
<p>Oraset 是一个简洁高效的解释型编程语言,专为简单任务和脚本编写设计。</p>
|
||||||
|
|
||||||
<h2>特性</h2>
|
<h2>特性</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>C++ 风格语法设计</li>
|
<li>简洁直观的语法</li>
|
||||||
<li>轻量级解释器(纯 C 实现)</li>
|
<li>轻量级解释器</li>
|
||||||
<li>变量定义(let 关键字)</li>
|
<li>变量和表达式支持</li>
|
||||||
<li>数组支持(创建、访问、修改)</li>
|
<li>条件语句和循环</li>
|
||||||
<li>自定义函数(proc 关键字)</li>
|
<li>灵活的输出控制(print 函数)</li>
|
||||||
<li>条件语句(if-else)</li>
|
<li>数组支持</li>
|
||||||
<li>循环语句(while、for、do-while)</li>
|
<li>自定义函数</li>
|
||||||
<li>switch-case 语句</li>
|
|
||||||
<li>goto 语句和标签</li>
|
|
||||||
<li>break 和 continue</li>
|
|
||||||
<li>位运算符(&、|、^、~、<<、>>)</li>
|
|
||||||
<li>复合赋值运算符(+=、-=、*=、/=、%=)</li>
|
|
||||||
<li>自增自减运算符(++、--)</li>
|
|
||||||
<li>结构体(struct)</li>
|
|
||||||
<li>枚举(enum)</li>
|
|
||||||
<li>类型别名(typedef)</li>
|
|
||||||
<li>丰富的内置函数(数学、字符串、数组)</li>
|
<li>丰富的内置函数(数学、字符串、数组)</li>
|
||||||
|
<li>复合赋值和自增自减运算符</li>
|
||||||
<li>REPL 交互模式</li>
|
<li>REPL 交互模式</li>
|
||||||
<li>跨平台支持(Windows、macOS、Linux)</li>
|
<li>跨平台支持(Windows、macOS、Linux)</li>
|
||||||
|
<li>自动更新功能(oraset -u)</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2>快速开始</h2>
|
<h2>快速开始</h2>
|
||||||
<pre>// hello.ora
|
<pre>// hello.ora
|
||||||
echo("Hello, World!");
|
print("Hello, World!");
|
||||||
let x = 42;
|
var x = 42;
|
||||||
echo("The value is:", x);
|
print("The value is:", x);</pre>
|
||||||
|
|
||||||
// 数组
|
|
||||||
let arr = [1, 2, 3];
|
|
||||||
echo(arr[0]);
|
|
||||||
|
|
||||||
// 函数
|
|
||||||
proc add(a, b) {
|
|
||||||
return a + b;
|
|
||||||
}
|
|
||||||
echo(add(10, 20));</pre>
|
|
||||||
|
|
||||||
<p>运行:<code>oraset hello.ora</code></p>
|
<p>运行:<code>oraset hello.ora</code></p>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user