0

rlz: Add a binary that prints the machine id

Partners apparently need this for something. There's a Windows
version of this too already, but I couldn't find the source for
that.

BUG=none


Review URL: https://chromiumcodereview.appspot.com/10872005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152880 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
thakis@chromium.org
2012-08-22 23:58:07 +00:00
parent 6962f3bde3
commit d3b7dcd4ed
2 changed files with 23 additions and 3 deletions
rlz

13
rlz/examples/rlz_id.cc Normal file

@ -0,0 +1,13 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "rlz/lib/machine_id.h"
int main() {
std::string machine_id;
if (!rlz_lib::GetMachineId(&machine_id))
return 1;
printf("%s\n", machine_id.c_str());
}

@ -27,7 +27,6 @@
{
'target_name': 'rlz_lib',
'type': 'static_library',
'include_dirs': [],
'dependencies': [
'../base/base.gyp:base',
'../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
@ -99,7 +98,6 @@
{
'target_name': 'rlz_unittests',
'type': 'executable',
'include_dirs': [],
'dependencies': [
':rlz_lib',
'../base/base.gyp:base',
@ -128,6 +126,16 @@
}]
],
},
{
'target_name': 'rlz_id',
'type': 'executable',
'dependencies': [
':rlz_lib',
],
'sources': [
'examples/rlz_id.cc',
],
},
],
'conditions': [
['OS=="win"', {
@ -135,7 +143,6 @@
{
'target_name': 'rlz',
'type': 'shared_library',
'include_dirs': [],
'sources': [
'win/dll/dll_main.cc',
'win/dll/exports.cc',