filemorph

Check-in [720cd34e52]
Login

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

Overview
Comment:Further refinements to Windows build
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:720cd34e523a0870c84b18315a458af95b2ea6f0
User & Date: kevin 2015-11-12 05:56:11
Context
2015-11-12
11:47
Add filemorph.c check-in: 8b85ff041b user: kevin tags: trunk
05:56
Further refinements to Windows build check-in: 720cd34e52 user: kevin tags: trunk
2015-11-11
11:56
Update overhaul to Windows build and deployment check-in: 30849adf00 user: kevin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to build.bat.

     6      6   
     7      7   if exist build\ (
     8      8   rmdir build\
     9      9   )
    10     10   mkdir build\
    11     11   mkdir build\filemorph\
    12     12   
           13  +call xcopy scriptlibs C:\Tcl\lib\  /s /i /y
           14  +call xcopy winlibs C:\Tcl\lib\  /s /i /y
    13     15   call xcopy  C:\Strawberry\c\bin\*.dll build\filemorph\ /s /i /y
    14     16   call xcopy  C:\Strawberry\perl\bin\*.dll build\filemorph\ /s /i /y
    15     17   call xcopy C:\Tcl\bin\*.dll build\filemorph\ /s /i /y
    16     18   call xcopy  C:\Strawberry\perl\lib build\filemorph\lib /s /i /y
    17     19   call xcopy  C:\Strawberry\perl\site build\filemorph\site /s /i /y
    18     20   call xcopy  C:\Strawberry\perl\vendor build\filemorph\vendor /s /i /y
    19     21   call xcopy C:\Tcl\lib build\lib /s /i /y
................................................................................
    25     27   call xcopy  filemorph.pl build\filemorph\filemorph.pl /y
    26     28   
    27     29   call windres icons.rc -o coff -o icons.o
    28     30   call windres versioninfo.rc -o coff -o versioninfo.o
    29     31   call perl build.pl
    30     32   
    31     33   call xcopy FileMorph.exe build\filemorph\
    32         -
    33         -::call xcopy scriptlibs C:\Tcl\lib\ /s /i /y
    34         -
    35         -::call xcopy winlibs C:\Tcl\lib\ /s /i /y
    36         -
    37         -::call pp  -C -M Encode::Byte -l zlib1.dll -l tcl86.dll -l tk86.dll  -a "C:/Tcl;script/Tcl" filemorph.pl -o FileMorph.exe 
    38         -
    39         -::call "C:\Program Files (x86)\Resource Hacker\ResourceHacker.exe" -modify  "FileMorph.exe", "FileMorph.exe", "filemorph-exe-par.ico", ICONGROUP, WINEXE, 0
    40         -
    41         -::call ie4uinit.exe -ClearIconCache
    42         -
    43     34   

Deleted filemorph-exe-par.ico.

cannot compute difference between binary files

Changes to filemorph.pl.

     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;
    17     16   
    18     17   print "FileMorph is starting up...\n";
    19     18   
    20     19   BEGIN {
    21     20   
    22     21       if ($Config{osname} eq "darwin") {
    23     22           my $frameworkpath = "$Bin/Contents/Frameworks/Tcl.framework/Tcl";
................................................................................
  1169   1168       &Tkx::machelp__userhelp;
  1170   1169   }
  1171   1170   
  1172   1171   #initialize the app
  1173   1172   sub startUp {
  1174   1173   
  1175   1174       $appname    = 'FileMorph';
  1176         -    $appversion = '2.5';
         1175  +    $appversion = '2.6';
  1177   1176       &Tkx::machelp__setAppName($appname, $appversion);
  1178   1177       &Tkx::softwareupdate__setAppName($appname);
  1179   1178       &Tkx::softwareupdate__setVersion($appname, $appversion);
  1180   1179   
  1181   1180       #check for app support directory
  1182   1181       our $prefdir = Tkx::xplat__appconfig("FileMorph");
  1183   1182       mkdir $prefdir unless (-d $prefdir);
................................................................................
  1233   1232                   -detail =>
  1234   1233   "FileMorph is not supported on Mac OS X $hostOS. The minimum supported OS version is $minOS.",
  1235   1234               );
  1236   1235           }
  1237   1236       }
  1238   1237   
  1239   1238       if ($appversion < $versionnumber) {
  1240         -        &Tkx::softwareupdate__updatePitchPerl($appname,
  1241         -            $versionnumber, $appversion, $changelog);
         1239  +        if ($IS_AQUA) {
         1240  +            &Tkx::softwareupdate__updatePitchPerl($appname,
         1241  +                $versionnumber, $appversion, $changelog);
         1242  +        }
         1243  +        if ($IS_WINDOWS) {
         1244  +            &Tkx::softwareupdate_winPitch($appname, $versionnumber,$appversion);
         1245  +        }
         1246  +
  1242   1247       }
  1243   1248       else {
  1244   1249           &Tkx::softwareupdate__upToDate();
  1245   1250       }
  1246   1251   }
  1247   1252   
  1248   1253   #-----AppleScript handlers------$

