Skip to content

Commit

Permalink
fixes #7
Browse files Browse the repository at this point in the history
using some dirty tricks to set Profiles folded to
"~/Library/Application Support/720Browser"
  • Loading branch information
kcome committed Sep 5, 2012
1 parent b8326f4 commit aab0183
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
17 changes: 17 additions & 0 deletions 720Browser-app/application.ini.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff -r -pU8 ./Contents/MacOS/application.ini /Volumes/720Browser/720Browser.app/Contents/MacOS/application.ini
--- ./Contents/MacOS/application.ini 2012-09-03 18:17:52.000000000 +0800
+++ /Volumes/720Browser/720Browser.app/Contents/MacOS/application.ini 2012-08-31 11:01:55.000000000 +0800
@@ -1,11 +1,11 @@
[App]
-Vendor=720browser.com
-Name=720Browser
+Vendor=Mozilla
+Name=Firefox
Version=15.0
BuildID=20120831105858
ID={ec8030f7-c20a-464f-9b0e-13a3a9e97384}

[Gecko]
MinVersion=15.0
MaxVersion=15.0

29 changes: 29 additions & 0 deletions patch/rel15_mozilla_450143d2d810.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
diff -r 450143d2d810 browser/app/nsBrowserApp.cpp
--- a/browser/app/nsBrowserApp.cpp 2012-08-25 06:28:46.000000000 +0800
+++ b/browser/app/nsBrowserApp.cpp 2012-09-05 14:40:59.000000000 +0800
@@ -148,18 +148,23 @@ static int do_main(int argc, char* argv[
if (NS_FAILED(rv)) {
Output("Couldn't read application.ini");
return 255;
}
int result = XRE_main(argc, argv, appData, 0);
XRE_FreeAppData(appData);
return result;
}
-
- return XRE_main(argc, argv, &sAppData, 0);
+ const char *username = getenv("LOGNAME");
+ char lasdir[1024];
+ sprintf(lasdir, "/Users/%s/Library/Application Support/720Browser", username);
+ char* firefox = "firefox";
+ char* profile = "-profile";
+ char* argvv[] = {firefox, profile, lasdir};
+ return XRE_main(3, argvv, &sAppData, 0);
}

#ifdef XP_WIN
/**
* Determines if the registry is disabled via the service or not.
*
* @return true if prefetch is disabled
* false if prefetch is not disabled or an error occurred.

0 comments on commit aab0183

Please sign in to comment.