As far as I know it should be enough to add customUI/customUI.xml file and modify _rels/.rels file.
Couple yeas ago I succesfully made file like that, but with newly created xlsm Excel file it fails.
i've tried:
add to .rels file:
<Relationship Type="http://schemas.microsoft.com/office/2007/relationships/ui/extensibility" Target="/customUI/customUI14.xml" Id="R131e66a518624244" />
with customUI14.xml:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon>
<officeMenu>
<button id="MyCustomButton1" label="My Macro" imageMso="HappyFace" onAction="Macro1" />
</officeMenu>
</ribbon>
</customUI>
and I tried add to .rels file:
<Relationship Type="http://schemas.microsoft.com/office/2006/relationships/ui/extensibility" Target="/customUI/customUI.xml" Id="R131e66a518624244" />
with customUI.xml:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon>
<officeMenu>
<button id="MyCustomButton1" label="My Macro" imageMso="HappyFace" onAction="Macro1" />
</officeMenu>
</ribbon>
</customUI>
in both scenarios Excel says that the file is corrupted. Any ideas?
Edit:
Probably I packed folder instead files inside folder...
Yeash... so the problem was that I manually was packing whole folder instead its content only
Related
I try to learn how to do an installer with WIX on Visual Studio 2012, First I create an HelloWorld Project to test WIX and to do an easy configuration. But I have an error during the building : It says me :
"Failed to open the database. During validation, this most commonly happens when attempting to open a database using an unsupported code page or a file that is not a valid Windows Installer database. Please use a different code page in Module/#Codepage, Package/#SummaryCodepage, Product/#Codepage, or WixLocalization/#Codepage; or make sure you provide the path to a valid Windows Installer database. light.exe 0 1 SetupProject1"
I see several solution like change XML's encoding, switch utf-8 by utf-16. And I also try to delete the encoding statement. But it changes nothing.
Here is my WIX XML :
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="54612752-7163-4B36-8CA6-01615090CD7F" Name="WIXTestSetup" Language="1033" Codepage="1252" Version="1.0.0.0" Manufacturer="MyCompany Ltd."
UpgradeCode="1756bfd5-c713-412a-9524-fb1b72886116">
<Package Id="*" Keywords="Installer" Description="My WIXTest Installer" Languages="1033" SummaryCodepage="1252" InstallerVersion="200"
Compressed="yes" InstallScope="perMachine" Comments="WIXTest Installer is a registered trademark of MyCompany and Co.Ltd" />
<Media Id="1" Cabinet="Sample.cab" EmbedCab="yes" DiskPrompt="CD-ROM #1" />
<Property Id="DiskPrompt" Value="WIXTestSetup Installation [1]"/>
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<Feature Id="ProductFeature" Title="WIXTestSetup" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder" Name="PFiles">
<Directory Id="MyCompany" Name = "MyCompany" >
<Directory Id="INSTALLFOLDER" Name="WIXTestSetup" />
</Directory>
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
<Component Id="MainExecutable" Guid="4BFF8919-9C07-4BBE-BD1C-46AB49524566">
<!-- TODO: Insert files, registry keys, and other resources here. -->
<File Id="WIxTestExe" Name ="WIXTest.exe" DiskId="1" Source="D:\PROJETS VISUAL STUDIO\Projects\MyFirstWIXProject\MyFirstWIXProject\bin\Debug\MyFirstWIXProject.exe" KeyPath="yes" />
</Component>
<Component Id="ProgramFilesFolder" Guid="53B3FC8A-9D2B-4CDD-BE68-D155435C6163">
<RemoveFolder Id="ProgramFilesFolder" On="uninstall"/>
</Component>
</ComponentGroup>
</Fragment>
</Wix>
I also check "CodePage" and "SummaryCodePage" but I've not resolve the build problem.
I've tried that too : WiX ICE validation errors
Have you some Idea to fix it ?
In the database validation step, light.exe tries to reopen the MSI file for read/write access While anti virus scanning the new msi file that been created.
Try to do the following:
Exclude the temporary directory from the real-time virus scan.
Adding English input language in Windows' regional settings.
Disable the ICE validation. Go to the wix Project Properties, Tool Settings, then checked "Suppress ICE validation".
You can check discussion related to this topic, here:
Error LGHT0301: Failed to open the database
I want to add code in all controller file of module in admin side using OCMOD.
My code is:
<file path="admin/controller/module/*.php">
<operation>
<search trim="true"><![CDATA[
public function index() {
]]></search>
<add position="after" trim="true"><![CDATA[
$this->document->addScript('catalog/view/javascript/xxxx.js');
]]></add>
</operation> </file>
But it doesn't work.
I have try your code. It is working fine. please try following.
You have to create ocmod xml file with ".ocmod.xml" extension, then you can upload that file using "Extension Installer" from admin panel of opencart.
You have to clear and refresh the modification cache to update the system and make the extension work. You can clear and refresh by top right buttons on Extension > Modification page in admin panel.
Example OCMOD file with your code: (File name: test.ocmod.xml)
<?xml version="1.0" encoding="utf-8"?>
<modification>
<code>mycode001</code>
<name>Modification Default</name>
<version>1.0</version>
<author>OpenCart</author>
<link>http://www.opencart.com</link>
<file path="admin/controller/module/*.php">
<operation>
<search trim="true">
<![CDATA[public function index() {]]>
</search>
<add position="after" trim="true">
<![CDATA[$this->document->addScript('catalog/view/javascript/xxxx.js');]]>
</add>
</operation>
</file>
</modification>
<publishers>
<xmllogger>
<logDir>log</logDir>
</xmllogger>
<merge>
<files>
<file action="Copy" deleteAfterMerge="false">C:\_CCNET\Aso\Artifacts\msbuild-results.xml</file>
<file action="Copy" deleteAfterMerge="false">C:\_CCNET\Aso\Build\src\TestResult.xml</file>
</files>
</merge>
<email from="xx#xx.net" mailhost="mail.xx.net" mailhostUsername="xx" mailhostPassword="xx">
<users>
<user name="x" group="developers" address="xx#gmail.com"/>
</users>
<groups>
<group name="developers" />
</groups>
</email>
</publishers>
and xmllogger create folder log and save file in it with random name like log20111229001245.xml.
How can I merge this file to msbuild-results.xml and send it with mail?
You don't, at least not the way you are approaching this. The standard way would be:
Replace your xmllogger configuration with simple <xmllogger/> and put it after the merge publisher.
Unless the msbuild-results.xml and TestResult.xml files are very large, use action="Merge" instead of Copy for the merge publisher.
Set you email publisher to includeDetails="TRUE" - once the other files are merged into you build report, that tells CruiseControl.Net to output the full build report in the email.
I've created a rptdesign file using BIRT IDE. This file contents are in Arial font, when I export the report to PDF in windows it works fine.
I uses the default viewerServlet to create reports. But when I moved the report to a linux system, all contents in the report was displayed in Times New Roman font instead of Arial in th PDF file.
Then I copied the Arial.ttf file to /var/font/truetype and added the following line to platform/plugins/org.eclipse.birt.report.engine.fonts_2.3.2.r232_20090202/fontsConfig.xml
<font-paths>
---------------
---------------
---------------
<path path="/var/font/truetype" />
</font-paths>
After adding this line all contents are coming in Arial font, but the contents which are bold appears to compressed and look very ugly.
Has anyone faced this problem and has any solution?
Thank you
Regards,
Arun
Here is my fontsConfig_pdf.xml file
<font>
<font-aliases>
<mapping name="sans-serif" font-family="Arial" />
<mapping name="serif" font-family="Times-Roman" />
<mapping name="monospace" font-family="Courier" />
</font-aliases>
<font-encodings>
<encoding font-family="Times-Roman" encoding="Cp1252" />
<encoding font-family="Helvetica" encoding="Cp1252" />
<encoding font-family="Courier" encoding="Cp1252" />
<encoding font-family="Zapfdingbats" encoding="Cp1252" />
<encoding font-family="Symbol" encoding="Cp1252" />
<encoding font-family="STSong-Light" encoding="UniGB-UCS2-H" />
<encoding font-family="STSongStd-Light" encoding="UniGB-UCS2-H" />
<encoding font-family="MHei-Medium" encoding="UniCNS-UCS2-H" />
<encoding font-family="MSung-Light" encoding="UniCNS-UCS2-H" />
<encoding font-family="MSungStd-Light" encoding="UniCNS-UCS2-H" />
<encoding font-family="HeiseiMin-W3" encoding="UniJIS-UCS2-H" />
<encoding font-family="HeiseiKakuGo-W5" encoding="UniJIS-UCS2-H" />
<encoding font-family="KozMinPro-Regular" encoding="UniJIS-UCS2-H" />
<encoding font-family="HYGoThic-Medium" encoding="UniKS-UCS2-H" />
<encoding font-family="HYSMyeongJo-Medium" encoding="UniKS-UCS2-H" />
<encoding font-family="HYSMyeongJoStd" encoding="UniKS-UCS2-H" />
</font-encodings>
<font-paths>
<path path="/var/fonts/truetype"/>
</font-paths>
<composite-font name="all-fonts">
<font font-family="Times-Roman" catalog="Western" />
<font font-family="MSung-Light" catalog="Chinese" />
<font font-family="HeiseiKakuGo-W5" catalog="Japanese" />
<font font-family="HYGoThic-Medium" catalog="Korean" />
</composite-font>
</font>
Try explicitly stating your path to the font like this:
<font-paths>
<path path="/var/font/truetype/arial.ttf" />
</font-paths>
Setting this property (font-paths) cause the default fonts directory to be ignored in favor of only the paths in this set. This will make Arial the only available font for your PDF. To include the default fonts (TNR, Courier, etc...) add the default path (org.eclipse.birt.report.engine.fonts) under the eclipse plug-ins to you font-paths entries as well.
You can also choose to just add Arial.ttf to the default directory and REMOVE ALL ENTRIES from font-paths and pick up the Arial type that way. Either way should work.
Good Luck.
Can any one tell me if there is any
issue with Arial font in linux, if the
characters are set as bold
Everything works fine for us. Below is my patch for fontsConfig.xml:
<font-aliases>
<mapping name="sans-serif" font-family="Arial" />
...
</font-aliases>
<font-paths>
<path path="fonts"/>
</font-paths>
Put in fonts folder arial.ttf and arial.xml files.
I spent hours searching for this:
export BIRT_FONT_PATH=/usr/share/fonts/truetype
Execute this and done!
Then I copied the Arial.ttf file to /var/font/truetype
Arial.ttf only contains the plain version of the font.
For bold, italic and italic-bold there are different files (arialbd.ttf etc).
Just copy these, too.
I had successfully extracted the compilation log present in my IDE into some one xml file very well. So in order to merge it I had mentioned in my ccnet.config file inside the publisher task using the <merge>
section.
But when I force my build, I am able to get the output.xml file correctly but an
error is thrown in ccnet.config window that it is unable to merge as this file is currently used by some other process.
Please see below:
[VSAT:ERROR] Publisher threw
exception:
ThoughtWorks.CruiseControl.Core.CruiseC
ontrolException: Unable to read the
contents of the file: C:
\ThreePartition\outp ut.xml --->
System.IO.IOException: The process
cannot access the file 'C:\ThreeP
artition\output.xml' because it is
being used by another process.
Can you suggest any method by which merging can be done successfully?
I have pasted the whole ccnet.config file below.
<project name="VSAT">
<sourcecontrol type="filtered">
<sourceControlProvider type="filesystem">
<repositoryRoot>C:\ThreePartition</repositoryRoot>
<autoGetSource>true</autoGetSource>
<ignoreMissingRoot>false</ignoreMissingRoot>
</sourceControlProvider>
<exclusionFilters>
<pathFilter>
<pattern>C:\ThreePartition\wrSbc750gx_ThreePartition\**</pattern>
</pathFilter>
<pathFilter>
<pattern>C:\ThreePartition\*.txt</pattern>
</pathFilter>
<pathFilter>
<pattern>C:\ThreePartition\*.xml</pattern>
</pathFilter>
</exclusionFilters>
</sourcecontrol>
<triggers>
<intervalTrigger name="continuous" seconds="240"
buildCondition="IfModificationExists" />
</triggers>
<tasks>
<nant>
<executable>C:\Nant-0.85\bin\NAnt.exe</executable>
<buildFile>nant.build</buildFile>
</nant>
</tasks>
<publishers>
<merge>
<files>
<file>C:\ThreePartition\output.xml</file>
</files>
</merge>
<xmllogger logDir="C:\Program Files\CruiseControl.NET\server\DF2.0-CI
\Logfiles" />
<email from="BuildAdmin#server.com"
mailhost="smtp.servermail.com" includeDetails="TRUE">
<users>
user name="Maddy" group="buildmaster"
address="Mymail#server.com"/>
</users>
<groups>
<group name="buildmaster" notification="always"/>
<group name="developers" notification="change"/>
</groups>
</email>
</publishers>
</project>
</cruisecontrol>
I had just placed the publishers section below for the better view
<publishers>
<merge>
<files>
<file>C:\ThreePartition\output.xml</file>
</files>
</merge>
<email from="BuildAdmin#server.com" mailhost="smtp.server.com" includeDetails="TRUE">
<users>
<user name="Maddy" group="buildmaster" address="Maddy.#server.com"/>
</users>
<groups> <group name="buildmaster" notification="always"/>
<group name="developers" notification="change"/>
</groups>
</email>
Some ideas:
Eliminate other obvious applications that would be writing to that file: other CCNet projects, other CCNet instances (e.g. are you maybe running the service and something from the command line?), or perhaps your source control.
If you're not attached to NAnt, try MSBuild and see if you get the same error. If all you're doing is compiling, you can pass the .sln or .csproj as a parameter directly to MSBuild.
Make sure you're on the latest version of CCNet - they regularly publish what I would consider fairly major bug fixes regularly.
What is says: the question is which process has open your xml while CC.net is trying to merge -- perhaps Process Explorer could be useful? Perhaps it works if you copy the xml output to a separate file and merge that.