Compile_scripts Detailed parameters
-H Help
-I source file directory
-O Output file directory/output filename
-P Package Prefix name
-X does not contain a package, that is, which packages in the current directory do not want to be added
-m compilation mode, contains two, one is the default package into a zip, the other is not packaged directly generated files
-e encryption mode, contains two, Xxtea_chunk is the file itself to encrypt, xxtea_zip is to encrypt the packaged zip
-ek Encryption secret key
-es Encrypted Signature
-ex the suffix name of the encrypted file, which is LUA by default
-C load parameter list from a file
-Q generation process does not output information
1. Command line encryption file
Engine root directory
D:\cocos2dx\v3quick
Project Catalog:
D:\cocos2dx\v3quick\projects\test
In the project directory, open the Command window and enter:
D:\cocos2dx\v3quick\projects\test>d:\cocos2dx\v3quick\quick\bin\
Compile_scripts.bat-i src-o output-mfiles-e Xxtea_chunk-ek mykey-es XT
Here the encryption key is MyKey, the cryptographic signature is XT, all the files under the SRC directory are encrypted and saved to the output folder in the same class as Src
2. File Decryption Code
In the AppDelegate.cpp
Luastack *pstack = Pengine->getluastack ();
Add the following code below:
Pstack->setxxteakeyandsign ("MYKEY", strlen ("MYKEY"), "XT", Strlen ("XT"));
3. Overwrite the files in output to SRC, compile the project, install to the mobile phone, use 7zip to view the LUA files in the APK, all through the encrypted