Can I change the Chromium target name in GYP ?

732 views
Skip to first unread message

guil...@paralint.com

unread,
Feb 12, 2013, 10:07:40 AM2/12/13
to chromium...@chromium.org
I have successfully built and run Chromium for Windows. The binary files are named chrome.exe and chrome.dll. 

I can rename Chrome.exe after it is built and it will run. But there are some problems :
  • I cannot rename Chrome.dll.
  • The memory usage tab is empty (it looks like it is looking for chrome.exe processes).
Is there a environment variable or command line switch to GYP that would allow me to rename the target to something like my-chrome.exe and my-chrome.dll ?

Nico Weber

unread,
Feb 12, 2013, 12:09:18 PM2/12/13
to guil...@paralint.com, chromium...@chromium.org
You probably have to edit the gyp file directly. Look at the
src/chrome/chrome_*.gyp and gypi files. I think the 'product_name':
'chrome' line in chrome_dll.gypi might determine the name of the dll.
It's possible that dll name is hardcoded somewhere in the browser code
though, so you might have to change some cc file too.

Nico
> --
> --
> Chromium Discussion mailing list: chromium...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-discuss
>
>
>

guil...@paralint.com

unread,
Mar 14, 2013, 12:57:41 PM3/14/13
to chromium...@chromium.org, guil...@paralint.com
Changing the product_name in chrome_dll.gypi did change the DLL name to chromium.dll, but chrome.exe is still built and it calls LoadLibrary(... chrome.dll ...). I completely deleted the output folder to be sure I  had a clean build.

I will leave it like that (manually renaming chrome) for now. Thanks !

--
Guillaume

Johan Hernefeldt

unread,
Mar 10, 2014, 10:13:45 AM3/10/14
to chromium...@chromium.org, guil...@paralint.com
Hi Guillaume Seguin

I'm trying to rename the dll as well. How did you manage to get chrome.exe to reference the new dll? It still wants to load chrome.dll

/Johan

Guillaume Seguin

unread,
Mar 10, 2014, 11:49:39 AM3/10/14
to Johan Hernefeldt, chromium...@chromium.org
I did not managed to rename chrome.exe to something else in the build itself. 

I was doing it to bypass a execution restriction policy based on name (i.e. prevent the creation of a process named chrome.exe). So renaming chrome.exe to chromium.exe after the build was sufficient for my needs. 

So now I have this :

$ tasklist /m chrome.dll

Nom de l'image              PID  Modules
========================= ====== =============================================
chromium.exe                3752 chrome.dll
chromium.exe                5476 chrome.dll
chromium.exe                5948 chrome.dll
chromium.exe                5792 chrome.dll
chromium.exe                5848 chrome.dll
chromium.exe                5860 chrome.dll
chromium.exe                5868 chrome.dll
chromium.exe                5880 chrome.dll
chromium.exe                4660 chrome.dll

(Pardon my French)

I thought of building chrome.exe, then search for chrome.exe everywhere and reverse the configuration, but IIRC there are many places where the name is refered to, sometimes through string concatenation or similar.

I was using - and still use - revision 214843. Maybe I should give it another try... I will git pull and rebuild the latest tree sometimes this week, if only to follow your progress on this issue.

Good luck,

--
Guillaume
Reply all
Reply to author
Forward
0 new messages