searleser97 / cpbooster

Competitive Programming Booster
GNU General Public License v3.0
144 stars 30 forks source link

cpb uses .exe extensions on all platforms #77

Closed shadmansaleh closed 1 year ago

shadmansaleh commented 1 year ago

Please complete the following information: cpbooster version: 2.6.4 OS: Arch

Using Neovim? : yes Terminal Name: kitty

Describe the bug

cpbooster names complied binaries with .exe extension. .exe only makes sense if user is running windows. It should probably check if the platform is windows before appending .exe here https://github.com/searleser97/cpbooster/blob/66f20b6424404e8684916d7ca3f326cb022f5405/app/src/Test/TesterFactory/CompiledTester.ts#L124

Steps To Reproduce it

  1. run any testcase on linux/mac and check the extension of compiled file

Expected behavior .exe should be used on windows only

searleser97 commented 1 year ago

for now there are no plans to make this change since even though the extension is .exe any platform can execute it natively

shadmansaleh commented 1 year ago

Because of the .exe extension, It gets sent to wine by default which is kind of dumb.

image

And it feels like a 1/2 line change to put a condition there so why not?

searleser97 commented 1 year ago

In unix (Mac or Linux) systems you can execute your compiled code in the terminal by prepending dot-slash like ./executable_file.exe

searleser97 commented 1 year ago

in progress here: https://github.com/searleser97/cpbooster/pull/89