1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 03:35:38 +03:00
aports/testing/tke/install-script.patch

84 lines
2.8 KiB
Diff

--- a/install.tcl
+++ b/install.tcl
@@ -57,7 +57,6 @@
if {[catch "package require Tk" rc]} {
puts "Not Found! ($rc)"
puts "Install tk8.6 package"
- exit 1
} else {
puts "Found"
}
@@ -90,7 +89,6 @@
if {[catch "package require tooltip" rc]} {
puts "Not Found! ($rc)"
puts "Install tklib package"
- exit 1
} else {
puts "Found"
}
@@ -225,6 +223,7 @@
}
# Create the file
+ set lib_dir /usr/lib/tke
puts -nonewline "Creating [file join $bin_dir tke]... "
flush stdout
if {![catch "open [file join $bin_dir tke] w" rc]} {
@@ -248,7 +247,8 @@
}
# If we are running on a system with a /usr/share/applications directory, create a tke.desktop file there
-if {[file exists [set app_dir [file join / usr share applications]]]} {
+ set app_dir [file join $install_dir share applications]
+ file mkdir $app_dir
set app_file [file join $app_dir tke.desktop]
puts -nonewline "Creating $app_file... "
flush stdout
@@ -267,12 +267,14 @@
} else {
puts "not done."
}
-}
# Create the MIME file so that the TKE theme and plugin bundle file extensions will be opened by TKE
-if {[file exists [set mime_dir [file join / usr share mime packages]]]} {
+ set lib_dir [file join $install_dir lib tke]
+ set mime_dir [file join $install_dir share mime packages]
+ file mkdir $mime_dir
set mime_file [file join $mime_dir tke.xml]
- set mime_icon_dir [file join / usr share icons hicolor scalable mimetypes]
+ set mime_icon_dir [file join $install_dir share icons hicolor scalable mimetypes]
+ file mkdir $mime_icon_dir
puts -nonewline "Creating mime file $mime_file... "
flush stdout
if {![catch "open $mime_file w" rc]} {
@@ -295,19 +297,13 @@
flush stdout
catch { file copy -force [file join $lib_dir lib images tke_theme.svg] [file join $mime_icon_dir application-x-tkethemz.svg] }
catch { file copy -force [file join $lib_dir lib images tke_plugin.svg] [file join $mime_icon_dir application-x-tkeplugz.svg] }
- if {![catch { exec -ignorestderr update-mime-database [file join / usr share mime] }]} {
- puts "done."
- } else {
- puts "not done."
- catch { file delete -force $mime_file }
- }
} else {
puts "not done."
}
-}
# If we are running on a system that can use appdata, add the file there
-if {[file exists [set appdata_dir [file join / usr share appdata]]]} {
+ set appdata_dir [file join $install_dir share metainfo]
+ file mkdir $appdata_dir
puts -nonewline "Copying tke.appdata.xml to [file join $appdata_dir tke.appdata.xml]... "
flush stdout
if {[catch "file copy [file join data tke.appdata.xml] $appdata_dir"]} {
@@ -315,7 +311,6 @@
} else {
puts "done."
}
-}
# Check to see if the bin directory is in the user's path
if {[lsearch [split $env(PATH) :] $bin_dir] == -1} {