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

Embed Windows application manifests #10878

Merged
merged 2 commits into from
Dec 13, 2013
Merged

Embed Windows application manifests #10878

merged 2 commits into from
Dec 13, 2013

Conversation

vadimcn
Copy link
Contributor

@vadimcn vadimcn commented Dec 9, 2013

In order to avoid UAC installer detection silliness...

Closes #10512

fn postprocess_executable(sess: Session, filename: &Path) {

let default_manifest = concat!(
"<?xml version='1.0' encoding='UTF-8' standalone='yes'?>\r\n",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to just do this as a literal:

"<?xml version='1.0' encoding='UTF-8' standalone='yes'?>\r
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>\r
  <trustInfo xmlns='urn:schemas-microsoft-com:asm.v3'>\r
...
"

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

concat!() performs compile-time concatenation, so this is a single literal.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that, I was talking at a source level because it just seems a little peculiar to have 10 strings rather than 1 (and concat! will possibly be removed, because it is designed to allow things like concat!("foo", some_macro!()) rather than just plain strings, and this "local expansion" can cause problems with hygiene, apparently.)

@alexcrichton
Copy link
Member

silly windows, but nice work!

@vadimcn
Copy link
Contributor Author

vadimcn commented Dec 9, 2013

@alexcrichton: moved manifest stuff to a separate file, added comments as you asked. r?

@alexcrichton
Copy link
Member

Needs a rebase.

@vadimcn
Copy link
Contributor Author

vadimcn commented Dec 10, 2013

@alexcrichton: Rebased

@alexcrichton
Copy link
Member

It appears some rebasing indentation has gone wrong. While you're at it, could you rebase these into a single commit?

@vadimcn
Copy link
Contributor Author

vadimcn commented Dec 10, 2013

Done.

@vadimcn
Copy link
Contributor Author

vadimcn commented Dec 12, 2013

@alexcrichton: retry

...please :)

@vadimcn
Copy link
Contributor Author

vadimcn commented Dec 12, 2013

Grrr... this trailing whitespace check is infuriating.
BTW, tidy seems to be broken on Windows, so make check did not catch this.

Also, rebased

@vadimcn
Copy link
Contributor Author

vadimcn commented Dec 13, 2013

I can't fathom how could this have broken Android but not other unixes... Perhaps a spurious build machine error?

bors added a commit that referenced this pull request Dec 13, 2013
In order to avoid UAC installer detection silliness...

Closes #10512
@bors bors closed this Dec 13, 2013
@bors bors merged commit d4d1310 into rust-lang:master Dec 13, 2013
@vadimcn vadimcn deleted the manifest branch March 1, 2015 08:04
flip1995 pushed a commit to flip1995/rust that referenced this pull request May 17, 2024
…et,GuillaumeGomez

Allow more attributes in `clippy::useless_attribute`

Fixes rust-lang#12753
Fixes rust-lang#4467
Fixes rust-lang#11595
Fixes rust-lang#10878

changelog: [`useless_attribute`]: Attributes allowed on `use` items now include `ambiguous_glob_exports`, `hidden_glob_reexports`, `dead_code`, `unused_braces`, and `clippy::disallowed_types`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows: rustc should embed application manifest into executables
4 participants