I have been working on a Scalatra project on a Linux environment and would now like to switch to a Windows environment. I've transferred the project folder to my Windows directory. Using Cygwyn, I cd to the Scalatra project and type
./sbt
> jetty:start
Nothing happens at this point. I have waited 10 minutes but nothing is printed to the console. I am having a hard time thinking of what might be the cause, since the exact same project works fine on Linux. Anyone have a Scalatra project working on Windows and remember whether there were any Windows-specific steps to set it up?
I did this on a fresh Windows 10 Professional VM in virtual box. I only allocated 1 CPU and 4 GB RAM, which may have made things unnecessarily slow. I was logged in as administrative user testvm
I always started new command prompts after modifying environment variables. All of my command prompts were run as administrator... I don't know whether that was necessary.
In general, these instructions were a good start: How to Install conscript in Windows, followed by http://scalatra.org/getting-started/first-project.html
installed the java developers kit, by visiting this page
or here
added the JDK's bin folder (C:\Program Files\Java\jdk1.8.0_131\bin) to the end of the PATH system variable
started a new command prompt and ran set to review the PATH environment variable, and ran javac –version as an additional sanity check
downloaded and installed sbt for windows. Didn't make any manual changes to the PATH at this point.
conscript (or giter8?) requires bash (and/or git?), so I installed git for windows. I did a default install, except I specified that git and "optional Linux components" should all be accessible form the windows prompt. I also added C:\Program Files\Git\bin to the PATH environment variable. I’m not sure if either or both of those tweaks are required.
downloaded the latest conscript jar. I got a warning that the download might not be safe and accepted anyway.
double clicked the conscript jar to run it. A nice graphical dialogue box came up and eventually told me that a cs.bat script had been created in C:\Users\testvm\.conscript\bin\cs.bat. 100% CPU use continued for several minutes after this and eventually I clicked the close button (X) in the upper right of the conscript installer dialogue.
When I installed conscript in another system more recently, it went quickly but I got a warning that cs.bat might not be on the system path.
ran conscript to obtain giter8. I have found that giter8 v 0.8 fails to build the skeleton project with an error like "parameters cannot contain '.'", so I specifically asked for v 0.7.2: C:\Users\testvm\.conscript\bin\cs.bat foundweekends/giter8/0.7.2
ran giter8 to install the skeleton scalatra project: C:\Users\testvm\.conscript\bin\g8.bat scalatra/scalatra-sbt
accepted all of the default parameters
turned off the windows firewall, the defender real-time protection, and started a new cmd prompt as administrator. I don’t know if any of those are necessary
ran sbt: c:\Users\testvm\my-scalatra-web-app\sbt
Going through this more recently, my-scalatra-web-app was installed into c:\Windows\System32\my-scalatra-web-app, but I was able to copy it to the top of C:\. cd'ing in there and running just sbt gave an error message, because there's a sbt file in that folder, but it's not a windows executable. So I entered "c:\Program Files (x86)\sbt\bin\sbt.bat". Subsequently, that directory was added to my PATH environment variable, so I could just enter sbt.bat
waited as components downloaded, installed and compiled
when the sbt > prompt reappeared, entered jetty:start and waited some more
eventually, the following appeared:
2017-05-09 07:31:15.101:INFO:oejs.ServerConnector:main: Started ServerConnector#bffcb98{HTTP/1.1}{0.0.0.0:8080}
2017-05-09 07:31:15.101:INFO:oejs.Server:main: Started #8698ms
Opened http://localhost:8080 in a web browser and saw Hello, world!
Related
TL;DR What is the sane way to automate invokation of VS 2017 vc_redist when called in a chain of several installers?
The Visual C++ Redistributable Installer that MS provides for VS 15.x (VS 2017), namely both (14.15.26706 - VS 15.8.4)):
vc_redist.x86.exe
vc_redist.x64.exe
As part of our full product installation, I have to run several vcredist installers (also older versions) silently.
The problem now is that these installers will refuse to install if a reboot is pending (e.g. "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager" - PendingFileRenameOperations).
When calling these installers with vc_redist /q, they will even trigger an immediate system reboot. This can be fixed by calling them with /q /norestart, however:
When calling vc_redist /q /norestart, and if a reboot is pending prior to this installer, it will return MSI exit code 3010 which indicates that a reboot is required.
However, AFAIK, this exit code also indicates, that this very setup requires a reboot to complete.
Actual question
So, I cannot distinguish whether this installer was succesful and just requires a reboot at the very end of my installation sequence (I do install otehr stuff before and after) - or whether the installer actually refused to do anything and I would need to restart the system and start this installer again!
How can I call this vc_redist in a chain of different third party installers and
ideally require just one reboot at the very end
at the very least, determine whether it installed successfully.
Some additional infos, fwiw:
Not sure these helkp with the question, but for completeness sake.
The installer GUI clearly indicates what is going on: (sorry, german Windows)
"No action was taken because a reboot of the system is required."
This is an InnoSetup built installer for our "product suite", that will be used by customers, the installation order goes as follows:
Run MSVC 2005 (VC8) 32 bit vcredist
Run MSVC 2010 (VC10) 32 bit vcredist
Run MSVC 2017 (VC141) 64 bit vcredist
Run MSVC 2017 (VC141) 32 bit vcredist
Run a few other third party dependecy / library installers
Install the actual application files (via InnoSetup)
Reboot (ask) if any installer indicated a required reboot.
As you can see from this sequence, rebooting after each vcredist woud be insane, and luckily it seems only the 2017 redist exhibits this unfortunate behaviour so far.
Of note: My trial runs on my dev machine all started with a reboot already pending at "step 0", and both the VC2005 and VC2010 installer run just fine (as verified through their GUI progress) even if a reboot is pending before hand. It's the VC2017 installers that refuse to do anything if a reboot is pending.
MSU Packages: After decompiling the vc_redist.x64.exe - which is a WiX bundle - using this command:
dark.exe -x Extract vc_redist.x64.exe
I found that the bundle installs: Update for Universal C Runtime in Windows - KB2999226. This component consists of Windows Update files (*.msu - used by Windows Update) and not just MSI files. I would suspect that they could be designed to require a reboot before allowing installation, but I don't have proof.
Suggestion: Run a check to make sure KB2999226 is installed. How to do this? I don't know a Win32 call, but the WiX guys will probably know. Here are some other suggestions.
Windows: How to List All of the Windows and Software Updates Applied to a Computer
Why are “get-hotfix” and “wmic qfe list” in Powershell missing installed updates?
Identifying installed updates on Microsoft products
The actual Windows Update Files are (over time these file names could change as new versions of this installer with the versionless file name - vc_redist.x64.exe - are released):
Windows6.0-KB2999226-x64.msu
Windows6.1-KB2999226-x64.msu
Windows8.1-KB2999226-x64.msu
Windows8-RT-KB2999226-x64.msu
In other words for Vista, Windows 7, Windows 8 et al. Various Server OS's as well. Windows 10 has this component built-in.
Corporate Deployment: In a corporate environment I would deploy these *.msu files via
the distribution mechanism available - whatever it might be - for
example SCCM - before installing the vc_redist.x64.exe package.
This should yield better control of the distribution process as you get error messages straight from the MSUs themselves.
Frankly these are core-SOE components in my opinion. I don't know why Microsoft keep these runtimes out of the main OS installation. They are crucial for most software.
A description of the decompilation approach using the WiX toolkit's dark.exe binary can be found here: How can I compare the content of two (or more) MSI files?
Strictly speaking, error 3010 is a success result. It means that the install has completed but requires a reboot. I'm not aware of anything to indicate that it means the install didn't start at all. The typical "won't install if reboot pending" is a result of using a launch condition based on the MsiSystemRebootPending property. Failures due to this launch condition do not return return a 3010 result - they usually return a 1602 error as a kind of "user cancel" error.
I have been able to successfully install a simple program using an Installer Project on Visual Studio Community 2017. However, I can't find out how to create a fully working deployable uninstaller for an end user.
The Installer Project was set up to only create an Application Folder (in C:\Program Files...) with the Program .exe, and nothing else. This it does successfully. I would like an installer because later I plan to make some registry keys upon installation.
To test uninstallation, I have run the original .exe file built by the Installer Project with the "Uninstall" option. This removes the Application Folder but does not remove the program from the Add/remove programs list in Windows - Leading me to believe there are other registry entries that have not been removed.
I have tried to uninstall purely from the Add/remove programs list, but then I get an error:
C:\WINDOWS\system32\msiexec.exe
"Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item."
In Visual Studio, I can click "Uninstall" from the Installer Project right-click menu which does successfully remove both the Application Folder and the Add/Remove Programs Item, but this is not a deployable solution.
Notes:
OS: Windows 10
Using Visual Studio 2017 Community
Looking at the application Folder, there is neither an install nor uninstall .exe file in it. The Installer Project .exe is only in the original build location, and I cannot find how to get a copy in the Application Folder (not sure if a copy there would work).
I have tried configuring the Installer Project as x86 and x64 with no change.
I have tried using both Debug and Release build configurations with no change.
From looking around, WiX seems to have more features and flexibility, but I haven't yet dug into that. Is there an easier solution?
Has this issue occurred to anyone else? My hopes were that Installer Projects were the simple way to learn and handle installation.
Looks like I jumped to conclusions in the comment above, however I think I found the issue: I cannot uninstall the program from the Windows Apps & Features window in System Settings, but uninstalling from Control Panel\Programs\Programs and Features works fine.
When typing in "Remove" using the windows start button, the default item that comes up is "Add or Remove Programs" in System settings (This looks like a Windows 10 thing). When you click that, it forwards you to the "Apps & features window. I am now learning that for some reason this has different functionality than the control panel window. Or maybe it has lower permissions, although I am the admin and only user of this computer...
Because it can be uninstalled from Control Panel, I think this would be the preferred solution. My assumptions about the other window in system settings was my real issue. I just wish the Apps & features window aligned its functionality/permissions with control panel.
I also learned that uninstall is successful when I run msiexec.ex /I{PACKAGEID} in cmd. Not sure how relevant this is, but documenting here.
Installs and uninstalls are transactional, they either work completely or roll back completely. If you do an uninstall but the entry remains in Add/Remove Programs then it's likely that the uninstall did not in fact work.
When you do the install, if it has a UAC elevation dialog then the install is running with elevation and installing files/registry entries to locations prohibited to limited users. Removing files from those locations also requires elevation. You haven't said exactly how your uninstall works, but most likely it requires elevation to succeed, and your program isn't running elevated. If your program uninstalls silently the uninstall will fail silently, so it's possible that your program isn't actually checking that the uninstall worked.
I'd also guess that your Visual Studio session may be running elevated so uninstall from there works fine.
Apart from privileges, an uninstall from a running installed program tends not to work very well because the uninstall process cannot remove your running program or its folder because it's in use. So while you could get it to work (with elevation) you might find that your program and its folder are left behind until the next reboot. If people really want to do this, one of the strategies is to copy an uninstall program to the temp folder and fire it off asynchronously, so everything can be removed.
Uninstalls from Add/Remove Programs&Features generally work fine. Without some context that error message doesn't mean much. It's not a message that comes out of Windows Installer, so it's perhaps coming out of a custom action. Otherwise it may be an issue specific to the test machine.
There is never an uninstall exe in a Windows Installer setup. When you remove a product the system just calls the Windows API to remove the product. Windows Installer is part of the Windows OS with API support for everything that needs doing. Only non-MSI setups require an install and uninstall exe to do anything.
None of these issues seem to be related to your choice of tool. They all create MSI files and if an MSI design is not optimal it doesn't matter what tool you use. There's nothing wrong with WiX, but to install literally a few files it's overkill compared to Visual Studio.
As I was going through installing Cuda v7.5 following this link http://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/#compiling-examples
I was not able to verify the installation as described in section 2.5. Verify the Installation. The reason was because I could not find deviceQuery program that should have been located in
C:\ProgramData\NVIDIA Corporation\CUDA Samples\v7.5\bin\win64\Release
Therefore, I could not run the deviceQuery for Cuda to be verified. Where is deviceQuery program located ? Is it still precompiled and deployed by the installation ?
Okay, so if you are a complete noob like me in using Visual Studio then you might be thrown off by the instruction "build the application first". Just watch this video to get an idea of how to build and run a project/program using VS.
https://www.youtube.com/watch?v=cL05xtTocmY
As soon as you open VS (I am using 15.6), you will be prompted to upgrade the SDK. Make sure to do so. If you've misclicked or skipped upgrading, you can go to the Project pull down menu and click "Retarget Solution" and click ok on the menu that appears. Then build and debug as shown in the video.
Creating the deviceQuery.exe file:
Go to the (default) directory C:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.2\1_Utilities\deviceQuery. Just follow the procedure of running the MatMul file but this time build the deviceQuery_vs2017.sln file and debug it. Remember to retarget the solution.
No, it's not precompiled any more.
You have to compile (build) the application first, before you can run it.
That is true for all the CUDA samples now.
OK, I've had this problem with CUDA Toolkit 10 under Windows 10. In my case, I do never use the admin account, and the installation was done from the user account, entering the admin password when necessary. After repeated trials, here's what worked for me:
Make sure to uninstall any old version of CUDA and Visual Studio
(just to have a clean start)
Restart the computer
Install Microsoft Visual Studio Community Edition. During the
install, make sure to select the C++ Development tools
Restart
Install the Cuda Toolkit
Restart
With this, I had all the files. But the deviceQuery still would not compile because it was targeted to an older version of Windows. To compile it, one needs to 'Retarget' the project to the current windows SDK. However, this doesn't work out-of-the-box because the 'deviceQuery_vs2017.vcxproj' file is read-only for regular users.
So, there are two possible solutions:
Copy the folder to some place where you have write permission, or
(This is what I used, for convenience) Using Windows Explorer, navigate to the C:\ProgramData\NVIDIA Corporation directory. Right click on the 'CUDA Samples' directory, select 'Properties'. Under the 'Security' tab, click 'Edit' and add your user to it.
This way you can Retarget the solution in place. After that, I could open the solution in MS Visual Studio, Retarget it, build it and test it, and all worked fine.
Hope that helps.
I need to create kind of builder for my Universal Windows App (UWP) application, that would load some configuration into it, build it and create app store package. Is there any way to build UWP app from command line, without associating it with the store and using Visual Studio at all?
There is WinAppDeployCmd, but it can be used to install builded appx package on device and I need tool like that to generate that package.
UPDATE
I've managed to build it and create app packages with command line, here is command I used:
msbuild "path to .csproj file" /p:OutDir=output_dir /p:AppxBundle=Always;AppxBundlePlatforms="x86|x64|ARM" /p:BuildAppxUploadPackageForUap=true
It's working but not as it should apparently. I can not install generated appx package on my phone (and emulator). I just get error
Failure reason: Failed to start deployment. Failure text: Install failed. Please contact your software vendor. (0x80073cf9)
I found many solutions for Windows 10 PC version, but there is only one solution I found for Windows 10 Mobile and this "solution" is to hard reset the phone, but I do not want to do that. Is there any other way?
And there is one more problem. This command doesn't work with parameter /p:Configuration=Release; and it only builds with Debug configuration, but I believe this is not related to previous error, because it doesn't work with Visual Studio either.
UPDATE
I could not find another solution, so I did the 'hard reset' of my phone and now it is working. It's sad, but I hope the reason is the Windows 10 Mobile OS is still in beta version.
Step 1 : See, you need to install .NET Framework installer from the below link. https://www.microsoft.com/en-us/download/details.aspx?id=30653
Step 2 : Go to C: drive and find where msbuild.exe is. You will find more msbuild. But mostly it will be in the location like C:\Windows\Microsoft.NET\Framework\v4.0.30319.
Step 3: Open the CMD in administrator and point to the location which is mentioned in Step 2.
Step 4 : Paste this. msbuild.exe "YourCompleteProjectPath.sln" /t:rebuild
See this for reference : https://msdn.microsoft.com/en-us/library/ms164311%28v=vs.85%29.aspx
I have installed and configured NetBeans 6.7 for c++ according to the official manual:
http://www.netbeans.org/community/releases/67/cpp-setup-instructions.html#mingw
Configuration window looks like this:
Unfortunately, at 'compile' command following line is displayed:
/usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf
BUILD SUCCESSFUL (total time: 642ms)
Since i'm on windows and it's no /usr/bin/make, no executable is compiled :(. How to correctly configure NetBeans so it will use make from it's config, not from /usr/bin?
Updated
Problem is only with mingw/msys toolchain. It works OK with cygwin (same /usr/bin/make message is displayed, but executable IS created). So the question can be changed to: Can Netbeans 6.7 work with mingw on Windows, or i'm limited to cygwin?
I had problems getting Netbeans 6.7.1/C++/MinGW working too. I don't know if this will help but I thought I'd describe my experience anyway.
I was having successful builds but Netbeans was unable to launch my executable. I was able to verify that the executable was being built and I could run it from an external command prompt. I was also unable to open the properties on my project.
After a day of searching the net, I found a tidbit of info that lead to the solution.
Basically, it all boiled down to not having the path to my build tools set in the windows environment path. After I set the path environment variable, I cleared all the Netbeans configuration so I could be sure about setting things up from scratch. You can do this by deleting the .netbeans folder in your user directory in c:/Documents and Settings.
That should all be done with Netbeans closed of course. Afterwards, start it up and setup your build configuration before you create any projects or load existing projects. Go to Tools/Options/C++ and point it at the build tools directory you added to your environment path (c:/MinGW/bin and c:/msys/1.0/bin) and the individual tools as required.
I have my msys stuff in the same directory as the MinGW stuff. As an extra precaution, you may want to make sure there are no same named programs in both bin directories that may cause grief.
I seem to have a C++ development environment now that I'm quite pleased with as I can use it in Windows and Linux. Hope something in there helps.
Can you check on the "project options" on your picture and look if the default platform is windows ?
Have installed netbeans on both linux and windows machines and it's strange that it didn't work "straight out of the box" after following the instructions..
You did double check everything right? As it seems that path variable isn't setup correctly in your environment.
The picture also says that the debugger is missing/invalid.. Did you follow these 16 steps (step 14 for installing debugger) or did you use something else?
Last but not least, your "error" message says that the build was successful. Where did you look for the .exe ? It should be under
dist/<Configuration>/<ToolChain>/