TextSweep

Check-in [dd0e6ab7bd]
Login

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

Overview
Comment:Add batch scripts
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: dd0e6ab7bda8645870f6136ab7184a39885bb237
User & Date: kevin 2016-08-20 02:05:17
Context
2016-08-20
02:41
Add icon, update scripts check-in: 7956ecc65a user: kevin tags: trunk
02:05
Add batch scripts check-in: dd0e6ab7bd user: kevin tags: trunk
2016-08-13
02:44
Rev bump to 3.0 check-in: 9f01762a9b user: kevin tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Added build.bat.























































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
SET COPYCMD=/Y

if exist TextSweep.exe (
del TextSweep.exe
)

if exist build\ (
rmdir build\
)
mkdir build\
mkdir build\texts\

call xcopy scriptlibs C:\Tcl\lib\  /s /i /y
call xcopy winlibs C:\Tcl\lib\  /s /i /y
call xcopy  C:\Strawberry\c\bin\*.dll build\textsweep\ /s /i /y
call xcopy  C:\Strawberry\perl\bin\*.dll build\textsweep\ /s /i /y
call xcopy C:\Tcl\bin\*.dll build\textsweep\ /s /i /y
call xcopy C:\Tcl\lib build\lib /s /i /y
call xcopy C:\Tcl\bin build\bin /s /i /y


call windres icons.rc -o coff -o icons.o
call windres versioninfo.rc -o coff -o versioninfo.o
call buildexe %pythondir%

call xcopy TextSweep.exe build\textsweep\

Added buildexe.bat.



>
1
gcc  icons.o versioninfo.o textsweep.c -I %1\include -L%1\libs -L%1\DLLs -lShlwapi -lpython35 -o TextSweep.exe

Added install.bat.





















































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
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
52
53
54
55
56
57
58
@echo off
::configure and install app files
set install_dir="%appdata%\FileMorph_App\"
set config_dir="%appdata%\FileMorph\"
set config
if not exist %install_dir% (
mkdir %install_dir%
)
 
if not exist %config_dir% (
mkdir %config_dir%
)
call 7za  x filemorph.zip
xcopy bin %install_dir%\bin /s /i /y
xcopy lib %install_dir%\lib /s /i /y
xcopy filemorph %install_dir%\filemorph /s /i /y
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\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.5.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%

::mklink /H FileMorph.exe "%appdata%\FileMorph_App\filemorph\FileMorph.exe"

echo Set oWS = WScript.CreateObject("WScript.Shell") >%temp%\link.vbs
echo sLinkFile = "FileMorph.lnk" >>  %temp%\link.vbs
echo Set oLink = oWS.CreateShortcut(sLinkFile) >>  %temp%\link.vbs
echo oLink.TargetPath = "%appdata%\FileMorph_App\filemorph\FileMorph.exe" >> %temp%\link.vbs
echo oLink.Save >>  %temp%\link.vbs
call  %temp%\link.vbs
del %temp%\link.vbs

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

Added makeinstaller.bat.





















>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
call 7za a filemorph.zip .\build\*

iexpress /n filemorph.sed

set VERSION="2.7.0.0 (%date%)"
set FILEDESCR=/s desc "Installer for FileMorph"
set COMPINFO=/s company "WordTech Communications LLC" /s (c) "(c) 2016"
set PRODINFO=/s product "FileMorph" /pv "2.7.0.0"

"C:\Users\kevin\Desktop\verpatch.exe" /va FileMorph_Setup.exe %VERSION% %FILEDESCR% %COMPINFO% %PRODINFO% 

Added uninstall.bat.









































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
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
@echo off
 
call :confirm
if "%yesno%"=="6" (
call :remove
) else (
call :cancel
)
exit /b
 
:confirm
::returns 6 = Yes, 7 = No.
set yesno=
echo wscript.echo MsgBox("Do you want to uninstall FileMorph?", vbYesNo+vbInformation, "Uninstall") > %temp%\confirm.vbs
for /f "tokens=* delims=" %%a in ('cscript //nologo "%temp%\confirm.vbs"') do set yesno=%%a
del %temp%\confirm.vbs /f /q
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