ADDED build.bat Index: build.bat ================================================================== --- build.bat +++ build.bat @@ -0,0 +1,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 Index: buildexe.bat ================================================================== --- buildexe.bat +++ buildexe.bat @@ -0,0 +1,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 Index: install.bat ================================================================== --- install.bat +++ install.bat @@ -0,0 +1,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 Index: makeinstaller.bat ================================================================== --- makeinstaller.bat +++ makeinstaller.bat @@ -0,0 +1,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 Index: uninstall.bat ================================================================== --- uninstall.bat +++ uninstall.bat @@ -0,0 +1,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