darkstar
darkstar copied to clipboard
Database Scripts (in /tools) should reference environment variables for MySQL Path
I have:
- [x] looked code way later than I should have
In both Database_xxx.bat scripts there are direct references to path for Program Files. Depending on the install and target system this could be either Program Files or Program Files (x86). To remove the need for a user to change this file we can use environment variables and check both locations. Setting a variable when we find that option.
Database_initial_setup.bat https://github.com/DarkstarProject/darkstar/blob/d0bc0d2cd3a6cb874c279b96811aebb692b3bbd6/tools/Database_initail_setup.bat#L33-L34
Database_update.bat https://github.com/DarkstarProject/darkstar/blob/d0bc0d2cd3a6cb874c279b96811aebb692b3bbd6/tools/Database_update.bat#L33
Sample
if exist %ProgramFiles\MySQL\MySQL Server 5.7\bin (
set mysql="..."
)
if not defined mysql (
if exist %ProgramFiles(x86)\MySQL\MySQL Server 5.7\bin (
set mysql="..."
)
)
@KnowOne134 food for thought
What if we're a weirdo and use MariaDB? :anguished:
Manually edit the line?
On Fri, Apr 26, 2019, 2:23 AM ibm2431 [email protected] wrote:
What if we're a weirdo and use MariaDB? 😧
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/DarkstarProject/darkstar/issues/5895#issuecomment-486955424, or mute the thread https://github.com/notifications/unsubscribe-auth/AIPXQA7YSSQXWHFH5HT7RF3PSKUYPANCNFSM4HISO4TA .
if exist %ProgramFiles\MariaDB 10.2\bin (
set mysql="..."
)
Don't forget Maria!