Skip to content

Commit

Permalink
GUI-Warp.app: starter.c to handle environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
mezantrop committed Sep 1, 2024
1 parent 202ada3 commit 86f8ee6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# CHANGELOG

* **2024.08.30 Current**
* **2024.09.01 Current**
* `GUI-Warp.app`: `starter.c` to handle environment variables
* `minmiconf`: Updated to version `1.1.1.0`
* `configure`: Added lost paths check for macOS SDK directories
* `GUI-Warp.app`: Added an internal launcher - `starter.c`
Expand Down
9 changes: 8 additions & 1 deletion gui/ports/macOS/starter.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
this stuff is worth it, you can buy me a beer in return Mikhail Zakharov
*/

/*
2024.08.29 v1.0 Initial release
2024.09.01 v1.1 Handle environment variables
*/


/* -------------------------------------------------------------------------- */
#include <stdio.h>
Expand All @@ -23,6 +29,7 @@

/* -------------------------------------------------------------------------- */
int main(int argc, char *argv[]) {
extern char** environ;
char buf[DIRBUFSZ];

if (argc > 2 || (argc == 2 && !strncmp(argv[1], "-h", 2))) {
Expand All @@ -40,6 +47,6 @@ int main(int argc, char *argv[]) {
getcwd(buf, DIRBUFSZ);
sprintf(buf + strnlen(buf, DIRBUFSZ), "/%s", APP_NAME);

return execl(buf, APP_NAME, NULL);
return execle(buf, APP_NAME, 0, environ);
}

0 comments on commit 86f8ee6

Please sign in to comment.