* * *

Author Topic: Executable has been hidden  (Read 1858 times)

stuey

  • Newbie
  • Posts: 3
Executable has been hidden
« on: April 13, 2018, 09:46:12 am »
This might be a Windows question and not a Lazarus one, but anyway...

I just compiled a "Hello World" program and received a message that said both "Success" and C:\Users\Owner\AppData\Local\Temp\project1.exe

I am logged on to my PC as Owner

But when I get into the C:\Users\Owner directory, there is no AppData directory

And when I did a computer-wide search for "project1.exe" it returned no matches.

I got Windows 7 Professional, Service Pack 1, 4GB memory, 64-bit OS...

what am I missing :-/

GetMem

  • Hero Member
  • *****
  • Posts: 3113
Re: Executable has been hidden
« Reply #1 on: April 13, 2018, 09:52:54 am »
Quote
there is no AppData directory
It's there but is hidden. Just paste the full path to your explorer address bar: C:\Users\Owner\AppData\Local\Temp\ then press enter.

stuey

  • Newbie
  • Posts: 3
Re: Executable has been hidden
« Reply #2 on: April 13, 2018, 10:13:36 am »
Hey thanks!!

Why do they hide it so...

GetMem

  • Hero Member
  • *****
  • Posts: 3113
Re: Executable has been hidden
« Reply #3 on: April 13, 2018, 10:19:09 am »
Try to delete AppData and see what happens :). Now seriously, AppData contains a lot of ini/config files, accidentally deleting those files most likely will cause some program/application to malfunction, this is why it's hidden in the first place.
« Last Edit: April 13, 2018, 10:21:30 am by GetMem »

dbannon

  • Sr. Member
  • ****
  • Posts: 292
Re: Executable has been hidden
« Reply #4 on: April 13, 2018, 11:35:37 am »

Which prompts me to raise a issue that has annoyed me for some time.

I think Lazarus should prompt the user for a place to put its files, perhaps when creating a new project ? 

~/AppData is not somewhere we should be writing working files. At least on my Linux box that would not happen but I often make a quick, new project to try and understand something and if I don't remember to "save as" files sometimes end up in another projects working dir. In other occasions, I just don't know where they are....

Thoughts ?

David 
Lazarus 1.8, Linux (and reluctantly Win10, OSX)

howardpc

  • Hero Member
  • *****
  • Posts: 2718
Re: Executable has been hidden
« Reply #5 on: April 13, 2018, 11:59:29 am »
I think Lazarus should prompt the user for a place to put its files, perhaps when creating a new project ? 

See Tools > Options > Environment, Naming subnode, "[ x ] Ask for file name on new file"

dbannon

  • Sr. Member
  • ****
  • Posts: 292
Re: Executable has been hidden
« Reply #6 on: April 13, 2018, 03:24:45 pm »
Thanks Howard, that does go part of the way.
However if you click Run before saving, it still saves its files, in a place of its choosing. In my case, and a clean start, ~/tmp/. which is not too bad. But as we heard, on Windows, in AppData. Maybe those "hello world" tutorials need to tell people to save before running. And look where its saving ...

But thats sure a useful setting and it now goes on my list !

David
Lazarus 1.8, Linux (and reluctantly Win10, OSX)

ezlage

  • Sr. Member
  • ****
  • Posts: 280
  • (Silêncio)
    • Lageteck
Re: Executable has been hidden
« Reply #7 on: April 13, 2018, 04:01:10 pm »
From Tools, Options you can set any path as "Directory for building test projects" (attachment).

I prefer to use %temp% (C:\Users\%username%\AppData\Local\Temp) for temp projects and .a, .o, .or, .obj and .compiled files, because I use the same Lazarus installation from several computers, synchronized through Google Drive.

I also change project option "Unit output directory (-FU)" (attachment 2).

Sorry by my poor english.

Atenciosamente,

Ezequiel Lage
ezequiel@lageteck.com

dbannon

  • Sr. Member
  • ****
  • Posts: 292
Re: Executable has been hidden
« Reply #8 on: April 18, 2018, 01:32:37 am »
Ah !
Thats very interesting and useful. Thanks ezlage.

So, it seems a 'Test' application is any new application that has not had its "home directory" set by doing a "save as". I have been playing with Lazarus for about 10 months now and did not know that.  %)

On Linux its set to ~/tmp/. and that makes a lot of sense. I now know  where to look for those little test runs and will feel lots happier about where they live. New ones overwrite old ones - thats fine, if you want to keep it, do a save as.

