Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove js version due to difficulties with cli mode GOLUWA_CURRENT_DIRECTORY > GOLUWA_WORKING_DIRECTORY
- Loading branch information
Showing
4 changed files
with
19 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
@echo off & set GOLUWA_START_TIME="%time%" & PowerShell -nologo -noprofile -noninteractive Invoke-Expression ('$args=(''%*'').split('' '');'+'$PSScriptRoot=(''%~dp0'');$env:GOLUWA_CURRENT_DIRECTORY=(''%cd%'');'+((Get-Content -Raw %~dp0%~n0%~x0 ) -Replace '^.*goto :EOF')); & goto :EOF | ||
|
||
$ROOT_DIR = $PSScriptRoot | ||
$ROOT_DIR = $([System.IO.Path]::GetFullPath("$ROOT_DIR")) | ||
$ROOT_DIR = $ROOT_DIR.substring(0, $ROOT_DIR.Length - 1) | ||
@echo off & set GOLUWA_START_TIME="%time%" & PowerShell -nologo -noprofile -noninteractive Invoke-Expression ('$args=(''%*'').split('' '');'+'$PSScriptRoot=(''%~dp0'');$env:GOLUWA_WORKING_DIRECTORY=(''%cd%'');'+((Get-Content -Raw %~dp0%~n0%~x0 ) -Replace '^.*goto :EOF')); & goto :EOF | ||
|
||
if (((gwmi -Query "select osarchitecture from win32_operatingsystem").OSArchitecture) -Match "64") { | ||
$ARCH = "x64" | ||
} else { | ||
$ARCH = "x86" | ||
} | ||
|
||
$BINARIES_LOCATION = "https://gitlab.com/CapsAdmin/goluwa-binaries-windows_$ARCH/raw/master" | ||
|
||
function Download($url, $location) { | ||
if(!(Test-Path "$location")) { | ||
Write-Host -NoNewline "'$url' >> '$location' ... " | ||
(New-Object System.Net.WebClient).DownloadFile($url, "$location") | ||
$path = "$(Get-Location)\$location" | ||
if(!(Test-Path "$path")) { | ||
Write-Host -NoNewline "'$url' >> '$path' ... " | ||
(New-Object System.Net.WebClient).DownloadFile($url, "$path") | ||
Write-Host "OK" | ||
} | ||
} | ||
|
||
New-Item -ItemType Directory -Force -Path "$ROOT_DIR\data\windows_$ARCH" | Out-Null | ||
Set-Location "$ROOT_DIR\data\windows_$ARCH\" | ||
$ROOT_DIR = $([System.IO.Path]::GetFullPath("$PSScriptRoot")) | ||
$ROOT_DIR = $ROOT_DIR.substring(0, $ROOT_DIR.Length - 1) | ||
Set-Location "$ROOT_DIR" | ||
|
||
Download "https://gitlab.com/CapsAdmin/goluwa-binaries-windows_$ARCH/raw/master/luajit.exe" "$ROOT_DIR\data\windows_$ARCH\luajit.exe" | ||
Download "https://gitlab.com/CapsAdmin/goluwa-binaries-windows_$ARCH/raw/master/lua51.dll" "$ROOT_DIR\data\windows_$ARCH\lua51.dll" | ||
Download "https://gitlab.com/CapsAdmin/goluwa-binaries-windows_$ARCH/raw/master/vcruntime140.dll" "$ROOT_DIR\data\windows_$ARCH\vcruntime140.dll" | ||
New-Item -ItemType Directory -Force -Path "data\windows_$ARCH" | Out-Null | ||
Set-Location "data\windows_$ARCH\" | ||
Download "$BINARIES_LOCATION/luajit.exe" "luajit.exe" | ||
Download "$BINARIES_LOCATION/lua51.dll" "lua51.dll" | ||
Download "$BINARIES_LOCATION/vcruntime140.dll" "vcruntime140.dll" | ||
|
||
if(!(Test-Path "$ROOT_DIR\core\lua\boot.lua" -PathType Leaf)) { | ||
New-Item -ItemType Directory -Force -Path "$ROOT_DIR\core\lua" | Out-Null | ||
Download "https://gitlab.com/CapsAdmin/goluwa/raw/master/core/lua/boot.lua" "$ROOT_DIR\core\lua\boot.lua" | ||
} | ||
New-Item -ItemType Directory -Force -Path "core\lua" | Out-Null | ||
Download "https://gitlab.com/CapsAdmin/goluwa/raw/master/core/lua/boot.lua" "..\..\core\lua\boot.lua" | ||
|
||
.\luajit.exe "../../core/lua/boot.lua" $args |
This file was deleted.
Oops, something went wrong.