Mike Torrettinni
Members-
Content Count
1509 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Mike Torrettinni
-
Is it possible to see Git current working branch in IDE?
Mike Torrettinni replied to Mike Torrettinni's topic in Delphi IDE and APIs
Thanks, I know yes. I did enable Git in IDE and saw the options, but that's pretty basic. -
Is it possible to see Git current working branch in IDE?
Mike Torrettinni replied to Mike Torrettinni's topic in Delphi IDE and APIs
Never mind, I copy pasted another ? char in the line. They return the same! Sorry -
Is it possible to see Git current working branch in IDE?
Mike Torrettinni replied to Mike Torrettinni's topic in Delphi IDE and APIs
I have git version version 2.28.0.windows.1. You? -
Is it possible to see Git current working branch in IDE?
Mike Torrettinni replied to Mike Torrettinni's topic in Delphi IDE and APIs
this works for me better, it gives me branch name: git branch --show-current while your suggestion gives me last commit id in current branch, so something like '6d2fab...' -
Is it possible to see Git current working branch in IDE?
Mike Torrettinni replied to Mike Torrettinni's topic in Delphi IDE and APIs
No, no, that was not my intention... it's just about getting branch name into the Delphi IDE. -
Is it possible to see Git current working branch in IDE?
Mike Torrettinni replied to Mike Torrettinni's topic in Delphi IDE and APIs
Yes, that looks good. I assume the info stays there when switching to .cpp code, right? -
Is it possible to see Git current working branch in IDE?
Mike Torrettinni replied to Mike Torrettinni's topic in Delphi IDE and APIs
I enabled Git in IDE, but no info on what branch you are working on. Shame, it would pretty useful if there would very clear info, something like [Git: branch name], either in IDE title or in Project name in Project manager. Too bad. -
Is it possible to see Git current working branch in IDE?
Mike Torrettinni replied to Mike Torrettinni's topic in Delphi IDE and APIs
@Lars Fosdal thanks, I know how the info is in Sourcetree, but i want to see in IDE what feature (branch) the opened project is about. Didn't know of it, will check. Thanks. -
What everyhing else do you put under source control, apart from Delphi projects?
Mike Torrettinni posted a topic in General Help
I just had a little issue with a website backup and hard time rolling back some changes, so decided to put it under the source control. I wish I had done this sooner, so I'm thinking what else makes sense to put under source control, like: documentation, various scripts. Do you also put 3rd party source code under source control? I rarely change anything, but I do have some patches I apply to some components on new install. What do you guys have under source control? -
What everyhing else do you put under source control, apart from Delphi projects?
Mike Torrettinni replied to Mike Torrettinni's topic in General Help
I've never done any restore that involve registry settings, except running registry patches like regarding disabling some Delphi packages that slow down IDE. So, I was just trying to understand what you are referring to, perhaps something it's useful for me too, but never realized that's a good idea to have backup of. -
What everyhing else do you put under source control, apart from Delphi projects?
Mike Torrettinni replied to Mike Torrettinni's topic in General Help
You backup the whole Registry or just patches you run manually after installations? -
What everyhing else do you put under source control, apart from Delphi projects?
Mike Torrettinni replied to Mike Torrettinni's topic in General Help
It says: "Note that you need to ask your backup vendor specifically whether they offer a 3-1-2 as shown or if they offer only a 3-1-1 (one copy in the cloud.) Don’t accept only a single copy in the cloud – it simply doesn’t offer the protection afforded by modern continuity and backup solutions." Is anybody really doing this? Requiring their backup vendor to have 3-1-1/3-1-2 backup of their data? So, if I have have 3 backup copies of my source, and vendor has 3 backup copies of what I upload to cloud backup... there are 6 backup copies of my source! And if that backup vendor is using a 3rd party backup vendor for one of the copies... 🙂 🙂 🙂 -
What everyhing else do you put under source control, apart from Delphi projects?
Mike Torrettinni replied to Mike Torrettinni's topic in General Help
Thanks, interesting. Definitely something to think about, but for sure need to clean up any large files, like zip, pdf, psd... also found a few 150MB .rsm files. -
What everyhing else do you put under source control, apart from Delphi projects?
Mike Torrettinni replied to Mike Torrettinni's topic in General Help
I assume same for Git, right? So I can put a lot of non-source stuff (icons, docs, scripts...) into single repository and it will push only deltas to github. -
What everyhing else do you put under source control, apart from Delphi projects?
Mike Torrettinni replied to Mike Torrettinni's topic in General Help
For files, right? Or are you talking about notes like Google Sheet and Google Docs? -
What everyhing else do you put under source control, apart from Delphi projects?
Mike Torrettinni replied to Mike Torrettinni's topic in General Help
Wow, you guys are really doing it the right way. I guess some learned the lesson, like I just did - the basic backups don't always solve all problem or make it easy to restore older version. I will need to rethink this whole thing. I have github as backup and I see they have 2GB and 50Gb packages, so it should handle all my stuff. -
Anybody changing FileVersion directly in dproj file?
Mike Torrettinni posted a topic in General Help
I noticed TDprojParser class that changes FileVersion in dproj file.: https://blogs.embarcadero.com/change-dproj-file-and-product-version/ It seems to do a good job. Anybody using it? I also noticed this thread about that people are using simple find/replace tools: https://en.delphipraxis.net/topic/4413-how-to-set-version-number-for-all-the-projects-in-a-project-group/ I know probably best option is creating .rc file, but if I opt for second-best, anybody ever found any issues with changing .dproj file while building projects? -
Anybody changing FileVersion directly in dproj file?
Mike Torrettinni replied to Mike Torrettinni's topic in General Help
That's why I gave up on .rc file, after 2h I couldn't make it work on new empty project, so I can't imagine it's worth investing time for all my projects, because I'm sure each of them will have it's own little quirk and valid reason why it's not working. Setting version in .dproj file on build and commit worked out of the box and every time, since. -
I'm experiment with some scripts and trying to get Parent info of the process. This is my call: I run a batch file, starting point: c:\Develop\ and batch file calls my Delphi's Project1.exe in Win32\Debug\ folder. I see in Process Monitor (mouse hint) that it has a Current directory of a Parent that executes my Delphi Project1.exe: Looking at Task manager I see this about the Parent process (19916): In Delphi I can get Parent PID, exe name and full path, so I can get Image path name, not sure how to get Command line info, but more important is Current directory (that is not in Task manager, but in Process Manager tool). I use CreateToolhelp32Snapshot to get Parent process info, PID and full path name. So, I want to find out what was the starting point or Current directory of the batch file that calls my Project1.exe. Any idea how to get this Parent's Current directory info?
-
Get Parent process Current directory
Mike Torrettinni replied to Mike Torrettinni's topic in Windows API
I do relate to this! 🙂 -
Get Parent process Current directory
Mike Torrettinni replied to Mike Torrettinni's topic in Windows API
Photoshop was just an example of impossibility for me to ask/force all these big companies to customize their tools to fit the needs of my tool. Just because they don't make it easy, doesn't mean it's not possible. Like I said, the user manual setup works just fine, the value of the tool is well worth even if the manual change is needed a few times a day - but it's annoying and now I'm investigating this option. -
Get Parent process Current directory
Mike Torrettinni replied to Mike Torrettinni's topic in Windows API
OK, let me try with example, lets look at Photoshop. Imagine it can be setup so each currently opened file you work on has it's own temp/permanent folder that contains scratch files, history, backup files... basically anything related to your .psd file. And you have a plugin/external tool that extends Photoshop features, based on all those files (perhaps you can look at the history, and pick and choose from it; perhaps there are files that contain brushes... anything that Photoshop doesn't make available on it's own). And Photoshop has an option to send a current working filename to your external tool and it only sends filename, but not the current working folder that has all the other files. The information about that folder is available for users to setup in Photoshop, so they know exactly where it is, but your tool doesn't. So, you can't really go to Adobe and ask them to modify their script to pass all the info you need, to make it easier for your tool. And the way Photoshop 'calls' your external tool is with a cmd from the current working folder of the current opened file. And this is the info your tool needs to work with to be useful. Yes, it took me a while to realize that Parent process is not persistent and even if it was, it's not easy to get it's current working dir, because the OS doesn't have this info just readily available. -
Get Parent process Current directory
Mike Torrettinni replied to Mike Torrettinni's topic in Windows API
Perhaps I don't know that it's possible, but can you identify what was the current directory that your project was called from? Please share the code. -
Get Parent process Current directory
Mike Torrettinni replied to Mike Torrettinni's topic in Windows API
Exactly, not reliable. I need to know where the the line was executed because this is current directory of the process that executes my project. And if Parent would always be persistent process, this would be Parent's current directory. So, I was hoping for function GetProcessCurrentDirectoty(ParentPID): string; 😉 Now, I will have to use batch file to get the current directory and pass it to my project. -
Get Parent process Current directory
Mike Torrettinni replied to Mike Torrettinni's topic in Windows API
Thanks, I did see similar scripts, some in Delphi already. Like Raymond says "Once the process can access its own command line, the kernel’s responsibilities are done. ", I guess is not completely true, since the command line is displayed in Task Manager. Same for Parent process current directory, not easily accessible. But if Parent process is not running anymore, then there is no info to get anyway.