Пример #1
0
    def testRemoveFilesByPath(self):
        project = XcodeProject(self.obj)
        original = project.__str__()
        build_files = project.add_file("file.m")

        result = project.remove_files_by_path('file.m')

        self.assertTrue(result)
        self.assertEqual(project.__str__(), original)
        #     foundScript = True
        # else:
        #     print("this script doesn't start with companyname:", build_phase.shellScript)
        id += 1

if not foundScript:
    project.add_run_script(script=finalscript)

# adding preprocessor macros for murka

project.add_flags('GCC_PREPROCESSOR_DEFINITIONS', 'MURKA_OF')
project.add_flags('GCC_PREPROCESSOR_DEFINITIONS', 'MURKA_OFFSCREEN')

# removing extra files

project.remove_files_by_path("src/ofApp.cpp")
project.remove_files_by_path("src/ofApp.h")
project.remove_files_by_path("src/main.cpp")

# adding files

group = project.get_or_create_group('hotjuice_source')
project.add_folder(hotjuice_path + "/src", parent=group)

# add additional sources
for filePath in include_files:
    project.add_file(filePath)

# setting bundle id

project.set_flags('PRODUCT_BUNDLE_IDENTIFIER', bundle_id)