Advertisement
vf2nsr

Untitled

Apr 5th, 2012
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. @echo off
  2. cd %~dp0
  3. SET KDEROOT=%~dp0
  4.  
  5. SET PATH=%KDEROOT%\bin;%PATH%
  6. SET HOME=%KDEROOT%\home
  7. SET KDEHOME=%HOME%
  8. SET KDESYCOCA=%HOME%\kdesycoca
  9. SET XDG_CONFIG_HOME=%HOME%\.config
  10. SET XDG_DATA_HOME=%HOME%\.local\share
  11. SET XDG_CACHE_HOM=%HOME%
  12.  
  13. SET APPLICATION=
  14.  
  15. IF NOT "%1" == "" (
  16. SET APPLICATION=%1
  17. SHIFT
  18. )
  19.  
  20. IF EXIST %KDEROOT%\firstrun GOTO :INSTALL
  21. IF NOT EXIST %KDEROOT%\home GOTO :INSTALL
  22.  
  23. :RUN
  24.  
  25. IF "%APPLICATION%" == "" (
  26. CALL bin\amarok.exe
  27. ) ELSE (
  28. CALL %APPLICATION% %1 %2 %3 %4 %5 %6 %7 %8 %9
  29. )
  30.  
  31. GOTO :EOF
  32.  
  33.  
  34. :INSTALL
  35. echo install
  36. IF NOT EXIST %KDEROOT%\home MKDIR %KDEROOT%\home
  37. IF EXIST %KDEROOT%\firstrun DEL firstrun
  38.  
  39.  
  40.  
  41. echo *******************************************************************************
  42. echo package: %0
  43. echo *******************************************************************************
  44.  
  45. SET quitnow=False
  46. ::for %%i in ( kioslave.exe kded4.exe ) DO (
  47. :: tasklist /NH /FI "IMAGENAME eq %%i" | find "%%i" > "Nul" && (
  48. :: echo error: found %%i running. please kill this process!
  49. :: SET quitnow=True
  50. :: )
  51. ::)
  52.  
  53. if %quitnow% equ True (
  54. echo error: one or more programs are running that shouldn't run.
  55. echo please close them before restarting this script
  56. goto :eof
  57. )
  58.  
  59. if not `"bin\update-mime-database.exe --help"` equ "" (
  60. bin\update-mime-database "%CD%\share\mime"
  61. ) else (
  62. echo error: update-mime-database wasn't found.
  63. echo please check for correct installation
  64. )
  65.  
  66. if not `"bin\kbuildsycoca4.exe --help"` equ "" (
  67. bin\kbuildsycoca4 --noincremental
  68. ) else (
  69. echo error: kbuildsycoca4 wasn't found.
  70. echo please check for correct installation
  71. )
  72.  
  73.  
  74. GOTO :RUN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement