You are here

PortableApps.com Launcher and reading Environment for file move or dir move

7 posts / 0 new
Last post
omidm
Offline
Last seen: 3 weeks 5 days ago
Joined: 2023-10-28 08:57
PortableApps.com Launcher and reading Environment for file move or dir move

hello

befor posting I searched a lot but there is no post like my problems. I want to know wah is my wrong? can use Environmen varible as a value of Launcher.ini but not working as a key of Launcher.ini pls see exp below.

Ini file
[section]
Key=value
PortableApps.com Launcher.ini
for exp.
;making Environment
[Environment]
LangCustom=persian
Sisi=SPCfolder

[FilesMove] ;or [DirectoriesMove]
lang\persian\persian.lng=%PAL:AppDir% ; works as well
lang\%LanguageCustom%\%LanguageCustom%.lng=%PAL:AppDir% ; not working for me
Sisi\SPC.ini=%PAL:AppDir% ; works as well
%SPCfolder%\SPC.ini=%PAL:AppDir% ; not working for me

thanks

Ken Herbert
Ken Herbert's picture
Offline
Last seen: 2 hours 1 min ago
DeveloperModerator
Joined: 2010-05-25 18:19
Wrong variable name

You are missing the PAL: prefix. You need to use %PAL:LanguageCustom% in your FilesMove/DirectoriesMove code.

omidm
Offline
Last seen: 3 weeks 5 days ago
Joined: 2023-10-28 08:57
not working with PAL: or

not working with PAL: or without it
all Environment variable not working as a key of ini file
Problem found
I just don't know why in the following micro
in the DirectoriesMove.nsh & FilesMove.nsh
!macro _DirectoriesMove_Start & !macro _FilesMove_Start
ParseLocations not defined for "full path to source"

John T. Haller
John T. Haller's picture
Offline
Last seen: 5 hours 12 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Can't Set Directly

That custom language variable mentioned in the documentation has to be used in conjunction with the language features of the PA.c Launcher.

Sometimes, the impossible can become possible, if you're awesome!

omidm
Offline
Last seen: 3 weeks 5 days ago
Joined: 2023-10-28 08:57
sorry I reddit my post

sorry I reddit my post

John T. Haller
John T. Haller's picture
Offline
Last seen: 5 hours 12 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Post The Files? Here's An Example

It might be easier if you were to post the files you're working on in PRE tags. Also, take a look at an example in one of our officially released apps as how language switching is handled:

[Language]
Base=%PortableApps.comLocaleglibc%
DefaultIfNotExists=en
CheckIfExists=%PAL:AppDir%\Audacity%PAcLauncherBits%\Languages\%PAL:LanguageCustom%\Audacity.mo

[LanguageFile]
Type=INI
File=%PAL:DataDir%\Portable Settings\audacity.cfg
Section=Locale
Key=Language

[FileWrite4]
Type=INI
File=%PAL:DataDir%\Portable Settings\audacity.cfg
Section=Locale
Key=Language
Value=%PAL:LanguageCustom%

Sometimes, the impossible can become possible, if you're awesome!

omidm
Offline
Last seen: 3 weeks 5 days ago
Joined: 2023-10-28 08:57
thank you

thank you

Log in or register to post comments