Changes to install.bat.

     7      7   mkdir %install_dir%
     8      8   )
     9      9    
    10     10   if not exist %config_dir% (
    11     11   mkdir %config_dir%
    12     12   )
    13     13   call 7za  x filemorph.zip
    14         -call xcopy bin %installdir%\bin /s /i /y
    15         -call xcopy lib %installdir%\lib /s /i /y
    16         -call xcopy filemorph %installdir%\filemorph /s /i /y
           14  +xcopy bin %install_dir%\bin /s /i /y
           15  +xcopy lib %install_dir%\lib /s /i /y
           16  +xcopy filemorph %install_dir%\filemorph /s /i /y
    17     17   copy /Y uninstall.bat %config_dir%\
    18     18   copy /Y filemorph.ico %config_dir%\
    19     19   
    20     20   ::test for key, add to registry
    21     21   reg query "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\FileMorph.exe"
    22     22   if errorlevel 0 (
    23     23   reg delete "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\FileMorph.exe" /f

Changes to makeinstaller.bat.

            1  +call 7za a filemorph.zip .\build\*
            2  +
     1      3   iexpress /n filemorph.sed
     2      4   
     3         -call 7za a filemorph.zip .\build\*
     4         -
     5         -set VERSION="2.5.0.0 (%date%)"
            5  +set VERSION="2.6.0.0 (%date%)"
     6      6   set FILEDESCR=/s desc "Installer for FileMorph"
     7      7   set COMPINFO=/s company "WordTech Communications LLC" /s (c) "(c) 2015"
     8         -set PRODINFO=/s product "FileMorph" /pv "2.5.0.0"
            8  +set PRODINFO=/s product "FileMorph" /pv "2.6.0.0"
     9      9   
    10     10   "C:\Users\kevin\Desktop\verpatch.exe" /va FileMorph_Setup.exe %VERSION% %FILEDESCR% %COMPINFO% %PRODINFO% 

Changes to scriptlibs/machelp/help.txt.

   126    126    * The "windowlist" package. Website and license: [http://fossil.codebykevin.com].
   127    127    * App icon from the Gnome project. Website: [http://www.gnome.org]. License: [http://creativecommons.org/licenses/by-sa/3.0/].
   128    128    * Icon fonts from Iconic project. Website and license: [https://github.com/somerandomdude/Iconic].
   129    129    * Help viewer by Keith Vetter: [http://wiki.tcl.tk/19649].
   130    130    * TkDND for drag and drop. Website and license: [http://sourceforge.net/projects/tkdnd/].
   131    131    * aem package for AppleScript support. Website and license: [http://fossil.codebykevin.com]/
   132    132    * Twapi packages for Windows integration. Website and license: [http://twapi.sourceforge.net]
   133         - * Perl Packager for Windows deployment. Website and license: [http://search.cpan.org/~autrijus/PAR-0.85_01/script/pp]
   134         - * Resource Hacker for final modification of Windows executable. [http://angusj.com/resourcehacker/]
   135    133    
   136    134   
   137    135   -------------------
   138    136   title: FileMorph Version History
   139    137   alias: History
   140    138   
          139  +'''2.6 (October 15, 2015):'''
          140  + * Changes in Windows installer. 
          141  + * Fix bug in event processing and image rendering on OS X.
          142  +
   141    143   '''2.5 (October 30, 2015):'''
   142    144    * Improvements in Windows installer. 
   143    145    * Fix bug in image display on OS X.
   144    146   
   145    147   '''2.4 (October 10, 2015):'''
   146    148    * Initial release for Windows.
   147    149    * Improvement in modification of file dates.
................................................................................
   173    175   
   174    176   -------------------
   175    177   title: License
   176    178   alias: License
   177    179    
   178    180   '''The MIT License (MIT)'''
   179    181   
   180         -FileMoroph source code: [http://fossil.codebykevin.com/fossil.cgi/filemorph/]
          182  +FileMorph source code: [http://fossil.codebykevin.com/fossil.cgi/filemorph/]
   181    183   
   182    184   Copyright (c) 2015 WordTech Communications LLC
   183    185   
   184    186   Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
   185    187   
   186    188   The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
   187    189   
   188    190   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Changes to scriptlibs/softwareupdate/softwareupdate.tcl.

   270    270       wm resizable .update 0 0
   271    271       wm deiconify .update
   272    272       raise .update
   273    273       wm transient .update .
   274    274   
   275    275   }
   276    276   
          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
          279  +	       ]
   277    280   
          281  +    switch -- $answer {
          282  +	yes {
          283  +
          284  +	    xplat::launch http://www.codebykevin.com/$name.html
          285  +	}
          286  +	no {
          287  +	    return
          288  +	}
          289  +    }
          290  +}
   278    291   #"busy" dialog
   279    292   proc checkingForUpdates {} {
   280    293   
   281    294       variable appname
   282    295       variable icon
   283    296   
   284    297       catch {destroy .updateprogress}
................................................................................
   447    460   		exec $currentinstall/Contents/MacOS/$appname &
   448    461   
   449    462   		exit
   450    463   	    }
   451    464   	}
   452    465   	
   453    466   	"win32" {
   454         -	  
   455         -	  softwareupdate::writeBatch $appname
   456         -	  eval exec [auto_execok start]  /b "" cmd /c [file join $tmpdir deleteapp.bat] &
          467  +	    
          468  +	    softwareupdate::writeBatch $appname
          469  +	    eval exec [auto_execok start]  /b "" cmd /c [file join $tmpdir deleteapp.bat] &
   457    470   	}
   458    471   	
   459    472   	"x11" {
   460    473   	    tk_messageBox -icon info -parent . -message "Please ask the maintainer of $appname on your platform to prepare a release of the latest version."
   461    474   	    return
   462    475   	}
   463    476       }
................................................................................
   467    480       
   468    481   
   469    482   }
   470    483   
   471    484   
   472    485   proc writeBatch {appname} {
   473    486   
   474         -variable tmpdir
   475         -variable currentinstall
          487  +    variable tmpdir
          488  +    variable currentinstall
   476    489   
   477         -set script {
   478         -cd  $currentinstall 
   479         -taskkill /IM $appname.exe /F
   480         -rename $appname.exe ${appname}-tmp.exe 
   481         -cd $tmpdir
   482         -copy [file nativename [file join $tmpdir $appname.exe]] [file nativename [file join $currentinstall $appname.exe]]
   483         -cd $currentinstall
   484         -start $appname.exe
   485         -del ${appname}-tmp.exe
   486         -cd $tmpdir
   487         -::del deleteapp.bat
   488         -}
          490  +    set script {
          491  +	cd  $currentinstall 
          492  +	taskkill /IM $appname.exe /F
          493  +	rename $appname.exe ${appname}-tmp.exe 
          494  +	cd $tmpdir
          495  +	copy [file nativename [file join $tmpdir $appname.exe]] [file nativename [file join $currentinstall $appname.exe]]
          496  +	cd $currentinstall
          497  +	start $appname.exe
          498  +	del ${appname}-tmp.exe
          499  +	cd $tmpdir
          500  +	::del deleteapp.bat
          501  +    }
   489    502   
   490         -set batchscript [subst $script]
   491         -set delscript [open [file join $tmpdir deleteapp.bat] w]
   492         -puts $delscript $batchscript
   493         -close $delscript
          503  +    set batchscript [subst $script]
          504  +    set delscript [open [file join $tmpdir deleteapp.bat] w]
          505  +    puts $delscript $batchscript
          506  +    close $delscript
   494    507   
   495    508   
   496    509   }
   497    510   
   498    511   namespace export *
   499    512   
   500    513   }