How to use lua web sockets on windows? - windows

This answer suggests this library to use web sockets for lua.
The installation guide of the library contains three strings:
$ git clone git://github.com/lipp/lua-websockets.git
$ cd lua-websockets
$ luarocks make rockspecs/lua-websockets-scm-1.rockspec
I don't know what results of the last command should be and how to proceed from executing it to compiling examples. But on my PC it only produces error message
'"C:\Program Files (x86)\LuaRocks\\lua5.1.exe"' is not recognized as
internal or external command, operable program or batch file
in visual studio 2015 developer console.
In regular console it just complains that cl is not recognized
I want to know not only ways of fixing the error, but all actions needed to start communicating with websockets from a lua script on windows with this library or another one.
The script will be run in vm provided by a third party app. I can require external modules from it. I installed luarocks from developer console. There are no other installed lua frameworks/compilers. The system is windows 8.

If you need to run this as the client, then you only need three pieces: lua interpreter, luasocket library, and the lua-websockets module you referenced. The module has other dependencies (luabitop and copas), but those are optional if you just want to try simple sync calls using luasocket. You can compile luasocket libraries yourself (that's what luarocks probably attempted for you to do, but you can also do it from the command line) or find already compiled libraries; for example, see this discussion for details.

Related

omnet++ installation error in windows 7

I am tring to install omnet++ but it gives me error "windows can not find ",is there anyone can help
I have been trying mingmenv.cmd gives me the same error
it gives as shown below error when I try to install:
First of all, did you unpack the OMNeT Windows installation file with the on-board ZIP tools or another program? Try to use programs like WinRAR or 7-Zip to unpack the OMNeT++ installation, the on-board ZIP tool from Windows 7 might have problems with the MinGW files.
Second, does the path to the OMNeT++ installation contain any spaces or special characters? This might also be the source of errors.
Third, does the message immediately show after you start the mingwenv.cmd or after you start it and try to run ./configure or make to configure and build OMNeT?? Check if no antivirus might block the OMNeT sources / helper programs.
General note: under Windows, you always use the mingwenv.cmd shell to compile OMNeT, the normal Windows command environment does not have the necessary paths or settings for OMNMeT.

Installing Primer3

I need to install Primer3 for my research in Windows, and I really have no idea of how to go about it. I was following the instructions mentioned here.
I'm getting to the part where I need to run
mingw32-make TESTOPTS=--windows
and I keep getting an error saying:
'mingw32-make' is not recognized as an internal or external command,
operable program or batch file.
Just for reference, I went into the minGW Installation manager and got the ming32-make packages, including the bin, doc, lang, and lic ones, because I really had no idea which one was the correct one.
If someone could help me, I would be very grateful! Installing these niche programs without an installation wizard is a challenge!
You will need to install mingw32-make. This is a
Windows of port of GNU Make,
a software-build tool that is supported on all operating systems,
indeed the daddy of such tools.
But make alone will not suffice. To build primer3 you will
need a Windows port of the whole GNU toolchain for building software
from source code. Without that, running make by itself will
just expose the absence of the GCC compiler and linker that it
expects to do its bidding.
This is quite a lot of software, but it is easy and quick to install and there
are several open-source offerings. I suggest you go to TDM GCC
and download the TDM64 bundle. This will give you an executable installer.
Just run it and you will end up with the complete GNU toolchain, including,
mingw32-make, in your chosen installation directory.
It will also install in your Windows launch menu the MinGW command prompt.
Launch this and you will be presented with a Windows commandline console
with its environment set up to find and run any of the GNU tools.
In this console change directory to your primer3-X.Y.Z/test directory
and then run mingw32-make TESTOPTS=--windows as per documentation.
Be forwarned that the self-tests of primer3 that are executed to
verify the build may take 1/2 hr. to 1 hr. to run, depending on your
hardware, but they will finish successfully with the steps I've
described, barring problems specific to your machine. It is a foolproof-simple build.
All the built executables are deposited in the primer3-X.Y.Z/src
directory. You may want to move them somewhere more convenient
in in your PATH.
It does seem oddly amateurish that the documentation simply
directs you to run mingw32-make with no preliminary account of
what that is or how to install it, while on the other hand it
advises that you must install perl and strongly recommends a
specific perl distribution; but evidently primer3 is open-source
scientfic software and its documentation is not bad by the standard
of that genre.

Unable to install Time:Piece module with cpan

I need to install the Time::Piece module in Perl. It's not there for some reason. When I use
cpan install Time::Piece
after some successful steps I get the error below
.....
Checking if your kit is complete...
Looks good
Unable to find a perl 5 (by these names: "My windows path variable contents here...i think"
Writing Makefile for Time::Piece
'nmake' is not recognized as an internal or external command,
operable program or batch file.
RJBS/Time-Piece-1.29.tar.gz
nmake -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Failed during this command:
RJBS/Time-Piece-1.29.tar.gz : make NO
cpan[2]>
Why is this happening ? Please help me to fix it.
I'll wait for an answer while I try to fix it myself. First problem -
'nmake' is not recognized as an internal or external command, operable program or batch file.
I used this solution
Windows 7 Control Panel, Programs and Features, Select Microsoft
Visual Studio 2008 Standard or Professional Edition application then
choose Uninstall/Change/Modify. This will bring you into Maintenance
Mode. Select C++ then check X64 Compilers and Tools.
I had Visual Studio Express and Visual Studio Professional 2013 (I don't remember how or why it's there on my system.) I followed the above instructions. The options were different: one had C++ mentioned in it - Microsoft Visual C++ 2013 Microsoft Foundation Class Libraries. So, I chose that one. Its a 600MB download and install.
I went to C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin and found nmake there. If you don't find it there, then you might find in Microsoft Visual Studio 10, 11 etc. Look for nmake there. Add the path for nmake to the PATH environment variable.
Now, I get a new error
NMAKE : fatal error U1073: don't know how to make 'C:/Program'
Stop.
RJBS/Time-Piece-1.29.tar.gz
nmake -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Failed during this command:
RJBS/Time-Piece-1.29.tar.gz : make NO
cpan[2]>
I'll try to fix this one too. By the way, #ikegami told me that installing to a path with no spaces (C:\progs\...) will solve my problem. I cannot install to another directory:
This version of Perl comes bundled with other software which must
install to the folder "C:\Program Files (x86)" which has a space in it. The
software needs to be in that path for some other things to work
correctly. Is there a simple way to edit the code which is trying to install the modules? I could make it parse the path by changing some
code. I am new to Perl though. Not sure if I'll be able to change
without causing harm .
EDIT -
I have both Active state perl 5.1.2 and perl 5.8 which are used by tool x and tool y (electric commander). Tool y has its own perl libraries which must be used in my code. So I am stuck with perl 5.8.
I just came to know this is due to issues with tool y. There is a workaround for this, but I am not able to understand it. Can you please help me to understand the workaround for windows ?
https://electriccloud.zendesk.com/hc/en-us/articles/202828073-KBEC-00180-Installing-Perl-modules-into-the-Commander-Perl-distribution
Which version of Perl are you running? what do you get if you run "perl -v" at a command prompt?
If the version number you get is 5.10 or higher, then Time::Piece should already be included with that version of Perl. If it's not, then your installation is broken in interesting ways and you should probably reinstall it from scratch.
If the version number you get is lower than 5.10 then you have a painfully old version of Perl installed and your best approach will be to upgrade to a newer version.

How to install Lua on windows

I'm new to Lua, and need to know how to install it on Windows?
I've tried and am unable to run the sample. When I try to compile it 100% success is shown, but when I click the run button it shows this error:
Can't find moai executable in any of the folders in PATH or MOAI_BIN:
C:\Program Files\moai, D:\Program Files\moai, C:\Program Files (x86)\moai, D:\Program Files (x86)\moai, C:\WINDOWS\system32, C:\WINDOWS, C:\WINDOWS\System32\Wbem, C:\moai-sdk\bin\win32\moai.exe, C:\moai-sdk/bin
If anyone can help me on how to install Lua, thanks.
Lua does not have a certified IDE or compiler to come with it. You usually run lua code from a lua command line / lua file which will handle the tasks you are attempting to create.
Downloading
Lua has a website where you can download their tools which will allow you to write and execute lua code: https://www.lua.org/download.html
Using lua console
After you download the file, put it in a file location anywhere on your computer, in order execute lua code; the first method is to open the lua console and simply type out your command: https://prnt.sc/ibw97h
Another method you can use, is make a .txt or .lua file, write your code in that, then you can drag and drop the file onto the lua console to execute it: https://prnt.sc/ibwa2f
Installing lua system wide
Add lua in the environment variables by adding the path from where it's installed. After doing this you can open PowerShell and enter lua53.exe to open lua.
Additional details
Although these is what lua directly offers, there are other third party alternatives of compiling and executing lua code. Examples of these can be found if you search for them.
I assume that you are trying to use Moai SDK to develop games.
I think this article may helps.

GAE Go Windows - "Cannot run program", "is not a valid Win32 application"

I've been trying to run a GAE Go project I developed on my Mac on my Windows machine with GoClipse after installing and configuring the appropriate SDKs and so forth. When attempting to run the project, I get this error:
Exception occurred executing command line. Cannot run program
"C:\GoogleAppEngine\dev_appserver.py" (in directory
"D:\Golang\workspace\Project\src\pkg"): CreateProcess
error=193, %1 is not a valid Win32 application
How can I fix that error in order to run my project?
While the below configuration works on the Mac as it has Python installed by default, Windows requires a different configuration.
On Mac the GoClipse External Tools Configuration would be:
Location: /GoogleAppEngine/dev_appserver.py
Working Directory: ${workspace_loc:/Project/src/pkg}
Arguments: .
The Windows configuration should look like:
Location: C:\Python27\Python.exe
Working Directory:
Arguments: C:\GoogleAppEngine\dev_appserver.py "${workspace_loc:/Project/src/pkg}"
Trying to run .py (Which IMO is a Python file?) wont work directly on windows. You will need to install Python and then pass the above filename to Python something like (I don't know Python so don't go by exact syntax, you might need to look around)
python "C:\GoogleAppEngine\dev_appserver.py
The reason it's working on Mac is because Python comes pre-installed on mac as cited here But on windows it doesn't. So you can install Python and add the Python's bin folder to path, and then run above script and it should run fine!

Resources