Why is the ShortcutPanel not shown in izpack? - installation

I am trying to make an installer with izpack 4.3.5. While installing, a shortcut should be added to the users Desktop. Though I have added the ShortcutPanel and did not add the skipOnNotSupported no panel is shown and no shortcut is created though it complies successfully.
I already took a look at the following post (izpack: create shortcut on windows) but couldn't figure out my mistake.
Here is part of my install-file:
<panels>
<panel classname="TargetPanel"/>
<panel classname="PacksPanel"/>
<panel classname="ShortcutPanel"/>
<panel classname="InstallPanel"/>
<panel classname="SimpleFinishPanel"/>
</panels>
<packs>
...
</packs>
<resources>
<res src="shortcut.xml" id="shortcut.xml"/>
</resources>
<natives>
<native type="izpack" name="ShellLink.dll"/>
<native type="izpack" name="ShellLink_x64.dll"/>
</natives>
And here is my shortcut XML:
<izpack:shortcuts version="5.0"
xmlns:izpack="http://izpack.org/schema/shortcuts"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://izpack.org/schema/shortcuts http://izpack.org/schema/5.0/izpack-shortcuts-5.0.xsd">
<shortcut
name = "test"
target = "$INSTALL_PATH\test.jar"
description="test"
programGroup="true"
desktop="yes"
applications="yes"
startMenu="yes"/>
<lateShortcutInstall />
</izpack:shortcuts>
Any ideas?
UPDATE:
I also tried to remove the lateShortcutInstall, but nothing changed.
Thanks in advance

You are trying to make install files for izPack version 5 work with izPack 4.3.5 (notice the version="5.0" in the shortcut XML?). This will not work as the format has changed in subtle details.
I suggest that you move to a current izPack 5 version (5.1.0 has just been released). It is actively maintained, more stable and better documented than 4.3.5.
If you are stuck on 4.3.5 please read my other post here: izpack-maven-plugin is not including native libraries by default and remove the <natives> element.

Related

Why emulator not opening? (Xamarin)

https://i.stack.imgur.com/S2za3.jpg
Emulator(phone) won't open. What is the problem?
Output: Hardcoded string "Button", should use #string resource
when another emulator(phone) is installed it gives this error
https://i.stack.imgur.com/54dEY.jpg
Output: The package was not installed. Please check you do not have it installed under any other user. If the package does show up on the device, try manually uninstalling it then try again. You should be able to uninstall the app via the Settings app on the device.
NOW
I deleted the old app links. The second error is over. The first error persists. The emulator does not open on the phone.
Output: Hardcoded string "Button", should use #string resource
This is a warning not an error. This warning would not affect the app running. I was able to reproduce this when set the text like below.
<Button
android:id="#+id/button1"
android:text="Button"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
If you want to fix the warning, add a Strings.xml in you value folder of Resources. Strings.xml is a string table to help with localization of the application.
Add the codes below into Strings.xml:
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<string name="Button_Text">Hello</string>
</resources>
And use it in your Layout:
android:text="#string/Button_Text"

Register Windows Application for tel and callto protocols

