问题描述
我需要使用火炬设置 Lua 在 Windows 10 和 ZeroBrane IDE 上,安装软件的可能性有限,并且下载权限受到限制.
I need to set up Lua running with Torchon Windows 10 and the ZeroBrane IDE, with limited possibilities of installing Software and restricted download rights.
我花了很长时间,所以我想我可以和你们分享一个食谱.如果能帮到您,我会很高兴.
It took me so Long, so I thought I might share a recipe for you guys. I would be glad if it helped you.
推荐答案
- (管理员)下载/安装tdm64/gcc/5.1.0-2.exe编译器
- (管理员)下载/安装ZeroBrane(Lua IDE)
- 下载lua/5.3.4.tar.gz( https://www.lua.org/download.html )
- 编写批处理文件build.cmd
- (Admin) Download/Install tdm64/gcc/5.1.0-2.exe Compiler
- (Admin) Download/Install ZeroBrane (Lua IDE)
- Download lua/5.3.4.tar.gz (https://www.lua.org/download.html)
- Write batch file build.cmd
@echo off
setlocal
:: you may change the following variable's value
:: to suit the downloaded version
set lua_version=5.3.4
set work_dir=%~dp0
:: Removes trailing backslash
:: to enhance readability in the following steps
set work_dir=%work_dir:~0,-1%
set lua_install_dir=%work_dir%\lua
set compiler_bin_dir=%work_dir%\tdm-gcc\bin
set lua_build_dir=%work_dir%\lua-%lua_version%
set path=%compiler_bin_dir%;%path%
cd /D %lua_build_dir%
mingw32-make PLAT=mingw
echo.
echo **** COMPILATION TERMINATED ****
echo.
echo **** BUILDING BINARY DISTRIBUTION ****
echo.
:: create a clean "binary" installation
mkdir %lua_install_dir%
mkdir %lua_install_dir%\doc
mkdir %lua_install_dir%\bin
mkdir %lua_install_dir%\include
copy %lua_build_dir%\doc\*.* %lua_install_dir%\doc\*.*
copy %lua_build_dir%\src\*.exe %lua_install_dir%\bin\*.*
copy %lua_build_dir%\src\*.dll %lua_install_dir%\bin\*.*
copy %lua_build_dir%\src\luaconf.h %lua_install_dir%\include\*.*
copy %lua_build_dir%\src\lua.h %lua_install_dir%\include\*.*
copy %lua_build_dir%\src\lualib.h %lua_install_dir%\include\*.*
copy %lua_build_dir%\src\lauxlib.h %lua_install_dir%\include\*.*
copy %lua_build_dir%\src\lua.hpp %lua_install_dir%\include\*.*
echo.
echo **** BINARY DISTRIBUTION BUILT ****
echo.
%lua_install_dir%\bin\lua.exe -e"print [[Hello!]];print[[Simple Lua test successful!!!]]"
echo.
pause
---又快又脏---
--- Quick and dirty ---
- 从以下位置下载所需的二进制版本并将其解压缩: https://github.com/hiili/WindowsTorch
-
在C:\ Users \ Name.zbstudio中生成user.lua文件:
- Download and unzip the desired binary build from: https://github.com/hiili/WindowsTorch
Generate user.lua file in C:\Users\Name.zbstudio:
path.lua = [[C:\app\tools\torch\bin\luajit.exe]]
将C:\ app \ tools \ torch \ lua文件夹移至C:\ app \ tools \ torch \ bin
Move the C:\app\tools\torch\lua folder to C:\app\tools\torch\bin
---未经测试的替代品---
--- Untested alternatives ---
未经测试,但我鼓励您: https://github.com/torch /torch7/wiki/Windows#cmder 也许第二好的选择是使用linux构建虚拟环境
Not tested, but I encourage you: https://github.com/torch/torch7/wiki/Windows#cmderMaybe second best option is to build a virtual environment with linux
注意:有关火炬"的更多信息,请参见此处 https://github.com/soumith/cvpr2015/blob/master/cvpr-torch.pdf
Note: More information on Torch can be found herehttps://github.com/soumith/cvpr2015/blob/master/cvpr-torch.pdf
http://torch.ch/docs/tutorials.html 我建议使用Torch Video Tutorials以获得基本的基础知识( https://github.com/Atcold/torch -视频教程)
http://torch.ch/docs/tutorials.htmlI recommend Torch Video Tutorials to get the basics straight (https://github.com/Atcold/torch-Video-Tutorials)
这是Torch指南供进一步阅读( https://github.com/torch/torch7/wiki/Cheatsheet ):-新手-安装和运行火炬-安装软件包-教程,按类别的演示-加载流行的数据集-按类别列出的软件包列表
This is a Torch Cheetsheet for further reading (https://github.com/torch/torch7/wiki/Cheatsheet):- Newbies- Installing and Running Torch- Installing Packages- Tutorials, Demos by Category- Loading popular datasets- List of Packages by Category
这篇关于使Lua在Windows 10上与Torch一起运行(具有有限的管理员权限)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!