@stuey started this thread, a windows user, surely Windows has a sensible default setting for "Dir for building test apps" too ?

That particular field does not have a Hint, would be nice if it did....
Lazarus 1.8, Linux (and reluctantly Win10, OSX)

molly

  • Hero Member
  • *****
  • Posts: 2345
Re: Executable has been hidden
« Reply #9 on: April 18, 2018, 01:42:35 am »
... surely Windows has a sensible default setting for "Dir for building test apps" too ?
%TMP% / %TEMP%

Phil

  • Hero Member
  • *****
  • Posts: 2749
Re: Executable has been hidden
« Reply #10 on: April 18, 2018, 01:48:19 am »
@stuey started this thread, a windows user, surely Windows has a sensible default setting for "Dir for building test apps" too ?

On Windows I believe Laz always defaults to the directory pointed to by the TEMP environmental variable. You shouldn't need to change the Laz setting to get a true temporary files directory.

On Mac, for some reason Laz uses ~/tmp by default, meaning Lazarus creates a new directory named "tmp" under the user's folder. That's inconsistent with the Windows behavior and is something that no other IDE does. I would change that to /tmp to use the system /tmp folder. In general on Mac, software uses the TMPDIR environment variable for determining where to create temporary files (for example, that's what FPC's GetTempDir uses).

I'm not very fond of the Delphi way of creating a temporary project that you then need to save and name - with Lazarus that means multiple saves. All other IDEs create a proper project folder with the various files already created when the new project is opened.

dbannon

  • Sr. Member
  • ****
  • Posts: 292
Re: Executable has been hidden
« Reply #11 on: April 18, 2018, 01:50:58 am »
Said Molly :

%TMP% / %TEMP%

(Hmm, are there really spaces on either side of that slash ? Sigh ...)

So, I wonder how poor stuey ended up in some system directory ?

I worry how many people try out Lazarus and have an experience like stuey's but don't chase it down, just dismiss the product and go elsewhere. The first couple of minutes using a new application is so critical ....

David
Lazarus 1.8, Linux (and reluctantly Win10, OSX)

molly

  • Hero Member
  • *****
  • Posts: 2345
Re: Executable has been hidden
« Reply #12 on: April 18, 2018, 01:56:11 am »
(Hmm, are there really spaces on either side of that slash ? Sigh ...)
*double sight*

It is to separate two answers. Everybody else in this world but you seems to know that windows does not allow spaces in directory names and that directories are separated with a backslash (and not a slash).

Quote
So, I wonder how poor stuey ended up in some system directory ?
The kindergarten answer.

Quote
I worry how many people try out Lazarus and have an experience like stuey's but don't chase it down, just dismiss the product and go elsewhere. The first couple of minutes using a new application is so critical ....
Yes, that is definitely true. In that regards there are many other design decisions made for lazarus IDE that i disagree with as it is not how common windows application work (or actually applications in general, it is not Windows platform specific). On the other hand someone once thought ribbon interface is a good idea.... which i find highly questionable as well.

edit: be more specific, elaborative and constructive
« Last Edit: April 18, 2018, 02:15:44 am by molly »

dbannon

  • Sr. Member
  • ****
  • Posts: 292
Re: Executable has been hidden
« Reply #13 on: April 18, 2018, 02:02:45 am »
Said Phil :
On Mac, for some reason Laz uses ~/tmp by default,

Yep, same on Linux, Lazarus apparently makes that directory. I think it makes sense in a way, if Lazarus used /tmp the contents are blown away on reboot, might not be what user expects ? 

Now that I understand what Lazarus is doing, I think its pretty good. Its a balance between getting you going quickly and keeping things safe enough. One improvement I'd like to see is some way of making the (new) user aware of the idea that a new, unsaved project is a "Test Application" and its save in the location indicated on the Options->Files ....

I have always used the simple trick of clicking "Save As" as a means of finding out where a file is initially but with a Lazarus Test Application that does not mention its existing path.


Lazarus 1.8, Linux (and reluctantly Win10, OSX)

dbannon

  • Sr. Member
  • ****
  • Posts: 292
Re: Executable has been hidden
« Reply #14 on: April 18, 2018, 02:07:51 am »
Said Molly :
The kindergarten answer.

Ask the average new user to read an article like that before using Lazarus and you have lost them forever !
Lazarus 1.8, Linux (and reluctantly Win10, OSX)

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus