NB! This project is outdated and unmaintained, please refer to the OpenSC WindowsInstaller instead!
| r33 | r36 | |
|---|---|---|
| 9 | 9 | OPENSC=0.10.0-pre3b |
| 10 | 10 | LIBP11=0.1.3 |
| 11 | ENGINE=0.1.1 | |
| 11 | 12 | PUTTY=0.58 |
| 12 | 13 | |
| … | … | |
| 106 | 107 | nmake /f Makefile.mak |
| 107 | 108 | COPY LIBP11.DLL $(DEST) |
| 109 | COPY LIBP11.LIB $(DEST)\lib | |
| 108 | 110 | cd .. |
| 109 | 111 | |
| … | … | |
| 113 | 115 | XCOPY /S DOC\* $(DEST)\DOC\LIBP11 |
| 114 | 116 | 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* | |
| 115 | 137 | |
| 116 | 138 | cd .. |
| r30 | r36 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | 1.) Download |
| 4 | OpenSSL source code | |
| 5 | http://www.openssl.org/source/openssl-0.9.7g.tar.gz | |
| 6 | ||
| 4 | 7 | OpenSC source code |
| 5 | 8 | http://www.opensc.org/files/testing/opensc-0.10.0-pre3.tar.gz |
| 6 | 9 | |
| 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 | |
| 9 | 15 | |
| 10 | 16 | Putty source code (for unix) |
| r30 | r36 | |
|---|---|---|
| 29 | 29 | #include <scconf.h> |
| 30 | 30 | |
| 31 | ||
| 32 | 31 | static int changeConfigFile(const char *csConfigDir); |
| 33 | 32 | static int changeRegistry(const char *csConfigDir); |
| … | … | |
| 35 | 34 | #define CLEANUP(iRes, iVal) {iRes = iVal; goto cleanup;} |
| 36 | 35 | |
| 37 | ||
| 38 | ||
| 39 | 36 | |
| 40 | 37 | int main(int argc, char **argv) |
| 41 | 38 | { |
| 39 | int iRet = 0; | |
| 42 | 40 | char csConfigDir[MAX_PATH]; |
| 43 | |
|
| 41 | char pwszPath[_MAX_PATH], pwszDrive[_MAX_DRIVE], pwszDir[_MAX_DIR]; | |
| 44 | 42 | |
| 45 | |
|
| 46 | |
|
| 47 | |
|
| 43 | if(!GetModuleFileName(NULL, pwszPath, _MAX_PATH)) return FALSE; | |
| 44 | _splitpath(pwszPath, pwszDrive, pwszDir, NULL, NULL); | |
| 45 | _makepath(pwszPath, pwszDrive, pwszDir, NULL, NULL); | |
| 48 | 46 | |
| 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"); | |
| 52 | 52 | |
| 53 | strncpy(csConfigDir, argv[1], sizeof(csConfigDir) - 1); | |
| 53 | SetCurrentDirectory(pwszPath); | |
| 54 | ||
| 55 | strncpy(csConfigDir, pwszPath, sizeof(csConfigDir) - 1); | |
| 54 | 56 | csConfigDir[sizeof(csConfigDir) - 1] = '\0'; |
| 55 | 57 | if (csConfigDir[strlen(csConfigDir) - 1] == '\\') |
| … | … | |
| 57 | 59 | |
| 58 | 60 | 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 { | |
| 64 | 65 | 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"); | |
| 71 | 71 | } |
| 72 | 72 | |
| 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; | |
| 87 | 74 | } |
| 88 | 75 |
| r35 | r36 | |
|---|---|---|
| 3 | 3 | |
| 4 | 4 | #define MyAppName "Smart card bundle" |
| 5 | #define MyAppVerName "Smart card bundle 0.5-pre1 |
|
| 5 | #define MyAppVerName "Smart card bundle 0.5-pre1e" | |
| 6 | 6 | #define MyAppPublisher "Andreas Jellinghaus" |
| 7 | 7 | #define MyAppURL "http://www.opensc.org/scb/" |
| … | … | |
| 18 | 18 | DefaultGroupName={#MyAppName} |
| 19 | 19 | LicenseFile=TARGET\LICENSE |
| 20 | OutputBaseFilename=scb-0.5-pre1 |
|
| 20 | OutputBaseFilename=scb-0.5-pre1e | |
| 21 | 21 | Compression=lzma |
| 22 | 22 | SolidCompression=yes |
| … | … | |
| 26 | 26 | Name: "docs"; Description: "Documentation"; Types: full |
| 27 | 27 | Name: "devel"; Description: "Development"; Types: full |
| 28 | Name: "engine"; Description: "PKCS#11 Engine for OpenSSL"; Types: full | |
| 28 | 29 | Name: "putty"; Description: "Putty SSH Client"; Types: full |
| 29 | 30 | |
| … | … | |
| 35 | 36 | Source: TARGET\include\*; DestDir: {app}\include; Flags: recursesubdirs createallsubdirs; Components: devel |
| 36 | 37 | Source: TARGET\doc\*; DestDir: {app}\doc; Flags: recursesubdirs createallsubdirs; Components: docs |
| 38 | Source: TARGET\engine\*; DestDir: {app}; Flags: recursesubdirs createallsubdirs; Components: engine | |
| 37 | 39 | Source: TARGET\putty\*; DestDir: {app}; Flags: recursesubdirs createallsubdirs; Components: putty |
| 38 | 40 | |
| … | … | |
| 43 | 45 | |
| 44 | 46 | [Icons] |
| 47 | Name: "{group}\Use Smartcard with Pageant"; Filename: "{app}\smartcard.ppk"; Tasks: startmenu; Components: putty | |
| 45 | 48 | Name: "{group}\PuTTY"; Filename: "{app}\putty.exe"; Tasks: startmenu; Components: putty |
| 46 | 49 | Name: "{group}\PuTTY Manual"; Filename: "{app}\putty.hlp"; Tasks: startmenu; Components: putty |
| … | … | |
| 67 | 70 | |
| 68 | 71 | [Run] |
| 69 | Filename: "{app}\editconf.exe"; Parameters: " |
|
| 72 | Filename: "{app}\editconf.exe"; Parameters: ""; Flags: postinstall shellexec; Components: main |