[or-cvs] r14713: This is a small C program that implements the features we wi (in torbrowser/trunk/src: . RelativeLink)

ioerror at seul.org ioerror at seul.org
Sun May 25 03:39:57 UTC 2008


Author: ioerror
Date: 2008-05-24 23:39:57 -0400 (Sat, 24 May 2008)
New Revision: 14713

Added:
   torbrowser/trunk/src/RelativeLink/
   torbrowser/trunk/src/RelativeLink/Relative-res.rc
   torbrowser/trunk/src/RelativeLink/RelativeLink.c
   torbrowser/trunk/src/RelativeLink/RelativeLink.ico
Log:
This is a small C program that implements the features we wish Windows had for relative linking. It allows a the TBB to have program in the root of a usbdisk. It has a custom icon to ease user confusion and it appears to work as fast as the batch file without any new hiccups being introduced.


Added: torbrowser/trunk/src/RelativeLink/Relative-res.rc
===================================================================
--- torbrowser/trunk/src/RelativeLink/Relative-res.rc	                        (rev 0)
+++ torbrowser/trunk/src/RelativeLink/Relative-res.rc	2008-05-25 03:39:57 UTC (rev 14713)
@@ -0,0 +1 @@
+1 ICON "RelativeLink.ico"


Property changes on: torbrowser/trunk/src/RelativeLink/Relative-res.rc
___________________________________________________________________
Name: svn:executable
   + *

Added: torbrowser/trunk/src/RelativeLink/RelativeLink.c
===================================================================
--- torbrowser/trunk/src/RelativeLink/RelativeLink.c	                        (rev 0)
+++ torbrowser/trunk/src/RelativeLink/RelativeLink.c	2008-05-25 03:39:57 UTC (rev 14713)
@@ -0,0 +1,42 @@
+#include <windows.h>
+#include <stdio.h>
+#include <tchar.h>
+
+//
+// RelativeLink.c
+// by Jacob Appelbaum <jacob at appelbaum.net>
+//
+// This is a very small program to work around the lack of relative links 
+// in any of the most recent builds of Windows.
+//
+// To build this, you need Cygwin or MSYS.
+//
+// You need to build the icon resource first:
+// windres ShortCut-res.rc ShortCut-res.o
+//
+// Then you'll compile the program and include the icon object file:
+// gcc -o StartTorBrowserBundle ShortCut.c ShortCut-res.o
+//
+// End users will be able to use StartTorBrowserBundle.exe
+//
+
+int _tmain( int argc, TCHAR *argv[])
+{
+    STARTUPINFO si;
+    PROCESS_INFORMATION pi;
+    
+    ZeroMemory ( &si, sizeof(si) );  
+    si.cb = sizeof(si);
+    ZeroMemory ( &pi, sizeof(pi) );
+
+    char *ProgramToStart;
+    ProgramToStart = "App/vidalia.exe --datadir .\\Data\\Vidalia\\";
+
+    if( !CreateProcess( 
+        NULL, ProgramToStart, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi ))
+    {
+         printf("Unable to start Vidalia: (%d)\n", GetLastError() );
+         return;
+    }
+
+}


Property changes on: torbrowser/trunk/src/RelativeLink/RelativeLink.c
___________________________________________________________________
Name: svn:executable
   + *

Added: torbrowser/trunk/src/RelativeLink/RelativeLink.ico
===================================================================
(Binary files differ)


Property changes on: torbrowser/trunk/src/RelativeLink/RelativeLink.ico
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream



More information about the tor-commits mailing list