summaryrefslogtreecommitdiff
path: root/ios
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2012-03-19 18:56:50 +0200
committerTor Lillqvist <tml@iki.fi>2012-03-21 00:00:07 +0200
commit29eed849a361d096052d69c4aa0f2a4f20e4f6a8 (patch)
treee9b9000ac3d38eb8777422aed53651a1ac1dc68a /ios
parent128749140ffc6165f0bbbf34da3b5461c541b32f (diff)
Further hacks: include rdb and component files in .app, pass more -env params
Diffstat (limited to 'ios')
-rw-r--r--ios/qa/sc/Makefile15
-rw-r--r--ios/qa/sc/filters-test.m125
2 files changed, 107 insertions, 33 deletions
diff --git a/ios/qa/sc/Makefile b/ios/qa/sc/Makefile
index 28b1fdec1b84..e8f1901a3bec 100644
--- a/ios/qa/sc/Makefile
+++ b/ios/qa/sc/Makefile
@@ -36,7 +36,8 @@ all: $(APPDIR)/$(APP) stuff
$(APPDIR)/$(APP): $(SRCS)
mkdir -p $(APPDIR)
- $(CXX) -o $@ $(CFLAGS) $(gb_OBJCXXFLAGS) $(SRCS) $(LIBS)
+ $(CXX) -Wl,-map,$(APP).map.mangled -o $@ $(CFLAGS) $(gb_OBJCXXFLAGS) $(SRCS) $(LIBS)
+ c++filt <$(APP).map.mangled >$(APP).map && rm $(APP).map.mangled
stuff:
# inifile:
@@ -48,6 +49,16 @@ stuff:
echo 'BRAND_BASE_DIR=$${ORIGIN}'; \
) >$(APPDIR)/fundamentalrc
#
+# .rdb files
+ cp $(OUTDIR)/bin/udkapi.rdb $(OUTDIR)/bin/types.rdb $(OUTDIR)/xml/ure/services.rdb $(APPDIR)
+#
+# a bunch of .component files
+ for F in framework/util/fwk i18npool/util/i18npool sfx2/util/sfx ucb/source/core/ucb1 ucb/source/ucp/file/ucpfile1 unoxml/source/service/unoxml configmgr/source/configmgr basic/util/sb chart2/source/controller/chartcontroller chart2/source/tools/charttools chart2/source/model/chartmodel comphelper/util/comphelp eventattacher/source/evtatt fileaccess/source/fileacc filter/source/config/cache/filterconfig1 oox/util/oox package/source/xstor/xstor package/util/package2 sax/source/expatwrap/expwrap sax/source/fastparser/fastsax sc/util/sc sc/util/scfilt scaddins/source/analysis/analysis scaddins/source/datefunc/date sot/util/sot svl/util/svl toolkit/util/tk ucb/source/ucp/tdoc/ucptdoc1 unotools/util/utl unoxml/source/rdf/unordf; do \
+ mkdir -p $(APPDIR)/ComponentTarget/`dirname $$F`; \
+ cp $(WORKDIR)/ComponentTarget/$$F.component $(APPDIR)/ComponentTarget/$$F.component; \
+ done
+
+#
# .res files
#
# $BRAND_BASE_DIR/program/resource hardcoded in
@@ -55,7 +66,7 @@ stuff:
# that.
mkdir -p $(APPDIR)/program/resource
for F in $(OUTDIR)/bin/*.res; do \
- cp $$F $(APPDIR)/res; \
+ cp $$F $(APPDIR)/program/resource; \
done
clean:
diff --git a/ios/qa/sc/filters-test.m b/ios/qa/sc/filters-test.m
index 8805ed385f19..c6650eaf3c38 100644
--- a/ios/qa/sc/filters-test.m
+++ b/ios/qa/sc/filters-test.m
@@ -61,37 +61,100 @@ main(int argc, char ** argv)
- (BOOL)application: (UIApplication *) application
didFinishLaunchingWithOptions: (NSDictionary *) launchOptions
{
- (void) application;
- (void) launchOptions;
-
- UIWindow *uiw = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
- uiw.backgroundColor = [UIColor redColor];
- self.window = uiw;
- [uiw release];
-
- // See unotest/source/cpp/bootstrapfixturebase.cxx
- const char *app_root = [[[NSBundle mainBundle] bundlePath] UTF8String];
- setenv("SRC_ROOT", app_root, 1);
- setenv("OUTDIR_FOR_BUILD", app_root, 1);
-
- setenv("SAL_LOG", "yes", 1);
-
- CppUnitTestPlugIn *iface = cppunitTestPlugIn();
- iface->initialize(&CppUnit::TestFactoryRegistry::getRegistry(), CppUnit::PlugInParameters());
-
- const char *argv[] = {
- "lo-qa-sc-filters-test",
- "dummy-testlib",
- "--headless",
- "--protector",
- "dummy-libunoexceptionprotector",
- "dummy-unoexceptionprotector"
- };
-
- lo_main(sizeof(argv)/sizeof(*argv), argv);
-
- [self.window makeKeyAndVisible];
- return YES;
+ int i;
+
+ (void) application;
+ (void) launchOptions;
+
+ UIWindow *uiw = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+ uiw.backgroundColor = [UIColor redColor];
+ self.window = uiw;
+ [uiw release];
+
+ // See unotest/source/cpp/bootstrapfixturebase.cxx
+ const char *app_root = [[[NSBundle mainBundle] bundlePath] UTF8String];
+ setenv("SRC_ROOT", app_root, 1);
+ setenv("OUTDIR_FOR_BUILD", app_root, 1);
+
+ setenv("SAL_LOG", "yes", 1);
+
+ CppUnitTestPlugIn *iface = cppunitTestPlugIn();
+ iface->initialize(&CppUnit::TestFactoryRegistry::getRegistry(), CppUnit::PlugInParameters());
+
+ const char *argv[] = {
+ "lo-qa-sc-filters-test",
+ "dummy-testlib",
+ "--headless",
+ "--protector",
+ "dummy-libunoexceptionprotector",
+ "dummy-unoexceptionprotector",
+ "placeholder-uno-types",
+ "placeholder-uno-services"
+ };
+
+ NSString *app_root_escaped = [[[NSBundle mainBundle] bundlePath] stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
+
+ NSString *uno_types = @"-env:UNO_TYPES=";
+
+ uno_types = [uno_types stringByAppendingString: @"file://"];
+ uno_types = [uno_types stringByAppendingString: [app_root_escaped stringByAppendingPathComponent: @"udkapi.rdb"]];
+
+ uno_types = [uno_types stringByAppendingString: @" "];
+
+ uno_types = [uno_types stringByAppendingString: @"file://"];
+ uno_types = [uno_types stringByAppendingString: [app_root_escaped stringByAppendingPathComponent: @"types.rdb"]];
+
+ argv[6] = [uno_types UTF8String];
+
+ NSString *uno_services = @"-env:UNO_SERVICES=";
+
+ const char *services[] = {
+ "services.rdb",
+ "ComponentTarget/basic/util/sb.component",
+ "ComponentTarget/chart2/source/controller/chartcontroller.component",
+ "ComponentTarget/chart2/source/tools/charttools.component",
+ "ComponentTarget/chart2/source/model/chartmodel.component",
+ "ComponentTarget/comphelper/util/comphelp.component",
+ "ComponentTarget/eventattacher/source/evtatt.component",
+ "ComponentTarget/fileaccess/source/fileacc.component",
+ "ComponentTarget/filter/source/config/cache/filterconfig1.component",
+ "ComponentTarget/oox/util/oox.component",
+ "ComponentTarget/package/source/xstor/xstor.component",
+ "ComponentTarget/package/util/package2.component",
+ "ComponentTarget/sax/source/expatwrap/expwrap.component",
+ "ComponentTarget/sax/source/fastparser/fastsax.component",
+ "ComponentTarget/sc/util/sc.component",
+ "ComponentTarget/sc/util/scfilt.component",
+ "ComponentTarget/scaddins/source/analysis/analysis.component",
+ "ComponentTarget/scaddins/source/datefunc/date.component",
+ "ComponentTarget/sot/util/sot.component",
+ "ComponentTarget/svl/util/svl.component",
+ "ComponentTarget/toolkit/util/tk.component",
+ "ComponentTarget/ucb/source/ucp/tdoc/ucptdoc1.component",
+ "ComponentTarget/unotools/util/utl.component",
+ "ComponentTarget/unoxml/source/rdf/unordf.component",
+ "ComponentTarget/framework/util/fwk.component",
+ "ComponentTarget/i18npool/util/i18npool.component",
+ "ComponentTarget/sfx2/util/sfx.component",
+ "ComponentTarget/unoxml/source/service/unoxml.component",
+ "ComponentTarget/configmgr/source/configmgr.component",
+ "ComponentTarget/ucb/source/core/ucb1.component",
+ "ComponentTarget/ucb/source/ucp/file/ucpfile1.component"
+ };
+
+ for (i = 0; i < sizeof(services)/sizeof(services[0]); i++) {
+ uno_services = [uno_services stringByAppendingString: @"file://"];
+ uno_services = [uno_services stringByAppendingString: [app_root_escaped stringByAppendingPathComponent: [NSString stringWithUTF8String: services[i]]]];
+ if (i < sizeof(services)/sizeof(services[0]) - 1)
+ uno_services = [uno_services stringByAppendingString: @" "];
+ }
+
+ argv[7] = [uno_services UTF8String];
+
+ lo_main(sizeof(argv)/sizeof(*argv), argv);
+
+ [self.window makeKeyAndVisible];
+ return YES;
}
@end