How to get CPU serial number using HISE?
-
@Christoph-Hart is it possible to have access to more parameters on the system ID generation?
I'm getting system ID changes when people perform OS updates, but there seems to be ways to only use the CPU/Motherboard to generate the ID instead◆ getUniqueDeviceID() static String SystemStats::getUniqueDeviceID ( ) static This method returns a machine unique ID unaffected by storage or peripheral changes. This ID will be invalidated by changes to the motherboard and CPU on non-mobile platforms, or performing a system restore on an Android device. There are some extra caveats on iOS: The returned ID is unique to the vendor part of your 'Bundle Identifier' and is stable for all associated apps. The key is invalidated once all associated apps are uninstalled. This function can return an empty string under certain conditions, for example, If the device has not been unlocked since a restart.
-
@Christoph-Hart Will the system ID change after reinstalling the system using this method? Is there a way to bind it to the hardware ID? In this way, even if the system is reinstalled, the system ID obtained will be the same
-
@Dan-Korneff @CatABC set
JUCE_USE_BETTER_MACHINE_IDS=1
so it is more OS update resilient -
What @ustk said, the default machine ID generation is a bit less robust and will change with major OS updates, but with this preprocessor it will be a little bit more stable.
Your copy protection system must cope with the scenario that computer IDs can change though.
-
@Christoph-Hart said in How to get CPU serial number using HISE?:
Your copy protection system must cope with the scenario that computer IDs can change though.
My protection system and I are in therapy. Hopefully we can cope soon.
-
@ustk
Do I have to use this when I compile HISE, or do I use it when I compile the plug-in?Thank you
Oli -
@Oli-Ullmann Both, otherwise the ID created will not be the same during test and production.
Once you use this flag it's forever for compatibility reasons
It should be set totrue
by default imho, but I think it's for breaking old project compatibility that it'sfalse
... @Christoph-Hart ? -
@ustk
All right, that makes sense. Thanks for the info! :-) -
I'm not sure what I'm doing wrong here, but HISE and my compiled plugin can't agree on a "better" machine ID.
I've compiled HISE like this:
and added this to my project:
When I launch the plugin, it detects that the ID is different and I update my license file. Then when I load HISE, it still thinks that the ID is different. What am I doing wrong?
-
@Dan-Korneff Have you tried to set it in the 'Modules` tab instead? That's what I do because I always think some pre-processor aren't working, that might be the case for this one...
-
@ustk I've changed the preprocessor in the module like this:
Still the same result
-
It appears to be something with the exported plugin. The machine IDs generated with JUCE_USE_BETTER_MACHINE_IDS=1 are the same as if it's set to false. At least I know where to start looking
-
Ok... I've obviously have not had enough coffee today. I'd probably have to export the plugin after I rebuild HISE for something to take effect.
Ignore my stupidity for now. -
@Dan-Korneff yeah it can be troublesome to be sure both are working (hise and plugin)