mirror of
https://github.com/cc65/cc65.git
synced 2024-12-28 06:30:16 +00:00
Fixed a few problems
git-svn-id: svn://svn.cc65.org/cc65/trunk@3441 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
16e88a489b
commit
86f1359c1c
@ -140,6 +140,9 @@ function GetMsg (Key)
|
|||||||
Msg = Msg & " the installation."
|
Msg = Msg & " the installation."
|
||||||
case "MSG_ANNOUNCEMENT"
|
case "MSG_ANNOUNCEMENT"
|
||||||
Msg = "cc65 Announcement"
|
Msg = "cc65 Announcement"
|
||||||
|
case "MSG_INCOMPLETE"
|
||||||
|
Msg = "The package seems to be incomplete and cannot be"
|
||||||
|
Msg = Msg & " installed."
|
||||||
case else
|
case else
|
||||||
Msg = Key
|
Msg = Key
|
||||||
end select
|
end select
|
||||||
@ -660,6 +663,23 @@ end function
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'******************************************************************************
|
||||||
|
' Check that there's something to install
|
||||||
|
'******************************************************************************
|
||||||
|
sub CheckFilesToInstall ()
|
||||||
|
|
||||||
|
' If the uninstaller is unavailable for some reason or the other, we
|
||||||
|
' have a problem, because the installer will create an uninstaller entry
|
||||||
|
' in the registry, but it will not work, which means that the package
|
||||||
|
' cannot be deinstalled or overwritten. So we have to check that at least
|
||||||
|
' the uninstaller is available in the same directory as the installer.
|
||||||
|
if not FileExists (Uninstaller) then
|
||||||
|
Abort (GetMsg ("MSG_INCOMPLETE"))
|
||||||
|
end if
|
||||||
|
end sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'******************************************************************************
|
'******************************************************************************
|
||||||
' Check that were running this script as admin
|
' Check that were running this script as admin
|
||||||
'******************************************************************************
|
'******************************************************************************
|
||||||
@ -975,7 +995,7 @@ end sub
|
|||||||
' Function that creates the menu entries
|
' Function that creates the menu entries
|
||||||
'******************************************************************************
|
'******************************************************************************
|
||||||
sub CreateMenuEntries ()
|
sub CreateMenuEntries ()
|
||||||
dim Folder, Result, Name, Desc, Exe, Args(2)
|
dim Folder, Result, Name, Desc, Target, Args(2)
|
||||||
|
|
||||||
' Create the start menu folder.
|
' Create the start menu folder.
|
||||||
Folder = BuildPath (Programs, AppName)
|
Folder = BuildPath (Programs, AppName)
|
||||||
@ -994,17 +1014,21 @@ sub CreateMenuEntries ()
|
|||||||
call CreateShortcut (Name, Uninstaller, UninstallerCmdLine, Desc)
|
call CreateShortcut (Name, Uninstaller, UninstallerCmdLine, Desc)
|
||||||
|
|
||||||
' Create a documentation shortcut in the menu folder
|
' Create a documentation shortcut in the menu folder
|
||||||
Args(1) = AppName
|
Target = BuildPath (InstallTarget, DocIndexFile)
|
||||||
Desc = FmtMsg ("MSG_DOCENTRY", Args)
|
if FileExists (Target) then
|
||||||
Name = BuildPath (Folder, Desc & ".url")
|
Args(1) = AppName
|
||||||
Exe = "file://" & BuildPath (InstallTarget, DocIndexFile)
|
Desc = FmtMsg ("MSG_DOCENTRY", Args)
|
||||||
call CreateUrl (Name, Exe, Desc)
|
Name = BuildPath (Folder, Desc & ".url")
|
||||||
|
call CreateUrl (Name, "file://" & Target, Desc)
|
||||||
|
end if
|
||||||
|
|
||||||
' Create the shortcut to the announcement in the menu folder
|
' Create the shortcut to the announcement in the menu folder
|
||||||
Desc = GetMsg ("MSG_ANNOUNCEMENT")
|
Target = BuildPath (InstallTarget, AnnouncementFile)
|
||||||
Name = BuildPath (Folder, Desc & ".url")
|
if FileExists (Target) then
|
||||||
Exe = "file://" & BuildPath (InstallTarget, AnnouncementFile)
|
Desc = GetMsg ("MSG_ANNOUNCEMENT")
|
||||||
call CreateUrl (Name, Exe, Desc)
|
Name = BuildPath (Folder, Desc & ".url")
|
||||||
|
call CreateUrl (Name, "file://" & Target, Desc)
|
||||||
|
end if
|
||||||
|
|
||||||
' Update the uninstall control file
|
' Update the uninstall control file
|
||||||
call WriteUninstallCtrlFile ("D " & Folder)
|
call WriteUninstallCtrlFile ("D " & Folder)
|
||||||
@ -1064,9 +1088,9 @@ sub AddEnvironment ()
|
|||||||
if not DirInPath (BinDir) then
|
if not DirInPath (BinDir) then
|
||||||
call AddToSysPath (BinDir)
|
call AddToSysPath (BinDir)
|
||||||
|
|
||||||
' Run the wm_settingchange program to notify other running programs
|
' Run the wm_envchange program to notify other running programs
|
||||||
' of the changed environment. Ignore errors.
|
' of the changed environment. Ignore errors.
|
||||||
call Run (BuildPath (BinDir, "wm_settingchange.exe"), 0)
|
call Run (BuildPath (BinDir, "wm_envchange.exe"), 0)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
end sub
|
end sub
|
||||||
@ -1093,6 +1117,9 @@ sub Main ()
|
|||||||
call ShowPathsAndLocations ()
|
call ShowPathsAndLocations ()
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
' Check that there's something to install
|
||||||
|
call CheckFilesToInstall ()
|
||||||
|
|
||||||
' Check that we're running this script as admin
|
' Check that we're running this script as admin
|
||||||
call CheckAdminRights ()
|
call CheckAdminRights ()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user