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

Rewrite pwsh script #107

Merged
merged 7 commits into from
Oct 27, 2024
Merged

Rewrite pwsh script #107

merged 7 commits into from
Oct 27, 2024

Conversation

wickdynex
Copy link
Contributor

@wickdynex wickdynex commented Oct 27, 2024

Overview of Changes

  1. Add new feature to install.ps1.: use -h for help, -d for specifying directory, -v for specifying chsrc version.
  2. Help output: use -h to display help.
  3. Specify directory: default dir is ${HOME}\Downloads, can use -d <dir> to specify the download directory.
  4. Specify chsrc version: default version is pre, use -v <version> to specify.
  5. Rewrite the whole file, rebuild its structure.
  6. Use English Output: to avoid scrambled code.

Related Issues

Fixed #98

Type of Change

  • New feature
  • Code refactoring

Impact

Now can use install.ps1 on windows to download any version of chsrc in any directory.

Test

I've already test the -h, -v, -d flag on my machine. OS Version: Windows 10 Professional 64-bit, CPU Model: 12th Gen Intel(R) Core(TM) i7-12700H.

Pretending Test

  • didn't execute the script on MacOS or Linux. If you have the mechine mentioned above, plz do it.
  • didn't test on Windows 32-bit OS and arch of x86.

@ccmywish ccmywish added Release Release Windows Windows相关 labels Oct 27, 2024
@ccmywish ccmywish added this to the v0.2.0 milestone Oct 27, 2024
@ccmywish
Copy link
Contributor

ccmywish commented Oct 27, 2024

Very well written script! 👍👍👍

Is there a better default directory other than {HOME}\.chsrc\bin

According to the design principle of chsrc, https://github.com/RubyMetric/chsrc/blob/main/doc/Write-A-Recipe-Even-If-You-Dont-Know-C.md#%E5%BC%80%E5%8F%91%E5%87%86%E5%88%99 We don't want to create a dir like ~/.chsrc or whatever in user's computer. Could you please find a better location?

@ccmywish
Copy link
Contributor

I've ran the script on my computer, the URL have an extra wrong letter v when pre. Please fix this little bug.

image

@ccmywish
Copy link
Contributor

The executable file chsrc.exe cant run correctly on Windows, no matter how I download it from the Gitee repository. Confused.

You can visit https://gitee.com/RubyMetric/chsrc/releases/tag/v0.1.9 to download and try if these executables work on your computer. I've checked them again, they can run correctly on my computer.

@wickdynex
Copy link
Contributor Author

The executable file chsrc.exe cant run correctly on Windows, no matter how I download it from the Gitee repository. Confused.

You can visit https://gitee.com/RubyMetric/chsrc/releases/tag/v0.1.9 to download and try if these executables work on your computer. I've checked them again, they can run correctly on my computer.

Alright, I double clicked it, that's why it can't run, haha. It can use when running from pwsh.

@wickdynex
Copy link
Contributor Author

Very well written script! 👍👍👍

Is there a better default directory other than {HOME}\.chsrc\bin

According to the design principle of chsrc, https://github.com/RubyMetric/chsrc/blob/main/doc/Write-A-Recipe-Even-If-You-Dont-Know-C.md#%E5%BC%80%E5%8F%91%E5%87%86%E5%88%99 We don't want to create a dir like ~/.chsrc or whatever in user's computer. Could you please find a better location?

I don't neither know. Maybe C:\Program Files\chsrc or C:\Users\name\Downloads? That's the question. But I agree with the UFO Principle. Plz give me an idea.

@ccmywish ccmywish merged commit b089172 into RubyMetric:dev Oct 27, 2024
ccmywish added a commit that referenced this pull request Oct 27, 2024
@ccmywish
Copy link
Contributor

Nice work, thank you @1328032567 👍👍👍

@wickdynex
Copy link
Contributor Author

wickdynex commented Oct 27, 2024

Nice work, thank you @1328032567 👍👍👍

Too kind of you too say so, I'm very glad to be praised like this. Thanks for acknowledging my work, but time is to tight, I also need spare the time on spring-boot framework studying in order to get an intern offer, TAT. What a pity! But, maybe I 'll also spend little time to fix the bash scripts TODO, worth expected. Finally, thank you to give me a chance to start working on this grand open-source project.🥰
Oh, maybe I forgot one thing, that is add my name and email to the title comment, could u plz do it for me🥹?

@ccmywish
Copy link
Contributor

Don't worry! I've already added it. https://github.com/RubyMetric/chsrc/blob/main/tool/installer.ps1#L3

Many open source projects nowadays are get paid by companies. But projects like chsrc don't get paid. For me, all the enthusiastic contributors like you are the payback! Beyond the geographic positions, we knit the code together not only useful but also beautiful. ❤️

Do your primary job as a Java dev, then, just in your spare time, come back now and then, as a host, not a guest, feel at home, get some fun by making chsrc better. 🏡

@wickdynex
Copy link
Contributor Author

Don't worry! I've already added it. https://github.com/RubyMetric/chsrc/blob/main/tool/installer.ps1#L3

Many open source projects nowadays are get paid by companies. But projects like chsrc don't get paid. For me, all the enthusiastic contributors like you are the payback! Beyond the geographic positions, we knit the code together not only useful but also beautiful. ❤️

Do your primary job as a Java dev, then, just in your spare time, come back now and then, as a host, not a guest, feel at home, get some fun by making chsrc better. 🏡

So touching! Your sentences impressed me so much, I feel that I've achieved my value🤩. Btw, maybe I'll also space one hour per day on open-source project like chars. This project is so grant, not only GPL3v but also a cool author. I love a tool which is streamlined, cross-platform, but also written by C language not *Python or Rust. C is the first programming language I've learned, I love C Language with its concept C Unconditionally Trust Each Coder Who Use It, whatever, except for embedded device or driver also os development used C, maybe learning about other language is better to find a job. However, I found this project by coincidence, there was such a project which unbelievable suits my taste, I love this project, also the concept of free sofeware😃. Thank you, thank you again for giving me a chance to participate in developing, I'm so lucky🍀.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release Release Windows Windows相关
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants