Soamp Posted June 5, 2011 Share Posted June 5, 2011 Is there any difference between packing models/texture folder with packing Script folder? when I try to pack script folder, it will cause a "Can't Open" error. while when I pack models/textures folders there is nothing wrong. :-?? Quote Link to comment Share on other sites More sharing options...
Soamp Posted June 10, 2011 Author Share Posted June 10, 2011 and here is additional information Language: C++ IDE: VisualStudio 2010 in fact we need to know if engine searchs for lua files inside zipped packes? #include "engine.h" #include <iostream> #include <string> const int ScreenWidth = 800; const int ScreenHeight = 600; const char* MediaDir = "."; const char* AppTitle = "DSGAME"; void ErrOut( const std::string& message ) { std::cerr << message << std::endl; } // ------------------------------- int main( int argn, char* argv[] ) { if( !Initialize() ) return 1; if( !Graphics(ScreenWidth,ScreenHeight) ) { ErrOut( "Failed to set graphics mode." ); return 1; } SetAppTitle( AppTitle ) ; RegisterAbstractPath( MediaDir ); SetZipStreamPassword("Menu.pak","123"); SetZipStreamPassword("Scripts.pak","123"); TFramework fw = CreateFramework(); if( fw == NULL ) { ErrOut( "Failed to initialize engine." ); return 1; } SetGlobalObject( "fw", fw ); BP lua = GetLuaState(); lua_pushobject( lua, fw ); lua_setglobal( lua, "fw" ); lua_pop( lua, 1 ); while( GetGlobalNumber("Game") == 1 && !AppTerminate()) { if( !AppSuspended() ) { UpdateFramework(); RenderFramework(); Flip( 0 ); } } return Terminate(); } Quote Link to comment Share on other sites More sharing options...
Soamp Posted June 12, 2011 Author Share Posted June 12, 2011 anyone? I need for test release (b1) Quote Link to comment Share on other sites More sharing options...
Birdman Posted June 12, 2011 Share Posted June 12, 2011 Hello Soamp, i'm investigating this too, i wasn't able to package the scripts folder. I have a Data folder with all the models, maps, etc and this works like a charm. I'm unsure if you can do this without a modification. This is why i prefer to code most of the important things in c++. EDIT: What you can do in the worst case is put scripts in the data folder, for an instance i have a specific script inside the model folder, so basically what i have in the scripts folder is all generic Leadwerks stuff. Quote Link to comment Share on other sites More sharing options...
Roland Posted June 13, 2011 Share Posted June 13, 2011 As I understand it you wan't to protect the script source. Maybe this is something for you then Compile more LUA scripts ... ... into single bin file Have not tested my self but I saw that post I thought it could be something for you. Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
Birdman Posted June 13, 2011 Share Posted June 13, 2011 I can compile em, but if another scripts need one, it wont find it, because name changed. How will a normal scripts scripts/start etc be compiled to works in leadwerks? Or how do i run this compiled scripts? Quote Link to comment Share on other sites More sharing options...
Josh Posted June 14, 2011 Share Posted June 14, 2011 You can pack model scripts into .pak files but I recommend leaving scripts that get included by other scripts as either the origjnal .lua files, or .luac if you want encrypted precompiled byte code. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Soamp Posted June 15, 2011 Author Share Posted June 15, 2011 @Roland : Thanks for your attention . I know that. But our scripts are too long and too much. @Josh: Thanks encrypting is good choice. But luac is not secure encrypting and my base code in lua, and our lua codes are import for me. Do you know better solution for it? Quote Link to comment Share on other sites More sharing options...
Laurens Posted June 18, 2011 Share Posted June 18, 2011 You might want to take a look at an executable packer. http://en.wikipedia.org/wiki/Executable_compression#List_of_packers Quote Link to comment Share on other sites More sharing options...
Soamp Posted June 22, 2011 Author Share Posted June 22, 2011 Thanks guys I try to use This Command (“ for /r Your path %s IN ("*.lua") do luac.exe -o %sc %s “) for encrypting all of our Lua Code to LuaC on this time. Although it’s safe less , It’s better than not encrypting. Quote Link to comment Share on other sites More sharing options...
Laurens Posted June 23, 2011 Share Posted June 23, 2011 Compiling is not encrypting. Obfuscating the code would probably more effective, although I'm not sure if there are any Lua obfuscators. Quote Link to comment Share on other sites More sharing options...
Josh Posted June 23, 2011 Share Posted June 23, 2011 Oh yeah, there's also Armadillo and ASProtect, and they won't require any changes to your code. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.