Author Topic: USER_DIRECTORY support for linux  (Read 361 times)

Offline K4thos

  • Planewalker
  • *****
  • Posts: 106
USER_DIRECTORY support for linux
« on: February 03, 2017, 06:06:58 PM »
USER_DIRECTORY variable doesn't support unix systems. EE mods that uses this variable are not compatible with linux.

As a workaround I've tried to manually fix the variable like this:
Code: [Select]
OUTER_PATCH_SAVE USER_DIRECTORY_FIX ~%USER_DIRECTORY%~ BEGIN
  PATCH_IF ~%WEIDU_OS%~ STR_EQ ~unix~ BEGIN
    REPLACE_TEXTUALLY "^\./" "~/.local/share/"
  END
END

and this:
Code: [Select]
AT_NOW ~echo $HOME >home.txt~ EXACT
COPY - ~home.txt~ ~.../home.txt~
  REPLACE_EVALUATE CASE_INSENSITIVE ~^\(.+\)$~ BEGIN
    SPRINT home_dir ~%MATCH1%~
  END ~~
OUTER_PATCH_SAVE USER_DIRECTORY_FIX ~%USER_DIRECTORY%~ BEGIN
  REPLACE_TEXTUALLY ~^\./~ ~%home_dir%/.local/share/~
END

But in both cases this FILE_EXISTS test code fails to find the file on linux:
Code: [Select]
ACTION_IF FILE_EXISTS ~%USER_DIRECTORY_FIX%/Baldur.lua~ BEGIN
  PRINT ~Baldur.lua exists in %USER_DIRECTORY_FIX% directory~
END ELSE BEGIN
  PRINT ~Baldur.lua doesn't exists in %USER_DIRECTORY_FIX% directory~
END

Any chance for updating USER_DIRECTORY to support linux?
« Last Edit: February 03, 2017, 06:11:41 PM by K4thos »

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 902
Re: USER_DIRECTORY support for linux
« Reply #1 on: March 18, 2017, 07:01:37 PM »
Done. Holdover from whenever.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: