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 Unified Diffs Show Whitespace Changes Patch

Changes to filemorph.c.

40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
 int main( int argc , char **argv , char **env ) 
{    
	// Get current module's full path

   TCHAR exedir [MAX_PATH] = "";
   GetModuleFileName( 0, exedir, MAX_PATH );

   // Remove file part for e.g. SomeExe.exe from C:/SomeProgram/SomeExe.exe

   // include shlwapi.h and link to shlwapi.lib
   PathRemoveFileSpec(exedir);

  // char appdir = (char)exedir;
   //Change working directory to where exe is installed 

 //  chdir(appdir);

 SetCurrentDirectory(exedir);

    // shift argv and force parameters

    int num_forced_parameters = 4;

    argc += num_forced_parameters;







|
<
<

<
<
<
<
<
<







40
41
42
43
44
45
46
47


48






49
50
51
52
53
54
55
 int main( int argc , char **argv , char **env ) 
{    
	// Get current module's full path

   TCHAR exedir [MAX_PATH] = "";
   GetModuleFileName( 0, exedir, MAX_PATH );

   // Remove file part 


   PathRemoveFileSpec(exedir);






 SetCurrentDirectory(exedir);

    // shift argv and force parameters

    int num_forced_parameters = 4;

    argc += num_forced_parameters;

Changes to filemorph.pl.

9
10
11
12
13
14
15

16
17
18
19
20
21
22
23
24
25




26
27
28
29
30
31
32
use FindBin qw($Bin);
use Config;
use File::Spec::Functions;
use File::Copy::Recursive qw(dircopy );
use Env qw(HOME);
use File::Path qw(remove_tree);
use File::Copy::Recursive qw (rmove);


print "FileMorph is starting up...\n";

BEGIN {

    if ($Config{osname} eq "darwin") {
        my $frameworkpath = "$Bin/Contents/Frameworks/Tcl.framework/Tcl";
        $ENV{'PERL_TCL_DL_PATH'} = $frameworkpath;
    }
    if ($Config{osname} eq "MSWin32") {




        my $frameworkpath = "$Bin/Tcl/bin/tcl86.dll";
        $ENV{'PERL_TCL_DL_PATH'} = $frameworkpath;

    }

}








>










>
>
>
>







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
use FindBin qw($Bin);
use Config;
use File::Spec::Functions;
use File::Copy::Recursive qw(dircopy );
use Env qw(HOME);
use File::Path qw(remove_tree);
use File::Copy::Recursive qw (rmove);
our $DOS;

print "FileMorph is starting up...\n";

BEGIN {

    if ($Config{osname} eq "darwin") {
        my $frameworkpath = "$Bin/Contents/Frameworks/Tcl.framework/Tcl";
        $ENV{'PERL_TCL_DL_PATH'} = $frameworkpath;
    }
    if ($Config{osname} eq "MSWin32") {
        require Win32::GUI;
        Win32::GUI->import();
        $DOS = Win32::GUI::GetPerlWindow();
        Win32::GUI::Hide($DOS);
        my $frameworkpath = "$Bin/Tcl/bin/tcl86.dll";
        $ENV{'PERL_TCL_DL_PATH'} = $frameworkpath;

    }

}

529
530
531
532
533
534
535



536
537
538
539
540
541
542

Tkx::MainLoop();
exit;

###----subroutines

sub shutdown {



    &Tkx::exit;
}

sub makeImage {

    my $data = "iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xh
BQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAA







>
>
>







534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550

Tkx::MainLoop();
exit;

###----subroutines

sub shutdown {
    if (IS_WINDOWS) {
        Win32::GUI::Show($DOS);
    }
    &Tkx::exit;
}

sub makeImage {

    my $data = "iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xh
BQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAA
1237
1238
1239
1240
1241
1242
1243
1244

1245
1246
1247
1248
1249
1250
1251

    if ($appversion < $versionnumber) {
        if ($IS_AQUA) {
            &Tkx::softwareupdate__updatePitchPerl($appname,
                $versionnumber, $appversion, $changelog);
        }
        if ($IS_WINDOWS) {
            &Tkx::softwareupdate_winPitch($appname, $versionnumber,$appversion);

        }

    }
    else {
        &Tkx::softwareupdate__upToDate();
    }
}







|
>







1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260

    if ($appversion < $versionnumber) {
        if ($IS_AQUA) {
            &Tkx::softwareupdate__updatePitchPerl($appname,
                $versionnumber, $appversion, $changelog);
        }
        if ($IS_WINDOWS) {
            &Tkx::softwareupdate__winPitch($appname, $versionnumber,
                $appversion);
        }

    }
    else {
        &Tkx::softwareupdate__upToDate();
    }
}

Changes to scriptlibs/softwareupdate/softwareupdate.tcl.

271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
    wm deiconify .update
    raise .update
    wm transient .update .

}

proc winPitch {name newversion oldversion} {
    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
	       ]

    switch -- $answer {
	yes {

	    xplat::launch http://www.codebykevin.com/$name.html
	}







|







271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
    wm deiconify .update
    raise .update
    wm transient .update .

}

proc winPitch {name newversion oldversion} {
    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
	       ]

    switch -- $answer {
	yes {

	    xplat::launch http://www.codebykevin.com/$name.html
	}