Check-in [de3dbf5d8c]
Overview
Comment:Updated to not reference "main" for KitDLL, which likely prevents getting the executable path
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:de3dbf5d8c8e90c114fea324dd2175bbec017335
User & Date: rkeene on 2013-05-13 23:43:56
Other Links: manifest | tags
Context
2013-05-14
20:14
Updated to produce "Android.mk" in the SDK if the compile looks like Android check-in: b0fcd7911d user: rkeene tags: trunk
2013-05-13
23:43
Updated to not reference "main" for KitDLL, which likely prevents getting the executable path check-in: de3dbf5d8c user: rkeene tags: trunk
01:27
Updated version numbers to test check-in: 037aa51865 user: rkeene tags: trunk
Changes

Modified kitsh/buildsrc/kitsh-0.0/kitInit.c from [0cfdc14cf7] to [9bfdc99cac].

    87     87   #  define TCLKIT_MOUNTPOINT "/.KITDLL_TCL"
    88     88   #  define TCLKIT_VFSSOURCE "$::tclKitFilename"
    89     89   #else
    90     90   #  define TCLKIT_MOUNTPOINT "[info nameofexecutable]"
    91     91   #  define TCLKIT_VFSSOURCE "[info nameofexecutable]"
    92     92   #endif /* TCLKIT_DLL */
    93     93   
    94         -#ifdef HAVE_ACCEPTABLE_DLADDR
    95         -#  ifdef KITSH_NEED_WINMAIN
    96         -#    ifdef _WIN32_WCE
           94  +#ifndef TCLKIT_DLL
           95  +#  ifdef HAVE_ACCEPTABLE_DLADDR
           96  +#    ifdef KITSH_NEED_WINMAIN
           97  +#      ifdef _WIN32_WCE
    97     98   int wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow);
    98         -#    else
           99  +#      else
    99    100   int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow);
   100         -#    endif /* _WIN32_WCE */
   101         -#  endif /* KITSH_NEED_WINMAIN */
          101  +#      endif /* _WIN32_WCE */
          102  +#    endif /* KITSH_NEED_WINMAIN */
   102    103   int main(int argc, char **argv);
   103         -#endif /* HAVE_ACCEPTABLE_DLADDR */
          104  +#  endif /* HAVE_ACCEPTABLE_DLADDR */
          105  +#endif /* !TCLKIT_DLL */
   104    106   
   105    107   #ifdef TCLKIT_REQUIRE_TCLEXECUTABLENAME
   106    108   char *tclExecutableName;
   107    109   #endif
   108    110   
   109    111   /*
   110    112    *  Attempt to load a "boot.tcl" entry from the embedded MetaKit file.
................................................................................
   295    297   		dladdr_ret = dladdr(&SetExecName, &syminfo);
   296    298   		if (dladdr_ret != 0) {
   297    299   			SetExecName(interp, syminfo.dli_fname);
   298    300   
   299    301   			return;
   300    302   		}
   301    303   	}
   302         -#  endif /* !TCLKIT_DLL */
   303         -
   304         -#  ifdef KITSH_NEED_WINMAIN
          304  +#    ifdef KITSH_NEED_WINMAIN
   305    305   	if (Tcl_GetNameOfExecutable() == NULL) {
   306         -#    ifdef _WIN32_WCE
          306  +#      ifdef _WIN32_WCE
   307    307   		dladdr_ret = dladdr(&WinMain, &syminfo);
   308         -#    else
          308  +#      else
   309    309   		dladdr_ret = dladdr(&wWinMain, &syminfo);
   310         -#    endif /* _WIN32_WCE */
          310  +#      endif /* _WIN32_WCE */
   311    311   
   312    312   		if (dladdr_ret != 0) {
   313    313   			SetExecName(interp, syminfo.dli_fname);
   314    314   
   315    315   			return;
   316    316   		}
   317    317   	}
   318         -#  endif /* KITSH_NEED_WINMAIN */
          318  +#    endif /* KITSH_NEED_WINMAIN */
   319    319   
   320    320   	if (Tcl_GetNameOfExecutable() == NULL) {
   321    321   		dladdr_ret = dladdr(&main, &syminfo);
   322    322   		if (dladdr_ret != 0) {
   323    323   			SetExecName(interp, syminfo.dli_fname);
   324    324   
   325    325   			return;
   326    326   		}
   327    327   	}
          328  +#  endif /* !TCLKIT_DLL */
   328    329   #endif /* HAVE_ACCEPTABLE_DLADDR */
   329    330   
   330    331   	if (Tcl_GetNameOfExecutable() == NULL) {
   331    332   		lobjv[0] = Tcl_GetVar2Ex(interp, "argv0", NULL, TCL_GLOBAL_ONLY);
   332    333   		execNameObj = Tcl_FSJoinToPath(Tcl_FSGetCwd(interp), 1, lobjv);
   333    334   
   334    335   		SetExecName(interp, Tcl_GetStringFromObj(execNameObj, &len));