MJW Posted May 24, 2017 Share Posted May 24, 2017 I include my Help files in the DLL as resources. I'd like to follow CodeLab's lead and compress the RTF file in ZIP format or BoltBait's RTZ format. Either will do. I want the RTF file to be automatically compressed upon building whenever the RTF file has been modified. If anyone knows how to do this in Visual Studio, I'd very much appreciate instructions. (This is probably something I could figure out by reading enough MS documentation, but I'm hoping someone knows if it can be done, and if so how to do it, so I dont have to spend my time reading MS's (often infuriating) documentation. (Can anyone describe things more indirectly than Microsoft?)) Quote Link to comment Share on other sites More sharing options...
BoltBait Posted May 24, 2017 Share Posted May 24, 2017 What you are asking for is not too hard. Open your project in visual studio. Right-click on your project and choose "Open folder in file explorer" Put this copy of "Compress.exe" into that folder. CompressV2.zip This build of "Compress" allows command line compressing. In visual studio, open your project properties screen and choose "Build events" In the "Pre-build event" section, place the following DOS commands: cd $(ProjectDir) compress help.rtf This will compress "help.rtf" into "help.rtfz" before the build begins. As long as you have "help.rtfz" included in the project as an "embedded resource" everything should work fine. 2 Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
MJW Posted May 24, 2017 Author Share Posted May 24, 2017 Thank you very much BoltBait. I do have a concern, though. I'd prefer that compression only occur when the RTF file has changed. If I make it a pre-build event, won't it be done for every build? (I suppose I could live with that, but I rather not do it each build.) Quote Link to comment Share on other sites More sharing options...
BoltBait Posted May 24, 2017 Share Posted May 24, 2017 8 minutes ago, MJW said: I do have a concern, though... I wouldn't worry about it. Just let the compression happen each build. It only takes a second. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
MJW Posted May 24, 2017 Author Share Posted May 24, 2017 I know it's a silly thing to worry about, and if I have to do it every build I will. I'm still curious about whether I can compress the file only when it changes. Back in the days of Makefiles, that would have been easy to achieve. Quote Link to comment Share on other sites More sharing options...
MJW Posted May 24, 2017 Author Share Posted May 24, 2017 Thanks for building the command-line version of Compress, BoltBait! It worked great. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.