Is there an offline MinGW installer? - c

I am learning C and I want to install MinGW on my laptop. The MinGW installer is a web-installer, it requires the computer to have access to the internet when installing. But the problem is that my computer's not connected to the internet. So it can't be installed.
So I am thinking of downloading the complete offline installer on my smart-phone and transfering it to my PC through blue-tooth.
I have already tried TDM-GCC, but even that requires me to download somthing.
So is there an offline installer to MinGW? If yes where can I get it?

I did not find an offline installer for MinGW,but instead I found a better Windows port; which is MinGW-W64
From http://mingw-w64.yaxm.org/doku.php:
Mingw-w64 is an advancement of the original mingw.org project, created to support the GCC compiler on Windows systems. It has forked it in 2007 in order to provide support for 64 bits and new APIs. It has since then gained widespread use and distribution.
Now to answer this question: it has to be mannually installed by downloading the zip file. It won't require additional download.

You can download it from link : https://github.com/jonasstrandstedt/MinGW
You need to extract the MinGW folder in C:\ eg: c:\MinGW . Then what you need to follow the steps given in the link above. In CodeBlock IDE go to settings>compiler>Tochain Executables. There you need to click on auto detect or specify the folder manually.

The most direct answer to the question "Is there an offline MinGW installer?" is "maybe, but it would be a snapshot from the past, and it's almost certainly not up-to-date with the latest available released versions." The individual packages are made available (almost) as soon as they're released, so capturing everything in a self-contained installer is a moving target.
But, you can use the standard installer offline with a bit of prep work if you use MSYS2's pacman, which manages dependencies and grabs all the right versions for you.
The details are given in an answer to another question (https://stackoverflow.com/a/46791235/).

Related

How do I copy my Selenium project from one laptop to another?

I have developed a hybrid framework using a maven project, POM, TestNG, etc. It's running fine now I wanted to copy the entire project from one laptop to another laptop so on first laptop I can continue with my work and second laptop I can use it just to execute the scripts which will same my lot of time.
On daily basis I take backup on OneDrive. I have some questions:
Can anybody guide me how to copy the entire project? Do I need to have the same version of Java and Eclipse on second laptop? Anything else need to be installed?
On a daily basis how do I get the backup data from 'OneDrive' to a second laptop?
This sounds like you want a repository. Use Github, Gitlab, Bitbucket, just.. git in general. That's exactly what this is for.
As for your Java and Eclipse versions, you need to look at your running version of selenium, what packages you are using, etc, and determine for yourself what Java version you should be running. The latest version of the jdk is going to have everything the earlier ones had, so it's usually a safe bet to use the latest stable version. Your Eclipse version should always be the latest as well as it is just an IDE and shouldn't have any impact on how your program runs.
Another option is to use a virtual environment (a virtual-env) and upload that to your git repository, this is a localized version of java present inside the project, that can be carried along with it, although this bloats your repository massively.
Try using git and github and you don't have to take backup and need to work on a specific laptop

How to synchronize code files on windows with WSL/linux?

Basically I have some C/C++ code that I need to build and debug on a Linux machine. Unfortunately, my windows laptop doesn't have enough free hard space to install some Linux dist nor does it have enough free RAM to comfortably run VM.
Until now, I dealt with it rather comfortably using WSL, but the scale was rather small. It was easy to edit and debug 2-3 .c files through CLI and gdb, but it became really annoying on a large scale projects.
I want something simple as "edit code in windows IDE [X], compile it on remote Linux/WSL (the project uses Makefiles), and preferably debug it via gdb".
VS has something close to what I want, but it can't deal with existing Linux projects. It needs to create a new configuration which is alien to the project's Makefile.
I know this question is a bit old, but I think the solution is to make a symlink between your WSL folder and the Window's folder. This is how I handled it for a Ubuntu-20.04 WSL:
Access PowerShell in Administrator mode
Type cmd.exe in the PowerShell
Once cmd.exe is opened, type mklink /d C:\<path_to_your_Windows_folder> \\wsl$\Ubuntu-20.04\home\<your_user>\<path_to_your_WSL_folder>
EDIT
This was tested under Windows 10 Version 2004 with WSL2
I'm unsure about C and C++ but it sounds like this is exactly the same as how i work in node and javascript every day.
I checkout my code using git inside WSL to a location like /mnt/c/code/myproject. Then using sublime/VS code/webstorm i edit the files in windows in the location c:\code\myproject this works really well and have been doing this every day for over a year.
Things to be aware of are that you need to ensure that your editor of choice saves files with linux line endings and that all command line operations are done inside WSL.
Please see this article to see the differences between windows and linux files and how this works inside the WSL.
I want something simple as "edit code in windows IDE , compile it on remote linux/WSL
You will have something as simple as that.
Only with Windows 19.03 though:
See "Updated WSL in Windows 10 version 1903 lets you access Linux files from Windows"
Microsoft's Craig Loewen says:
In the past, creating and changing Linux files from Windows resulted in losing files or corrupting data. Making this possible has been a highly requested and long anticipated feature. We're proud to announce you can now easily access all the files in your Linux distros from Windows.
So how does this work? He goes on to explain:
To put it briefly: a 9P protocol file server facilitates file related requests, with Windows acting as the client.
We've modified the WSL init daemon to include a 9P server. This server contains protocols that support Linux metadata, including permissions.
There is a Windows service and driver that acts as the client and talks to the 9P server (which is running inside of a WSL instance).
Client and server communicate over AF_UNIX sockets, since WSL allows interop between a Windows application and a Linux application using AF_UNIX as described in this post.
Warning:
The old rules still apply, you should NOT access your Linux files inside of the AppData folder!
If you try to access your Linux files through your AppData folder, you are bypassing using the 9P server, which means that you will not have access to your Linux files, and you could possibly corrupt your Linux distro.

Checking installation integrity with installshield

For Linux packages, specifically RPMs with stored checksums, we always can check two things: the contents of package is ok and the installation from this package is ok. When someone modifies parts of the installation he shouldn't, we can see it by running rpm -Vp my-precious-package. In our busyness it is not only recommended, but obligatory to provide our packages with tools for this purpose and for Linux these are just simple bash scripts.
Now I have to do something similar for Windows. Basically what I want is to provide some batch file by running which one can get assured, the installation is the same as it meant to be in the package. I'm using InstallShield for packaging, and yet it has some great visual tools, I still haven't found a way to verify package checksums in the command line.
Is it even possible, or should I reinvent the wheel writing my own checking utils?
Take a look at MakeCat and SignTool from Microsoft, both in SDK
http://msdn.microsoft.com/en-us/library/windows/desktop/aa386967%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/aa387764%28v=vs.85%29.aspx
Windows Installer has a feature called resiliency that supports auto repair of products and there are ways to call it for self checks only. (This is assuming by InstallShield you mean Windows Installer based projects.)
Here's a couple links to read to get you started:
INFO: Description of Resiliency in Windows Installer
Resiliency
Application Resiliency: Unlock the Hidden Features of Windows Installer
MsiProvideComponent function (See dwInstallMode flags)
This also assumes all files are key files. Companion files are not managed by the installer. Also changes performed by custom actions outside of the installer aren't managed.

Export and import resharper 6.0 settings

I've recently installed resharper 6.0. It took my long time to set up everything as I wanted. Now I want to export all this settings to another computer. I've tried this aproach without any success (might be because the computers use different versions of visual studio?). Then I found this in this answer. But RSM works for r# 5. I started reading to see if there is going to be RSM for r# 6.0 and there will not be because in r# 6.1 some settings management options are included. But I'm stick with r# 6.0.. Is there any way I can transfer my settings from one PC to another?
Now you may want to update to ReSharper 6.1 where the management of settings are improved including an export and import feature.
You didn't explain what you meant by "without any success".
Were you able to find the folders and copy the files?
Were there files already in the target directory? (If there weren't, you probably had the wrong directory.)
Did you diff the old and new files as a sanity check? (This would be especially important since you're apparently expecting this to work even when the two machines aren't running the same version of Visual Studio. There could easily be differences in the file format across VS versions.)
Did you make sure to close Visual Studio before copying the files?
Did you just copy files in ReSharperVersion\VisualStudioVersion, or did you also copy the files in the vAny directory?
At any rate, if you really can't copy the global settings files, and if you can't install 6.1 (why not? it's a free upgrade from 6.0), I think your only other option is to export and import your coding-style settings by going to ReSharper > Options > Languages > Common > Code Style Sharing. That won't get all the ReSharper settings, but it will get some of the most important ones.

Is it safe/practical to manually update shell32.dll in Windows XP?

I am running my development environment Windows XP. I need access to the function SHGetKnownFolderPath. My team proposes that I simply update my shell32.dll with theirs and update my header files.
The function is documented here:
http://msdn.microsoft.com/en-us/library/bb762188%28v=vs.85%29.aspx
Now, understand that the focus of this question is on the viability of overriding/updating the shell32.dll manually via copy-paste. Please do not respond with workarounds/alternatives to the function mentioned above. That is not the point of this question.
Is it safe to simply take the Windows 7 version of shell32.dll and paste over mine (in XP)? I am afraid to test that for fear of murdering my entire operating system. I do not know all of Windows' library inter-dependencies and whether this would even be compatible. It sounds incredibly unstable, but that is what is being proposed I do.
You should not change a Windows DLL manually. A Windows 7 DLL will have dependencies that will not resolve on XP. Even if this worked (very unlikely), next time you install a patch from Windows Update it may either break due to dependencies or replace your Windows 7 DLL back to XP version.
UPDATE: This just won't work. The Windows 7 DLL has dependencies on API sets which did not exist in XP.
Copying manually the dll via copy-paste will not work, because WFP will kick in and restore the original dll. IIRC only digitally-signed updates from Microsoft are allowed to replace system dlls on a running system to avoid messes like this. You should replace the file offline (e.g. from another copy of Windows/BartPE/Linux/...), or disable/workaround WFP in some way. So, it's not practical.
Taking a system dll from another version of Windows and copying it there seems like a terrible idea. The shell changed a lot from Windows XP to Windows 7, I'm sure that there will be a lot of missing dependencies. Even if you managed to copy every file of the Windows 7 shell to Windows XP, these files would depend from newer user32/gdi32/ntdll/... functions added in Vista and 7, so it would not work anyway.
So, I think that the most probable consequence of replacing shell32.dll would be the failure to load almost any non-core component of the OS: failing shell32.dll to load due to missing dependencies, almost any GUI executable that links against it would fail to start. So, it's not safe.
Other than being a problem from a technical standpoint, I strongly suspect that it's also illegal. Having a license for both Windows XP and Windows 7 would not help, I think that this is considered "modification of the software product", that is explicitly disallowed by the Microsoft EULAs. So, it's not legal.
If you want backwards compatibility with XP just use SHGetFolderPath instead of doing all this mess.
Is it safe/practical to manually update shell32.dll in
Windows XP?
No.
shell32.dll is a core operating system file. I would expect that minus the other dependencies underneath the Windows 7 version you would have all sorts of unexpected behaviors. It would be better to test within a VM a complete Windows 7 environment rather than copy over a part of another version of an operating system.
Bigger questions: Do you think anyone at Microsoft every tested this exact combination? If you run into issues and you call support do you believe that you will find that your configuration is a supported one for your efforts? Having worked for MSFT in the past I would think that the answer to both is likely not.
Probably they know what they're saying. Anyway I would suggest you creating a system restore point and, just in case, downloading a minimal linux distribution so that, in extreme cases (i.e. windows can't boot), you simply restore their shell32.dll with yours.
I don't think so...
But if still want to try, then i suggest you install a virtual machine and try it there. this way much safer.

Resources