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

Can we have ${SLOEBER_HOME} in .sproject and sloeber.cfg files please #1608

Open
PerennialNovice opened this issue Jan 4, 2024 · 5 comments

Comments

@PerennialNovice
Copy link

PerennialNovice commented Jan 4, 2024

This would add to portability of the projects around systems

All other project settings like include paths, linked resources etc are using env. variables.

The path in .sproject and sloeber.cfg is the only setting that has absolute path left

I changed the files manually and it works, but gets overwritten once you change any other project setting

@jantje
Copy link
Member

jantje commented Jan 4, 2024

Strange.
This is how it should work.

Config.mega.board.BOARD.ID=mega
Config.mega.board.BOARD.MENU.cpu=atmega2560
Config.mega.board.BOARD.TXT=${SLOEBER_HOME}/arduinoPlugin/packages/arduino/hardware/avr/1.8.6/boards.txt
Config.mega.compile.sloeber.extra.all=

Looking at the code I see it is a string replace which means potential / \ issues

public static String makePathVersionString(File file) {

return path.toOSString().replace(sloeberHomePathToString, SLOEBER_HOME_VAR);

@PerennialNovice
Copy link
Author

In this context I really think I should have mentioned that I am on Windows system...

and that slashes are backslashes ( \ )

@jantje
Copy link
Member

jantje commented Jan 5, 2024

I'm on windows to right now.
I'm only trying to say you need an exact string match for it to work.
You do realize you can define SLOEBER_HOME at the OS level?

@PerennialNovice
Copy link
Author

Nope, wasn't aware of that...

@jantje
Copy link
Member

jantje commented Aug 13, 2024

The nightly has a way better implementation to get ${SLOEBER_HOME} in sloeber.cfg
Still looking how to get ${SLOEBER_HOME} in .sproject

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

No branches or pull requests

2 participants