How to disable default commandline option -help for custom applications? - install4j

Is it possible, to disable the default option -help for an un-/installer or custom install4j application? Our main application uses this option as well and the commandline parameter will not be passed throught to the application when a custom application (update check) is started before the main application. Instead the help dialog is shown. Now I need to delete or suppress this option so the parameter can be handled by the main application. Is it possible?
Thanks in advance
Hardie

Related

Turning Firebase Analytics on on Xcode

I am trying to test the implementation of my Firebase Analytics. In their documentation they state that:
Enable debug mode by passing the -FIRDebugEnabled argument to the
application. You can add this argument in the application’s Xcode
scheme. When debug mode is enabled via -FIRDebugEnabled, further
executions of the application will also be in debug mode. In order to
return to default mode, you must explicitly disable the debug mode
with the application argument -FIRDebugDisabled.
Unfortunately I do not understand where it is that I set this scheme. In Android this was easy. Help would be appreciated.
I have found the answer on this alternative page of Google:
https://firebase.google.com/docs/analytics/ios/start
In Xcode, select Product > Scheme > Edit scheme...
Select Run from the left menu.
Select the Arguments tab.
In the Arguments Passed On Launch section, add -FIRAnalyticsDebugEnabled.
I wish Google would stop releasing half baked products and documentation. Could save hundreds of thousands of hours worldwide
I tried editing scheme and adding parameters, https://firebase.google.com/docs/analytics/ios/start but it did not work for me. In addition, I added following code after configuring FirebaseApp, at AppDelegate, didFinishLaunchingWithOptions
FirebaseApp.configure()
Analytics.setAnalyticsCollectionEnabled(true)
and it worked for me. I hope it helps you too.
I think you should check console log on XCode. Because I will show log
To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see https://help.apple.com/xcode/mac/8.0/#/dev3ec8a1cb4)
Check again, if you don't:
Add key FirebaseCrashlyticsCollectionEnabled has value true in Info.plist
set key IS_ANALYTICS_ENABLED is true in GoogleService-Info.plist
Make sure file GoogleService-Info.plist add will all targets and save in root project

How to handle unattended mode in custom form components?

I finally created my first custom form component and it works like a charm in GUI mode. Now I have to fullfill a requirement that also the silent installation should work. The documentation said to override the handleUnattended() method. But there is not mentioned which other methods will be called during the lifecycle of the custom form.
I implemented the validation of the user input inside the checkComplete() method and depending on the validation result I set a variable to the installer context and switch to the next screen. Will this method also be called after the handleUnattended() method or is this only a method for the GUI mode installation?
And how to get the "user input" from the varfile-file? I suppose to get the variable from the installer context like context.getVariable("some-input"). Is it correct?
Thanks in advance
Hardie
During my research I can answer some questions by myself:
1) checkComplete() is also called independed of the implementation of handleUnattended()
2) vafile arguments are reachable from the installer context
3) with context.isUnattended() it is possible to check, whether you have to display an error dialog or exit the installer process.
Please correct me, if there are any missunderstandings.

setting options while installing or after installing App

I want to set the language for one time once the user downloaded the app and started using it, for only first time. but not all the time he use the app. How can i do that?
like how we get select language options , while installing Microsoft products, etc
is this possible ?
you can control that when you application apears. Did you know about property lists?
You could use it. Or maybe you can create a file with Core data with name Configs. You need to check if field is blank and case yes, open a viewControllerChangeLanguange.After select save the data and start your application. Remember, everytime you start you will check your file. Case exists, set current language.Case not, invoke an interface to user select a language. All the controller could be made by just a file config.

Reporting progress of a org.eclipse.core.runtime.jobs.Job using a org.eclipse.swt.widgets.ProgressBar

I would like to know whether it is possible and good practice to report the progress of a org.eclipse.core.runtime.jobs.Job using a org.eclipse.swt.widgets.ProgressBar.
The javadoc says that the run method of org.eclipse.core.runtime.jobs.Job takes a org.eclipse.core.runtime.IProgressMonitor argument. However I don't want to use a jface ProgressMonitorDialog and I'd rather a non-dialog widget.
Can anyone please advise?
Have a look at org.eclipse.ui.internal.progress.ProgressManager, which extends org.eclipse.core.runtime.jobs.ProgressProvider to provide progress to Jobs. You can provide a ProgressProvider, and that can return your preferred IProgressMonitor for use with Jobs. You can base it on org.eclipse.jface.dialogs.ProgressIndicator or work with ProgressBar directly.
As mentioned by https://stackoverflow.com/users/9204/alexey-romanov in RCP you should use the IProgressSevice if possible, and you can display your progress in the ProgressView already provided in the workbench.
In an RCP application, the best practice is to use IProgressService.

Disable Installed Software & Installation History tab on Help | About | Installation Details

Is there some way I can suppress or disable the "Installed Software" & "Installation History" tabs on Help | About | Installation Details button in a RCP?
I'm not using P2 for this particular application so there will never be any history and the installed software tab has no content.
If you do not want these do show then make sure that the following plug-ins are not deployed in your application's target platform:
org.eclipse.p2.ui
org.eclipse.p2.ui.discovery
org.eclipse.p2.ui.sdk
org.eclipse.p2.ui.updatechecker
Strictly speaking you only really need to remove the first bundle in the above list as the subsequent bundles depend on the core ui bundle. Typically, if I do not want the user to shcedule updates etc. I'll only inlcude the first bundle above. I then build a custom UI around p2 functionality whilst re-using some of the provided core p2 UI API (but without auto-scheduling UI etc. included).
If you want to remove the preference pages for the p2 sheduling/updates, then in your in your WorkbenchAdvisor you can use write the following in the postStartup() method:
PreferenceManager pm =
PlatformUI.getWorkbench(
).getPreferenceManager();
pm.remove("org.eclipse.equinox.internal.p2.ui.sdk.ProvisioningPreferencePage"); pm.remove("org.eclipse.update.internal.ui.preferences.MainPreferencePage");
I ended up deleting the org.eclipse.p2.ui plugin's & features from my built product.
Not the most elegant solution, but it works.
subclass the AboutDialog class and override the createButtonsForButtonBar(Composite) method :)
and use your own InstallationDialog subclass.
to avoid displaying the tabs you don't want you have to override the createFolderItems method.
give a look the loadElements method to understand how this part of the dialog works.