bcpierce00 / unison

Unison file synchronizer
GNU General Public License v3.0
4.21k stars 236 forks source link

README.md update, instructions on installing binaries built by the CI process - Windows #1085

Open StuartDaniells opened 3 days ago

StuartDaniells commented 3 days ago

At https://github.com/bcpierce00/unison/wiki/CI-Binary-instructions#installing-binaries-built-by-the-ci-process Noticed a todo for Windows based installation: image

Have a solution tried on my Windows 11 machine (using WSL).

gdt commented 3 days ago

(Please quote text as text, not images.)

You opened an issue, but I am not following. I am unclear on WSL; I don't think we intend to require that.

Do you have proposed text? If so, please provide it (as text of course).

StuartDaniells commented 3 days ago

Unison File Synchronizer Installation on Windows Using CI Binaries

This guide explains how to install Unison File Synchronizer on Windows using CI binaries. Since Unison's CI binaries are typically provided for Linux/macOS, the steps involve using Windows Subsystem for Linux (WSL) to facilitate the installation.

Step 1: Download CI Binaries

  1. Visit the Releases Page

  2. Select the Latest CI Binary

    • Look for a file ending with .tar.gz or .zip. If there is no Windows binary available, download the Linux binary to be used in WSL.

Step 2: Install WSL (Windows Subsystem for Linux)

To run Unison binaries built for Linux on Windows, you need to install WSL:

  1. Enable WSL on Windows

    • Open PowerShell as Administrator.
    • Run the following command to enable WSL:
      wsl --install
    • If WSL is not enabled, restart your computer after running the command.
  2. Install a Linux Distribution

    • Install a Linux distribution from the Microsoft Store. Ubuntu is recommended.

Step 3: Install and Set Up Unison in WSL

  1. Open the WSL Terminal

    • Launch the installed Linux distribution (e.g., Ubuntu) from the Start Menu.
  2. Download and Extract CI Binaries

    • Use wget or curl to download the Unison CI binaries:
      wget https://github.com/bcpierce00/unison/releases/download/<release>/unison-v<version>-linux64.tar.gz

      Replace <release> and <version> with the appropriate values.

  3. Extract the Archive

    • Extract the downloaded .tar.gz file:
      tar -xzf unison-v<version>-linux64.tar.gz
  4. Move the Unison Executable to a Standard Location

    • Move the Unison binary to /usr/local/bin:
      sudo mv unison /usr/local/bin/
  5. Make the Binary Executable

    • Ensure the binary is executable:
      chmod +x /usr/local/bin/unison

Step 4: Synchronize Files Between Windows and WSL

  1. Access Windows Files from WSL

    • You can access your Windows files directly from WSL via the /mnt directory (e.g., C: is available at /mnt/c).
  2. Create a Profile to Sync Files

    • Create a Unison profile in the .unison directory within your home directory:
      mkdir -p ~/.unison
      nano ~/.unison/default.prf
    • Example content for the profile:
      root = /mnt/c/Users/<YourUsername>/Folder1
      root = /mnt/c/Users/<YourUsername>/Folder2
  3. Run Unison in WSL

    • Run the synchronization with:
      unison default

Additional Notes

This setup allows us to use Unison's Linux binaries through WSL to synchronize files on your Windows system, utilizing CI binaries.

gdt commented 3 days ago

This seems to expplain how to use GNU/Linux binaries on windows, which is not using the windows binaries from CI.