First of all let me say that we are pretty new with this "windows app" developing process.
Our customers want us to develop an app working as click to call. The app is working just fine, but we are encountering problems with that appearing in the "default apps for protocol" menus for callto and tel protocols.
We are kinda clueless about the steps needed to achieve this goal.
What we tried:
Adding the following to the manifests files.
<Applications>
<Application Id="App" StartPage="default.html">
<Extensions>
<Extension Category="windows.protocol">
<Protocol Name="alsdk" />
</Extension>
</Extensions>
</Application>
</Applications>
Modifying the registry keys:
[HKEY_CLASSES_ROOT\tel]
#="URL:custom_app"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\tel\shell]
[HKEY_CLASSES_ROOT\tel\shell\open]
[HKEY_CLASSES_ROOT\tel\shell\open\command]
#="<path_to_exe>.app.exe" "%1"
Any help WILL be appreciated. Thanks in advance.
Solved by registering the app first and then creating all the needed associations.
Windows Registry Editor Version 5.00
;Register The App
[HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications]
"CustomApp"="Software\\Clients\\CustomApp\\Capabilities"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\CustomApp]
#="CustomApp"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\CustomApp\Capabilities\StartMenu]
"CustomApp"="CustomApp"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\CustomApp\Capabilities\UrlAssociations]
"callto"="CustomApp.callto"
"tel"="CustomApp.tel"
[HKEY_CLASSES_ROOT\CustomApp.callto]
#="CustomApp callto Handler"
[HKEY_CLASSES_ROOT\CustomApp.callto\shell\open\command]
#="\"<path_to_app>\\CustomApp.exe\" \"%1\""
[HKEY_CLASSES_ROOT\CustomApp.tel]
#="CustomApp tel Handler"
[HKEY_CLASSES_ROOT\CustomApp.tel\shell\open\command]
#="\"<path_to_app>\\CustomApp.exe\" \"%1\""
If you have any file associations, you can add them easily doing this:
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\CustomApp\Capabilities\FileAssociations]
".foo"="CustomApp.foo"
[HKEY_CLASSES_ROOT\CustomApp.foo]
#="CustomApp foo Handler"
[HKEY_CLASSES_ROOT\CustomApp.foo\shell\open\command]
#="\"<path_to_app>\\CustomApp.exe\" \"%1\""

How to run application as administrator in Qt

How can I start my Qt application as administrator or get a prompt when admin privilege is needed? I have tried everything in the posts that I could find about it and most of them are a few years old. Nothing has worked and everyone seems to have a different spin on it. I have downloaded the windows SDK to get mt.exe, created the manifest files, the RC file and every other methods including right click and set the application to start in administrator mode. Nothing has worked. I need it because a task in my program requires administrator privilege. QFile::errorString() says access denied. Does anyone know how to make this work?
Okay so I found the answer to my question. I had found some solutions before, but they were not working. I found the reason why they were not working. The reason was very stupid: It was because the folder that my files were in had a space between the first and second word like (my app) which causes an error about not being able to find the location.It should be (myapp) with no spaces. The error about location not found was only happening when trying to add the adim privileges. Otherwise everything worked fine and there were no errors. So here is the solution and make sure there are no spaces in folder names.
1) Create the rc file :Open notepad and paste the following text inside then
save the file as yourappname.rc This creates the rc
file. Put the file in the folder that has all of your sourcecode and pro
file.
#include <windows.h>
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "yourappname.exe.manifest"
2) Create the manifest file with notepad, paste the following text, and save it
as yourappname.exe.manifest and put it in the same location as above.
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="2.0.0.0" processorArchitecture="X86"
name="yourappname.yourappname" type="win32" />
<description>A discription of your app</description>
<dependency />
<!-- Identify the application security requirements. -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="requireAdministrator"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
3) In your pro file put the following text:
win32 {
RC_FILE = yourappname.rc
}
That's it. Now your application should start with administrator privileges.
There are similar post that describe this process too. Just make sure there are
no spaces in your folder names or it won't work. Also you MUST run qt with
administrator privileges for it to work. Right click Qt and run as
administrator before trying to compile.
Works for me (add in your_project.pro):
win32 {
CONFIG += embed_manifest_exe
QMAKE_LFLAGS_WINDOWS += /MANIFESTUAC:"level='requireAdministrator'"
}
To get the require admin prompt to display, I simply added
QMAKE_LFLAGS += /MANIFESTUAC:\"level=\'requireAdministrator\' uiAccess=\'false\'\"
to my qmake file. I use this in my projects all the time.
Easiest way is config at project Run configuration, adding this env variable:
__COMPAT_LAYER=RUNASINVOKER
then cleanup and rebuild and run again the proj, it will work.

Running phpdoc through Phing, phpdocumentor.ini location

