Check for a file existence in WIX SEtup - asp.net-mvc

I am creating a Setup for my .Net Application using WIX.
I want to check the existence of a file before installing my WIX SET UP as a Dependency.
If that file not exist then a message should be displayed.
Any help would be appreciated.

To check for the existence of a file you can use the FileSearch-element in combination with the DirectorySearch-element. For an example you can take a look at How To: Check the Version Number of a File During Installation (you don't have to use the version part for your needs).
For displaying the dialog you can create your own SpawnDialog like described here. Another alternative would be to add the text as property to the Welcome-dialog and set the property based on your findings. Still another way would be to include a second Welcome-dialog and then invoke the needed one as described in this stackoverflow-question.

Related

How to assign a copied jira board to project using API?

I'm trying automatize some processes. I create a project using Jira API and can not find possibilities to change the board's setting using API.
How I am doing it using UI. Firstly I copy the board then I walk to my copied board's settings and change its location to desired project. After that I delete the old board of this project. I did not find any method for assign board's configuration. There are only some API methods for getting configuration not setting. Have you got any suggestions for this ?
It doesn't look like there are currently any API methods that would allow you to perform that change. My suggestion would be instead use the Create method to create a new board with the copied configuration, and set the project location during creation.
You could also potentially try use the https://sitename.atlassian.net/rest/greenhopper/1.0/rapidviewconfig/boardLocation PUT method, which is what's called when you change the location from the UI. However that is from the frontend, so your mileage may vary as far as authentication and use in general.

NopCommerce Plugin Localization

I am working on a NopCommerce website and have quite a bit of site-wide customization so I have created a plugin to handle it all but not sure on how to handle the localization. I see there are a couple of ways of updating the Localization strings, one way I have found is in the Plugin's Install() method:
this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.AdditionalFee", "Additional fee");
This looks like it only adds new resource strings for the plugin, is there a similar way to update the other resources via the Install() method like:
Admin.Catalog.Products.List.DownloadPDF
I found that there is a way to export the entire language to a language_pack.xml file, would it be better to just create an entire language pack instead? Is there a way to add a new language pack from the plugins Install() method?
I guess I could simply open the language_pack.xml file and add each resource found using the AddOrUpdatePluginLocaleResource, I was hoping that there was a built-in way of doing this using NopCommernce functionality.
Thanks!
As #Raphael suggested in a comment, provide a language pack along with plugin file to the end users, and give an option to upload required resource file within your plugin configuration page.
As per as I know, there is no inbuilt way to add language pack on plugin installation, but you can do some code on plugin install method to find language pack file(s) from plugin folder and install it, not quite sure, you can take reference of inbuilt methods.

Advanced Installer: How to pass arguments to executable?

I'm using Advanced Installer to wrap up my executable into a nice friendly package. I would normally launch the executable from the command line via something like this:
> myExecutable.exe firstArg secondArg
Now I'm trying to add these arguments into the Advanced Installer package somehow but it is unclear how to do this. Some posts have suggested I need to add a private or public property, but they don't explain how to do this well. I feel like there should be some straightforward way how to do this within the AI GUI. Any help is much appreciated, thanks!!
In the Finish Actions panel of the ExitDialog is a Launch Application section. It allows you to specify your application path and arguments.
As for using a property, use the Install Parameters screen to add your public (all caps) or private property and simply reference it as [MY_PUBLIC_PROPERTY] in the Arguments: text box.

How to respond automaticly with properties file to a yeoman prompt

When i run a app generator many question is ask by the prompt.
How can i run the "yo" command with, for example, a file with the answers for generate the app automatically without user interaction ?
Thanks
Yeoman supports options and arguments http://yeoman.io/authoring/user-interactions.html
You can skip prompts when an option is provided instead. But this needs to be done manually by the generator author at the moment.
You can check the source code of generator-node and see how it is done over there: https://github.com/yeoman/generator-node/blob/master/generators/app/index.js
A custom adapter can be used to provide answers to questions. This does require creating a new executable though, as the yo command does not support custom adapters.
Find an example of an adapter that answers questions at https://github.com/OctopusSamples/content-team-apps/blob/main/js/octopus-template-generator/src/domain/yeoman/adapter.ts.

Grails using a package to hold domain classes

Grails question: Confused about using a package to hold domain classes.
I'm using Netbeans on Mac to check out Grails.
When I create domain classes without using a package holding it, I can just go to localhost:8080/gTunes and the expected .gsp page is rendered properly.
However when I use a package (com.g2one.gtunes) to hold a domain class (Song), I don't see the .gsp page when I go to localhost:8080/gTunes. Instead I see a Directory view of folders/files such as META-INF, WEB-INF, etc. In order to see the expected .gsp page, I have to type in the specific URL localhost:8080/gTunes/index.gsp
In my research I've seen people talk about adding the following line but I can't figure out where to add it.
<%#page import="path.to.domains.*"%>
Any help is appreciated.
Thank you.
You need to add that import to the top of your GSP pages that use the domain class that you put in a package. Don't forget you'll also need an import in your controllers unless that are in the same package.
Add the specified line as the very first line in the GSP you are trying to render (show).
Figured out why I way I was having this issue. I'm going through Definitive Guide to Grails 2nd Edt on mac with NetBeans. I ran into this problem when I
created 'gtunes' project at /Users/name/NetBeans/gtunes
deleted 'gtunes' project and /Users/name/NetBeans/gtunes
created another project with same name at /Users/name/NetBeans/gtunes. I type in some code and run it and I run into the error I posted.
To get around this error,
I create 'gtunes' project located at /Users/name/NetBeans/gtunes
I right click on 'gtunes' project in NetBeans, issue 'Clean' command. Than I see some files are removed from ~/.grails/... in Output window
I right click on Album.groovy (possibly Song.groovy also) and issue 'Generate Views', NOT 'Generate All'
Run the project and it works!
Thanks all for comments and hopefully my mistake will help others avoid same mistake.

Resources