Skip to content

RedtamarinWindowsEnvironmentSetup

Zwetan Kjukov edited this page Jan 27, 2016 · 7 revisions

Redtamarin Windows Environment Setup

Simply put the command-line environment under Windows is subpar.

On other systems like Linux and Mac OS X we can rely on a POSIX environment.

Because we needed to replicate the same environment for Windows, we created simple Batch script redtamarin-setup.bat.

The Redtamarin Windows Environment Setup
install and configure the following

You need to run redtamarin-setup.bat only once and after that you can install and upgrade as many redtamarin installations as you want.

Before Installing

The Cygwin installer use by default this mirror
http://mirrors.kernel.org/sourceware/cygwin/
which maybe not the fastest for you.

A list of other mirrors can be found here
https://cygwin.com/mirrors.html

If you want to use another mirror
in redtamarin-setup.bat

edit the following line
SET SITE=http://mirrors.kernel.org/sourceware/cygwin/

and replace the URL, for example
SET SITE=http://www.mirrorservice.org/sites/sourceware.org/pub/cygwin/

Install

  • download redtamarin-setup.bat
    from the repository extras/windows/redtamarin-setup.bat
    or from the releases page
  • either double click the file to run it
    or open command-prompt (cmd.exe)
    go to the directory
    type "redtamarin-setup.bat" then ENTER
  • this will open a command-prompt
    that will stay open for the duration of the setup
  • at each step of the process
    you will need to type any key
    (or simply ENTER) to continue
  • most of it is automated but you will
    still have to approve the installation
    of some programs by clicking "yes"
  • at the end of the installation
    the command-prompt stays open
    but you will see something like
    *** Redtamarin Windows Environment Setup
    *** COMPLETE for Windows 64-bit

redtamarin-setup.bat has been tested
and is known to work for

  • Windows 8.1 Pro 64-bit
  • Windows 10 Pro 64-bit
  • other?

Known Issues

  • the Batch file should work for
    Windows 7, 8, 8.1 in 32-bit and 64-bit
    but it only been tested on
    Windows 8.1 64-bit
  • if you right click redtamarin-setup.bat
    and "Run as administrator"
    it will crash the cygwin setup

If you run successfully the redtamarin-setup.bat
under either Windows 7 32-bit, Windows 7 64-bit,
Windows 8 32-bit, Windows 8 64-bit, Windows 8.1 32-bit
or any older (Windows 2000) or newer (Windows 10)
please, create an issue and tell us on which system it worked

FAQ

Q: Why a Batch file?
A: we could have used numerous installer solutions
like NSIS, Inno Setup, WiX, etc.
we could have even used redtamarin to build our
own installer, but for security and transparency
we thought it was better to use a simple .bat file
of few lines that can be inspected and reviewed

Q: Is there manual instructions instead of the Batch file?
A: yes, just follow the instructions here

Q: How long will it take to install/setup ?
A: It mainly depends on your connection speed
over DSL it should take about 20mn or so

Q: My system is 32-bit and the setup download/install wpkg-1.0.0-amd64.exe ?
A: yes, its is confusing with a name containing "amd64"
you would expect a 64-bit executable, but it is a 32-bit one
proof: $ file wpkg-1.0.0-amd64.exe output

PE32 executable (GUI) Intel 80386, for MS Windows, Nullsoft Installer self-extracting archive

Manual Instructions

We take the script redtamarin-setup.bat and details how it would be done manually

  • it is preferable to have a username without spaces
  • Download Cygwin
    for your Windows operating system
  • run the Cygwin installer
    • install in C:\cygwin
    • select the "Base" package
    • select bash, bash-completion, mintty, ncurses and which
    • select nano, wget, hostname, and openssh
    • select any other packages you may want
  • launch Cygwin console
    (should use mintty by default)
    it will setup your HOME folder and the different profiles
  • Download apt-cyg
    it will act as our Cygwin package manager
    the file is apt-cyg (right click "save as")
    • move the file to the cygwin /bin folder
    • make the file executable
      eg. $ chmod +x /bin/apt-cyg
    • you can test it if you want
      $ apt-cyg or $ apt-cyg list, etc.
  • Download Wpkg
    another kind of Windows package manager
    this one will act as an equivalent of dpkg
    so we can install .deb packages manually
    • download wpkg-1.0.0
      evne if the file mention amd64, it is a 32-bit installer that will work everywhere
    • install wpkg in the default folder C:\WPKG
    • once installation is complete, you have to copy
      C:\WPKG\wpkg_static.exe to your cygwin /bin folder
      for ex: cp /cygdrive/c/WPKG/wpkg_static.exe /bin/wpkg.exe
    • you also have to modify
      your .profile and/or .bash_profile with the following
      export WPKG_OPTIONS='--root c:/cygwin --admindir c:/WPKG/var/lib/wpkg'
  • all done :)
Clone this wiki locally