I'm rebuilding my xampp and CI environment (on win7) from scratch but am having trouble running phpdoc through phing. In particular, Phing is looking to phpdocumentor.ini in a place that doesn't exist (and never has).
Phing and PhpDocumentor have both been installed through Pear, paths setup seems fine, and have these versions:
php version 5.4.7
pear version 1.9.4
phpdoc version 2.0.1
phing version 2.6.1
Relevant paths on the system are:
H:\xampp\php;
H:\xampp\php\pear;
On my sample project:
I can run phpdoc without a hitch, for example: phpdoc -d apps -t docs runs fine.
Here's my phpdoc task, which has worked well in the past:
<phpdoc title=Docs" destdir="${docsdir}" sourcecode="false" output="HTML:frames:earthli">
<fileset dir="./apps">
<include name="**/*.php" />
</fileset>
<projdocfileset dir=".">
<include name="README" />
<include name="INSTALL" />
<include name="CHANGELOG" />
</projdocfileset>
</phpdoc>
When I run Phing, phpdoc fails with the following notice:
Parsing configuration file phpDocumentor.ini...
(found in C:\php\pear\data/PhpDocumentor/)...
ERROR: cannot open phpDocumentor.ini in directory
-Is phpdoc in either the path or include_path in your php.ini file?
There is no c:\php... directory, and never has been, so I don't know where this has come from.
I can only get this working if I create the whole PHPDocumentor structure Phing anticipates on C: but I'd ideally like to get the ini file's anticipated location changed so I have everything on the one drive.
Is there any way I can inform Phing of the true location of my phpdocumentor.ini?
I've not found this specific problem listed on SO, but am hopeful someone else has seen and rectified this. The Phing site docs/forum/trac don't list any recent reports of this problem.
Thanks all
It looks like you're trying to use phpDocumentor 2.x and seeing some behavior from what looks like phpDocumentor 1.x. Perhaps there is some 1.x code that came with the XAMPP source that is lingering and affecting your ability to run 2.x cleanly.
In considering the Phing angle, in glancing at the Phing manual, it looks like the correct Phing task to use for phpDocumentor 2.x is the DocBlox task [1] rather than the old PhpDoc task.
[1] -- http://www.phing.info/docs/guide/stable/apcs52.html.
Downloading the latest zip archive release of XAMPP for Windows I see that the file:
\xampp\php\pear\PhpDocumentor\phpDocumentor\Setup.inc.php
the function parseIni() refers directly to the aforementioned path:
enter code herephpDocumentor_out(" (found in " . 'C:\php\pear\data/PhpDocumentor' . PATH_DELIMITER . ")...\n");
So its more likely to be a XAMPP problem than any of the components I've been upgrading or force-reinstalling.

Install a pfx certificate in a users store in Windows using WiX

Please, can someone provide me with a WiX snippet or solution for the mentioned scenario. I need to include the pfx file in the WiX msi and the user will download my msi to his machine via the internet explorer and Click install and I need also the certificate to be installed on his machine.
You need the Certificate element. It is part of the IIS extension for wix, but can be used for non-IIS related installations also.
You need to
declare a prefix for the iis namespace, for
example like this in the root Wix element:
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'
xmlns:iis='http://schemas.microsoft.com/wix/IIsExtension'>
Embed the PFX file as a binary
stream in your install package. Add
a Binary element under the
product element like this:
<Binary Id="MyCertificateBinaryStream"
SourceFile="c:/path/to/mycertificate.pfx" />
Declare a component with a <iis:Certificate> element, for
example like this. Look at the
documentation, you need to fill in some
more attributes. Note that you don't need CertficatePath if you use the BinaryKey attribute.
<Component Id="MyCertificateComponent" Guid="MY-GUID-HERE">
<iis:Certificate Id="MyCertificate"
BinaryKey="MyCertificateBinaryStream"
... some more attributes ...
/>
</Component>
Activate the IIS extension by adding
the option -ext WixIISExtension
option when invoking the wix command line tools. If you use visual studio, this is just a matter of adding a reference in your wix project to WixIISExtension.
To expand on the answer a little, the following set of attributes worked for me:
<iis:Certificate
Id="My.Certificate"
StoreName="root"
Overwrite="yes"
Name="My Friendly Certificate Name"
Request="no"
BinaryKey="MyCertificate.Binary"
StoreLocation="localMachine" />
Where the <Product> element contained a <Binary> child as follows:
<Binary
Id="MyCertificate.Binary"
SourceFile="$(var.ProjectDir)MyCertificate.pfx" />
(I included the PFX file within my WiX project).

Resources