|
|
|
#1
|
|||
|
|||
|
A LUA compiler written in LUA. This application will only work within the simulator, and it's only meant to.
LUAC gives you a list of the applications in your applications folder used by the simulator. Click on one and it will compile the MAIN.LUA script. It will create a backup named MAIN.BAK.LUA. Updated to compile all LUA files in the selected application folder(Not sub-folders though, maybe later). Example: All lua files in C:\Creative\ZEN X-Fi2\Applications\MyGame\
__________________
Only ONE more functions in the Wiki need addressing! Zen X-Fi2 LUA Wiki Want to protect your applications? Click Here! Tower Defense Thread Zen Lock - Protect Your Zen! Last edited by ThievingSix; 03-16-2010 at 05:16 PM. |
|
|
|||
|
|
|
#2
|
|||
|
|||
|
Awesome tool, I can see this coming in handy.
|
|
#3
|
||||
|
||||
|
Indeed. I wrote my own little script to do it after your instructions, but this one requires less work ^^
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#4
|
|||
|
|||
|
Updated to compile all LUA files in the application folder(Not sub-folders though, maybe later).
__________________
Only ONE more functions in the Wiki need addressing! Zen X-Fi2 LUA Wiki Want to protect your applications? Click Here! Tower Defense Thread Zen Lock - Protect Your Zen! |
|
#5
|
||||
|
||||
|
Quote:
And I also wonder like Tetrajak, if it compiles the "stat.lua" where I save stuff, will I be able to read and write to it?
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#6
|
|||
|
|||
|
Quote:
I think you misunderstood. It compiles all lua files in a selected application folder. So if you have: "MAIN.LUA", "MYSCRIPT.LUA" in one application folder it will compile both of those. It doesn't compile every application. I'll update the first post to make it more clear.
__________________
Only ONE more functions in the Wiki need addressing! Zen X-Fi2 LUA Wiki Want to protect your applications? Click Here! Tower Defense Thread Zen Lock - Protect Your Zen! |
|
#7
|
||||
|
||||
|
Quote:
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#8
|
|||
|
|||
|
After compiling a file, is it still possible to have it written to by another Lua file? (io.output)
|
|
#10
|
||||
|
||||
|
It only helps with startup, because the code will compile on runtime anyway.
__________________
Tools: Playlist Manager , Document to RSS , Notepad++ Instellisense Games/Apps: Asteroids, ZenFrame, Graphing Calculator, Pingus X-Fi2, Boxwars, SkiFree, Jezzball |
|
#11
|
|||
|
|||
|
It did help. Starting Hypogeum on player with scripts compiled doesn't crash the app.
I have 1 suggestion how to make LUAC more user friendly: don't compile scripts to script.lua.COMP because if you have 20+ script you have to manually remane them back every time you compile them ![]() - you could back em up to folder - remane the backup rather then compiled scripts. |
|
#12
|
||||
|
||||
|
Quote:
But, there is one flaw with doing it this way. If you compile the app twice, then it backs up your already compiled file, overwriting the uncompiled backup. That is why he did it the way he did I assume. I will look into it a bit more to see if I can come up with a viable solution to prevent this from happening, I've got an idea...
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#13
|
||||
|
||||
|
Quote:
. You can compile your own code with this function:Code:
function compile(file) -- this function will compile a file
old = string.dump(assert(loadfile(file)));
CodeOutput = io.open(file,"wb");
CodeOutput:write(old);
io.close(CodeOutput);
old = nil;
end
__________________
Tools: Playlist Manager , Document to RSS , Notepad++ Instellisense Games/Apps: Asteroids, ZenFrame, Graphing Calculator, Pingus X-Fi2, Boxwars, SkiFree, Jezzball |
|
#14
|
||||
|
||||
|
Quote:
It is a c module that you can use once compiled using the require function "require lfs" then you can handle directories ( here is an example), Code:
for file in lfs.dir[[C:\Program Files]] do
if lfs.attributes(file,"mode") == "file" then print("found file, "..file)
elseif lfs.attributes(file,"mode")== "directory" then print("found dir, "..file," containing:")
for l in lfs.dir("C:\\Program Files\\"..file) do
print("",l)
end
end
end
__________________
Tools: Playlist Manager , Document to RSS , Notepad++ Instellisense Games/Apps: Asteroids, ZenFrame, Graphing Calculator, Pingus X-Fi2, Boxwars, SkiFree, Jezzball |
|
#15
|
||||
|
||||
|
Quote:
On another note, fixed the over-writing bug so now if I could just make these folders work then I can upload it...
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#16
|
||||
|
||||
|
Quote:
The dll will be in the attachments of this post extract the dll to the root folder of the lua code and use ' require "lfs" ' to load it ------------------------------------------------------------------------------------------------------------------------------------------ This dll was built for a specific setup using some other dll's so it will crash, i will resetup the dll and the package and uploaded it again soon -------------------------------------------------------------------- Its all working now, i re uploaded the zip
__________________
Tools: Playlist Manager , Document to RSS , Notepad++ Instellisense Games/Apps: Asteroids, ZenFrame, Graphing Calculator, Pingus X-Fi2, Boxwars, SkiFree, Jezzball Last edited by jbob182; 08-23-2011 at 03:35 PM. |
|
#17
|
||||
|
||||
|
Ah, thanks! I haven't used modules for LUA before, and I wasn't sure exactly what I'd need, and I wasn't sure how to compile it myself just right off the bat. I'm spoiled with Visual Studio and Eclipse... xD
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#18
|
||||
|
||||
|
Make sure you re download the zip, i changed the setup so it wont crash,
Sample code: Code:
require "lfs"
for file in lfs.dir[[C:\Program Files]] do
if lfs.attributes(file,"mode") == "file" then print("found file, "..file)
elseif lfs.attributes(file,"mode")== "directory" then print("found dir, "..file," containing:")
for l in lfs.dir("C:\\Program Files\\"..file) do
print("",l)
end
end
end
__________________
Tools: Playlist Manager , Document to RSS , Notepad++ Instellisense Games/Apps: Asteroids, ZenFrame, Graphing Calculator, Pingus X-Fi2, Boxwars, SkiFree, Jezzball Last edited by jbob182; 08-23-2011 at 03:47 PM. |
|
#19
|
||||
|
||||
|
I made it work by downloading and including the missing .dll, but thanks for the fix. I found that reference already as well online. Now my only issue is that it creates the folder, but I can't write to it, it says it doesn't exist, can't figure out why... Guess I need to head to bed soon, it's getting late. Thanks for the help! I'll hopefully have it working by tomorrow.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#20
|
||||
|
||||
|
Quote:
Code:
require "lfs"
lfs.mkdir (lfs.currentdir () .. "/HelloWorldDir")
myfile = io.open("/HelloWorldDir/TextFile.txt","w+")
myfile:write("Hello World!")
io.close(myfile)
__________________
Tools: Playlist Manager , Document to RSS , Notepad++ Instellisense Games/Apps: Asteroids, ZenFrame, Graphing Calculator, Pingus X-Fi2, Boxwars, SkiFree, Jezzball Last edited by jbob182; 08-23-2011 at 04:09 PM. |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 02:24 PM.













. You can compile your own code with this function:
Hybrid Mode
