Hi everyone.
I'm tying to make a portableapp. It's main program is stored in two directories: "c:\Program Files\AppName" and "c:\Program Files\Common Files\AppName"(not java or other plugin). So how do I handle this?
I put "c:\Program Files\AppName" into "App\Appname". Put "c:\Program Files\Common Files\AppName" into "App\DefaultData\Common Files\AppName" and wrote this in launch.ini:
Common Files\AppName=%CommonProgramFiles%\AppName
So before the application launched, the "Common Files" part is copied to "%CommonProgramFiles%\AppName". After the application is closed, copied back into Data directory. I don't think this is a good idea. It took long time to copy back. It is unnecessary to copy it back. I just want to delete the copy after the application closed, rather than copy it back. So how to do? Please help me. Thanks.
And I have another question.The program I'm working on has two executable files. How to make two portableapps launchers like AppNamePortable1.exe and AppNamePortable2.exe. How to write the launch.ini? I read the Manual and didn't got the answer. Please help, thanks.
Regards,
David Pi
If you tell us what is the app, we will be able to analyze it and maybe we could help you better.
Regarding multiple launchers, it seems that it's not supported yet. (@Chris: build all, select in extra page, other alternatives?)
Previously known as kAlug.
I think the app name is not very importank. It's an instant messaging app, installed some dll files in Common Files.
I think the OpenOffice Portable is a multi launcher app, isn't it?
Knowing the app would allow us to perform an analysis ourselves.
What are the DLLs? Are them really necessary?
Yes, OOo/LO is multi-launcher, but I'm not sure if it's using PAL.
Previously known as kAlug.
Yes. But I'm just a P.A fan, learning how to build portableapps, most for fun. Telling the app's name may end the discussion.
Yes, the program can't run without those DLLs. Most of them is like little games, photo uploading, etc, as additional features of the app.
Writing things to system dirs is really a bad idea.
Can you join the IRC channel? The discussion there is more active.
Previously known as kAlug.
Hi.I'm still working on it.
If I want copy "App\Common Files\AppName" to $COMMONFILES\AppName at the beginning (if target already exist, rename it.)
And delete $COMMONFILES\AppName at the end(don't copy back), restore the renamed directory.
How do I write the code?
I know nothing about NSIS code.Could you help me? Thanks.
David
It's unlikely that it actually requires the files to be in the Common Files directory. What happens if you put these DLL files in the app's own directory?
I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1
I've tried but it can't work. Must be put into commonfiles.
But now I've wrote some codes. It seems works great.
${SegmentFile}
${SegmentPrePrimary}
Rename "$COMMONFILES\AppName" "$COMMONFILES\AppName-backupbyportableapps"
CopyFiles /SILENT "$EXEDIR\App\Common Files\AppName" "$COMMONFILES\AppName"
!macroend
${SegmentPostPrimary}
RMDir /r "$COMMONFILES\AppName"
Rename "$COMMONFILES\AppName-backupbyportableapps" "$COMMONFILES\AppName"
!macroend
Thanks anyway.