Changeset 2834


Ignore:
Timestamp:
2001-11-21T10:46:35+13:00 (22 years ago)
Author:
sjboddie
Message:

* empty log message *

Location:
trunk/is_gsdl_cdrom
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/is_gsdl_cdrom/Greenstone Digital Library Software.ipr

    r2827 r2834  
    77[Data]
    88CurrentMedia=default
     9set_mifserial=
     10ProductName=Greenstone Digital Library Software
    911CurrentComponentDef=Default.cdf
    10 ProductName=Greenstone Digital Library Software
    11 set_mifserial=
     12set_dlldebug=No
     13AppExe=
    1214DevEnvironment=Microsoft Visual C++
    13 AppExe=
    14 set_dlldebug=No
     15set_mif=No
     16set_testmode=No
     17Instructions=Instructions.txt
    1518EmailAddresss=
    16 Instructions=Instructions.txt
    17 set_testmode=No
    18 set_mif=No
    1919SummaryText=
    2020Department=
     21Type=Internet Application
     22Author=
    2123HomeURL=
    22 Author=
    23 Type=Internet Application
    2424InstallRoot=C:\My Installations\is_gsdl_cdrom
     25set_level=Level 3
     26InstallationGUID=4c986880-d387-11d5-840f-a0c20cc10000
    2527Version=2.37.000
    26 InstallationGUID=4c986880-d387-11d5-840f-a0c20cc10000
    27 set_level=Level 3
     28set_miffile=Status.mif
     29set_args=
     30set_maxerr=50
     31Notes=Notes.txt
    2832CurrentFileGroupDef=Default.fdf
    29 Notes=Notes.txt
    30 set_maxerr=50
    31 set_args=
    32 set_miffile=Status.mif
    3333set_dllcmdline=
     34set_warnaserr=No
    3435Copyright=
    35 set_warnaserr=No
     36set_preproc=
     37Category=
    3638CurrentPlatform=
    37 Category=
    38 set_preproc=
     39set_compileb4build=No
     40set_crc=Yes
     41set_maxwarn=50
     42Description=Description.txt
     43CompanyName=New Zealand Digital Library Project
    3944CurrentLanguage=English
    40 CompanyName=New Zealand Digital Library Project
    41 Description=Description.txt
    42 set_maxwarn=50
    43 set_crc=Yes
    44 set_compileb4build=No
    4545
    4646[MediaInfo]
  • trunk/is_gsdl_cdrom/Script Files/setup.rul

    r2832 r2834  
    7171    prototype rs(BYREF STRING);
    7272    prototype InstallCollOrganizer();
     73    prototype SetPermissions();
    7374
    7475    // ----- global variables ------
     
    8687    BOOL bCompact;
    8788    STRING svAdminPassword, svLogFile;
     89
     90
     91    // for _LaunchAppEx function
     92    #ifndef STILL_ACTIVE
     93        #define STILL_ACTIVE    0x00000103
     94    #endif
     95    #if _ISCRIPT_VER < 0x600
     96        #ifndef BYVAL
     97            #define BYVAL
     98        #endif
     99    #endif
     100    prototype _LaunchAppEx(STRING, STRING, NUMBER, NUMBER, NUMBER, BYREF NUMBER);
     101    prototype BOOL kernel32.CreateProcessA(POINTER, BYVAL STRING, POINTER,
     102                            POINTER, BOOL, NUMBER, POINTER, POINTER, POINTER,
     103                            POINTER);
     104    prototype BOOL kernel32.GetExitCodeProcess(NUMBER, POINTER);
     105    prototype NUMBER kernel32.WaitForSingleObject(NUMBER, NUMBER);
     106    prototype BOOL kernel32.CloseHandle(HWND);
     107    typedef STARTUPINFO
     108    begin
     109        NUMBER   cb;
     110        POINTER  lpReserved;
     111        POINTER  lpDesktop;
     112        POINTER  lpTitle;
     113        NUMBER   dwX;
     114        NUMBER   dwY;
     115        NUMBER   dwXSize;
     116        NUMBER   dwYSize;
     117        NUMBER   dwXCountChars;
     118        NUMBER   dwYCountChars;
     119        NUMBER   dwFillAttribute;
     120        NUMBER   dwFlags;
     121        NUMBER    wShowWindow;
     122        POINTER  lpReserved2;
     123        HWND  hStdInput;
     124        HWND  hStdOutput;
     125        HWND  hStdError;
     126    end;
     127    typedef PROCESS_INFORMATION
     128    begin
     129        NUMBER hProcess;
     130        HWND hThread;
     131        NUMBER dwProcessId;
     132        NUMBER dwThreadId;
     133    end;
     134
    88135
    89136///////////////////////////////////////////////////////////////////////////////
     
    302349    EditSetupBat();
    303350    SetAdminPassword();
     351    SetPermissions();
    304352
    305353    szReferenceFile = svDir ^ @PRODUCT_KEY;
     
    9581006end;
    9591007
     1008
     1009// if running NT/2000 we need to make the collect and tmp
     1010// directories and some contents of the etc directory writable
     1011// by all users (otherwise certain functions will only work
     1012// if Greenstone is run by someone with admin privileges)
     1013function SetPermissions()
     1014    STRING szProgram, szCmdLine;
     1015    NUMBER nvExitCode;
     1016
     1017begin
     1018
     1019    if (bWinNT) then
     1020       
     1021        szProgram = WINSYSDIR ^ "cmd.exe";
     1022       
     1023        szCmdLine = "/c cacls \"" + TARGETDIR ^ "tmp\" /T /E /G Everyone:F";
     1024        _LaunchAppEx(szProgram, szCmdLine, WAIT, SW_HIDE, 5000, nvExitCode);
     1025   
     1026        szCmdLine = "/c cacls \"" + TARGETDIR ^ "collect\" /T /E /G Everyone:F";
     1027        _LaunchAppEx(szProgram, szCmdLine, WAIT, SW_HIDE, 5000, nvExitCode);
     1028       
     1029        szCmdLine = "/c cacls \"" + TARGETDIR ^ "etc" ^ "errout.txt\" /T /E /G Everyone:F";
     1030        _LaunchAppEx(szProgram, szCmdLine, WAIT, SW_HIDE, 5000, nvExitCode);
     1031       
     1032        szCmdLine = "/c cacls \"" + TARGETDIR ^ "etc" ^ "initout.txt\" /T /E /G Everyone:F";
     1033        _LaunchAppEx(szProgram, szCmdLine, WAIT, SW_HIDE, 5000, nvExitCode);
     1034   
     1035        szCmdLine = "/c cacls \"" + TARGETDIR ^ "etc" ^ "key.db\" /T /E /G Everyone:F";
     1036        _LaunchAppEx(szProgram, szCmdLine, WAIT, SW_HIDE, 5000, nvExitCode);
     1037   
     1038        szCmdLine = "/c cacls \"" + TARGETDIR ^ "etc" ^ "users.db\" /T /E /G Everyone:F";
     1039        _LaunchAppEx(szProgram, szCmdLine, WAIT, SW_HIDE, 5000, nvExitCode);
     1040   
     1041        szCmdLine = "/c cacls \"" + TARGETDIR ^ "etc" ^ "main.cfg\" /T /E /G Everyone:F";
     1042        _LaunchAppEx(szProgram, szCmdLine, WAIT, SW_HIDE, 5000, nvExitCode);
     1043   
     1044        szCmdLine = "/c cacls \"" + TARGETDIR ^ "etc" ^ "history.db\" /T /E /G Everyone:F";
     1045        _LaunchAppEx(szProgram, szCmdLine, WAIT, SW_HIDE, 5000, nvExitCode);
     1046   
     1047        szCmdLine = "/c cacls \"" + TARGETDIR ^ "etc" ^ "usage.txt\" /T /E /G Everyone:F";
     1048        _LaunchAppEx(szProgram, szCmdLine, WAIT, SW_HIDE, 5000, nvExitCode);
     1049       
     1050    endif;
     1051
     1052end;
     1053
     1054function _LaunchAppEx(szProgram, szCmdLine, nWait, nShow, nTimeOut, nvExitCode)
     1055    STARTUPINFO siData;
     1056    PROCESS_INFORMATION piData;
     1057
     1058begin
     1059
     1060    siData.cb = 68;
     1061    siData.lpReserved = NULL;
     1062    siData.lpDesktop = NULL;
     1063    siData.lpTitle = NULL;
     1064    siData.dwX = 0;
     1065    siData.dwY = 0;
     1066    siData.dwXSize = 0;
     1067    siData.dwYSize = 0;
     1068    siData.dwXCountChars = 0;
     1069    siData.dwYCountChars = 0;
     1070    siData.dwFillAttribute = 0;
     1071    siData.dwFlags = 1;
     1072    siData.wShowWindow = nShow;
     1073    siData.lpReserved2 = NULL;
     1074    siData.hStdInput = NULL;
     1075    siData.hStdOutput = NULL;
     1076    siData.hStdError = NULL;
     1077
     1078    if (CreateProcessA(NULL, szProgram + " " + szCmdLine, NULL, NULL,
     1079                       TRUE, 0, NULL, NULL, &siData, &piData) = 0) then
     1080       return (-1);
     1081    endif;
     1082
     1083    if ( nWait != WAIT ) then
     1084       nvExitCode = 0;
     1085       return 0;
     1086    endif;
     1087   
     1088    WaitForSingleObject(piData.hProcess, nTimeOut);
     1089
     1090    GetExitCodeProcess(piData.hProcess, &nvExitCode);
     1091
     1092    CloseHandle(piData.hProcess);
     1093    CloseHandle(piData.hThread);
     1094
     1095    return 0;
     1096end;
     1097
     1098
    9601099///////////////////////////////////////////////////////////////////////////////
    9611100//
     
    9751114
    9761115
     1116
     1117
Note: See TracChangeset for help on using the changeset viewer.