problem with upx... lazarus / 8-Other ---------------------------------------------------------------------- fab25 · 2006-01-02 17:20 Hi, I have a small problem when I try to reduce the size of the output file to Linux. This line fails to work after I use upx (it works fine after strip). QuoteMemoSource.Lines.LoadFromFile(ExtractFilePath(Application.Exename )+'text.txt'); I tried to see where the problem came from. When I do a showmessage after upx, (showmessage(ExtractFilePath(Application.Exename)), the value returned isQuote /tmp in spite of the fact that this is not the real path of the executable. Since the file after strip is still a way to big, I would like to know, if anyone does, how to fix this. This is on the TForm1.FormCreate(Sender: TObject); procedure... Thanks for your help... ---------------------------------------------------------------------- barko · 2006-01-02 18:20 Use this function: Code: [Select] function origpath:string; var tmp:string; begin   tmp:=StrPas(argv[0]);   tmp:=ExpandFileName(tmp);   tmp:=ExtractFileDir(tmp);   tmp:=IncludeTrailingPathDelimiter(tmp);   result:=tmp; end; example: MemoSource.Lines.LoadFromFile(origpath+'text.txt'); ---------------------------------------------------------------------- fab25 · 2006-01-02 19:08 Thanks a lot!!! That did the trick! PS : what does StrPas(argv[0]) stands for?