filemorph

Check-in [504caaebae]
Login

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

Overview
Comment:Finally got start menu icon right for Windows
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 504caaebae8a04418c6cb03adaad21cc94420b92
User & Date: kevin 2015-10-11 05:03:55
Context
2015-10-11
05:21
Remove Win32 calls, causing issues on Mac check-in: 1a14573e7d user: kevin tags: trunk
05:03
Finally got start menu icon right for Windows check-in: 504caaebae user: kevin tags: trunk
2015-10-10
01:59
More changes check-in: 18dab05cc9 user: kevin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to build.bat.

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

call xcopy winlibs C:\Tcl\lib\ /s /i /y

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 

call "C:\Program Files (x86)\Resource Hacker\ResourceHacker.exe" -delete FileMorph.exe , FileMorph.exe , versioninfo , ,,

call "C:\Program Files (x86)\Resource Hacker\ResourceHacker.exe" -delete FileMorph.exe , FileMorph.exe , icongroup, ,,

call windres -i icons.rc  -o icons.res -O res

call windres -i versioninfo.rc -o  versioninfo.res -O res

call "C:\Program Files (x86)\Resource Hacker\ResourceHacker.exe" -add FileMorph.exe , FileMorph.exe , icons.res , ,,

call "C:\Program Files (x86)\Resource Hacker\ResourceHacker.exe" -add FileMorph.exe , FileMorph.exe , versioninfo.res , ,,

call ie4uinit.exe -ClearIconCache







<
<
<
<


<
<



12
13
14
15
16
17
18




19
20


21
22
23

call xcopy winlibs C:\Tcl\lib\ /s /i /y

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 

call "C:\Program Files (x86)\Resource Hacker\ResourceHacker.exe" -delete FileMorph.exe , FileMorph.exe , versioninfo , ,,





call windres -i versioninfo.rc -o  versioninfo.res -O res



call "C:\Program Files (x86)\Resource Hacker\ResourceHacker.exe" -add FileMorph.exe , FileMorph.exe , versioninfo.res , ,,

call ie4uinit.exe -ClearIconCache

Changes to filemorph.sed.

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

37
38
39
40
41
42

PostInstallCmd=%PostInstallCmd%
AdminQuietInstCmd=%AdminQuietInstCmd%
UserQuietInstCmd=%UserQuietInstCmd%
SourceFiles=SourceFiles

[Strings]
InstallPrompt=Would you like to install FileMorph and its supporting files?
DisplayLicense=mit.txt
FinishMessage=Thank you for installing FileMorph. To run the program, please select it from the start menu.
TargetName=FileMorph_Setup.exe
FriendlyName=FileMorph_Setup
AppLaunched=cmd /c install.bat
PostInstallCmd=<None>
AdminQuietInstCmd=
UserQuietInstCmd=
FILE2="FileMorph.exe"
FILE0="uninstall.bat"
FILE1="install.bat"

[SourceFiles]
SourceFiles0=C:\Users\kevin\Desktop\filemorph
[SourceFiles0]
%FILE0%=
%FILE1%=
%FILE2%=








|

|





|


>

|




>
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
PostInstallCmd=%PostInstallCmd%
AdminQuietInstCmd=%AdminQuietInstCmd%
UserQuietInstCmd=%UserQuietInstCmd%
SourceFiles=SourceFiles

[Strings]
InstallPrompt=Would you like to install FileMorph and its supporting files?
DisplayLicense=C:\Users\kevin\Desktop\filemorph\mit.txt
FinishMessage=Thank you for installing FileMorph. To run the program, please select it from the start menu.
TargetName=C:\Users\kevin\Desktop\filemorph\FileMorph_Setup.exe
FriendlyName=FileMorph_Setup
AppLaunched=cmd /c install.bat
PostInstallCmd=<None>
AdminQuietInstCmd=
UserQuietInstCmd=
FILE3="filemorph.ico"
FILE0="uninstall.bat"
FILE1="install.bat"
FILE2="FileMorph.exe"
[SourceFiles]
SourceFiles0=C:\Users\kevin\Desktop\filemorph\
[SourceFiles0]
%FILE0%=
%FILE1%=
%FILE2%=
%FILE3%=

Changes to install.bat.

8
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
38
)
 
if not exist %config_dir% (
mkdir %config_dir%
)
copy /Y FileMorph.exe %install_dir%\
copy /Y uninstall.bat %config_dir%\


