forked from UNLOZE/sm-plugins
Added python scripts for easier compiling
Fixed bunch of includes and a warnings Added ip addresses for admins to status KnifeAlert prints to everyone now if someone gets infected due to a knifed zombie Fixed WeaponCleaner not registering weapons if somebody disconnects Refactored custom-chatcolors to new syntax, added autoreplace and some fixes Added GFLClan.ru support to immunityreservedslots added nominate_removemap to mapchooser_extended and fixed a bug for recently played maps
This commit is contained in:
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/python3
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
SM_INCLUDES = "includes"
|
||||
SPCOMP = "./spcomp"
|
||||
|
||||
if __name__ == "__main__":
|
||||
Plugins = []
|
||||
Path, Directories, Files = next(os.walk("."))
|
||||
for Directory in Directories:
|
||||
if Directory != ".git" and Directory != "include" and Directory != "includes" and Directory != "plugins":
|
||||
Plugins.append(Directory)
|
||||
|
||||
for Plugin in Plugins:
|
||||
print("Compiling {0}".format(Plugin))
|
||||
|
||||
SourcePath = os.path.join(Plugin, "scripting")
|
||||
Path, Directories, Files = next(os.walk(SourcePath))
|
||||
for File in Files:
|
||||
if File.endswith(".sp"):
|
||||
SourcePath = os.path.join(Path, File)
|
||||
IncludePath = os.path.join(Path, "include")
|
||||
OutDir = "plugins"
|
||||
OutPath = os.path.join(OutDir, os.path.splitext(os.path.basename(SourcePath))[0] + ".smx")
|
||||
|
||||
Compiler = [SPCOMP, "-i" + SM_INCLUDES]
|
||||
if os.path.isdir(IncludePath):
|
||||
Compiler.append("-i" + IncludePath)
|
||||
Compiler.append(SourcePath)
|
||||
Compiler.append("-o" + OutPath)
|
||||
|
||||
try:
|
||||
subprocess.run(Compiler, check=True)
|
||||
except Exception:
|
||||
sys.exit(1)
|
||||
Reference in New Issue
Block a user