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:
13
rlz/examples/rlz_id.cc
Normal file
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());
|
||||
}
|
13
rlz/rlz.gyp
13
rlz/rlz.gyp
@ -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',
|
||||
|
Reference in New Issue
Block a user