We still don’t have a C++ API, but you can write Ruby C Extensions (and in C++) that interface with the Ruby API and also make use of our C API for licensing.
For Ruby C/C++ Extensions that works with SketchUp, have a look at our examples on GitHub:
Yes - I have seen this. It looks like this is only available for SU2015. My plugins work on versions SU7 through to SU2015.
I offer 7 days free trial on Door Maker and Stair Maker.
During the free trial the user must have internet on his first run of the plugin.
With Door Maker there is just 1 plugin but it has 2 levels, Pro and Gold.
The plugin is licensed to 1 user on 1 computer.
If a user wants a refund then his license is revoked and the next time the plugin checks it won’t run. I also check a compressed and encrypted file on his local machine to see when the last check was. Checks are once every week or 2
If a user wants to go to a site where there is no internet then before he leaves he can choose
Door Maker - Check License
The license file is updated and the check will wait for at least another week.
Before I jump into C++ to make it difficult for hackers I have a couple of questions.
Windows: do I need to compile C++ code differently for every version of Sketchup or are all the versions compatible at the dll interface level? I see there is a free visual C++ 2010 express compiler. Will that work?
MacOS:I see Mac brings out new compilers almost with every new OS release. Will XCode 4.5 compiler work with all current versions of OSX with respect to interfacing with SU? And which versions of Sketchup can I support with a single compile?
I’m trying to determine what level of effort I have to go through. Can we have 1 code base that works with OSX and Windows like I can do with with Embarcadero?
First question: Am I correct that the Ruby API licensing scheme requires that the user have an internet connection, and that a lookup is made every time the user loads/users the extension to a database of valid licenses on a SketchUp server at Trimble?
Second question: How do all the attempts to use C avoid the age old problem of a user buying one license and then sending a copy of the extension with whatever encrypted files are stored with it to his dearest 1,000 friends?
If his hard disc crashes how does he reactivate his license? Why can’t his 1,000 friends reactivate the same license?
You’d need a new build for each Ruby version, so currently you have Ruby 1.8 32bit and 2.0 in 32 and 64bit.
But the license API isn’t available to older SketchUp versions. So if you support older SketchUp versions you’d need to roll your own license scheme.
Yes.
I’m not that familiar with OSX, I’m not sure if you can use older XCode on newer OSX versions. But you can set up your project to how far back you support OSX.
Depending on what you’ll actually be doing - if you ever make use of OS depended functions or not. But for simple extensions I’m compiling the same source on both platforms.
I’ve now installed Visual C++ 2010 Express and have your ruby-c-extension-examples-master example now compiling after applying patch and updating project file.
I don’t get how to actually run the example. There must be a ruby to put into plugins folder or to load.
An internet connection is only need upon installing the extension - as it has to be installed from within Extension Warehouse. SketchUp then fetch a license which will be locked to that computer.
If the user copies the extension to their buddies they won’t have the license on their machine - and even if they copy the license file it won’t work.
He’d have to download from Extension Warehouse again.
there are other nice weeknesses created either by Developers or by Sketchup Team.
E.g. developers shadowes some menu item. Try:
class Sketchup
def Sketchup.is_pro?
return true
end
end
Scrambling is very difficult hold secure for a long time. Identify method is easy, header (stamp) is public and password or his represantaion is constant distributed by every instance of Sketchup and off line Scrambler.