Stringscan

Check-in [94163cac4b]
Login

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

Overview
Comment:Significant updates for Windows deployment
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:94163cac4b997116e6b2e40d82b9d2190ce6a8d5bc8218a2d9fe39a3a9574fc7
User & Date: kevin 2020-05-19 15:27:55
Context
2020-05-19
19:31
Tweaks for Mac build check-in: ef03b64190 user: kevin tags: trunk
15:27
Significant updates for Windows deployment check-in: 94163cac4b user: kevin tags: trunk
2020-05-14
13:03
Further refinements check-in: c62a21fa99 user: kevin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to buildexe.bat.

1
2

 ocra stringscan.rb lib/**/* --no-autoload --gem-full=tk --debug-extract  --dll tcl86.dll --dll tk86.dll --no-enc --add-all-core 

|
1
2

 ocra stringscan.rb lib/**/* --no-autoload --gem-full=tk --dll tcl86.dll --dll tk86.dll --no-enc --add-all-core  --debug-extract --windows

Changes to install.bat.

8
9
10
11
12
13
14

15
16
17
18
19
20
21
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
)
 
if not exist %config_dir% (
mkdir %config_dir%
)
copy /Y stringscan.zip %install_dir%\
call 7za x %install_dir%\stringscan.zip -o%install_dir%

copy /Y uninstall.bat %config_dir%\
copy /Y stringscan.ico %config_dir%\
copy /Y pathed.exe %config_dir%\

::test for key, add to registry
reg query "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Stringscan.lnk"
if errorlevel 0 (
................................................................................
set startdir="%appdata%\Microsoft\Windows\Start Menu\Stringscan\"

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

::mklink /H Stringscan.lnk "%appdata%\Stringscan_App\stringscan\Stringscan.lnk"

echo Set oWS = WScript.CreateObject("WScript.Shell") >%temp%\link.vbs
echo sLinkFile = "Stringscan.lnk" >>  %temp%\link.vbs
echo Set oLink = oWS.CreateShortcut(sLinkFile) >>  %temp%\link.vbs
echo oLink.TargetPath = "%appdata%\Stringscan_App\Stringscan.lnk" >> %temp%\link.vbs
echo oLink.Arguments = "stringscan.rb" >> %temp%\link.vbs
echo oLink.IconLocation = "%appdata%\Stringscan\stringscan.ico" >> %temp%\link.vbs
echo oLink.WorkingDirectory = "%appdata%\Stringscan_App\"  >> %temp%\link.vbs
echo oLink.Save >>  %temp%\link.vbs
call  %temp%\link.vbs
copy /Y "Stringscan.lnk"  "%appdata%\Stringscan_App\"
del %temp%\link.vbs

call %config_dir%\pathed.exe -a "%appdata%\Stringscan_App\\"

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







>







 







<




|
<











8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
..
40
41
42
43
44
45
46

47
48
49
50
51

52
53
54
55
56
57
58
59
60
61
62
)
 
if not exist %config_dir% (
mkdir %config_dir%
)
copy /Y stringscan.zip %install_dir%\
call 7za x %install_dir%\stringscan.zip -o%install_dir%
del %install_dir%\stringscan.zip /f /q
copy /Y uninstall.bat %config_dir%\
copy /Y stringscan.ico %config_dir%\
copy /Y pathed.exe %config_dir%\

::test for key, add to registry
reg query "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Stringscan.lnk"
if errorlevel 0 (
................................................................................
set startdir="%appdata%\Microsoft\Windows\Start Menu\Stringscan\"

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



echo Set oWS = WScript.CreateObject("WScript.Shell") >%temp%\link.vbs
echo sLinkFile = "Stringscan.lnk" >>  %temp%\link.vbs
echo Set oLink = oWS.CreateShortcut(sLinkFile) >>  %temp%\link.vbs
echo oLink.TargetPath = "%appdata%\Stringscan_App\stringscan.exe" >> %temp%\link.vbs

echo oLink.IconLocation = "%appdata%\Stringscan\stringscan.ico" >> %temp%\link.vbs
echo oLink.WorkingDirectory = "%appdata%\Stringscan_App\"  >> %temp%\link.vbs
echo oLink.Save >>  %temp%\link.vbs
call  %temp%\link.vbs
copy /Y "Stringscan.lnk"  "%appdata%\Stringscan_App\"
del %temp%\link.vbs

call %config_dir%\pathed.exe -a "%appdata%\Stringscan_App\\"

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

Changes to mit.txt.

1
2
3
4
5
6
7
8
9
10
11
The MIT License (MIT)

Copyright (c) 2018 WordTech Communications LLC

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:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

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.




|








1
2
3
4
5
6
7
8
9
10
11
The MIT License (MIT)

Copyright (c) 2020 WordTech Communications LLC

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:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

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 stringscan.rb.

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
# coding: utf-8
#Stringscan: grep-like tool, written in Ruby-Tk. (c) 2019 Kevin Walzer/WordTech Communications LLC. License: MIT license.
#encoding: UTF-8

require 'rbconfig'
host_os = RbConfig::CONFIG['host_os']
case host_os
when /mswin|windows/i
  if ENV["OCRA_EXECUTABLE"] != ""
    begin
    FileUtils.cp_r(File.dirname(__FILE__) + '/lib/tcl8.6/.', File.dirname(File.dirname(File.dirname(__FILE__))) + '/lib/tcl8.6', remove_destination: true)
    FileUtils.cp_r(File.dirname(__FILE__) + '/lib/tcl8/.', File.dirname(File.dirname(File.dirname(__FILE__))) + '/lib/tcl8', remove_destination: true)
    FileUtils.cp_r(File.dirname(__FILE__) + '/lib/tk8.6/.', File.dirname(File.dirname(File.dirname(__FILE__))) + '/lib/tk8.6', remove_destination: true)
rescue
    raise
    end
  end
end
require 'tk'
#find additional Tcl libraries
Tk::AUTO_PATH.list <<= File.dirname(__FILE__)
require_relative 'tkballoonhelp'  
require 'tkextlib/tile'
require 'find'
require 'tkextlib/tkDND'
require 'fileutils'
require 'tempfile'

$platform = Tk.windowingsystem

if $platform == 'aqua'
  require 'tk/tk_mac'
  TkPackage.require('darkaqua')




|
<
<
<
<
<
<
<
<
<
<
<
<
<







<







1
2
3
4
5













6
7
8
9
10
11
12

13
14
15
16
17
18
19
# coding: utf-8
#Stringscan: grep-like tool, written in Ruby-Tk. (c) 2019 Kevin Walzer/WordTech Communications LLC. License: MIT license.
#encoding: UTF-8

require 'fileutils'













require 'tk'
#find additional Tcl libraries
Tk::AUTO_PATH.list <<= File.dirname(__FILE__)
require_relative 'tkballoonhelp'  
require 'tkextlib/tile'
require 'find'
require 'tkextlib/tkDND'

require 'tempfile'

$platform = Tk.windowingsystem

if $platform == 'aqua'
  require 'tk/tk_mac'
  TkPackage.require('darkaqua')