Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
StuartDaniells opened this issue Nov 25, 2024 · 3 comments
Labels
feedback Information has been requested; may be closed in 30 days if not provided.

Comments

@StuartDaniells
Copy link

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
Copy link
Collaborator

gdt commented Nov 25, 2024

(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).

@gdt gdt added the feedback Information has been requested; may be closed in 30 days if not provided. label Nov 25, 2024
@StuartDaniells
Copy link
Author

StuartDaniells commented Nov 25, 2024

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

  • Since you are using WSL, file paths must be in WSL format (e.g., /mnt/c/...) to access Windows files.
  • Ensure that the Linux version of Unison matches the version running on the remote machine if synchronizing across different machines to avoid protocol mismatch errors.

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

@gdt
Copy link
Collaborator

gdt commented Nov 26, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback Information has been requested; may be closed in 30 days if not provided.
Projects
None yet
Development

No branches or pull requests

2 participants