How do I make my Setup project produce an executable? - wpf

I've built a small desktop application with which I am trying to use a Setup project to allow other users to install it. But whenever I run this installer, it does not produce an executable file. This is my first time making a setup project.
My solution contains two projects. One is the setup project which installs the primary output from the other project. The other project is a WPF App that consists of two xaml files, a xaml.cs file for each, an App.config file, and an icon. It also has a few dependencies including one Assembly, two Frameworks, and a handful of Packages. The app works exactly as intended whenever I start a Visual Studio debugging instance on either Debug or Release configurations.
I followed these instructions to build my Setup and deploy my app.
Whenever I ran the resulting Setup, it installed an XML configuration file, a JSON file, a main application dll file, and a bunch of dll files for my assemblies. I looked into some resources on how to run the main dll file properly, only (A) I'm completely stumped by everything I find on that topic, and (B) I would rather just produce an executable file anyway, since I intend for this Setup project to be used by other people and it would be inconvenient to ask said others to jump through the same hoops just to run it.
Why does my Setup project not produce a .exe file? I see that a .exe file is produced in my bin folder whenever I build my project (and this .exe works), so I would think the setup project should also produce one of those, but it doesn't. What am I doing wrong with my Setup project or anything else?

The setup.exe is a bootstrapper over the setup.msi. We can install the content using .msi or by running .exe which inturn runs /gets the data from the msi. To enable setup.exe building, go to solution explorer -> project -> properties -> prerequisites. check the check box on the top "Create setup program to install prerequisite components". apply and rebuld the project. A setup.exe bootstrapper will be created allong with msi.

Switch to Release mode, then rebuild your setup project. If everything went well (check the output console), you'll find an MSI file inside {setup project folder}/bin/Release

In "system file" from your proyect installer, you shoud to add in "Application Folder" the next source = PublishItemsOutpuGroup. In my case functions well.

Related

DNN Module installation

