Closed mp4096 closed 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:
Great!
... 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.
This would be so awesome if it works: https://github.com/rust-lang/libc/issues/290
Ok, we'll probably need to bump Rust version to 1.14 in order to support static linking of CRT.
I hope this will work for Win 7. MS CRT is relatively new
Stuff regarding the Wix installer:
Program files
or AppData
)PATH
(user or system environment variables)wxs
filepandoc -f markdown -t rtf LICENSE.md -s -o LICENSE.rtf
)Banner image for the installer
A blue to black gradient with a bold-italic caption
Install directory (
Program files
orAppData
)
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.
https://github.com/syxolk/indentex/tree/wix-packaging
%LOCALAPPDATA%
%PATH%
Great!
Erm, how are we supposed to generate a GUID (ProductUpgradeCode
)? Just take a random number and pray it's not already used?..
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
Ok, I see. Thanks!
We still have to find out how to link CRT statically. I'll make a separate issue for it.
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
Continued in #31
Most of the people I know use Windows for writing LaTeX. So it is imperative indentex has first-class Windows (7+) support.
Blocking issues:
termcolor
instead ofansi_term
-- resolved (by removing colours altogether) in #20