Skip to content

DYN-3241: Deploy md2html.exe as a single.exe#1

Merged
sm6srw merged 8 commits intomore_failing_test_fixesfrom
DYN-3241
Dec 2, 2020
Merged

DYN-3241: Deploy md2html.exe as a single.exe#1
sm6srw merged 8 commits intomore_failing_test_fixesfrom
DYN-3241

Conversation

@sm6srw
Copy link
Owner

@sm6srw sm6srw commented Dec 1, 2020

Purpose

Deploy md2html.exe as a single.exe

This Pull Request does:

  • deploy md2html.exe as a single exe in windows
  • keep the old behavior for mono.

Note: I did not find a good way to use the same project file for both windows and mono. Let me know if you know about a way to detect mono inside a csproj file.

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated

Reviewers

@mjkkirschner

FYIs

@sm6srw sm6srw changed the title DYN-3241: Add ILMerge DYN-3241: Deploy md2html.exe as a single.exe Dec 1, 2020
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="AfterBuild">
<!-- the ILMergePath property points to the location of ILMerge.exe console application -->
<Exec Command="$(ILMergeConsolePath) $(OutputPath)Md2Html.exe ^

Choose a reason for hiding this comment

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

where does this live though? In the packages folder?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yes, that just works.

<Optimize>true</Optimize>
<OutputPath>$(OutputPath)\Md2Html\</OutputPath>
<SharedOutputPath>$(OutputPath)\Md2Html\</SharedOutputPath>
<OutputPath>bin\AnyCPU\Release\</OutputPath>

Choose a reason for hiding this comment

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

can you explain this and why it needs two output paths and hardcoded path?

Copy link
Owner Author

Choose a reason for hiding this comment

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

SharedOutputPath points to a md2Html directory in our shared bin folder.
OutputPath points to a local output folder relative to the project file.

ILMerge is then used for building a single .exe that is placed in the shared folder from the files in the local bin folder.

@mjkkirschner
Copy link

@sm6srw did you try '$(OS) ? that should let you detect the OS in msbuild and decide to invoke the script or not?

@sm6srw
Copy link
Owner Author

sm6srw commented Dec 1, 2020

Yes, that might work, assuming nobody uses mono on windows? I will take a look.

@mjkkirschner
Copy link

@sm6srw it looks good either way - but maybe one improvement would be to add a local readme file to this folder describing the build steps and super briefly what the tool does?

@sm6srw
Copy link
Owner Author

sm6srw commented Dec 1, 2020

@mjkkirschner Reusing the same csproj file now. I will add a README for the tool as a separate task.

@sm6srw
Copy link
Owner Author

sm6srw commented Dec 2, 2020

Added Readme. I will merge this PR now.

@sm6srw sm6srw merged commit b4c88bc into more_failing_test_fixes Dec 2, 2020
@sm6srw sm6srw deleted the DYN-3241 branch December 2, 2020 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants