WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Chromium Nightly script  (Read 5145 times)

Offline althalus

  • Sr. Member
  • ****
  • Posts: 351
Chromium Nightly script
« on: March 01, 2010, 04:45:30 AM »
This script downloads the latest good build of chromium from the dev site's waterfall and creates an extension from it.

The chromium-browser-nightly.tcz built by the script conflicts with other chromium extensions in the repo.
Obviously depends on the squashfs tools.

The SSL bug appears to be resolved, and chromium extensions can be installed with the latest version.

EDIT2: Updated, includes symlink for flash
Code: [Select]
#!/bin/sh

# Where are extensions?
EXTDIR=/mnt/sda1/tce/optional
# Where is the extension?
CHROMEXT=/mnt/sda1/tce/optional/chromium-browser.tcz
# Get the latest release version
RELEASE=`wget http://build.chromium.org/buildbot/snapshots/chromium-rel-linux/LATEST -O -`
# Where to put things?
TMPDIR=/"tmp/chromium/${RELEASE}"

# Create the temp dir and get latest pre-compiled version
mkdir ${TMPDIR} -p
wget http://build.chromium.org/buildbot/snapshots/chromium-rel-linux/${RELEASE}/chrome-linux.zip -O ${TMPDIR}/chrome-linux.zip

# Extract archives
unzip ${TMPDIR}/chrome-linux.zip -d ${TMPDIR}

# Set up dirs for new extension
mkdir ${TMPDIR}/ext/usr/local/bin -p
mkdir ${TMPDIR}/ext/usr/local/tce.menu -p
mkdir ${TMPDIR}/ext/usr/local/tce.installed -p
mkdir ${TMPDIR}/ext/usr/local/tce.icons -p
mkdir ${TMPDIR}/ext/usr/local/share/applications -p
mkdir ${TMPDIR}/ext/usr/local/share/pixmaps -p

# Get the icon
wget http://www.chromium.org/_/rsrc/1220198801738/config/app/images/customLogo/customLogo.gif \
-O ${TMPDIR}/ext/usr/local/share/pixmaps/chromium-browser.png

# Set up wbar entry
cat > ${TMPDIR}/ext/usr/local/tce.icons/chromium-browser-nightly << EOF
i: /usr/local/share/pixmaps/chromium-browser.png
t: Chromium
c: /usr/local/chrome-linux/chrome-wrapper
EOF

# Set up JWM menu entry
cat > ${TMPDIR}/ext/usr/local/tce.menu/chromium-browser-nightly << EOF
<JWM>
<Program label="Chromium">/usr/local/chrome-linux/chrome-wrapper</Program>
</JWM>
EOF

# Set up freedesktop entry
cat > ${TMPDIR}/ext/usr/local/share/applications/chromium-browser.desktop << EOF
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Chromium Web Browser
Exec=/usr/local/chrome-linux/chrome-wrapper %U
Terminal=false
Icon=chromium-browser.png
Type=Application
Categories=Application;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;
EOF

# Copy the new binaries
cp -a ${TMPDIR}/chrome-linux ${TMPDIR}/ext/usr/local/chrome-linux
ln -s /usr/local/chrome-linux/chrome-wrapper ${TMPDIR}/ext/usr/local/bin/chrome-wrapper
# Flash!
mkdir ${TMPDIR}/ext/usr/local/chrome-linux/plugins
ln -s /usr/local/share/flash10/libflashplayer.so ${TMPDIR}/ext/usr/local/chrome-linux/plugins/libflashplayer.so

# Make extension and put it into the TCE directory.
mksquashfs ${TMPDIR}/ext ${TMPDIR}/chromium-browser-nightly.tcz
cp ${TMPDIR}/chromium-browser-nightly.tcz ${EXTDIR}/chromium-browser-nightly.tcz

# dep list
cat > ${EXTDIR}/chromium-browser-nightly.tcz.dep << EOF
atk.tcz
cairo.tcz
pango.tcz
glib2.tcz
fontconfig.tcz
expat2.tcz
libxml2.tcz
graphics-libs-1.tcz
pixman.tcz
Xlibs_support.tcz
gtk2.tcz
ORBit2.tcz
libIDL.tcz
GConf.tcz
dbus.tcz
dbus-glib.tcz
bzip2-lib.tcz
libasound.tcz
sqlite3.tcz
nss-nspr.tcz
shared-mime-info.tcz
hicolor-icon-theme.tcz
EOF
« Last Edit: March 01, 2010, 03:17:29 PM by althalus »

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: Chromium Nightly script
« Reply #1 on: March 01, 2010, 06:59:47 AM »
just put a symlink in root dir of chromium executable plugins/libflashplayer.so to /usr/local/share/flash10/libflashplayer.so

if that does not work try calling it with --enable-plugins

Offline sci_fi

  • Jr. Member
  • **
  • Posts: 86
Re: Chromium Nightly script
« Reply #2 on: March 01, 2010, 12:49:24 PM »
Hi althalus,

Thank you so much for posting this script. I had some difficulties with it as originally listed. My slightly modified version is below (working for me, although probably could be improved). Again, many thanks.

Also to get get flash you must do the following:
create /usr/local/chrome-linux/plugins/libflashplayer.so

libflashplayer.so is a symlink to "wherever you have flash on your system"

Hope this is of some help.

Best regards,

sci_fi

----------------------------------------------------
#!/bin/sh

# Where are extensions?
EXTDIR=/tmp/test
rmdir -r /tmp/test
mkdir /tmp/test
# Where is the extension?
CHROMEXT=/mnt/sda1/tce/optional/chromium-browser.tcz
# Get the latest release version
RELEASE=`wget http://build.chromium.org/buildbot/snapshots/chromium-rel-linux/LATEST -O -`
# Where to put things?
TMPDIR=/"tmp/chromium/${RELEASE}"

# Create the temp dir and get latest pre-compiled version
mkdir ${TMPDIR} -p
wget http://build.chromium.org/buildbot/snapshots/chromium-rel-linux/${RELEASE}/chrome-linux.zip -O ${TMPDIR}/chrome-linux.zip

# Extract archives
unzip ${TMPDIR}/chrome-linux.zip -d ${TMPDIR}

# Set up dirs for new extension
mkdir ${TMPDIR}/ext/usr/local/tce.menu -p
mkdir ${TMPDIR}/ext/usr/local/tce.installed -p
mkdir ${TMPDIR}/ext/usr/local/tce.icons -p
mkdir ${TMPDIR}/ext/usr/local/share/applications -p
mkdir ${TMPDIR}/ext/usr/local/share/pixmaps -p

# Get the icon
wget http://www.chromium.org/_/rsrc/1220198801738/config/app/images/customLogo/customLogo.gif \
-O ${TMPDIR}/ext/usr/local/share/pixmaps/chromium-browser.png

# Set up wbar entry
cat > ${TMPDIR}/ext/usr/local/tce.icons/chromium-browser-nightly << EOF
i: /usr/local/share/pixmaps/chromium-browser.png
t: Chromium
c: /usr/local/chrome-linux/chrome-wrapper
EOF

# Set up JWM menu entry
cat > ${TMPDIR}/ext/usr/local/tce.menu/chromium-browser-nightly << EOF
<JWM>
<Program label="Chromium">/usr/local/chrome-linux/chrome-wrapper</Program>
</JWM>
EOF

# Set up freedesktop entry
cat > ${TMPDIR}/ext/usr/local/share/applications/chromium-browser.desktop << EOF
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Chromium Web Browser
Exec=/usr/local/chrome-linux/chrome-wrapper %U
Terminal=false
Icon=chromium-browser.png
Type=Application
Categories=Application;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;
EOF


# Copy the new binaries
cp -a ${TMPDIR}/chrome-linux ${TMPDIR}/ext/usr/local/chrome-linux

#####JGS addition
sudo chmod  777 ${TMPDIR}/ext/usr/local/chrome-linux/chrome
sudo chmod  777 ${TMPDIR}/ext/usr/local/chrome-linux/chrome-wrapper
#####END JGS addition

###ln -s ${TMPDIR}/chrome-linux/chrome-wrapper /usr/local/bin/chrome-wrapper - Change by jgs
ln -s ${TMPDIR}/chrome-linux/chrome-wrapper /ext/usr/local/bin/chrome-wrapper
# No need to fix up the existing menu entries.
ln -s ${TMPDIR}/chrome-linux/chrome-wrapper /ext/usr/local/bin/chromium-browser




# Make extension and put it into the TCE directory.
mksquashfs ${TMPDIR}/ext ${TMPDIR}/chromium-browser-nightly.tcz
cp ${TMPDIR}/chromium-browser-nightly.tcz ${EXTDIR}/chromium-browser-nightly.tcz

# dep list
cat > ${EXTDIR}/chromium-browser-nightly.tcz.dep << EOF
atk.tcz
cairo.tcz
pango.tcz
glib2.tcz
fontconfig.tcz
expat2.tcz
libxml2.tcz
graphics-libs-1.tcz
pixman.tcz
Xlibs_support.tcz
gtk2.tcz
ORBit2.tcz
libIDL.tcz
GConf.tcz
dbus.tcz
dbus-glib.tcz
bzip2-lib.tcz
libasound.tcz
sqlite3.tcz
nss-nspr.tcz
shared-mime-info.tcz
hicolor-icon-theme.tcz
EOF

Offline althalus

  • Sr. Member
  • ****
  • Posts: 351
Re: Chromium Nightly script
« Reply #3 on: March 01, 2010, 03:23:44 PM »
Updated my original post with a new script.

I swear to god I tried putting a plugins directory in the chrome-linux directory before I posted the script last night, but for whatever reason, it works now, so that's fine. The script now symlinks to the default place for putting flash in TC.

Fixed the chrome-wrapper symlink too - No bin directory was created, so the symlink was failing (plus the symlink was wrong anyway).

Glad it helped you sci_fi. I'm curious - why did you need to chmod the binaries to 777? They have the correct permissions upon extracting from the zip file.

Offline sci_fi

  • Jr. Member
  • **
  • Posts: 86
Re: Chromium Nightly script
« Reply #4 on: March 01, 2010, 05:05:30 PM »
Hi althalus,

In answer to your question. While I was fumbling around, I thought that I found that the binaries were coming out not executable. Seemed like manually changing them fixed things, so I added to the build script. Also, historically, I seem to frequently run into permission problems, so usually when I start changing permissions during my hacking sessions, I just turn everything on. Not needed here, as you point out.

Thanks yet again for the script. Nice to to have up to date Chrome running.

 Now if I could just get the streaming radio files to play. Right now, no matter what I do they download. I have hacked up versions of the vlc mozilla  plug-in in place but can't get chrome to use it.

Best regards,

sci_fi

Offline althalus

  • Sr. Member
  • ****
  • Posts: 351
Re: Chromium Nightly script
« Reply #5 on: March 01, 2010, 08:37:08 PM »
When you get that working, post a little guide or some links for the rest of us, aye.

EDIT:
http://code.google.com/p/chromium/issues/detail?id=37072
Granted, the bug was reported under Mac, not Linux, but it sounds general enough to affect more than just Mac.
« Last Edit: March 01, 2010, 08:44:59 PM by althalus »