Sfall-ScriptEditor

Форк
0
74 строки · 2.0 Кб
1
@echo off
2
rem *** Example user config for compiling script file ***
3

4
if not exist %1 goto NOFILE
5
set namescript=%~n1
6

7
rem Include files path
8
set ipath=%2
9

10
rem Path to compile scripts
11
set pathcompile=%3
12

13
rem Preprocessor definition for conditional compilation option
14
set def=
15
if not %4 == 0 (
16
	echo Build type: %4
17
	set def=-d%4%
18
) else (echo Build type: None)
19

20
rem Compiling with optimization level option
21
set optimize=%5
22

23
rem Compiling with Short-Circuit Evaluation option (last)
24
set shortCircuit=%7
25

26
rem Set name and path for preprocessing file
27
set prefile=..\scrTemp\%namescript%_[pre].ssl
28
if exist %prefile% del %prefile%
29
if exist %namescript%.ssl del /q %namescript%.ssl
30

31
echo -------------------------------------------------------------------------------
32
echo   Compilation script:
33
echo   %~6\%namescript%.ssl
34
echo -------------------------------------------------------------------------------
35
wcc386.exe %1 -p -fo=%namescript%.i -w -i=%ipath% %def%
36
if not exist %namescript%.i goto ERROR
37
echo   Preprocessing script: OK.
38

39
ren %namescript%.i %namescript%.ssl
40
if exist %namescript%.int del %namescript%.int
41

42
rem compiling script sfall compiler with BIS compatible mode
43
compile.exe -b -O%optimize% %namescript%.ssl
44

45
if exist %namescript%.int (
46
	echo   [BIS] Script compilation is completed.
47
	goto COMPILE
48
)
49
echo   [BIS] Compilation script error.
50
echo   Try sfall compiler.
51
echo -------------------------------------------------------------------------------
52
compile.exe -O%optimize% %shortCircuit% %namescript%.ssl
53
echo -------------------------------------------------------------------------------
54
if not exist %namescript%.int goto ERROR
55
echo   [SFALL] Script compilation is completed.
56

57
:COMPILE
58
move %namescript%.int %pathcompile%\%namescript%.int
59
del %namescript%.ssl
60
echo Script file is compiled into: %pathcompile:~1,-1%\%namescript%.int
61
goto DONE
62

63
:NOFILE
64
echo File script %1 is not found.
65
Exit 1
66
goto DONE
67

68
:ERROR
69
echo Compilation of script %namescript%.ssl error.
70
echo Look for an error in preprocessing file: %prefile%
71
move %namescript%.ssl %prefile%
72
Exit 1
73

74
:DONE

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.