mp4096 / indentex

An indentation-based superset of LaTeX
MIT License
9 stars 2 forks source link

Windows support #17

Closed mp4096 closed 7 years ago

mp4096 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

Great!

syxolk commented 7 years ago

... 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 commented 7 years ago

This would be so awesome if it works: https://github.com/rust-lang/libc/issues/290

mp4096 commented 7 years ago

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 commented 7 years ago

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

syxolk commented 7 years ago

Stuff regarding the Wix installer:

mp4096 commented 7 years ago

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 commented 7 years ago

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

mp4096 commented 7 years ago

Great!

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

syxolk commented 7 years ago

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 commented 7 years ago

Ok, I see. Thanks!

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

mp4096 commented 7 years ago

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 commented 7 years ago

:roll_eyes:

error: failed to run rustc to learn about target-specific information

mp4096 commented 7 years ago

Continued in #31