< Back

Compile-SourceScript

Mon Jan 13, 2020 4:12 am

NAME Compile-SourceScript



SYNOPSIS

A wrapper for compiling SourceMod (.sp) and AMX Mod X (.sma) plugin source files for Source / Goldsource games.





SYNTAX

Compile-SourceScript [-File] <String> [-SkipWrapper] [-Force] [<CommonParameters>]





DESCRIPTION

Specified plugins are compiled and subsequently copied into the mod's plugins directory if found to be new or have

been changed.





PARAMETERS

-File <String>

Path to the plugin's source file (.sp or .sma).



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SkipWrapper [<SwitchParameter>]

To directly run the mod's compiler instead of using provided wrappers (such as 'compile.exe' and 'compile.sh')

in the compilation process.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Force [<SwitchParameter>]

Copies the newly compiled plugin to the mod's plugins directory without user confirmation.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Compile-SourceScript -File ~/servers/csgo/addons/sourcemod/scripting/plugin1.sp



Compiles the SourceMod plugin source file 'plugin1.sp', and installs the compiled plugin with user confirmation

for the game Counter-Strike: Global Offensive.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Compile-SourceScript -File ~/servers/cstrike/addons/amxmodx/scripting/plugin2.sma -SkipWrapper -Force



Compiles the AMX Mod X plugin source file 'plugin2.sma' without using the mod's compiler wrapper, and installs the

compiled plugin without user confirmation for the game Counter-Strike 1.6.











RELATED LINKS

https://github.com/startersclan/Compile-SourceScript