WARNING: this is not meant for casual users. Really, only SDK writers should use this as there is no guarantee it is complete, and if you install a plugin that has any kind of syntax error, you have to wipe the Application cache and/or the Browser cache! This means you loose any projects you've saved in local storage!
Note: the converter can only convert to the C2 runtime. Automated conversion to the C3 runtime is not possible - the engine is considerably different from C2. v1.0.1 has an option to stub for the C3runtime though!
Usage:
inputDirectory outputDirectory
Processes a single plugin and outputs it to output-directory
inputDirectory outputDirectory "pluginCategory"
Processes a single plugin and outputs it to output-directory. Sets the plugin category in plugin.js to the specified value. Must be one of the values specified in the SDK manual.
Flags:
-masterblaster
This lets you point the tool to one top level directory and it will process all plugins in that directory. (ie: C2/../plugins) Outputs to the output-directory.
Ex: -masterblaster inputDirectory outputDirectory
-noscirra
Skips Scirra plugins. Good to try third-party plugins in your plugin directory.
Ex: -noScirra -masterblaster inputDirectory outputDirectory
-effect
Converts an effect.
-c3stub
This will create fake placeholders (stubs) for C3 so that projects can be opened/switched to the C3runtime.
Ex: inputDirectory outputDirectory -c3stub
-skipcommonjstest
Skips the test for a blank common.js file.
No code is migrated, only the properties and ACE definitions. Language mappings are all uniquely identified. No extra (.js) files are added.
Use the Visual Studio editor to check all JSON files. It points out errors before you upload them.
Examples:
C2C3AddonConverter.exe -noscirra -masterblaster "C:\Program Files\Construct 2\exporters\html5\plugins" "C:\C3pluginStagingArea\C3conversions"
C2C3AddonConverter.exe "C:\C3pluginStagingArea\C2originals\bht_smart_random" "C:\C3pluginStagingArea\AutoGen\C3_bht_smart_random" "data-and-storage"
History:
Requires: .NET 4.5
2020-09-13
*Supports new minify mechanism (as of r206)
*Removes ( and ) from property IDs.
*PW: scirra
https://sslwsh001.securedata.net/blackhornettechnologies.com/SDK/C2C3AddonConverter_1_0_1_3.zip
2019-03-05
*Fixed C3 stub class name generation to use ID.
*PW: scirra
https://sslwsh001.securedata.net/blackhornettechnologies.com/SDK/C2C3AddonConverter_1_0_1_1.zip
2019-01-20
*New flag: -c3stub
**This will create fake placeholders (stubs) for C3 so that projects can be opened/switched to the C3runtime. The intent is NOT to support the C3runtime, but to allow you to do the switch so you can systematically replace any plugin functionality from the C2 engine to the new C3 replacements: ie: tweening (although someone already did the LiteTween conversion), or Paster, which is unlikely to be converted, but has been replaced by the official Canvas plugin.
2018-02-04
*AddCommonAngleACEs was missing.
*SetIsRotatable was always false.
*external-css type set for CSS dependencies.
*plugin-description can now handle commas in the description.
2017-12-01
*Further fixes for effect ID.
2017-11-27
*Small fix to ensure IDs are unique.
*add -effect to command line to convert effects - not 100% yet.
2017-11-25
*Drawing plugins now supported.
*It is not possible to migrate any edittime code, so the original author must still do any migration manually. The base methods are included, but only Draw() will have default object drawing code, so the plugin shows something to the user. Other changes may be required to the runtime, due to changes in the C3 drawing mechanism.
2017-08-12
*Fixed duplicate variadic placeholder - {...} - bug.
*Fails if AddFunctionNameParam() detected.
2017-08-11
*Added missing variadic placeholder - {...}, if needed.
2017-08-09
*Dependencies added.
2017-06-05
*Added file-list developer data.
*Anything with dependencies, common.js code, or unsupported flags will no longer generate any output. This should make it clear that the conversion didn't work.
2017-05-25
*Fixed combo-param corruption.
*Support all 'deprecated' flags.
*(allow for wrong syntax of ef_none instead of cf_none)
2017-05-22
*Fixed bad Expression 'translated-name'.
*Convert <i> & <b> to new format.
*Fixed bad property conversion.
2017-05-20
*Behaviors added!
*Now enforces placeholder rules. C3 enforces a 1:1 rule on parameters and placeholders in the DisplayString. I now add any missing ones, and remove any extras. Not ideal, but better than nothing.
*Now allows deprecated ACEs. Display text is marked as DEPRECATED. Not ideal, but better than nothing.
*Null Versions are dealt with.
Still need to deal with code in common.js, and dependencies, but these can be hand edited if needed.
2017-04-16
*'Categories' supported.
*Cleanup - won't create any directory for skipped plugins (-noScirra)
2017-04-12
*Single-quotes are valid when encasing double-quotes.
*'text' properties must have a 'text' initial-value. C2 didn't enforce this.
*Decode, but warn of dependencies.