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

Create deploy batch files #188

Merged
merged 1 commit into from
Jun 16, 2023

Conversation

roryjamesallen
Copy link
Collaborator

These are .bat files (for windows) which will copy the various firmware and contrib files onto a connected Pico.
There is one batch file per folder of scripts; one for basic firmware, one for experimental firmware, and one for all contrib scripts.
There is also a master batch file named menu_setup.bat which when run will execute the previously mentioned three files in order, and then copy and rename menu.py from contrib to main.py in root.

With these files, the only extra step is to install the ssd1306 library, after which the module can be connected to power and used immediately. Thanks to the batch files being separated, if you were only editing the contrib files, you could only copy those over by running deploy_contrib.bat and not the rest.

These are .bat files (for windows) which will copy the various firmware and contrib files onto a connected Pico, including renaming menu.py to main.py and placing it in the Pico's root folder if menu_setup is run
Copy link
Collaborator

@mjaskula mjaskula left a comment

Choose a reason for hiding this comment

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

I have no way of testing these myself, so grain of salt. We should probably have at least one other person run them before merge.

[optional] I don't thing that the windows directory is necessary. It's very common for .bat and .sh scripts to live side by side in directories like these. Users understand that only some of them are applicable to their platform.

[optional] I think that the PR description could be used as script documentation pretty easily. I'm not sure what the documentation expectation is for bat files. Of course this points out that the .sh files aren't documented either.

I added one comment where I think the process could be improved, but otherwise it looks good to me.

rshell cp /pyboard/lib/contrib/menu.py menu.py
ren menu.py main.py
rshell cp main.py /pyboard
del main.py
Copy link
Collaborator

Choose a reason for hiding this comment

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

[question] I'm not sure i understand the goal of copying the file twice in order to rename it, so I may be missing something, but i think that the above four lines can all be:

rshell cp /pyboard/lib/contrib/menu.py /pyboard/main.py

@awonak awonak merged commit 4cf1682 into Allen-Synthesis:main Jun 16, 2023
@roryjamesallen roryjamesallen deleted the deploy-for-windows branch February 6, 2024 09:00
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.

3 participants