filemorph

Check-in [ad11b54de7]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Commit of final revisions for 2.6
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:ad11b54de7671201e4f36515613bce5957608feb
User & Date: kevin 2015-11-15 22:26:51
Context
2015-11-17
01:00
Fix serious crash in Windows build check-in: de77c8d1dc user: kevin tags: trunk
2015-11-15
22:26
Commit of final revisions for 2.6 check-in: ad11b54de7 user: kevin tags: trunk
2015-11-13
11:48
Additional tweaks check-in: 83230a13ac user: kevin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to filemorph.c.

    40     40    int main( int argc , char **argv , char **env ) 
    41     41   {    
    42     42   	// Get current module's full path
    43     43   
    44     44      TCHAR exedir [MAX_PATH] = "";
    45     45      GetModuleFileName( 0, exedir, MAX_PATH );
    46     46   
    47         -   // Remove file part for e.g. SomeExe.exe from C:/SomeProgram/SomeExe.exe
    48         -
    49         -   // include shlwapi.h and link to shlwapi.lib
           47  +   // Remove file part 
    50     48      PathRemoveFileSpec(exedir);
    51         -
    52         -  // char appdir = (char)exedir;
    53         -   //Change working directory to where exe is installed 
    54         -
    55         - //  chdir(appdir);
    56         -
    57         - SetCurrentDirectory(exedir);
           49  +   SetCurrentDirectory(exedir);
    58     50   
    59     51       // shift argv and force parameters
    60     52   
    61     53       int num_forced_parameters = 4;
    62     54   
    63     55       argc += num_forced_parameters;
    64     56   

Changes to filemorph.pl.

     1      1   # FileMorph: Rename files, edit attributes
     2      2   
     3      3   #Copyright (C) 2015 WordTech Communications LLC
     4      4   
     5      5   #MIT license
     6      6   
     7      7   #let's get started
     8         -
            8  + 
     9      9   use FindBin qw($Bin);
    10     10   use Config;
    11     11   use File::Spec::Functions;
    12     12   use File::Copy::Recursive qw(dircopy );
    13     13   use Env qw(HOME);
    14     14   use File::Path qw(remove_tree);
    15     15   use File::Copy::Recursive qw (rmove);
           16  +our $DOS;
    16     17   
    17     18   print "FileMorph is starting up...\n";
    18     19   
    19     20   BEGIN {
    20     21   
    21     22       if ($Config{osname} eq "darwin") {
    22     23           my $frameworkpath = "$Bin/Contents/Frameworks/Tcl.framework/Tcl";
    23     24           $ENV{'PERL_TCL_DL_PATH'} = $frameworkpath;
    24     25       }
    25     26       if ($Config{osname} eq "MSWin32") {
           27  +        require Win32::GUI;
           28  +        Win32::GUI->import();
           29  +        $DOS = Win32::GUI::GetPerlWindow();
           30  +        Win32::GUI::Hide($DOS);
    26     31           my $frameworkpath = "$Bin/Tcl/bin/tcl86.dll";
    27     32           $ENV{'PERL_TCL_DL_PATH'} = $frameworkpath;
    28     33   
    29     34       }
    30     35   
    31     36   }
    32     37   
................................................................................
   529    534   
   530    535   Tkx::MainLoop();
   531    536   exit;
   532    537   
   533    538   ###----subroutines
   534    539   
   535    540   sub shutdown {
          541  +    if (IS_WINDOWS) {
          542  +        Win32::GUI::Show($DOS);
          543  +    }
   536    544       &Tkx::exit;
   537    545   }
   538    546   
   539    547   sub makeImage {
   540    548   
   541    549       my $data = "iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xh
   542    550   BQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAA
................................................................................
  1237   1245   
  1238   1246       if ($appversion < $versionnumber) {
  1239   1247           if ($IS_AQUA) {
  1240   1248               &Tkx::softwareupdate__updatePitchPerl($appname,
  1241   1249                   $versionnumber, $appversion, $changelog);
  1242   1250           }
  1243   1251           if ($IS_WINDOWS) {
  1244         -            &Tkx::softwareupdate_winPitch($appname, $versionnumber,$appversion);
         1252  +            &Tkx::softwareupdate__winPitch($appname, $versionnumber,
         1253  +                $appversion);
  1245   1254           }
  1246   1255   
  1247   1256       }
  1248   1257       else {
  1249   1258           &Tkx::softwareupdate__upToDate();
  1250   1259       }
  1251   1260   }

Changes to scriptlibs/softwareupdate/softwareupdate.tcl.

   271    271       wm deiconify .update
   272    272       raise .update
   273    273       wm transient .update .
   274    274   
   275    275   }
   276    276   
   277    277   proc winPitch {name newversion oldversion} {
   278         -    set answer [tk_messageBox  -icon info -title "New Version Available" -message "New Version Available" -detail "$name $newversion is available--you have $currentapp. Would you like to download it now?" -type yesno
          278  +    set answer [tk_messageBox  -icon info -title "New Version Available" -message "New Version Available" -detail "$name $newversion is available--you have $oldversion. Would you like to download it now?" -type yesno
   279    279   	       ]
   280    280   
   281    281       switch -- $answer {
   282    282   	yes {
   283    283   
   284    284   	    xplat::launch http://www.codebykevin.com/$name.html
   285    285   	}