SETTING UP
- (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%dm-gccin
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%in
mkdir %lua_install_dir%include
copy %lua_build_dir%doc*.* %lua_install_dir%doc*.*
copy %lua_build_dir%src*.exe %lua_install_dir%in*.*
copy %lua_build_dir%src*.dll %lua_install_dir%in*.*
copy %lua_build_dir%srcluaconf.h %lua_install_dir%include*.*
copy %lua_build_dir%srclua.h %lua_install_dir%include*.*
copy %lua_build_dir%srclualib.h %lua_install_dir%include*.*
copy %lua_build_dir%srclauxlib.h %lua_install_dir%include*.*
copy %lua_build_dir%srclua.hpp %lua_install_dir%include*.*
echo.
echo **** BINARY DISTRIBUTION BUILT ****
echo.
%lua_install_dir%inlua.exe -e"print [[Hello!]];print[[Simple Lua test successful!!!]]"
echo.
pause
SETTING UP TORCH UNDER LUA ON WINDOWS
--- Quick and dirty ---
- Download and unzip the desired binary build from: https://github.com/hiili/WindowsTorch
Generate user.lua file in C:UsersName.zbstudio:
path.lua = [[C:appoolsorchinluajit.exe]]
Move the C:appoolsorchlua folder to C:appoolsorchin
--- Untested alternatives ---
Not tested, but I encourage you: https://github.com/torch/torch7/wiki/Windows#cmder
Maybe second best option is to build a virtual environment with linux
Note: More information on Torch can be found here
https://github.com/soumith/cvpr2015/blob/master/cvpr-torch.pdf
GET STARTED WITH LUA AND TORCH
http://torch.ch/docs/tutorials.html
I recommend Torch Video Tutorials to get the basics straight (https://github.com/Atcold/torch-Video-Tutorials)
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
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…