The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,380 other followers

Delphi needs a few more wizards – verify dpr against dproj and check both against files on disk

Posted by jpluimers on 2018/05/31

There are a few experts Delphi needs for project management:

  • verify the .dproj against the .dpr as these get out of sync often, especially in multi-person or multi-branch projects
  • verify .dproj and .dpr against files on disk (often there are files on disk not in the Project Manager; Visual Studio has this nice [WayBack“Show All Files” button that helps fixing this there)

via [WayBackIs there a way to export the file structure of a Project from the Project Manager view to a txt file? – John Kouraklis – Google+

Atilla Kovaks posted a small bash script to get started: [WayBackhttp://pisil.de/prfiles.sh.txt

–jeroen

From https://pastebin.com/fcsiLc6Q :

 

3 Responses to “Delphi needs a few more wizards – verify dpr against dproj and check both against files on disk”

  1. Attila Kovacs said

    my webserver is temporary suspended due to GDPR :P

    here is the script:

    #!/bin/bash

    !!! Be careful with scripts, always do your backup or play on a copy !!!

    if [[ $# -eq 0 ]] ; then
    echo ‘usage: prfiles.sh project.dproj’
    exit 1
    fi

    declare file_content=$( cat $1 | sed -nr “/DCCReference Include/I{s/(.)\”(.)\”(.*)/\2/g;p}” )

    shopt -s nocasematch

    for i in find . -name "*.pas" -type f -printf '%f\n'; do
    [[ ! ” $file_content ” =~ $i ]] && echo $i “not in dproj”
    done

    exit

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: