Critters / TWANG

Arduino-based 1D dungeon crawler
MIT License
180 stars 83 forks source link

Move sketch to appropriately named subfolder #5

Open per1234 opened 6 years ago

per1234 commented 6 years ago

The Arduino IDE requires that a sketch be located in a folder of the same name. Although the name of the repository does match the sketch name, when GitHub's popular Clone or download > Download ZIP feature is used to download the contents of a repository the branch/release/commit name is appended to the folder name, causing a mismatch.

When opening a file that does not meet this sketch/folder name matching requirement the Arduino IDE presents a dialog:

The file "TWANG.ino" needs to be inside a sketch folder named "TWANG".
Create this folder, move the file, and continue?

After clicking "OK" the Arduino IDE currently moves only the file TWANG.ino to the new folder, leaving behind the other source files. This causes compilation of the sketch to fail:

TWANG-master\TWANG\TWANG.ino:7:18: fatal error: iSin.h: No such file or directory
mirceaciu commented 6 years ago

just remove the -[branch name] appended to the root directory

per1234 commented 6 years ago

@mirceaciu ...or just put the sketch in an appropriately named folder and that won't be necessary.

Of course I know to change the folder name. The purpose of this PR is to make the project friendly to the average Arduino user, who won't know to do that and will end up suffering a lot of confusion. That also results in an increased support burden.

mirceaciu commented 6 years ago

.ino file must have same name as root folder. If your 'average' user does not know this fact he will probably have bigger problems when importing the project dependencies. Let them learn, it better this way