home *** CD-ROM | disk | FTP | other *** search
Wrap
on DoItNow global gsPopupType, gsPopupCont, gnMMSprite, gnPopupText InitWaitWindow(gsPopupType, gsPopupCont) StartMrMore(EMPTY, "more wait") DoAnim(gnMMSprite, 9, 1) InstallObject(gsPopupType, gsPopupCont) if the castNum of sprite gnPopupText > 0 then set s to the text of cast the castNum of sprite gnPopupText put "100 %" into line 2 of s set the text of cast the castNum of sprite gnPopupText to s end if DoAnim(gnMMSprite, 9, 1) StopMrMore() ClosePopup() end on DoItLater global gsPopupType, gsPopupCont, gnMMSprite, gnPopupText set sType to gsPopupType if sType = "soun" then set sType to "Desi" end if set s to the text of field ("Install" & sType) if s contains "Keine Daten gewählt" then set s to EMPTY end if if s <> EMPTY then set s to s & RETURN end if set the text of field ("Install" & sType) to s & gsPopupCont end on DeInstallObject sType, sObject, sFileName global goGBTools put sType, sObject, sFileName goGBTools(mDeleteProfileString, sType & "Ins", sObject, "mrmore.ini") set file to FileIO(mnew, "read", sFileName) if not objectp(file) then exit end if file(mDelete) end on InstallObject sType, sName global gsDefPath put sType, sName if sName = EMPTY then exit end if if sType = "font" then InstallFont(sName, sType) else if sType = "game" then InstallGame(sName) else if sType = "util" then InstallUtil(sName) else if sType = "desi" then if CheckDir(sType) then InstallClip(gsDefPath & "gross\back\", the text of cast "desiDir", sName, sType) end if else if sType = "soun" then if CheckDir("desi") then InstallSound(gsDefPath & "sounds\design\", the text of cast "desiDir", sName, sType) end if else if sType = "back" then if CheckDir("desi") then InstallClip(gsDefPath & "gross\back\", the text of cast "desiDir", sName, sType) end if else if sType = "clip" then if CheckDir(sType) then InstallClip(gsDefPath & "clips\clip\", the text of cast "clipDir", sName, sType) end if else if sType = "faxe" then if CheckDir(sType) then InstallClip(gsDefPath & "gross\faxe\", the text of cast "faxeDir", sName, sType) end if end if end if end if end if end if end if end if end if end on InstallEinkauf global glInstallList, gnInstallActive, goGBTools, gnPopupText if count(glInstallList) < 1 then ClosePopup() StopMrMore() exit end if if gnInstallActive <> 0 then if goGBTools(mIsActive, gnInstallActive) then exit else set gnInstallActive to 0 end if end if set sCmd to getAt(glInstallList, 1) set sCont to char 5 to length(sCmd) of sCmd set s to "installiere: " & sCont & RETURN & " " put string(100 / count(glInstallList)) & " %" into line 2 of s set the text of cast the castNum of sprite gnPopupText to s InstallObject(char 1 to 4 of sCmd, sCont) set l to glInstallList set n to count(l) set glInstallList to list() repeat with i = 2 to n append(glInstallList, getAt(l, i)) end repeat end on CheckDir sType set sDir to the text of cast (sType & "Dir") set sDir to alltrim(sDir) if char length(sDir) of sDir <> "\" then set sDir to sDir & "\" end if set the text of cast (sType & "Dir") to sDir if not IsValidDir(sDir) then if sType = "faxe" then set s to "Fax" else if sType = "desi" then set s to "Design" else if sType = "clip" then set s to "Clip Art" end if end if end if ClosePopup() set the text of cast "instDirTitle" to "Bitte geben Sie ein gültiges Zielverzeichnis für " & s & "-Dateien an!" go("instDir") return 0 end if return 1 end on CheckForSpace sDir, nKB global goGBTools set n to goGBTools(mGetDriveSpace, sDir) / 1024 if n < nKB then return 0 end if return 1 end on IsValidDir sDir if (sDir = EMPTY) or (sDir = "\") then return 0 end if set obj to FileIO(mnew, "write", sDir & "~mm~tst~.tmp") if not objectp(obj) then return 0 end if if obj(mStatus) <> 0 then obj(mdispose) return 0 end if obj(mDelete) return 1 end on CheckForInstalled sType, sName set sInstalled to ReadIni(sType & "Ins", sName, "MRMORE.INI") put sInstalled if sInstalled <> EMPTY then return 1 else return 0 end if end on InstallClip sSourceDir, sDestDir, sName, sType global goGBTools, gsDefPath if CheckForInstalled(sType & "ins", sDestDir & sName) then DoMrMore("fehler\bildinst", "more aktiv" & string(random(4)), 9, 0) exit end if if not CheckForSpace(sDestDir, 300) then DoMrMore("fehler\noplatz", "more aktiv" & string(random(4)), 9, 0) exit end if set sSrc to sSourceDir & sName & ".bmp" set sDest to sDestDir & sName & ".bmp" put sSrc, sDest set n to goGBTools(mCopyFile, sSrc, sDest) if n = -1 then DoMrMore("fehler\bildinst", "more aktiv" & string(random(4)), 9, 0) exit else if n <= 0 then if sType = "desi" then InstallSound(gsDefPath & "sounds\design\", the text of cast "desiDir", sName, sType) else DoMrMore("fehler\bildcopy", "more aktiv" & string(random(4)), 9, 0) end if exit else WriteIni(sType & "ins", sName, sDest, "MRMORE.INI") end if end if end on InstallSound sSourceDir, sDestDir, sName, sType global goGBTools if CheckForInstalled(sType & "ins", sDestDir & sName) then DoMrMore("fehler\souninst", "more aktiv" & string(random(4)), 9, 0) exit end if if not CheckForSpace(sDestDir, 205) then DoMrMore("fehler\noplatz", "more aktiv" & string(random(4)), 9, 0) exit end if set sSrc to sSourceDir & sName & ".wav" set sDest to sDestDir & sName & ".wav" set n to goGBTools(mCopyFile, sSrc, sDest) if n = -1 then DoMrMore("fehler\souninst", "more aktiv" & string(random(4)), 9, 0) exit else if n <= 0 then DoMrMore("fehler\souncopy", "more aktiv" & string(random(4)), 9, 0) exit end if end if WriteIni(sType & "ins", sName, sDest, "MRMORE.INI") end on InstallGame sName global goGBTools, gnInstallActive, gsDefPath if sName = "Lemminge 3D" then MsgBox("OK", "Mr. More", "Bitte beachten Sie, daß Lemminge 3D EMS-Speicher verwendet!" & RETURN & "Nach der Installation starten Sie bitte Lemminge 3D aus dem Programm-Manager.") open("AEKDB", gsDefPath & "addl3d.exe") else if sName = "Lemminge Windows" then MsgBox("OK", "Mr. More", "Das Installationsprogramm für Lemminge für Windows wird nun gestartet. " & "Bitte beachten Sie, daß der Mr. More Deinstaller für dieses Programm aus " & "technischen Gründen nicht aktiv ist." & RETURN & "Nach der Installation finden Sie die Lemminge-Gruppe im Start-Menü unter 'Programme'." & RETURN & RETURN & "!! Achtung !! Bei Compaq-Rechnern mit integriertem Soundsystem muß gegebenenfalls das Inputsignal für WAV-Dateien im Programm CD-Sound-System in der Programmgruppe Media Pilot angehoben werden.") goGBTools(mChDir, gsDefPath & "games\lwin") set gnInstallActive to goGBTools(mExec, gsDefPath & "games\lwin\setup") end if end if end on InstallUtil sName global goGBTools, gnInstallActive, gsDefPath, gsWinDir MsgBox("OK", "Mr. More", "Das Installationsprogramm für dieses Utility wird nun gestartet. " & "Bitte beachten Sie, daß der Mr. More Deinstaller für dieses Programm aus " & "technischen Gründen nicht aktiv ist.") set sFile to alltrim(MakeUtilityFileName(sName)) goGBTools(mChDir, gsDefPath & "sharewa\" & sFile) set sCmd to gsDefPath & "sharewa\" & sFile & "\" & line 1 of field sFile set gnInstallActive to goGBTools(mExec, sCmd) end on InstallFont sName global gsWinDir, gsSysDir, goGBTools, gsDefPath if CheckForInstalled("font", sName) then DoMrMore("fehler\fontinst", "more aktiv" & string(random(4)), 9, 0) exit end if if not CheckForSpace(gsWinDir, 70) then DoMrMore("fehler\noplatz", "more aktiv" & string(random(4)), 9, 0) exit end if set sFileName to MakeFontFileName(sName) set oGlue to dllglue(mnew, "gdi.EXE", "AddFontResource", "I", "S") if not CheckObject(oGlue, "Glue") then quit() end if if GetWinVersion() = "3.95" then set n to goGBTools(mCopyFile, gsDefPath & "fonts\" & sFileName & ".ttf", gsWinDir & "fonts\" & sFileName & ".ttf") if n <= 0 then if n = -1 then DoMrMore("fehler\fontinst", "more aktiv" & string(random(4)), 9, 0) else DoMrMore("fehler\fontwrit", "more aktiv" & string(random(4)), 9, 0) end if oGlue(mdispose) exit end if oGlue(mCall, gsWinDir & "fonts\" & sFileName & ".ttf") WriteIni("FontIns", sName, gsWinDir & "fonts\" & sFileName & ".ttf", "MRMORE.INI") else WriteIni("fonts", sName & " (True Type)", sFileName & ".fot", "WIN.INI") goGBTools(mCopyFile, gsDefPath & "fonts\" & sFileName & ".ttf", gsSysDir & sFileName & ".ttf") set n to goGBTools(mCopyFile, gsDefPath & "fonts\" & sFileName & ".fot", gsSysDir & sFileName & ".fot") if n <= 0 then if n = -1 then DoMrMore("fehler\fontinst", "more aktiv" & string(random(4)), 9, 0) else DoMrMore("fehler\fontwrit", "more aktiv" & string(random(4)), 9, 0) end if oGlue(mdispose) exit end if put oGlue(mCall, sFileName & ".fot") WriteIni("FontIns", sName, gsSysDir & sFileName & ".ttf", "MRMORE.INI") end if oGlue(mdispose) end on MakeFontFileName sFont set nWords to the number of words in sFont set nLen to length(word 1 of sFont) set sFileName to char 1 to 3 of word 1 of sFont set sFileName to sFileName & char nLen - 1 to nLen of word 1 of sFont if nWords > 2 then set sFileName to sFileName & char 1 of word 2 of sFont end if set sFileName to sFileName & char 1 to 2 of word nWords of sFont return sFileName end on MakeUtilityFileName sUtil set nLen to length(word 1 of sUtil) if nLen > 6 then return char 1 to 7 of sUtil end if set sFileName to char 1 to nLen of sUtil set sFileName to sFileName & char nLen + 2 to 8 of sUtil return sFileName end on GetWinVersion set oGetVer to dllglue(mnew, "KRNL386.EXE", "GetVersion", "U", "V") if not objectp(oGetVer) or (not oGetVer(mStatus) = 0) then alert("cannot determine Windows-Version!") closeXLib("dllglue") exit end if set n to oGetVer(mCall) set nVersion to LoByte(LoWord(n)) set nRevision to HiByte(LoWord(n)) return string(nVersion) & "." & string(nRevision) end on HiWord n return n / 65536 end on LoWord n return n mod 65536 end on HiByte n return n / 256 end on LoByte n return n mod 256 end on WriteIni sSection, sEntry, sValue, sFile global goGBTools set s to goGBTools(mWritePrivateProfileString, sSection, sEntry, sValue, sFile) end on ReadIni sSection, sEntry, sFile global goGBTools set s to goGBTools(mGetPrivateProfileString, sSection, sEntry, sFile) return s end