Liberty Unleashed
Scripting => Script Help => Topic started by: Stoku on November 03, 2013, 03:46:17 pm
-
Hey,
I need a simple module for my Admin Panel to get list of the files of given extension, eg GetFileList(dir,ext). I'm sure, it'll be an useful util for others too.
Anyone could help me please? Ofc +to credits.
-
Windows: lu_GetFileList_win32.zip (https://dl.dropboxusercontent.com/u/15204202/lu_GetFileList_win32.zip)
Linux: lu_GetFileList_linux.zip (https://dl.dropboxusercontent.com/u/15204202/lu_GetFileList_linux.zip)
Source: lu_GetFileList_src.zip (https://dl.dropboxusercontent.com/u/15204202/lu_GetFileList_src.zip)
The second parameter is optional, and should not include the dot.
Example:
function onScriptLoad() {
LoadModule("lu_GetFileList");
local list = GetFileList("Logs", "log");
for( local i = 0; i < list.len(); i++ )
{
print(list[i]);
}
}
-
Thank you Thijn, but the "MSVCR110D.dll" is missing. Did you compile it as debug or release?
-
Thank you Thijn, but the "MSVCR110D.dll" is missing. Did you compile it as debug or release?
MSVCR110D = MicroSoft Visual C++ Release 11 0D
Download: http://www.dll-files.com/msvcr110d.zip?0WKfS0YKfS (http://www.dll-files.com/msvcr110d.zip?0WKfS0YKfS)
Put "MSVCR110D.dll" in your Server dir.
-
Thank you Thijn, but the "MSVCR110D.dll" is missing. Did you compile it as debug or release?
MSVCR110D = MicroSoft Visual C++ Release 11 0D
Download: [url]http://www.dll-files.com/msvcr110d.zip?0WKfS0YKfS[/url] ([url]http://www.dll-files.com/msvcr110d.zip?0WKfS0YKfS[/url])
Put "MSVCR110D.dll" in your Server dir.
Thanks, but I did it already and this file should be located in Windows/System32 dir properly. Don't get me wrong, but I don't want to make people downloading additional dlls, just to use stuff which is developed to make work easier. It must be newbie friendly, for people who doesn't even know how to load script.
-
... and the release version has always a lighter size ;).
-
Im not a great c++ programmer and I received errors when compiling a release build, if someone with a bit more knowledge of what they're doing can take a look. That would be nice.
Fixed, Same link.
-
Im not a great c++ programmer and I received errors when compiling a release build, if someone with a bit more knowledge of what they're doing can take a look. That would be nice.
Fixed, Same link.
Thanks Thijn, but now it's missing MSVCR110.dll. It should be probably compiled with the same VC++ redist package as LU has, anyone could recompile it to work without additional thingies please?
-
Kinda late, but you shouldn't be downloading and using dll's from random sources.
Thanks Thijn, but now it's missing MSVCR110.dll. It should be probably compiled with the same VC++ redist package as LU has, anyone could recompile it to work without additional thingies please?
You need to install the VS2012 C++ redistributable package from http://www.microsoft.com/en-us/download/details.aspx?id=30679 (http://www.microsoft.com/en-us/download/details.aspx?id=30679).
-
Kinda late, but you shouldn't be downloading and using dll's from random sources.
Thanks Thijn, but now it's missing MSVCR110.dll. It should be probably compiled with the same VC++ redist package as LU has, anyone could recompile it to work without additional thingies please?
You need to install the VS2012 C++ redistributable package from [url]http://www.microsoft.com/en-us/download/details.aspx?id=30679[/url] ([url]http://www.microsoft.com/en-us/download/details.aspx?id=30679[/url]).
I know what I have to do, but I'm not coding for myself but community and I don't want to make people downloading additional things to use a not necessary feature in my admin panel, which is dedicated for newbies and must be easy to use.
Compiling it with the same version of VS as LU wouldn't solve that error? Which redists are installed with LU?
-
Yes, if modules were compiled with the same version as LU it would solve the redist issue. The thing is, the LU Server doesn't come with any redists and i am pretty sure the readme says it requires the 2008 redists but we recently changed it to 2010 so that needs updating...
We may compile LU in 2012 in the future but it currently doesn't use that due to a bug in the visual C++ compiler which produces really wacky code when compiling LU, this bug was only fixed in visual studio 2 weeks ago but we haven't had chance to make sure that LU now works correctly.
There is nothing wrong with having a range of redists installed on your machine anyway as you will most likely need 2010 and 2012 these days as more and more software start using the latest compilers.
-
Thijn, but now it's missing MSVCR110.dll. It should be probably compiled with the same VC++ redist package as LU has, anyone could recompile it to work without additional thingies please?
MSVCR110d.dll keeps popping up as a requirement for me in the latest version. I think VRocker released a debug build again by accident...*rolls eyes and giggles*