NB! This project is outdated and unmaintained, please refer to the OpenSC WindowsInstaller instead!

Changeset 36


Ignore:
Timestamp:
09/20/05 12:35:26 (7 years ago)
Author:
aj
Message:

improved editconf.c file - detect the directory it is run in.
add engine_pkcs11 (0.1.1 with small modifications).
install libp11.lib file.

Location:
trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.mak

    r33 r36  
    99OPENSC=0.10.0-pre3b 
    1010LIBP11=0.1.3 
     11ENGINE=0.1.1 
    1112PUTTY=0.58 
    1213 
     
    106107        nmake /f Makefile.mak 
    107108        COPY LIBP11.DLL $(DEST) 
     109        COPY LIBP11.LIB $(DEST)\lib 
    108110        cd .. 
    109111 
     
    113115        XCOPY /S DOC\* $(DEST)\DOC\LIBP11 
    114116        DEL /Q $(DEST)\DOC\LIBP11\Makefile* 
     117 
     118        cd .. 
     119 
     120        cd engine_pkcs11-$(ENGINE) 
     121         
     122        cd src 
     123        perl -p -e "s/^OPENSSL_INC.*/OPENSSL_INC = \/I$(DESTP)\\include/g" -i~ Makefile.mak 
     124        perl -p -e "s/^OPENSSL_LIB.*/OPENSSL_LIB = $(DESTP)\\lib\\libeay32.lib/g" -i~ Makefile.mak 
     125        perl -p -e "s/^LIBP11_INC.*/LIBP11_INC = \/I$(DESTP)\\include/g" -i~ Makefile.mak 
     126        perl -p -e "s/^LIBP11_LIB.*/LIBP11_LIB = $(DESTP)\\lib\\libp11.lib/g" -i~ Makefile.mak 
     127        nmake /f Makefile.mak 
     128 
     129        mkdir $(DEST)\engine 
     130        COPY ENGINE_PKCS11.DLL $(DEST)\engine 
     131 
     132        cd .. 
     133 
     134        mkdir $(DEST)\DOC\ENGINE_PKCS11 
     135        XCOPY /S DOC\* $(DEST)\DOC\ENGINE_PKCS11 
     136        DEL /Q $(DEST)\DOC\ENGINE_PKCS11\Makefile* 
    115137 
    116138        cd .. 
  • trunk/README

    r30 r36  
    22 
    331.) Download 
     4        OpenSSL source code 
     5        http://www.openssl.org/source/openssl-0.9.7g.tar.gz 
     6 
    47        OpenSC source code 
    58        http://www.opensc.org/files/testing/opensc-0.10.0-pre3.tar.gz 
    69 
    7         OpenSSL source code 
    8         http://www.openssl.org/source/openssl-0.9.7g.tar.gz 
     10        Libp11 source code 
     11        http://www.opensc.org/files/libp11-0.1.3.tar.gz 
     12 
     13        Engine_pkcs11 source code 
     14        http://www.opensc.org/files/testing/engine_pkcs11-0.1.1.tar.gz 
    915 
    1016        Putty source code (for unix) 
  • trunk/editconf.c

    r30 r36  
    2929#include <scconf.h> 
    3030 
    31 static int printHelp(const char *csMesg, int iRet); 
    3231static int changeConfigFile(const char *csConfigDir); 
    3332static int changeRegistry(const char *csConfigDir); 
     
    3534#define CLEANUP(iRes, iVal) {iRes = iVal; goto cleanup;} 
    3635 
    37 #define LOG(s) 
    38 #define LOGINT(s, i) 
    3936 
    4037int main(int argc, char **argv) 
    4138{ 
     39        int iRet = 0; 
    4240        char csConfigDir[MAX_PATH]; 
    43         int iRet = 0; 
     41        char pwszPath[_MAX_PATH], pwszDrive[_MAX_DRIVE], pwszDir[_MAX_DIR]; 
    4442 
    45         LOG("\n*************\n"); 
    46         LOG(argv[0]); 
    47         LOGINT("\nargc=%d\n", argc); 
     43        if(!GetModuleFileName(NULL, pwszPath, _MAX_PATH)) return FALSE; 
     44        _splitpath(pwszPath, pwszDrive, pwszDir, NULL, NULL); 
     45        _makepath(pwszPath, pwszDrive, pwszDir, NULL, NULL); 
    4846 
    49         if (argc != 2) 
    50                 return printHelp(NULL, 0); 
    51         LOG(argv[1]); 
     47        printf("\nThis tool configures OpenSC after installation.\n"); 
     48        printf("\nUsage: editconf\n"); 
     49        printf("  It will edit the opensc.conf file and set some\n"); 
     50        printf("  registry keys so everything workd.\n"); 
     51        printf("  It will use the path to itself for this purpose.\n"); 
    5252 
    53         strncpy(csConfigDir, argv[1], sizeof(csConfigDir) - 1); 
     53        SetCurrentDirectory(pwszPath); 
     54 
     55        strncpy(csConfigDir, pwszPath, sizeof(csConfigDir) - 1); 
    5456        csConfigDir[sizeof(csConfigDir) - 1] = '\0'; 
    5557        if (csConfigDir[strlen(csConfigDir) - 1] == '\\') 
     
    5759 
    5860        iRet = changeConfigFile(csConfigDir); 
    59         LOGINT("\nchangeConfigFile(): %d\n", iRet); 
    60         if (iRet != 0) 
    61                 printHelp("Error: couldn't change the opensc.conf file: %d\n", 
    62                           iRet); 
    63         else { 
     61        if (iRet != 0) { 
     62                fprintf(stderr,"Error: couldn't change the opensc.conf file: %d\n", iRet); 
     63                return 1; 
     64        } else { 
    6465                iRet = changeRegistry(csConfigDir); 
    65                 LOGINT("changeRegistry(): %d\n", iRet); 
    66                 if (iRet != 0) 
    67                         printHelp("Error: couldn't change the registry: %d\n", 
    68                                   iRet); 
    69                 else 
    70                         printf("\nconfigopensc finished successfully\n"); 
     66                if (iRet != 0) { 
     67                        fprintf(stderr,"Error: couldn't change the registry: %d\n", iRet); 
     68                        return 1; 
     69                } else 
     70                        printf("configopensc finished successfully\n"); 
    7171        } 
    7272 
    73         return iRet; 
    74 } 
    75  
    76 static int printHelp(const char *csMesg, int iRet) 
    77 { 
    78         if (csMesg != NULL) 
    79                 printf(csMesg, iRet); 
    80         printf("\nThis tool configures OpenSC after installation.\n"); 
    81         printf("\nUsage: configopensc <installationdir>\n"); 
    82         printf("  in which <installationdir> is the directory where\n"); 
    83         printf("  the OpenSC config fileshave been installed.\n"); 
    84         printf("  (E.g. \"C:\\Program Files\\OpenSC\\conf\")\n\n"); 
    85         printf("So: OpenSC should have been installed already.\n\n"); 
    86         return iRet; 
     73        return 0; 
    8774} 
    8875 
  • trunk/scb.iss

    r35 r36  
    33 
    44#define MyAppName "Smart card bundle" 
    5 #define MyAppVerName "Smart card bundle 0.5-pre1d" 
     5#define MyAppVerName "Smart card bundle 0.5-pre1e" 
    66#define MyAppPublisher "Andreas Jellinghaus" 
    77#define MyAppURL "http://www.opensc.org/scb/" 
     
    1818DefaultGroupName={#MyAppName} 
    1919LicenseFile=TARGET\LICENSE 
    20 OutputBaseFilename=scb-0.5-pre1d 
     20OutputBaseFilename=scb-0.5-pre1e 
    2121Compression=lzma 
    2222SolidCompression=yes 
     
    2626Name: "docs"; Description: "Documentation"; Types: full 
    2727Name: "devel"; Description: "Development"; Types: full 
     28Name: "engine"; Description: "PKCS#11 Engine for OpenSSL"; Types: full 
    2829Name: "putty"; Description: "Putty SSH Client"; Types: full 
    2930 
     
    3536Source: TARGET\include\*; DestDir: {app}\include; Flags: recursesubdirs createallsubdirs; Components: devel 
    3637Source: TARGET\doc\*; DestDir: {app}\doc; Flags: recursesubdirs createallsubdirs; Components: docs 
     38Source: TARGET\engine\*; DestDir: {app}; Flags: recursesubdirs createallsubdirs; Components: engine 
    3739Source: TARGET\putty\*; DestDir: {app}; Flags: recursesubdirs createallsubdirs; Components: putty 
    3840 
     
    4345 
    4446[Icons] 
     47Name: "{group}\Use Smartcard with Pageant"; Filename: "{app}\smartcard.ppk"; Tasks: startmenu; Components: putty 
    4548Name: "{group}\PuTTY"; Filename: "{app}\putty.exe"; Tasks: startmenu; Components: putty 
    4649Name: "{group}\PuTTY Manual"; Filename: "{app}\putty.hlp"; Tasks: startmenu; Components: putty 
     
    6770 
    6871[Run] 
    69 Filename: "{app}\editconf.exe"; Parameters: "{app}"; Flags: postinstall shellexec; Components: main 
     72Filename: "{app}\editconf.exe"; Parameters: ""; Flags: postinstall shellexec; Components: main 
Note: See TracChangeset for help on using the changeset viewer.