the-carlisle-group / Acre-Desktop

A simple Dyalog APL IDE plugin that introduces "projects" and allows you to keep your source code in Unicode text files.
MIT License
11 stars 1 forks source link

Using .dyapp file to open projects #67

Closed norberturkiewicz closed 6 years ago

norberturkiewicz commented 6 years ago

This works nicely and I no longer have to type 👍

explorer_2018-02-13_10-42-56

norberturkiewicz commented 6 years ago

Might be helpful in the wiki.

norberturkiewicz commented 6 years ago

Here's a dyapp command that will use the folder its in for the project name

Run ⎕se.UCMD 'acre.OpenProject ',(0⊃⎕nparts #.GetEnvironment'DYAPP')

e9gille commented 6 years ago

Launching a dyapp file starts Dyalog and sets the current directory to the path of the dyapp file. If acre supports relative paths it should suffice to call Run ⎕se.UCMD 'acre.OpenProject .'

I rely on these dyapp files on windows and hope Dyalog will get the same functionality in the nix versions soon.

PhilLast commented 6 years ago

Acre 3 puts one of these in the .acre/ folder by default but when it came to putting it back in desktop I couldn't work out the best place for it. Intrigued by Gil's hint above. Is that dot before the final quote standard notation? It certainly works in the project folder!!

Should it be another standard item put there by CreateProject?

e9gille commented 6 years ago

A single dot refers to current directory, so yes, it is standard notation.

Won't hurt to add the file as a standard item. I usually have a couple xload.dyapp load.dyapp and sometimes build.dyapp

aplteam commented 6 years ago

@PhilLast : any progress?

PhilLast commented 6 years ago

What progress is required? I did suggest whether the creation of such a .dyapp file should be standard and Gil suggested it wouldn't hurt.

Does anyone actually want this? And if so where should it be put? So far acre populates the project folder and nothing else. To be of use the .dyapp would have to be outside it.

aplteam commented 6 years ago

@e9gille ?

PhilLast commented 6 years ago

To elaborate slightly on my last comment If it's in the project folder it can be merely

Run ⎕se.UCMD 'acre.OpenProject .'

But in windows at least I can only get this to work from windows explorer. From a task bar menu or pinned to the Dyalog icon in the task bar it looks in

C:/WINDOWS/system32/

for the folder so needs the full path to work.

aplteam commented 6 years ago

This is a Dyalog/Windows problem: when you create a shortcut from a DYAPP or a DWS and stick it to the taskbar it won't work either in case you use relative path names within the DYAPP.

The reason is that when you double-click any file then Windows checks whether it knows its extension. If it does it starts the associated application and forces it to have the directory the double-clicked file lives in as the working directory.

That works fine in case a DWS or a DYAPP as such are double-clicked for obvious reasons, but it does not work at all with a shortcut pointing to a DWS or a DYAPP. I would have expected that Windows is smart enough to work out that it's a shortcut, and that it does not matter at all where the shortcut lives, only which folder it is pointing to, but it is not. Pity.

I've reported this as a problem to Dyalog. I suggest we forget about DYAPPs for the time being and close this issue. When the report (I hesitate to call it a bug because I think that Microsoft got this wrong) has a result I will report back. I hope that Dyalog is able to do something about this. Until my report they have not been aware of the problem at all.