-
Notifications
You must be signed in to change notification settings - Fork 2
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
Use wix toolset to package windows installer #28
Conversation
Thanks! Python 2 works well, I've just tested it out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good apart from two points:
- PEP8-compliance in the Python script 🇪🇸 🔥
- I think we should drop the
pandoc
dependency and version theLICENSE.rtf
file in git. Rationale: Easier building in AppVeyor.
packaging/wix/configure.py
Outdated
from os import path | ||
from string import Template | ||
import toml | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use two empty lines between functions, cf. PEP8.
packaging/wix/configure.py
Outdated
with open(path.join("..", "..", "Cargo.toml")) as f: | ||
cargo = toml.load(f) | ||
return cargo["package"]["version"] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two empty lines here as well...
packaging/wix/configure.py
Outdated
|
||
with open("indentex.wxs", "w") as f: | ||
f.write(tmpl.substitute(version=version)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...and here too.
packaging/wix/configure.py
Outdated
tmpl = Template(f.read()) | ||
|
||
with open("indentex.wxs", "w") as f: | ||
f.write(tmpl.substitute(version=version)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would be better to pass a context? Something along the lines of tmpl.substitute(**context)
.
It's more future-proof if someday we have more variables than just the version.
However, don't write any code you don't need right now, so...
packaging/wix/make_installer.ps1
Outdated
@@ -0,0 +1,5 @@ | |||
python configure.py | |||
pandoc -f markdown -t rtf ..\..\LICENSE.md -s -o LICENSE.rtf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The more I think about it... maybe it is better to version LICENSE.rtf
? The thing is, I'd like to build a WiX installer in AppVeyor on each tagged commit / release. AppVeyor has Wix 3.11 (as of now) and Python installed by default, but no pandoc
.
It's actually pretty easy to install pandoc using Chocolatey: |
Oh, ok. Consider this one resolved! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACCEPTABLE.
@syxolk Would you like me to squash on merge? |
One last thing: Should we rename the folder from
|
Hm, I don't know. The thing is, maybe we'd like to make a choco package in the future. Mayber |
I wanted to say yes but nevermind. |
¯\_(ツ)_/¯ |
What is needed:
toml
packagemake_installer.ps1
from within thepackaging/wix
directoryWhat it does:
Cargo.toml
intoindentex.wxs
LICENSE.rtf
fromLICENSE.md
indentex.msi