I am building a Joomla package with a component, multiple modules and a plugin.
My question is, where should I place the install.sql and uninstall.sql files, relative to the package root? Right now they are at root/com_mypackage/administrator/sql/install.mysql.utf8.sql and they are defined in the component's manifest as:
<install><!-- Runs on install -->
<sql>
<file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file>
</sql>
</install>
However, this doesn't seem right to me. Should I include administrator before the path in the <file> tag?
Of course, the component itself will be packed in its own .zip, to be included in the Package's XML install file.
No there is no need to this tag in administrator tag. you missing some in manifest.xml
for fully doc try:-
http://docs.joomla.org/Developing_a_Model-View-Controller_Component/2.5/Adding_an_install-uninstall-update_script_file
http://docs.joomla.org/Components:xml_installfile
on my end manifest.xml (my .sql in admin/install/install.mysql.utf8):-
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="2.5" method="upgrade">
<name>Social</name>
<license>Open Source License, GPL v2 based</license>
<author>me</author>
<authorEmail>developers#me.com</authorEmail>
<authorUrl>http://www.me.com</authorUrl>
<creationDate>2012-01-01</creationDate>
<copyright>2013, me</copyright>
<version>1.1</version>
<description></description>
<!-- Installation -->
<install>
<sql>
<file driver="mysql" charset="utf8">install/install.mysql.utf8.sql</file>
</sql>
</install>
<installfile>install/install.php</installfile>
<uninstall>
<sql>
<file driver="mysql" charset="utf8">install/uninstall.mysql.utf8.sql</file>
</sql>
</uninstall>
<uninstallfile>install/uninstall.php</uninstallfile>
and rest of
Related
I want to create my own custom package for System.Data.SQLite. I have the all the dll's I need but I'm unsure how to structure it and create the nuspec for it.
Current folder structure of the dll's is this, whereabouts would I put the different interop dlls to have them copied correctly to the output and what do I need to add to the nuspec?
lib/net452
-> System.Data.SQLite.dll , System.Data.SQLite.Linq.dll, System.Data.SQLite.EF6.dll
Custom.SQLite.nuspec
Still have the default nuspec something like this atm
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
<metadata minClientVersion="2.5">
<id>Custom.SQLite.Name</id>
<version>1.0.0.0</version>
<authors>name</authors>
<owners>owner</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Desc</description>
<copyright>Copyright 2021</copyright>
</metadata>
</package>
SQLite.Interop.dll does not act as a lib assembly dll. That is not its role. And it should be a content file rather than a assembly dll. So it should not be packed as lib.
To create such custom nuget package, you should first pack System.Data.SQLite.dll, System.Data.SQLite.Linq.dll, System.Data.SQLite.EF6.dll as lib. See this document.
and then pack SQLite.Interop.dll as content.
Also, to make the content file be copied into the output folder of the main project when you install the nuget package, you have to use a <packages_id>.props or targets file to realize it.
1) create a file called <packages_id>.props into your class library project. And it should be the same name as your nuget package. In your side, it should be named as Custom.SQLite.Name.props. Otherwise, it will not work.
And then add these into the file:
<Project>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)..\content\x86\SQLite.Interop.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="$(MSBuildThisFileDirectory)..\content\x64\SQLite.Interop.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
2) use this nuspec file:
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
<metadata minClientVersion="2.5">
<id>Custom.SQLite.Name</id>
<version>1.0.0.0</version>
<authors>name</authors>
<owners>owner</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Desc</description>
<copyright>Copyright 2021</copyright>
</metadata>
<files>
<file src="System.Data.SQLite.dll" target="lib\net452" />
<file src="System.Data.SQLite.EF6.dll" target="lib\net452" />
<file src="System.Data.SQLite.Linq.dll" target="lib\net452" />
<file src="xxx\x86\SQLite.Interop.dll" target="content\x86" />
<file src="xxx\x64\SQLite.Interop.dll" target="content\x64" />
<file src="Custom.SQLite.Name.props" target="build" />
</files>
</package>
3) rebuild your lib project and then use nuget pack to pack the new version.
Before you use this new version, please uninstall the old one and delete all cache files under C:\Users\xxx\.nuget\packages\Custom.SQLite.Name and <solution_folder>\packages\Custom.SQLite.Name.1.0.0. Then, reinstall the new version.
I created a nuget package, all seems to be ok (no error message), when I install it from Package Manager Console, the dll is in XXX/lib/lib ... I don't know why there are two lib folder ??? I tried to change my nuspec with several solutions but I always had the same folder
<package>
<metadata>
<id>Telerik.Reporting.OpenXmlRendering</id>
<version>8.1.14.804</version>
<title>Telerik.Reporting.OpenXmlRendering</title>
<authors>XXXXX</authors>
<owners>XXXXX</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Assembly XXXX</description>
<copyright>Copyright XXXX</copyright>
<references></references>
<tags></tags>
</metadata>
<files>
<file src="*.dll" target=".\" />
</files>
</package>
I tried
<file src="*.dll" target="lib\net45" />
<file src="*.dll" target="lib\" />
<file src="*.dll" target="" />
And the installed always put the dll in :
C:\XXXXXX\packages\Telerik.Reporting.OpenXmlRendering.8.1.14.804\lib\lib
Do you have any ideas ?
Thanks
I've made a NuGet package that has a lib/Xamarin.iOS10 folder with a dll inside it.
I've created a test project (an iOS unified API Single View App) and I try to add my package but I get this response:
Could not install package 'mypackage 1.0'. You are trying to install
this package into a project that targets 'Xamarin.iOS,Version=v1.0',
but the package does not contain any assembly references or content
files that are compatible with that framework. For more information,
contact the package author.
Extracting the file, I can verify that my dll is present.
This is the nuspec file:
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata minClientVersion="2.8">
<id>MyPackage</id>
<version>1.0</version>
<title>My Package</title>
<authors>Kristian</authors>
<owners>Kristian</owners>
<developmentDependency>true</developmentDependency>
<licenseUrl>http://www.opensource.org/licenses/mit-license.php</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Experiment Package</description>
<summary />
<language>en-US</language>
<tags></tags>
<dependencies>
<dependency id="Fody" version="1.29.3"/>
</dependencies>
</metadata>
<files>
<file src="../MyPackage.XamarinIOS/bin/iPhone/Release/MyPackage.dll" target="lib/Xamarin.iOS10/MyPackage.dll" />
</files>
</package>
Is there anything else I need to do? I am not using the new project.json format for my package.. I am using Xamarin Studio version 5.9.8.
Shouldn't that be:
target="lib/xamarinios10/MyPackage.dll"
Instead of your Xamarin.iOS10 path?
I developed a joomla component. But I got this error while trying to install it.
"JInstaller: :Install: Cannot find Joomla XML setup file"
Error
Path does not have a valid package.
Below is myforms.xml file
<? xml version = "1.0"encoding = "utf-8" ?>
<extension type="component" version="3.2" method="upgrade">
<name>My Forms!</name>
<creationDate>Sept 09 2014</creationDate>
<author>Toni Ezeamaka</author>
<authorEmail>tons613#ymail.com</authorEmail>
<copyright>A-One GlobalSoft Technologies</copyright>
<version>1.0.1</version>
<description>A component for adding forms to my sites</description>
<installfile>install.php</installfile>
<uninstallfile>uninstall.php</uninstallfile>
<scriptfile>script.php</scriptfile>
<update>
<schemas>
<schemapath type="mysql">sql/updates/mysql/</schemapath>
</schemas>
</update>
<files folder="site">
<filename>index.html</filename>
<filename>myforms.php</filename>
<filename>controller/myforms.php</filename>
<folder>views</folder>
<folder>models</folder>
</files>
<administration>
<!-- Administration Menu Section -->
<menu>My Forms!</menu>
<files folder="admin">
<filename>index.html</filename>
<filename>myforms.php</filename>
<filename>controller.php</filename>
<folder>sql</folder>
<folder>tables</folder>
<folder>models</folder>
<folder>views</folder>
</files>
</administration>
</extension>
can someone help please?
The Issue was with the space in <? xml
I changed it to <?xml version = "1.0"encoding = "utf-8"?>
and it worked. Thanks to #Irfan
I think the problem lies in my xml.
<?xml version="1.0" encoding="UTF-8"?>
<extension version="2.5" type="plugin" group="content">
<install>
<name>Content - eya</name>
<author>eya</author>
<creationDate>February 2013</creationDate>
<copyright>(C) 2013 Open Source Matters. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>anigag#grzeit.com</authorEmail>
<authorUrl>www.eya.com</authorUrl>
<version>2.5.0</version>
<description>Adds eya plugin ot your site</description>
<files>
<filename plugin="eya">eya.php</filename>
</files>
</install>
<administration >
<filename>admin.php</filename>
</administration>
</extension>
This is my main php file that executes the content:eya.php.
I have got another file (admin.php) that takes 2 session variables from eya.php and put them in an iframe. There are two problems. One is that I dont know if the eya.php runs everytime before admin.php (or at least once to set the session variables). The second problem is that I dont know how to display only the admin.php and nothing else.
to build an admin interface for your plugin just add the config part to your xml
<config>
<fields name="params">
<fieldset name="basic">
<field name="testfield" type="text" default="mytest" label="field_label" description="field_description" />
</fieldset>
</fields>
</config>
but I didn't get the part of your admin.php/eya.php