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

Windows support #17

Closed
4 tasks done
mp4096 opened this issue May 22, 2017 · 15 comments
Closed
4 tasks done

Windows support #17

mp4096 opened this issue May 22, 2017 · 15 comments
Assignees

Comments

@mp4096
Copy link
Owner

mp4096 commented May 22, 2017

Most of the people I know use Windows for writing LaTeX. So it is imperative indentex has first-class Windows (7+) support.

Blocking issues:

@syxolk
Copy link
Collaborator

syxolk commented May 22, 2017

Compiling with MSVC so that indentex can be packed to a Windows installer together with C++ redistributable

I've just found a configuration that works:

  1. Install the Build Tools für Visual Studio 2017
  2. Install rustup
  3. Use the stable-x86_64-pc-windows-msvc toolchain

@mp4096
Copy link
Owner Author

mp4096 commented May 22, 2017

Great!

@syxolk
Copy link
Collaborator

syxolk commented May 22, 2017

... together with C++ redistributable

One can also use the linker flags /MT or /MTd to statically link the standard libraries. At least for an older project of mine the C++ Redistributable was no longer needed. However, I don't know how to do this in rust.

@mp4096
Copy link
Owner Author

mp4096 commented May 22, 2017

This would be so awesome if it works: rust-lang/libc#290

@mp4096
Copy link
Owner Author

mp4096 commented May 22, 2017

Ok, we'll probably need to bump Rust version to 1.14 in order to support static linking of CRT.

See release notes for 1.14

@mp4096
Copy link
Owner Author

mp4096 commented May 22, 2017

I hope this will work for Win 7. MS CRT is relatively new

@syxolk
Copy link
Collaborator

syxolk commented May 26, 2017

Stuff regarding the Wix installer:

  • Icons for the installer and the executable
  • Banner image for the installer
  • Install directory (Program files or AppData)
  • Add to PATH (user or system environment variables)
  • How to update the version in the wxs file
  • How to generate RTF from LICENSE.md (pandoc -f markdown -t rtf LICENSE.md -s -o LICENSE.rtf)

@mp4096
Copy link
Owner Author

mp4096 commented May 26, 2017

Banner image for the installer

A blue to black gradient with a bold-italic caption

Install directory (Program files or AppData)

AppData only, no option for system-wide installs.

Add to PATH (user or system environment variables)

Yep.

How to update the version in the wxs file
How to generate RTF from LICENSE.md (pandoc -f markdown -t rtf LICENSE.md -s -o LICENSE.rtf)

I think the best way is to write a release script which does all this stuff automatically.

@syxolk
Copy link
Collaborator

syxolk commented May 26, 2017

https://github.com/syxolk/indentex/tree/wix-packaging

  • Install to %LOCALAPPDATA%
  • No UAC
  • Add install path to user's %PATH%

@mp4096
Copy link
Owner Author

mp4096 commented May 26, 2017

Great!

Erm, how are we supposed to generate a GUID (ProductUpgradeCode)? Just take a random number and pray it's not already used?..

@syxolk
Copy link
Collaborator

syxolk commented May 26, 2017

I don't know about the component's GUID but the UpgradeCode must be unique.

http://wixtoolset.org/documentation/manual/v3/howtos/general/generate_guids.html

@mp4096
Copy link
Owner Author

mp4096 commented May 27, 2017

Ok, I see. Thanks!

We still have to find out how to link CRT statically. I'll make a separate issue for it.

@mp4096
Copy link
Owner Author

mp4096 commented May 27, 2017

After studying RFC 1721, I think that static linking can be enforced by passing a target-feature=+crt-static flag to rustc.

Hence, we need to call cargo like this:

RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --target x86_64-pc-windows-msvc

@mp4096
Copy link
Owner Author

mp4096 commented May 27, 2017

@mp4096
Copy link
Owner Author

mp4096 commented May 28, 2017

Continued in #31

@mp4096 mp4096 closed this as completed May 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants