Enter the serial number every time
-
@xsaad Have you checked if the RegistrationInfo.js file was created correctly in the plugin folder? After you enter the serial number, the plugin generates this file to store the license. Each time you open the plugin, if the file is missing, it will prompt you to enter the serial number again.
-
@bendurso Yes The file is within the project files
It contains serial number. -
@xsaad Are you saying that the file was created in the app data folder?
On Windows, it's located at %AppData%/Your Brand/Your Plugin, and on macOS, it's in Library/Application Support/Your Brand/Your Plugin.
If you mean it was created inside the HISE project folder, that has no connection to the exported plugin. It's only for working inside HISE.
-
@bendurso Ah I understood whether I should create this file myself or it should be created automatically when exporting plugin?
-
@xsaad That file is created automatically after you insert the serial and click submit (check dumpAsJSON). Here:
inline function onSubmitButtonControl(component, value) { if(!value) // Just execute once return; local v = SerialInput.getValue(); Console.print(v); // Checks if it's in the input if(serials.Data.contains(v)) { Console.print("Serial number found"); local data = { "Serial": v }; // Stores the file to the hard drive. In HISE it will be the project folder // but in the compiled plugin it will use the parent directory to the // user preset directory (which is usually the app data folder). Engine.dumpAsJSON(data, "../RegistrationInfo.js"); setValidLicense(true); } else { Console.print("Invalid serial number"); Description.set("text", "Invalid serial number. The number you supplied does not match"); setValidLicense(false); } }; Content.getComponent("SubmitButton").setControlCallback(onSubmitButtonControl);
If the file is not created in the app data folder after you insert the serial, then there is a problem with the creation of this file. Most likely a system permissions issue.
-
@bendurso I found that the file is not created when adding the serial number, I tried it on another computer and the file was not created.
-
@xsaad Are you using mac or windows? Are you using global app data or user app data? Because if you are using global app data with mac, the file cannot be created if the folder does not exist (Application Support/Your Brand/Your plugin)
You can check in your project settings if you have enabled "Use Global App Data Folder"
-
@bendurso I am using Windows and I have enabled "Use Global App Data Folder" and after searching I found that the file containing the serial number is saved in users/Hp/AppData/brand/plugin but the problem is still with me even though the file is in app data
-
@bendurso Hi brother I was able to find out the cause of the problem I had to deactivate "saveInPrest" for the submitbutton and it worked for me
I would also like to thank you for your time. I really appreciate your help. Thank you. -
@xsaad You're welcome!
Oh yeah, you have to remove saveInPreset from all momentary buttons :)