mirror of
https://github.com/janet-lang/janet
synced 2025-06-21 07:54:12 +00:00
Merge branch 'master' of github.com:bakpakin/janet
This commit is contained in:
commit
6c91e5fae0
1
.gitignore
vendored
1
.gitignore
vendored
@ -10,6 +10,7 @@ janet
|
|||||||
/Emscripten
|
/Emscripten
|
||||||
/src/include/generated/*.h
|
/src/include/generated/*.h
|
||||||
janet-*.tar.gz
|
janet-*.tar.gz
|
||||||
|
dist
|
||||||
|
|
||||||
# Emscripten
|
# Emscripten
|
||||||
*.bc
|
*.bc
|
||||||
|
2
Makefile
2
Makefile
@ -157,7 +157,7 @@ dist: build/janet-dist.tar.gz
|
|||||||
|
|
||||||
build/janet-%.tar.gz: $(JANET_TARGET) src/include/janet/janet.h \
|
build/janet-%.tar.gz: $(JANET_TARGET) src/include/janet/janet.h \
|
||||||
janet.1 LICENSE CONTRIBUTING.md $(JANET_LIBRARY) \
|
janet.1 LICENSE CONTRIBUTING.md $(JANET_LIBRARY) \
|
||||||
build/doc.html README.md $(wildcard doc/*)
|
build/doc.html README.md $(wildcard doc/*.md)
|
||||||
tar -czvf $@ $^
|
tar -czvf $@ $^
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
|
@ -20,7 +20,10 @@ init:
|
|||||||
install:
|
install:
|
||||||
- build_win
|
- build_win
|
||||||
- build_win test
|
- build_win test
|
||||||
|
- choco install nsis -y -pre
|
||||||
|
- call "C:\Program Files (x86)\NSIS\makensis.exe" janet-installer.nsi
|
||||||
- build_win dist
|
- build_win dist
|
||||||
|
- copy janet-install.exe dist\install.exe
|
||||||
|
|
||||||
build: off
|
build: off
|
||||||
|
|
||||||
|
@ -100,7 +100,6 @@ copy README.md dist\README.md
|
|||||||
copy janet.lib dist\janet.lib
|
copy janet.lib dist\janet.lib
|
||||||
copy janet.exp dist\janet.exp
|
copy janet.exp dist\janet.exp
|
||||||
copy src\include\janet\janet.h dist\janet.h
|
copy src\include\janet\janet.h dist\janet.h
|
||||||
xcopy /s doc dist\doc
|
|
||||||
exit /b 0
|
exit /b 0
|
||||||
|
|
||||||
:TESTFAIL
|
:TESTFAIL
|
||||||
|
55
janet-installer.nsi
Normal file
55
janet-installer.nsi
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
!define MULTIUSER_EXECUTIONLEVEL Highest
|
||||||
|
!define MULTIUSER_MUI
|
||||||
|
!define MULTIUSER_INSTALLMODE_COMMANDLINE
|
||||||
|
!define MULTIUSER_INSTALLMODE_INSTDIR "janet"
|
||||||
|
!include "MultiUser.nsh"
|
||||||
|
!include "MUI2.nsh"
|
||||||
|
|
||||||
|
Name "Janet"
|
||||||
|
OutFile "janet-install.exe"
|
||||||
|
|
||||||
|
!define MUI_ABORTWARNING
|
||||||
|
|
||||||
|
!insertmacro MUI_PAGE_WELCOME
|
||||||
|
!insertmacro MUI_PAGE_LICENSE "LICENSE"
|
||||||
|
!insertmacro MUI_PAGE_COMPONENTS
|
||||||
|
!insertmacro MULTIUSER_PAGE_INSTALLMODE
|
||||||
|
!insertmacro MUI_PAGE_DIRECTORY
|
||||||
|
|
||||||
|
!insertmacro MUI_PAGE_INSTFILES
|
||||||
|
|
||||||
|
!insertmacro MUI_PAGE_FINISH
|
||||||
|
|
||||||
|
!insertmacro MUI_UNPAGE_CONFIRM
|
||||||
|
!insertmacro MUI_UNPAGE_INSTFILES
|
||||||
|
|
||||||
|
!insertmacro MUI_LANGUAGE "English"
|
||||||
|
|
||||||
|
Section "Janet" BfWSection
|
||||||
|
SetOutPath $INSTDIR
|
||||||
|
File "janet.exe"
|
||||||
|
WriteUninstaller "$INSTDIR\janet-uninstall.exe"
|
||||||
|
|
||||||
|
# Start Menu
|
||||||
|
CreateShortCut "$SMPROGRAMS\Janet.lnk" "$INSTDIR\janet.exe" "" ""
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Function .onInit
|
||||||
|
!insertmacro MULTIUSER_INIT
|
||||||
|
!insertmacro MUI_LANGDLL_DISPLAY
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
|
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${BfWSection} "The Janet programming language."
|
||||||
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||||
|
|
||||||
|
Section "Uninstall"
|
||||||
|
Delete "$INSTDIR\janet.exe"
|
||||||
|
Delete "$INSTDIR\janet-uninstall.exe"
|
||||||
|
RMDir "$INSTDIR"
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Function un.onInit
|
||||||
|
!insertmacro MULTIUSER_UNINIT
|
||||||
|
!insertmacro MUI_UNGETLANGUAGE
|
||||||
|
FunctionEnd
|
@ -1158,8 +1158,8 @@ JANET_API int janet_typeabstract_err(JanetArgs args, int32_t n, const JanetAbstr
|
|||||||
} while (0)
|
} while (0)
|
||||||
#define JANET_CHECKMANY(A, N, TS) do {\
|
#define JANET_CHECKMANY(A, N, TS) do {\
|
||||||
if ((A).n > (N)) {\
|
if ((A).n > (N)) {\
|
||||||
JanetType t = janet_type((A).v[(N)]);\
|
JanetType _t_ = janet_type((A).v[(N)]);\
|
||||||
if (!((1 << t) & (TS))) return janet_typemany_err(A, N, TS);\
|
if (!((1 << _t_) & (TS))) return janet_typemany_err(A, N, TS);\
|
||||||
} else {\
|
} else {\
|
||||||
if (!((TS) & JANET_NIL)) return janet_typemany_err(A, N, TS);\
|
if (!((TS) & JANET_NIL)) return janet_typemany_err(A, N, TS);\
|
||||||
}\
|
}\
|
||||||
@ -1167,9 +1167,9 @@ JANET_API int janet_typeabstract_err(JanetArgs args, int32_t n, const JanetAbstr
|
|||||||
|
|
||||||
#define JANET_CHECKABSTRACT(A, N, AT) do {\
|
#define JANET_CHECKABSTRACT(A, N, AT) do {\
|
||||||
if ((A).n > (N)) {\
|
if ((A).n > (N)) {\
|
||||||
Janet x = (A).v[(N)];\
|
Janet _x_ = (A).v[(N)];\
|
||||||
if (!janet_checktype(x, JANET_ABSTRACT) ||\
|
if (!janet_checktype(_x_, JANET_ABSTRACT) ||\
|
||||||
janet_abstract_type(janet_unwrap_abstract(x)) != (AT))\
|
janet_abstract_type(janet_unwrap_abstract(_x_)) != (AT))\
|
||||||
return janet_typeabstract_err(A, N, AT);\
|
return janet_typeabstract_err(A, N, AT);\
|
||||||
} else {\
|
} else {\
|
||||||
return janet_typeabstract_err(A, N, AT);\
|
return janet_typeabstract_err(A, N, AT);\
|
||||||
@ -1177,15 +1177,16 @@ JANET_API int janet_typeabstract_err(JanetArgs args, int32_t n, const JanetAbstr
|
|||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define JANET_ARG_NUMBER(DEST, A, N) do { \
|
#define JANET_ARG_NUMBER(DEST, A, N) do { \
|
||||||
if ((A).n <= (N)) \
|
if ((A).n <= (N)) return janet_typemany_err(A, N, JANET_TFLAG_NUMBER); \
|
||||||
return janet_typemany_err(A, N, JANET_TFLAG_NUMBER);\
|
Janet _val_ = (A).v[(N)];\
|
||||||
Janet val = (A).v[(N)];\
|
JanetType _type_ = janet_type(_val_); \
|
||||||
if (janet_checktype(val, JANET_REAL)) { \
|
if (_type_ == JANET_REAL) { \
|
||||||
DEST = janet_unwrap_real(val); \
|
DEST = janet_unwrap_real(_val_); \
|
||||||
} else if (janet_checktype(val, JANET_INTEGER)) {\
|
} else if (_type_ == JANET_INTEGER) {\
|
||||||
DEST = (double) janet_unwrap_integer(val);\
|
DEST = (double) janet_unwrap_integer(_val_);\
|
||||||
}\
|
} else { \
|
||||||
else return janet_typemany_err(A, N, JANET_TFLAG_NUMBER); \
|
return janet_typemany_err(A, N, JANET_TFLAG_NUMBER); \
|
||||||
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define JANET_ARG_BOOLEAN(DEST, A, N) do { \
|
#define JANET_ARG_BOOLEAN(DEST, A, N) do { \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user