Is it possible to "install" a module just by pasting the file of the module and just paste it into the DesktopModules folder and have the modules working on the website?
If not, is there a way where I can export the whole module from one system and install it onto another system?
Have you tried creating a module package for this module? (when you click the edit pen for the extension, you should find a "Create package" button on the top right).
Take care to include the assembly/assemblies needed, and also the Sql Server scripts to install the module correctly (often found in the module folder under Providers/DataProvider/SqlDataProvider/*.SqlDataProvider). There might be other files in the module folder (images, css, etc), be sure to include them in the package, then try to create it. You will find the ZIP file under /install/Modules then, move it away from there somewhere on your local file system (otherwise the installer might try to install it with the next update). Then try to update the extension in a testing system, check if it works and you're done. If there are errors it might be that you are missing some files that have to be included. Check the error messages, and restart.
There used to be a way using the /Install/Module/ folder (put ZIP file there, then call /install/install.aspx?mode=installresources) If you are on an old version of DNN (7 and earlier?) you can still use this. But you've got a load of security issues that should drive you to upgrade.
I don't know of a good way to do this now. For security purposes DNN removes the Install resources after an upgrade.
IF you already have the module installed in both locations, you could copy the resources for the file from server to server (DLL in the BIN folder and the contents of the desktopmodules folder) assuming you don't have any MANIFEST file changes that need registered.

Netbeans JSF - Creating executable JAR file

I'm working at the moment on an JSF Project project. Everything is working fine. Creating .war-file, deploying it.
What I actually want is, to create a executable JAR-file for a single Class. In this Class I have a Main-method that sends an email after executing it.
I the past I have worked with Eclipse. And that was very easy.
Now I am working with Netbeans. I have red a lot of posts with the information to clean and build the project. Next to that checking the .dist folder for the JAR-files.
I have either the .dist folder, or any JAR-files in my Project folder for that correlate file.
How can I easily create that JAR-file in Netbeans?
Assuming you are using a native NetBeans project rather than Maven:
The build artefact of a project is defined by it's project type. A JSB/Web project is always build into a WAR file.
If there is one class in your project that you want to put into a JAR file, the clean solution would be to create a new "Java" project with that class (as your class clearly has no dependencies to your Web Application this should work).
For such a project NetBeans will automatically create a runnable JAR file if you configure the main method.
In your JSF project you can simply include that project as a library. If you enable "Build projects on classpath", the jar will automatically be build when you build the web application.
Another approach would be to customize the Ant script NetBeans uses internally and add a target that builds your executable JAR file from that single class.
Details on how to customize the IDE generated Ant script can be found in the manual:
https://docs.oracle.com/netbeans/nb82/netbeans/NBDAG/create_japps.htm#CHDDAHEB

How can one import the whole webDriver project in an executable form so that anybody else can run the suite by just a click.?

I am relatively new to Selenium WebDriver and a self learner. I have created a webDriver project which consists of different packages and have made use of Page Factory concepts extensively. I use TestNg framework to run the suite to generate my report. So my test cases are also following the TestNG framework concepts.
Now my team wants to use my script to be run at every build to test the sanity. The build team just wants to run my whole script by just a click. It can be shell script command or .exe or jar. Build team uses linux m/c and they dont have Ecplise , TestNg installed in their machine. Their intention is whenever build is given they want to run my script by just a click or a command in Command Prompt.( it has to be that simple for them) and a report should be generated in some location in hdfs
My script runs on FF version 32 and Selenium webDriver 2.44.0
Would really appreciate if someone could give me a solution that actually works for my requirement.
I found a similar query from someone but i am not sure if the answer still suits.
How to make Java executable Jar file of WebDriver project
Could somebody please give me a solution. Or the solution mentioned in the above link stil is the best?
Regards
There are few ways to do it:
Use CI tool (Jenkins): You can set up your project in Jenkins and it will allow you to run the project in single click. Jenkins also provides you an option to run the tests periodically so you can configure it in such a way that it will always get executed after certain time period.Jenkins is also capable to trigger the execution if there is any changes in source code of tests. I'd suggest to use this tool. https://jenkins-ci.org/
Use .bat or .sh file: I am not sure if you are using any build tool like ANT or Maven, if you are using any one of them then you can write a .bat or .sh file to run the tests. ANT
If you are not using any build tool then start using, it will help to run the tests in simplest way.For me to run entire suite, I just type below command in terminal from root directory of project
ant run -Dsuite=all
If you are more concerned about system configuration for e.g. the system which will be used by build team does not have a specific version of browser or specific required library. Then I'd suggest to keep all essentials like browser installation files, libraries in your project directory. This is not a good practice but yes it will help others to run the tests smoothly.
I would suggest just exporting a jar file for your project. All the libraries will be packaged together in the jar files(including TestNG) and you can simply double click on the jar file to start your tests.
External resources (if any), will have to be available for the jar file though. So, you can provide the jar file and the external resources together. The external resources might include your test data (if any) or Portable Firefox(if you are using the portable version).
Steps:
Right click on Project -> Export -> Runnable jar file
Give a name and file path for the jar file
Select option - Extract required libraries into generated JAR
And Finish
Troubleshooting:
Check the java version for the machines that you will be running your jar file on. Programs compiled with java 7 will mostly not run if the machine has java 6. Either compile with java 6 or update the jre on the target machines.
If the jar file does not launch, try using Jarfix.

How to run AuBio (an Open Source C program) on Visual Studio Express

I am trying to get an open source software called AuBio ( Source ) to run on Visual studio express but I am having a lot of problems getting it to build.
What I've Done:
I opened a new C/C++ solution on VS Express then copied all the header files in the source folder (SRC) into the "Header Files" filter of my project then copied all the C files in the SRC folder into the "Source Files" filter of my project. I have also downloaded all the 3 dependencies required to run AuBio but I do not know where to put them because the "External Dependencies" filter of my project does not seem to want accept them.
Can someone please guide me on how I can go about about building this program?
Addition:
The dependencies are other open source projects; the build instructions for AuBio ( which are HERE ) tell me that I need to install the dependencies before I use AuBio but I have no clue how I can do that.
AuBio also provides a pre-compiled version of it's software (it's cross compiled on MingGW32, and is here) which consists of exe files for each major class and dll files for both AuBio and all it's dependencies, but I have no idea how to use these too, when I download and try to run the exe's they refuse to run.
I am really stuck on this can someone help?
It's not clear what you mean by filter. Do the header files and source files appear in 'Solution View' of the project? If not you need to add them to the project using the Project, Add Existing Item menu command.
Dependencies:
If they are .lib files then add a line like this to your source files:
#pragma comment (lib,"libname.lib")

Setting up subproject in Microsoft Visual Studio 2010

I am developing Windows code in C using Visual Studio 2010.
I am working on several related projects: a static library, a DLL, and an executable. The DLL should have the static library linked in, and the executable depends on the DLL. (I am using "implicit" DLL linking; I do not need to control the DLL loading and unloading.)
Right now I have three separate VS2010 projects, but I know it is possible to set things up as "subprojects": the static library should be a subproject of the DLL, and the DLL should be a subproject of the EXE.
I want to solve the following:
When I rebuild the EXE, it should rebuild the DLL if need be, and in turn the DLL build should rebuild the static library if need be. I'd like to just have the EXE open, hit the F7 key, and everything builds.
When I rebuild the EXE as Debug, it should link with the Debug .lib file from the DLL; likewise when I rebuild the EXE as Release, it should link with the Release .lib file from the DLL. If I set up the subprojects correctly, will this Just Work automatically?
EDIT: I have made progress. First, in the DLL project, I used File / Add and then chose Add Existing Project to add the static library. (This is only available on the File menu as far as I can tell! It definitely is not in the right-click menu.) Second, I clicked on the DLL project in the "Solution Explorer" sidebar on the left, then right-clicked and chose Project Dependencies... and set that the DLL project depends on the static library project, which should build first. Visual Studio seems to have then magically set up the link dependency for me, and when I hit the F7 key in the DLL project, it will build the static library project.
I tried repeating the above steps for the EXE project. Now it will build the DLL, but it isn't linking things correctly yet; the linker is complaining that the functions exported from the DLL are not available.
You can't really have 'sub-projects', but you can have multiple projects in a solution. Then you can mark their dependencies on each other by opening the "Project | Project Dependencies..." menu item.
You can also make a 'stronger' dependency between some projects by having one reference another one (from the "Project | References..." menu item). For example, if an application project references a library project, that library will be automatically be linked to the application.
I have it working. Here are the steps I used to make it work:
Choose File / Add / Existing Project... and navigate to the other project that you want as a subproject. Choose the .vcxproj file and okay the dialog. You have just added a project as a subproject.
Right-click on the main project in the "Solution Explorer" sidebar pane on the left, and choose Project Dependencies... Click on the subproject to make it a dependency of the main project, then okay the dialog. This is a tabbed dialog, and the other tab is "Build Order"; if you click on that you can make sure that Visual Studio will build the subproject first and then build the main project. You have now set things up so that the subproject builds first, then the main project.
Right-click on the main project in the "Solution Explorer" sidebar pane on the left, and choose References... In the references dialog, click on the Add New Reference... button. Make the main project reference the sub-project and okay it. You have now set things so that the linker will link the output file of the sub-project.
I performed the above steps to make the DLL project have the static library project as a subproject, and I again performed these steps to make the EXE project have the DLL project as a subproject. But I got build errors about the static library file not being found. So I think that, even though I set the static library as a subproject of the DLL library, it is essential to set up that dependency within the EXE project; the dependencies don't seem to be transitive! I performed the above steps to make it clear that the static library is a subproject of the DLL subproject of the EXE project, and that fixed things.
Now when I hit the F7 key, everything builds. If I choose Build / Clean Solution it cleans all three projects. When it links, it gets the Debug or Release library files as appropriate and links them in.
Sometimes when I hit F7 and build, the build fails, saying that the dependent library is outdated; but if I just hit F7 again then Visual Studio rebuilds the dependent library and the build succeeds. If I hit Ctrl+Alt+F7 to force a clean build, the build succeeds every time. I don't know why Visual Studio has this quirk.

Resources