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 Side-by-Side Diffs Ignore Whitespace Patch

Added build.bat.

            1  +SET COPYCMD=/Y
            2  +
            3  +if exist TextSweep.exe (
            4  +del TextSweep.exe
            5  +)
            6  +
            7  +if exist build\ (
            8  +rmdir build\
            9  +)
           10  +mkdir build\
           11  +mkdir build\texts\
           12  +
           13  +call xcopy scriptlibs C:\Tcl\lib\  /s /i /y
           14  +call xcopy winlibs C:\Tcl\lib\  /s /i /y
           15  +call xcopy  C:\Strawberry\c\bin\*.dll build\textsweep\ /s /i /y
           16  +call xcopy  C:\Strawberry\perl\bin\*.dll build\textsweep\ /s /i /y
           17  +call xcopy C:\Tcl\bin\*.dll build\textsweep\ /s /i /y
           18  +call xcopy C:\Tcl\lib build\lib /s /i /y
           19  +call xcopy C:\Tcl\bin build\bin /s /i /y
           20  +
           21  +
           22  +call windres icons.rc -o coff -o icons.o
           23  +call windres versioninfo.rc -o coff -o versioninfo.o
           24  +call buildexe %pythondir%
           25  +
           26  +call xcopy TextSweep.exe build\textsweep\
           27  +

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  +@echo off
            2  +::configure and install app files
            3  +set install_dir="%appdata%\FileMorph_App\"
            4  +set config_dir="%appdata%\FileMorph\"
            5  +set config
            6  +if not exist %install_dir% (
            7  +mkdir %install_dir%
            8  +)
            9  + 
           10  +if not exist %config_dir% (
           11  +mkdir %config_dir%
           12  +)
           13  +call 7za  x filemorph.zip
           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  +copy /Y uninstall.bat %config_dir%\
           18  +copy /Y filemorph.ico %config_dir%\
           19  +
           20  +::test for key, add to registry
           21  +reg query "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\FileMorph.exe"
           22  +if errorlevel 0 (
           23  +reg delete "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\FileMorph.exe" /f
           24  +)
           25  +reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\FileMorph.exe" /f
           26  +reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\FileMorph.exe"  /ve /d "%appdata%\FileMorph_App\filemorph\FileMorph.exe" /f
           27  + 
           28  +reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f
           29  +reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f /v "DisplayIcon" /t REG_SZ /d "%appdata%\FileMorph\filemorph.ico"
           30  +reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f /v "DisplayName" /t REG_SZ /d "FileMorph"
           31  +reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f /v "InstallLocation" /t REG_SZ /d "%install_dir%"
           32  +
           33  +reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f /v "Publisher" /t REG_SZ /d "WordTech Communications LLC"
           34  +reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f /v "InstallDate" /t REG_SZ /d %DATE%
           35  +reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f /v "Version" /t REG_SZ /d 2.5.0
           36  + 
           37  +reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f /v "UninstallString" /t REG_SZ /d "cmd /c %appdata%\FileMorph\uninstall.bat"
           38  + 
           39  +::add to start menu
           40  +set startdir="%appdata%\Microsoft\Windows\Start Menu\FileMorph\"
           41  +
           42  +if not exist %startdir% (
           43  +mkdir %startdir%
           44  +)
           45  +cd %startdir%
           46  +
           47  +::mklink /H FileMorph.exe "%appdata%\FileMorph_App\filemorph\FileMorph.exe"
           48  +
           49  +echo Set oWS = WScript.CreateObject("WScript.Shell") >%temp%\link.vbs
           50  +echo sLinkFile = "FileMorph.lnk" >>  %temp%\link.vbs
           51  +echo Set oLink = oWS.CreateShortcut(sLinkFile) >>  %temp%\link.vbs
           52  +echo oLink.TargetPath = "%appdata%\FileMorph_App\filemorph\FileMorph.exe" >> %temp%\link.vbs
           53  +echo oLink.Save >>  %temp%\link.vbs
           54  +call  %temp%\link.vbs
           55  +del %temp%\link.vbs
           56  +
           57  +cd C:\Users\%username%\Desktop
           58  +echo Done.

Added makeinstaller.bat.

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

Added uninstall.bat.

            1  +@echo off
            2  + 
            3  +call :confirm
            4  +if "%yesno%"=="6" (
            5  +call :remove
            6  +) else (
            7  +call :cancel
            8  +)
            9  +exit /b
           10  + 
           11  +:confirm
           12  +::returns 6 = Yes, 7 = No.
           13  +set yesno=
           14  +echo wscript.echo MsgBox("Do you want to uninstall FileMorph?", vbYesNo+vbInformation, "Uninstall") > %temp%\confirm.vbs
           15  +for /f "tokens=* delims=" %%a in ('cscript //nologo "%temp%\confirm.vbs"') do set yesno=%%a
           16  +del %temp%\confirm.vbs /f /q
           17  +exit /b
           18  + 
           19  + 
           20  +:remove
           21  +reg delete "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\FileMorph.exe" /f
           22  +reg delete  "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FileMorph" /f
           23  + 
           24  +rmdir "%appdata%\Microsoft\Windows\Start Menu\FileMorph" /s /q 
           25  +echo MsgBox "Uninstallation of FileMorph is complete.", vbOKOnly+vbInformation, "Uninstall"> %temp%\remove.vbs
           26  +call %temp%\remove.vbs
           27  +del %temp%\remove.vbs /f /q
           28  +rmdir %appdata%\FileMorph_App /s /q
           29  +start /b "" cmd /c rmdir "%appdata%\FileMorph\" /s /q && exit
           30  + 
           31  + 
           32  +:cancel
           33  +echo MsgBox "Uninstallation of FileMorph cancelled.",vbOKOnly+vbInformation, "Uninstall FileMorph"  > %temp%\cancel.vbs
           34  +call %temp%\cancel.vbs
           35  +del %temp%\cancel.vbs /f /q
           36  +exit /b