Commit 0ce84af4 authored by Grant Kim's avatar Grant Kim
Browse files

Init

parents
MIT License
Copyright (c) 2015 Grant Kim
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# Papyrus Build Helper
## Overview
Papyrus Build Helper is a simple batch script for compile Papyrus source codes.
## Prerequisites
* Papyrus Compiler (Part of Creation Kit package)
## How to use
### Edit configurations
Open ```build.cmd``` and edit ```CCPATH``` to where Papyrus Compiler located.
Then, add or remove ```INCLUDEPATH``` to where additional ```psc``` files
located for a compile time.
### Build
```build.cmd -a``` to compile every ```psc``` files located in current
directory.
Or, ```build.cmd <YourFile.psc>``` to compile a single file.
```build.cmd --help``` for more details.
### License
This script released under ```MIT License```.
@echo off
REM Papyrus Compiler frontend
REM
REM Author: Grant Kim
REM Version: 1.0
REM
REM License: MIT License
REM
REM Copyright (c) 2015 Grant Kim
REM
REM Permission is hereby granted, free of charge, to any person obtaining a copy
REM of this software and associated documentation files (the "Software"), to deal
REM in the Software without restriction, including without limitation the rights
REM to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
REM copies of the Software, and to permit persons to whom the Software is
REM furnished to do so, subject to the following conditions:
REM
REM The above copyright notice and this permission notice shall be included in
REM all copies or substantial portions of the Software.
REM
REM THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
REM IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
REM FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
REM AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
REM LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
REM OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
REM THE SOFTWARE.
SETLOCAL
SET locSrc=./
SET locDest=../
SET addiParams=
REM
REM Please configure following parameters in here.
REM
REM Options:
REM CCPATH: Set where "Papyruscompiler.exe" located
REM INCLUDEPATH: Set where "imported" source codes located.
REM
SET CCPATH=D:\Steam\SteamApps\common\Skyrim\Papyrus Compiler
SET INCLUDEPATH=^
S:\Skyrim\SKSE;^
S:\Skyrim\SkyUI_SDK;^
S:\Skyrim\FNIS;^
S:\Skyrim\MfgConsole;^
S:\Skyrim\JContainers;^
S:\Skyrim\UIExtensions;^
S:\Skyrim\NetImmerseOverride;^
S:\Skyrim\XP32;^
S:\Skyrim\NiOverride;^
S:\Skyrim\Skyrim;^
goto main
:main
PATH=%CCPATH%;%PATH%
if [%1]==[] GOTO help
if [%1]==[clean] GOTO clean
if [%1]==[/c] GOTO clean
if [%1]==[--clean] GOTO clean
if [%1]==[--help] GOTO help
if [%1]==[help] GOTO help
if [%1]==[/?] GOTO help
if [%1]==[all] GOTO compileALL
if [%1]==[/a] GOTO compileALL
if [%1]==[--all] GOTO compileALL
if [%1]==[license] GOTO showLicense
if [%1]==[--license] GOTO showLicense
goto compileSingle
:clean
del ..\*.pex
goto end
:showLicense
echo Copyright (c) 2015 Grant Kim
echo.
echo Permission is hereby granted, free of charge, to any person obtaining a copy
echo of this software and associated documentation files (the "Software"), to deal
echo in the Software without restriction, including without limitation the rights
echo to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
echo copies of the Software, and to permit persons to whom the Software is
echo furnished to do so, subject to the following conditions:
echo.
echo The above copyright notice and this permission notice shall be included in
echo all copies or substantial portions of the Software.
echo.
echo THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
echo IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
echo FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
echo AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
echo LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
echo OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
echo THE SOFTWARE.
goto end
:help
echo.
echo Papyrus compiler frontend for Windows
echo Version 1.0
echo.
echo usage: %0 [file] [options]
echo.
echo [file] : Filename
echo Example: %0 foo.psc
echo.
echo Options:
echo.
echo --help /? Show this message
echo --clean /c Clean all compiled files.
echo --all /a Compile all source codes in current directory.
echo --license Show License
echo.
goto end
:compileSingle
papyruscompiler %* -f=TESV_Papyrus_Flags.flg -op^
-o="%locDest%" -import="%INCLUDEPATH%"
goto end
:invaildFile
echo File "%1%" is not a vaild papyrus source code.
echo program terminated.
goto end
:compileAll
papyruscompiler ./ -all -f=TESV_Papyrus_Flags.flg -op^
-o="%locDest%" -import="%INCLUDEPATH%"
goto end
:end
ENDLOCAL
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment