Since we have this topic, and it is in the addon board, I am going to share what I did which I think the only things needed to be done in converting hook version of the 1.1. addon to 2.0. We may split it later, only if needed, but for now, I do not think so.
Basically you need to update your package-info.xml first, where just below the 1.1 uninstall bracket, you need to add something like this:
<install for="2.0.0 Beta 1 - 2.0.99">
<readme type="file" parsebbc="true">Masa.readme.txt</readme>
<require-file name="English.php" destination="LANGUAGEDIR/Masa" />
<require-file name="Masa.subs.php" destination="ADDONSDIR/Masa" />
<require-file name="Masa.template.php" destination="THEMEDIR/Masa" />
<require-file name="Masa.styles.css" destination="THEMEDIR/css/Masa" />
<require-file name="Masa_light.css" destination="THEMEDIR/css/_light/Masa" />
<require-file name="Masa_guest_light.css" destination="THEMEDIR/css/_light/Masa" />
<code>Masa.hooks.php</code>
<redirect url="?action=admin;area=addonsettings;sa=general" timeout="499">Redirecting to Addons Settings...</redirect>
</install>
<uninstall for="2.0.0 Beta 1 - 2.0.99">
<readme parsebbc="true">Masa.readme.txt</readme>
<remove-dir name="LANGUAGEDIR/Masa" />
<remove-dir name="ADDONSDIR/Masa" />
<remove-dir name="THEMEDIR/Masa" />
<remove-dir name="THEMEDIR/css/Masa" />
<remove-dir name="THEMEDIR/css/_light/Masa" />
<code>Masa.hooks.php</code>
<redirect url="?action=admin;area=packages" timeout="499">Redirecting to Package Manager...</redirect>
</uninstall>
Others seems the same but note the changes in the LANGUAGEDIR and ADDONSDIR, as in 1.1 we use LANGUAGEDIR/english/Masa, and SOURCEDIR/addons/Masa, something like that, but 2.0 seems to cut it short, and this also affects when you call for them later.
The second one will be the hooks file that call the function from your addon, something like this will make it 2.0 compliance, I think:
if (ELK == 'SSI')
db_extend('packages');
// Define the directory and hooks for 2.0 compatibility
$addon_dir = file_exists(ADDONSDIR . '/Masa/Masa.subs.php') ? ADDONSDIR : SOURCEDIR . '/addons';
$hook_functions = array(
'integrate_menu_buttons' => 'Masa_Main|' . $addon_dir . '/Masa/Masa.subs.php',
'integrate_general_mod_settings' => 'Masa_Settings|' . $addon_dir . '/Masa/Masa.subs.php',
);
// Adding or removing them?
if (!empty($context['uninstalling']))
$call = 'remove_integration_function';
else
$call = 'add_integration_function';
This is simply because there is no need to create a different file to make it 2.0 compliance, just because the path has changed, we just accommodate it to work for both 1.1 and 2.0.
Thirdly, so far everything was called exactly the same in 2.0 except for languages, which as I noted above earlier, that you must use English.php, and put it at the above LANGUAGEDIR, and load it like this:
// Load language(s)
if (is_dir(SOURCEDIR . '/ElkArte/Languages'))
loadLanguage('Masa'); // ElkArte 2.x
else
loadLanguage('Masa/Masa'); // ElkArte 1.1
Also please note that above all, you addon(s) must be php8 compliance, otherwise, you may get error(s), since 2.0 is for php8 and above.
I think that is about all that was needed to be edited in making your 1.1 addon(s) 2.0 compatible, so good luck.