Permalink
Browse files

replace util/dump_xml_compiler_result by Cocoa version

  • Loading branch information...
1 parent c021524 commit 0d25a6c9d20d870069efca0656cb4ed6c1b400bd @tekezo committed Apr 5, 2012
@@ -1,11 +1,19 @@
-CXXFLAGS += -I../../src/lib/xml_compiler/include -std=c++11
+#CONFIGURATION = Debug
+CONFIGURATION = Release
-SOURCES=$(wildcard *.cpp)
-OBJECTS=$(patsubst %.cpp,%.o,$(SOURCES))
-
-all: $(OBJECTS)
- $(CXX) $(CXXFLAGS) -o dump_xml_compiler_result $(SOURCES) $(LDFLAGS) \
- ../../src/lib/xml_compiler/build/Release/libxml_compiler.a
+all:
+ $(MAKE) -C ../../pkginfo
+ $(MAKE) -C ../../src/lib/xml_compiler
+ xcodebuild -alltargets -configuration $(CONFIGURATION) build
clean:
- rm -f *.o a.out
+ rm -rf build
+ rm -f Info.plist
+ rm -f *.xcodeproj/*.mode1
+ rm -f *.xcodeproj/*.mode1v3
+ rm -f *.xcodeproj/*.pbxuser
+ rm -rf *.xcodeproj/xcuserdata
+ rm -rf *.xcodeproj/project.xcworkspace/xcuserdata
+
+xcode:
+ open *.xcodeproj
@@ -0,0 +1,287 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 3474BA64152D6A230004AA37 /* libstdc++.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 34BEC97D152D670000CBA5E9 /* libstdc++.dylib */; };
+ 34BEC928152D601300CBA5E9 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34BEC927152D601300CBA5E9 /* Cocoa.framework */; };
+ 34BEC932152D601300CBA5E9 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 34BEC930152D601300CBA5E9 /* InfoPlist.strings */; };
+ 34BEC934152D601300CBA5E9 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 34BEC933152D601300CBA5E9 /* main.m */; };
+ 34BEC938152D601300CBA5E9 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 34BEC936152D601300CBA5E9 /* Credits.rtf */; };
+ 34BEC93B152D601300CBA5E9 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 34BEC93A152D601300CBA5E9 /* AppDelegate.m */; };
+ 34BEC93E152D601300CBA5E9 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34BEC93C152D601300CBA5E9 /* MainMenu.xib */; };
+ 34BEC967152D637500CBA5E9 /* libxml_compiler.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 34BEC966152D637500CBA5E9 /* libxml_compiler.a */; };
+ 34BEC973152D653200CBA5E9 /* app.icns in Resources */ = {isa = PBXBuildFile; fileRef = 34BEC972152D653200CBA5E9 /* app.icns */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 34BEC923152D601300CBA5E9 /* dump_xml_compiler_result.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = dump_xml_compiler_result.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 34BEC927152D601300CBA5E9 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
+ 34BEC92A152D601300CBA5E9 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
+ 34BEC92B152D601300CBA5E9 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
+ 34BEC92C152D601300CBA5E9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 34BEC92F152D601300CBA5E9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+ 34BEC931152D601300CBA5E9 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 34BEC933152D601300CBA5E9 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 34BEC935152D601300CBA5E9 /* dump_xml_compiler_result-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "dump_xml_compiler_result-Prefix.pch"; sourceTree = "<group>"; };
+ 34BEC937152D601300CBA5E9 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = "<group>"; };
+ 34BEC939152D601300CBA5E9 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+ 34BEC93A152D601300CBA5E9 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
+ 34BEC93D152D601300CBA5E9 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
+ 34BEC966152D637500CBA5E9 /* libxml_compiler.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libxml_compiler.a; path = ../../src/lib/xml_compiler/build/Release/libxml_compiler.a; sourceTree = "<group>"; };
+ 34BEC972152D653200CBA5E9 /* app.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = app.icns; path = ../../../src/share/Resources/app.icns; sourceTree = "<group>"; };
+ 34BEC97D152D670000CBA5E9 /* libstdc++.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libstdc++.dylib"; path = "usr/lib/gcc/i686-apple-darwin10/4.0.1/libstdc++.dylib"; sourceTree = SDKROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 34BEC920152D601300CBA5E9 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 3474BA64152D6A230004AA37 /* libstdc++.dylib in Frameworks */,
+ 34BEC967152D637500CBA5E9 /* libxml_compiler.a in Frameworks */,
+ 34BEC928152D601300CBA5E9 /* Cocoa.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 34BEC918152D601300CBA5E9 = {
+ isa = PBXGroup;
+ children = (
+ 34BEC97D152D670000CBA5E9 /* libstdc++.dylib */,
+ 34BEC966152D637500CBA5E9 /* libxml_compiler.a */,
+ 34BEC92D152D601300CBA5E9 /* dump_xml_compiler_result */,
+ 34BEC926152D601300CBA5E9 /* Frameworks */,
+ 34BEC924152D601300CBA5E9 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 34BEC924152D601300CBA5E9 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 34BEC923152D601300CBA5E9 /* dump_xml_compiler_result.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 34BEC926152D601300CBA5E9 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 34BEC927152D601300CBA5E9 /* Cocoa.framework */,
+ 34BEC929152D601300CBA5E9 /* Other Frameworks */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 34BEC929152D601300CBA5E9 /* Other Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 34BEC92A152D601300CBA5E9 /* AppKit.framework */,
+ 34BEC92B152D601300CBA5E9 /* CoreData.framework */,
+ 34BEC92C152D601300CBA5E9 /* Foundation.framework */,
+ );
+ name = "Other Frameworks";
+ sourceTree = "<group>";
+ };
+ 34BEC92D152D601300CBA5E9 /* dump_xml_compiler_result */ = {
+ isa = PBXGroup;
+ children = (
+ 34BEC939152D601300CBA5E9 /* AppDelegate.h */,
+ 34BEC93A152D601300CBA5E9 /* AppDelegate.m */,
+ 34BEC93C152D601300CBA5E9 /* MainMenu.xib */,
+ 34BEC92E152D601300CBA5E9 /* Supporting Files */,
+ );
+ path = dump_xml_compiler_result;
+ sourceTree = "<group>";
+ };
+ 34BEC92E152D601300CBA5E9 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 34BEC972152D653200CBA5E9 /* app.icns */,
+ 34BEC92F152D601300CBA5E9 /* Info.plist */,
+ 34BEC930152D601300CBA5E9 /* InfoPlist.strings */,
+ 34BEC933152D601300CBA5E9 /* main.m */,
+ 34BEC935152D601300CBA5E9 /* dump_xml_compiler_result-Prefix.pch */,
+ 34BEC936152D601300CBA5E9 /* Credits.rtf */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 34BEC922152D601300CBA5E9 /* dump_xml_compiler_result */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 34BEC941152D601300CBA5E9 /* Build configuration list for PBXNativeTarget "dump_xml_compiler_result" */;
+ buildPhases = (
+ 34BEC91F152D601300CBA5E9 /* Sources */,
+ 34BEC920152D601300CBA5E9 /* Frameworks */,
+ 34BEC921152D601300CBA5E9 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = dump_xml_compiler_result;
+ productName = dump_xml_compiler_result;
+ productReference = 34BEC923152D601300CBA5E9 /* dump_xml_compiler_result.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 34BEC91A152D601300CBA5E9 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0430;
+ };
+ buildConfigurationList = 34BEC91D152D601300CBA5E9 /* Build configuration list for PBXProject "dump_xml_compiler_result" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 34BEC918152D601300CBA5E9;
+ productRefGroup = 34BEC924152D601300CBA5E9 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 34BEC922152D601300CBA5E9 /* dump_xml_compiler_result */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 34BEC921152D601300CBA5E9 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 34BEC932152D601300CBA5E9 /* InfoPlist.strings in Resources */,
+ 34BEC938152D601300CBA5E9 /* Credits.rtf in Resources */,
+ 34BEC93E152D601300CBA5E9 /* MainMenu.xib in Resources */,
+ 34BEC973152D653200CBA5E9 /* app.icns in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 34BEC91F152D601300CBA5E9 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 34BEC934152D601300CBA5E9 /* main.m in Sources */,
+ 34BEC93B152D601300CBA5E9 /* AppDelegate.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 34BEC930152D601300CBA5E9 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 34BEC931152D601300CBA5E9 /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ 34BEC936152D601300CBA5E9 /* Credits.rtf */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 34BEC937152D601300CBA5E9 /* en */,
+ );
+ name = Credits.rtf;
+ sourceTree = "<group>";
+ };
+ 34BEC93C152D601300CBA5E9 /* MainMenu.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 34BEC93D152D601300CBA5E9 /* en */,
+ );
+ name = MainMenu.xib;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 34BEC940152D601300CBA5E9 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ CLANG_ENABLE_OBJC_ARC = NO;
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_ENABLE_OBJC_GC = unsupported;
+ GCC_TREAT_WARNINGS_AS_ERRORS = YES;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_CHECK_SWITCH_STATEMENTS = YES;
+ GCC_WARN_MISSING_PARENTHESES = YES;
+ GCC_WARN_SHADOW = YES;
+ GCC_WARN_SIGN_COMPARE = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_LABEL = YES;
+ GCC_WARN_UNUSED_VALUE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = ../../src/lib/xml_compiler/include;
+ MACOSX_DEPLOYMENT_TARGET = 10.6;
+ RUN_CLANG_STATIC_ANALYZER = YES;
+ SDKROOT = macosx10.6;
+ };
+ name = Release;
+ };
+ 34BEC943152D601300CBA5E9 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "dump_xml_compiler_result/dump_xml_compiler_result-Prefix.pch";
+ INFOPLIST_FILE = dump_xml_compiler_result/Info.plist;
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/../../src/lib/xml_compiler/build/Release\"",
+ "\"$(SDKROOT)/usr/lib/gcc/i686-apple-darwin10/4.0.1\"",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 34BEC91D152D601300CBA5E9 /* Build configuration list for PBXProject "dump_xml_compiler_result" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 34BEC940152D601300CBA5E9 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 34BEC941152D601300CBA5E9 /* Build configuration list for PBXNativeTarget "dump_xml_compiler_result" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 34BEC943152D601300CBA5E9 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 34BEC91A152D601300CBA5E9 /* Project object */;
+}
Oops, something went wrong.
@@ -1,25 +0,0 @@
-#include "pqrs/xml_compiler_bindings_clang.h"
-#include "pqrs/xml_compiler.hpp"
-#include "pqrs/bridge.h"
-
-int
-main(void)
-{
- pqrs::xml_compiler xml_compiler("/Library/org.pqrs/KeyRemap4MacBook/app/KeyRemap4MacBook.app/Contents/Resources",
- "/Users/tekezo/Library/Application Support/KeyRemap4MacBook");
- xml_compiler.reload();
-
- if (xml_compiler.get_error_count()) {
- std::cerr << "----------------------------------------" << std::endl;
- std::cerr << xml_compiler.get_error_message() << std::endl;
- std::cerr << "----------------------------------------" << std::endl;
- return 1;
- }
-
- auto remapclasses_initialize_vector = xml_compiler.get_remapclasses_initialize_vector();
- for (auto d : remapclasses_initialize_vector.get()) {
- std::cout << d << std::endl;
- }
-
- return 0;
-}

0 comments on commit 0d25a6c

Please sign in to comment.