Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy over several Movement Unlocker changes + add Lua warning #1

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
AMBuilder linguist-generated=true
AMBuildScript linguist-generated=true
PackageScript linguist-generated=true
108 changes: 108 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: CI

on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main

jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
os: [windows-2022, ubuntu-latest]
include:
- os: windows-2022
- os: ubuntu-latest
container: registry.gitlab.steamos.cloud/steamrt/sniper/platform
steps:
- name: Install apt packages
if: runner.os == 'Linux'
run: |
apt update
apt install -y git python3 python3-setuptools clang

- name: Checkout
uses: actions/checkout@v4
with:
path: LuaUnlocker

- name: Checkout Metamod
uses: actions/checkout@v4
with:
repository: alliedmodders/metamod-source
ref: master
path: mmsource-2.0
submodules: recursive

- name: Checkout HL2SDK
uses: actions/checkout@v4
with:
repository: alliedmodders/hl2sdk
ref: cs2
path: hl2sdk-cs2

- name: Checkout AMBuild
uses: actions/checkout@v4
with:
repository: alliedmodders/ambuild
path: ambuild

- name: Install AMBuild
run: |
cd ambuild && python setup.py install && cd ..

- name: Build
working-directory: LuaUnlocker
shell: bash
run: |
mkdir build && cd build
python ../configure.py --enable-optimize --sdks cs2
ambuild

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }}
path: LuaUnlocker/build/package

release:
name: Release
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest

steps:
- name: Download artifacts
uses: actions/download-artifact@v3

- name: Package
run: |
version=`echo $GITHUB_REF | sed "s/refs\/tags\///"`
ls -Rall
if [ -d "./Linux/" ]; then
cd ./Linux/
tar -czf ../${{ github.event.repository.name }}-${version}-linux.tar.gz addons
cd -
fi
if [ -d "./Windows/" ]; then
cd ./Windows/
zip -r ../${{ github.event.repository.name }}-${version}-windows.zip addons
cd -
fi

- name: Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ github.event.repository.name }}-*
tag: ${{ github.ref }}
file_glob: true
4 changes: 3 additions & 1 deletion AMBuildScript

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
# LuaUnlocker
# Lua Unlocker

Enables the Lua VScripting language, now as a MetaMod plugin!

Build instructions (Windows)
**WARNING: Lua VScript is intentionally disabled by Valve! It is expected to be replaced by Pulse in the future, and will likely be completely removed from the game when that happens. Depend on Lua at your own risk.**

## Installation

- Install [Metamod](https://www.sourcemm.net/downloads.php?branch=dev)
- Download the [latest release package](https://github.com/Source2ZE/LuaUnlocker/releases/latest) for your OS
- Extract the package contents into `game/csgo` on your server

## Build Instructions

### Windows
```bash
git clone https://github.com/Source2ZE/LuaUnlocker/ && cd LuaUnlocker

Expand All @@ -14,7 +24,7 @@ python ../configure.py -s cs2
ambuild
```

Build instructions (Linux)
### Linux
```bash
git clone https://github.com/Source2ZE/LuaUnlocker/ && cd LuaUnlocker

Expand Down