mirror of
https://github.com/janet-lang/janet
synced 2025-01-10 23:50:26 +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
|
||||
/src/include/generated/*.h
|
||||
janet-*.tar.gz
|
||||
dist
|
||||
|
||||
# Emscripten
|
||||
*.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 \
|
||||
janet.1 LICENSE CONTRIBUTING.md $(JANET_LIBRARY) \
|
||||
build/doc.html README.md $(wildcard doc/*)
|
||||
build/doc.html README.md $(wildcard doc/*.md)
|
||||
tar -czvf $@ $^
|
||||
|
||||
#########################
|
||||
|
@ -20,7 +20,10 @@ init:
|
||||
install:
|
||||
- build_win
|
||||
- build_win test
|
||||
- choco install nsis -y -pre
|
||||
- call "C:\Program Files (x86)\NSIS\makensis.exe" janet-installer.nsi
|
||||
- build_win dist
|
||||
- copy janet-install.exe dist\install.exe
|
||||
|
||||
build: off
|
||||
|
||||
|
@ -100,7 +100,6 @@ copy README.md dist\README.md
|
||||
copy janet.lib dist\janet.lib
|
||||
copy janet.exp dist\janet.exp
|
||||
copy src\include\janet\janet.h dist\janet.h
|
||||
xcopy /s doc dist\doc
|
||||
exit /b 0
|
||||
|
||||
: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)
|
||||
#define JANET_CHECKMANY(A, N, TS) do {\
|
||||
if ((A).n > (N)) {\
|
||||
JanetType t = janet_type((A).v[(N)]);\
|
||||
if (!((1 << t) & (TS))) return janet_typemany_err(A, N, TS);\
|
||||
JanetType _t_ = janet_type((A).v[(N)]);\
|
||||
if (!((1 << _t_) & (TS))) return janet_typemany_err(A, N, TS);\
|
||||
} else {\
|
||||
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 {\
|
||||
if ((A).n > (N)) {\
|
||||
Janet x = (A).v[(N)];\
|
||||
if (!janet_checktype(x, JANET_ABSTRACT) ||\
|
||||
janet_abstract_type(janet_unwrap_abstract(x)) != (AT))\
|
||||
Janet _x_ = (A).v[(N)];\
|
||||
if (!janet_checktype(_x_, JANET_ABSTRACT) ||\
|
||||
janet_abstract_type(janet_unwrap_abstract(_x_)) != (AT))\
|
||||
return janet_typeabstract_err(A, N, AT);\
|
||||
} else {\
|
||||
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)
|
||||
|
||||
#define JANET_ARG_NUMBER(DEST, A, N) do { \
|
||||
if ((A).n <= (N)) \
|
||||
return janet_typemany_err(A, N, JANET_TFLAG_NUMBER);\
|
||||
Janet val = (A).v[(N)];\
|
||||
if (janet_checktype(val, JANET_REAL)) { \
|
||||
DEST = janet_unwrap_real(val); \
|
||||
} else if (janet_checktype(val, JANET_INTEGER)) {\
|
||||
DEST = (double) janet_unwrap_integer(val);\
|
||||
}\
|
||||
else return janet_typemany_err(A, N, JANET_TFLAG_NUMBER); \
|
||||
if ((A).n <= (N)) return janet_typemany_err(A, N, JANET_TFLAG_NUMBER); \
|
||||
Janet _val_ = (A).v[(N)];\
|
||||
JanetType _type_ = janet_type(_val_); \
|
||||
if (_type_ == JANET_REAL) { \
|
||||
DEST = janet_unwrap_real(_val_); \
|
||||
} else if (_type_ == JANET_INTEGER) {\
|
||||
DEST = (double) janet_unwrap_integer(_val_);\
|
||||
} else { \
|
||||
return janet_typemany_err(A, N, JANET_TFLAG_NUMBER); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define JANET_ARG_BOOLEAN(DEST, A, N) do { \
|
||||
|
Loading…
Reference in New Issue
Block a user