1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-24 23:40:27 +00:00

Windows installer pulls version from interpreter.

This should make version updates simpler. Also
try an make installer write to ProgramFiles instead
of ProgramFiles (x86) for 64 bit build.
This commit is contained in:
Calvin Rose 2019-12-19 13:18:46 -05:00
parent e28262f5ab
commit 3492ed6d88
3 changed files with 9 additions and 5 deletions

View File

@ -157,7 +157,11 @@ copy auxbin\jpm dist\jpm
copy tools\jpm.bat dist\jpm.bat
@rem Create installer
"C:\Program Files (x86)\NSIS\makensis.exe" janet-installer.nsi
janet.exe -e "(print janet/version)" > build\version.txt
janet.exe -e "(print (= (os/arch) :x64))" > build\64bit.txt
set /p JANET_VERSION= < build\version.txt
set /p SIXTYFOUR= < build\64bit.txt
"C:\Program Files (x86)\NSIS\makensis.exe" janet-installer.nsi /DVERSION=%JANET_VERSION% /DSIXTYFOUR=%SIXTYFOUR%
exit /b 0
@rem Run the installer. (Installs to the local user with default settings)

View File

@ -1,5 +1,4 @@
# Version
!define VERSION "1.6.0"
!define PRODUCT_VERSION "${VERSION}.0"
VIProductVersion "${PRODUCT_VERSION}"
VIFileVersion "${PRODUCT_VERSION}"
@ -14,8 +13,9 @@ VIFileVersion "${PRODUCT_VERSION}"
!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME ""
!define MULTIUSER_INSTALLMODE_INSTDIR "Janet-${VERSION}"
# For now, use 32 bit folder as build is 32 bit
# !define MULTIUSER_USE_PROGRAMFILES64
!if ${SIXTYFOUR} == "true"
!define MULTIUSER_USE_PROGRAMFILES64
!endif
# Includes
!include "MultiUser.nsh"

View File

@ -110,7 +110,7 @@ static Janet os_arch(int32_t argc, Janet *argv) {
#elif defined(__EMSCRIPTEN__)
return janet_ckeywordv("wasm");
#elif (defined(__x86_64__) || defined(_M_X64))
return janet_ckeywordv("x86-64");
return janet_ckeywordv("x64");
#elif defined(__i386) || defined(_M_IX86)
return janet_ckeywordv("x86");
#elif defined(_M_ARM64) || defined(__aarch64__)