::test for key, add to registry
reg query "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\FileMorph.exe"
if errorlevel 0 (
reg delete "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\FileMorph.exe" /f
)
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\FileMorph.exe" /f
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\FileMorph.exe"  /ve /d "%appdata%\FileMorph_App\FileMorph.exe" /f
 
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f /v "DisplayIcon" /t REG_SZ /d "%appdata%\FileMorph_App\FileMorph.exe,0"
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f /v "DisplayName" /t REG_SZ /d "FileMorph"
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f /v "InstallLocation" /t REG_SZ /d "%install_dir%"

reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f /v "Publisher" /t REG_SZ /d "WordTech Communications LLC"
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f /v "InstallDate" /t REG_SZ /d %DATE%
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f /v "Version" /t REG_SZ /d 1.0
 
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f /v "UninstallString" /t REG_SZ /d "cmd /c %appdata%\FileMorph\uninstall.bat"
 
::add to start menu
cd "%appData%\Microsoft\Windows\Start Menu"









rmdir /q "FileMorph"
mklink /j "FileMorph" "%install_dir%"

cd C:\Users\%username%\Desktop
echo Done.







>
>









|


>


|




|
>
>
>
>
>
>
>
>
>
|
|
>


8
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
)
 
if not exist %config_dir% (
mkdir %config_dir%
)
copy /Y FileMorph.exe %install_dir%\
copy /Y uninstall.bat %config_dir%\
copy /Y filemorph.ico %config_dir%\

::test for key, add to registry
reg query "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\FileMorph.exe"
if errorlevel 0 (
reg delete "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\FileMorph.exe" /f
)
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\FileMorph.exe" /f
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\FileMorph.exe"  /ve /d "%appdata%\FileMorph_App\FileMorph.exe" /f
 
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f /v "DisplayIcon" /t REG_SZ /d "%appdata%\FileMorph\filemorph.ico"
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f /v "DisplayName" /t REG_SZ /d "FileMorph"
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f /v "InstallLocation" /t REG_SZ /d "%install_dir%"

reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f /v "Publisher" /t REG_SZ /d "WordTech Communications LLC"
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f /v "InstallDate" /t REG_SZ /d %DATE%
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f /v "Version" /t REG_SZ /d 2.4.0
 
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f /v "UninstallString" /t REG_SZ /d "cmd /c %appdata%\FileMorph\uninstall.bat"
 
::add to start menu
set startdir="%appdata%\Microsoft\Windows\Start Menu\FileMorph\"

if not exist %startdir% (
mkdir %startdir%
)
cd %startdir%

echo [InternetShortcut] >> FileMorph.url
echo URL="%appdata%\FileMorph_App\FileMorph.exe" >> FileMorph.url
echo IconFile="%appdata%\FileMorph\filemorph.ico" >> FileMorph.url
echo IconIndex=0 >> FileMorph.url


cd C:\Users\%username%\Desktop
echo Done.

Changes to uninstall.bat.

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
exit /b
 
 
:remove
reg delete "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\FileMorph.exe" /f
reg delete  "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f
 
rmdir /q "%appdata%\Microsoft\Windows\Start Menu\FileMorph"
echo MsgBox "Uninstallation of FileMorph is complete.", vbOKOnly+vbInformation, "Uninstall"> %temp%\remove.vbs
call %temp%\remove.vbs
del %temp%\remove.vbs /f /q
rmdir %appdata%\FileMorph_App /s /q
start /b "" cmd /c rmdir "%appdata%\FileMorph\" /s /q && exit
 
 
:cancel
echo MsgBox "Uninstallation of FileMorph cancelled.",vbOKOnly+vbInformation, "Uninstall FileMorph"  > %temp%\cancel.vbs
call %temp%\cancel.vbs
del %temp%\cancel.vbs /f /q
exit /b







|












17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
exit /b
 
 
:remove
reg delete "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\FileMorph.exe" /f
reg delete  "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f
 
rmdir "%appdata%\Microsoft\Windows\Start Menu\FileMorph" /s /q 
echo MsgBox "Uninstallation of FileMorph is complete.", vbOKOnly+vbInformation, "Uninstall"> %temp%\remove.vbs
call %temp%\remove.vbs
del %temp%\remove.vbs /f /q
rmdir %appdata%\FileMorph_App /s /q
start /b "" cmd /c rmdir "%appdata%\FileMorph\" /s /q && exit
 
 
:cancel
echo MsgBox "Uninstallation of FileMorph cancelled.",vbOKOnly+vbInformation, "Uninstall FileMorph"  > %temp%\cancel.vbs
call %temp%\cancel.vbs
del %temp%\cancel.vbs /f /q
exit /b