Windows For Developers
Windows is commonly used by developers π. While it is less convenient than Linux in some ways, there are some ways to make it suitable for developing software and everything else π.
- WSL is commonly used to get a Linux console environment
-
Cygwin or mingw are commonly used to get a Linux console environment or to get
.exe
versions of Linux commands. - VSCode or JetBrains are commonly used as editors to write code
- WAMP is often used to emulate a web server for web development
- Virtual Box or VMWare are often used to emulate Linux
- ...
While not specific to Windows, these are often used instead of the Linux command:
- FileZilla mostly for FTP
- Putty MobaXTerm... mostly for SSH, FTP...
- ...
β‘οΈ For articles on Windows, check out the Windows Club.
Basic knowledge
Window Path
On Linux, when we write a command such as make
, it will look for it in each folder in the PATH
and execute the binary if found.
There is the same on Windows. The shortest way to find the menu we are looking for is by writing PATH in the search bar.
From it, select environment variables then edit Path
in User variables.
Windows Subsystem for Linux (WSL)
Windows Subsystem for Linux (WSL) is a system that allows us to access a Linux CLI interface. It's basically a docker.
Follow the installation instructions here. Basically, open a PowerShell or a CMD as an admin and install any WSL as follows:
PS> wsl -l -o
Ubuntu Ubuntu
Debian Debian GNU/Linux
...
PS> wsl --install Debian
PS> bash # pop a bash shell
You can start it as you would with any program too.
π‘ You can also download them from the Microsoft Store. Doing so will enable auto-updates for you.
β WSL doesn't natively support graphical apps and some commands.
Access WSL files from Windows
You can use the file explorer:
You can also enter the PATH
\\wsl.localhost\
or\\wsl$
.
Graphical interfaces with XMing
XMing is a low-quality graphical tool. Install it and XMing fonts (scroll to "public domain" to find the download links). To run graphical apps, you will mostly use -c
to the commands that support it.
$ subl -c # sublime text
$ emacs -c # emacs
$ ./idea.sh -c # IntelliJ
Common usage of WSL
Most of the time, we integrate WSL within our code environment π. For instance, when pressing the compile/run button from your IDE, it will compile/run the code using the WSL.
- IntelliJ and WSL (Java IDE)
- CLion and WSL (C/C++ IDE)
- VSCode C/C++ and WSL
- ...
Cygwin
Cygwin is a collection of Unix tools ported to Windows π². It also includes a CLI such as WSL aside from the fact that it only allows us to run installed commands (e.g. there is no APT command...).
- Download Cygwin Installer/Updater
- Run it, press next
- Install from the internet, Next, Next, Next, Next
- Pick a mirror in the list, Next
- In view, select full
- From this point, select the commands that you want by replacing "Skip" (in the column "New") with a version of the command.
- Complete the installation
Commands are stored in C:/cygwin64/bin
. It should have been added to your path so that you can call, for instance, make
or make.exe
from any Windows terminal.
$ make -v
# GNU Make 4.3
# ...
β‘οΈ See also: apt-cyg (2.9k β, 2017 πͺ¦).
Protocols
Secure Shell (SSH)
Some tools:
InnoSetup
InnoSetup is a tool for creating modern Windows installers. You can download it here π¬. Simply install and run the software.
Use the Create a new file using the Script wizard
wizard. It will generate a .iss
with the configuration to generate the installer.
Target folder
Ex: All files will be stored in the app
folder.
-Source: "a\path\to\app\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "a\path\to\app\*"; DestDir: "{app}\app"; Flags: ignoreversion recursesubdirs createallsubdirs
CLI options
PS> file.exe /SILENT # Only show the progress bar
PS> file.exe /VERYSILENT # No installer visible
# Add custom options
PS> file.exe /VERYSILENT /MERGETASKS="desktopicon,postinstall"
π» To-do π»
Stuff that I found, but never read/used yet.
- mingw
- winpty
- msys2
- Pengwin (wlinux)
- vcxsrv
- chocolatey
- autohotkey
- voidtools
- cyberduck
SysInternals
- procmon (admin required, see _image)
- strings: similar to Linux strings.
- tpcView: Windows tcpdump
- SysInternals Suite: tools. Can be installed or loaded remotely (
\\live.sysinternals.com\tools\xxx.exe
) - ProcMon > Process Monitor Filter > Process Name is xxx.exe then Include
- Noriben wrapper to procmon but may miss some stuff
C:\> IEX((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
C:\> choco upgrade chocolatey
C:\> choco install docker-desktop
C:\> choco install python vscode git wsl2 openssh openvpn microsoft-windows-terminal WSL2
C:\> Add-MpPreference -ExclusionPath "C:\Users\xxx\AppData\Local\Temp\chocolatey\"