From 2c5ff2b62a3b426d23e41081d7ae1a3b1f3a5268 Mon Sep 17 00:00:00 2001 From: sgschantz Date: Mon, 1 Nov 2021 12:01:11 +0700 Subject: [PATCH 01/38] renamed method that gets package name from inf file --- .../KMConfiguration/KMConfigurationWindowController.m | 2 +- mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.h | 2 +- mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/KMConfigurationWindowController.m b/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/KMConfigurationWindowController.m index 858ece8cf6..e442142fd9 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/KMConfigurationWindowController.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/KMConfigurationWindowController.m @@ -170,7 +170,7 @@ } - (NSString *)packageNameFromFolder:(NSString *)packageFolder { - return [self.AppDelegate packageNameFromFolder:packageFolder]; + return [self.AppDelegate packageNameFromInfFile:packageFolder]; } - (NSString *)keyboardsPath { diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.h b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.h index 8821532263..1277c1c9c5 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.h +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.h @@ -118,7 +118,7 @@ typedef struct { - (NSString *)packagePathAtIndex:(NSUInteger)index; - (NSInteger)indexForPackageFolder:(NSString *)packageFolder; - (NSString *)packageFolderFromPath:(NSString *)path; -- (NSString *)packageNameFromFolder:(NSString *)packageFolder; +- (NSString *)packageNameFromInfFile:(NSString *)packageFolder; - (NSArray *)keyboardNamesFromFolder:(NSString *)packageFolder; - (NSDictionary *)infoDictionaryFromFile:(NSString *)infoFile; - (NSString *)kvkFilePathFromFilename:(NSString *)kvkFilename; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m index c01f2286c7..55ac9021c6 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m @@ -602,7 +602,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef return packageFolder; } -- (NSString *)packageNameFromFolder:(NSString *)packageFolder { +- (NSString *)packageNameFromInfFile:(NSString *)packageFolder { NSString *packageName = nil; NSString *path = [[self keyboardsPath] stringByAppendingPathComponent:packageFolder]; NSString *fileContents = [NSString stringWithContentsOfFile:[path stringByAppendingPathComponent:@"kmp.inf"] encoding:NSWindowsCP1252StringEncoding error:NULL]; From 96c78752b5847dd330736a6292d43c043dd3681f Mon Sep 17 00:00:00 2001 From: sgschantz Date: Thu, 25 Nov 2021 17:09:01 +0700 Subject: [PATCH 02/38] load Keyman Package information from kmp.json file and store in new PackageInfo object rather than in existing Dictionary hierarchy --- mac/Keyman4Mac/Keyman4Mac/AppDelegate.m | 4 +- .../Keyman4MacIM.xcodeproj/project.pbxproj | 12 + .../KMConfigurationWindowController.m | 6 +- .../KMInfoWindow/KMInfoWindowController.m | 72 ++-- .../Keyman4MacIM/KMInputController.m | 2 +- .../Keyman4MacIM/KMInputMethodAppDelegate.h | 3 +- .../Keyman4MacIM/KMInputMethodAppDelegate.m | 310 +++++++++++++++++- .../KMKeyboardHelpWindowController.m | 41 ++- .../Keyman4MacIM/KMKeyboardInfo.h | 36 ++ .../Keyman4MacIM/KMKeyboardInfo.m | 45 +++ mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h | 39 +++ mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m | 42 +++ .../KeymanEngine4Mac/KME/KMXFile.h | 2 +- .../KeymanEngine4Mac/KME/KMXFile.m | 12 +- 14 files changed, 582 insertions(+), 44 deletions(-) create mode 100644 mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.h create mode 100644 mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.m create mode 100644 mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h create mode 100644 mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m diff --git a/mac/Keyman4Mac/Keyman4Mac/AppDelegate.m b/mac/Keyman4Mac/Keyman4Mac/AppDelegate.m index e360ac8e54..e8c9506f52 100644 --- a/mac/Keyman4Mac/Keyman4Mac/AppDelegate.m +++ b/mac/Keyman4Mac/Keyman4Mac/AppDelegate.m @@ -283,7 +283,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef } NSString *packagePath = [kmxPath stringByDeletingLastPathComponent]; - NSDictionary *infoDict = [KMXFile infoDictionaryFromFilePath:kmxPath]; + NSDictionary *infoDict = [KMXFile keyboardInfoFromKmxFile:kmxPath]; NSString *kvkFilename = [infoDict objectForKey:kKMVisualKeyboardKey]; if (kvkFilename && [kvkFilename length]) { NSString *kvkPath = [packagePath stringByAppendingPathComponent:kvkFilename]; @@ -328,7 +328,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef self.kmxList = [NSMutableArray arrayWithArray:[self KMXFiles]]; NSMutableArray *kmxDesc = [[NSMutableArray alloc] initWithCapacity:0]; for (NSString *path in self.kmxList) { - NSDictionary *infoDict = [KMXFile infoDictionaryFromFilePath:path]; + NSDictionary *infoDict = [KMXFile keyboardInfoFromKmxFile:path]; if (!infoDict) continue; diff --git a/mac/Keyman4MacIM/Keyman4MacIM.xcodeproj/project.pbxproj b/mac/Keyman4MacIM/Keyman4MacIM.xcodeproj/project.pbxproj index bbeb9f75df..54b7bc293f 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM.xcodeproj/project.pbxproj +++ b/mac/Keyman4MacIM/Keyman4MacIM.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 290BC680274B9DB1005CD1C3 /* KMPackageInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 290BC67F274B9DB1005CD1C3 /* KMPackageInfo.m */; }; + 290BC75E274F3FD7005CD1C3 /* KMKeyboardInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 290BC75D274F3FD7005CD1C3 /* KMKeyboardInfo.m */; }; 37A245C12565DFA6000BBF92 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 37A245C02565DFA6000BBF92 /* Assets.xcassets */; }; 37AE5C9D239A7B770086CC7C /* qrcode.min.js in Resources */ = {isa = PBXBuildFile; fileRef = 37AE5C9C239A7B770086CC7C /* qrcode.min.js */; }; 37C2B0CB25FF2C350092E16A /* Help in Resources */ = {isa = PBXBuildFile; fileRef = 37C2B0CA25FF2C340092E16A /* Help */; }; @@ -125,6 +127,10 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 290BC67E274B9DB1005CD1C3 /* KMPackageInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KMPackageInfo.h; sourceTree = ""; }; + 290BC67F274B9DB1005CD1C3 /* KMPackageInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KMPackageInfo.m; sourceTree = ""; }; + 290BC75C274F3FD7005CD1C3 /* KMKeyboardInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KMKeyboardInfo.h; sourceTree = ""; }; + 290BC75D274F3FD7005CD1C3 /* KMKeyboardInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KMKeyboardInfo.m; sourceTree = ""; }; 370E44542564E1EE00642929 /* Sentry.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Sentry.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 37589AD422E52DA20097D39D /* Keyman.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Keyman.entitlements; sourceTree = ""; }; 37A00ED4239AA25700D2C837 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; @@ -433,6 +439,10 @@ E240F598202DED740000067D /* KMPackage.m */, 9A3D6C5B221531B0008785A3 /* KMOSVersion.h */, 9A3D6C5C221531B0008785A3 /* KMOSVersion.m */, + 290BC67E274B9DB1005CD1C3 /* KMPackageInfo.h */, + 290BC75C274F3FD7005CD1C3 /* KMKeyboardInfo.h */, + 290BC75D274F3FD7005CD1C3 /* KMKeyboardInfo.m */, + 290BC67F274B9DB1005CD1C3 /* KMPackageInfo.m */, ); path = Keyman4MacIM; sourceTree = ""; @@ -801,6 +811,7 @@ 98F3C8931A8D739500F675E3 /* KMConfigurationWindowController.m in Sources */, 9A3D6C5D221531B0008785A3 /* KMOSVersion.m in Sources */, 989C9C111A7876DE00A20425 /* main.m in Sources */, + 290BC680274B9DB1005CD1C3 /* KMPackageInfo.m in Sources */, 98BF924F1BF02DC20002126A /* KMBarView.m in Sources */, E240F599202DED740000067D /* KMPackage.m in Sources */, 984B8F441AF1C3D900E096A8 /* OSKWindowController.m in Sources */, @@ -820,6 +831,7 @@ 98FE105E1B4DE8F400525F54 /* NSWindow+SuppMethods.m in Sources */, 9836B3741AE5F11D00780482 /* ZipArchive.mm in Sources */, 983247B21A9EB9690010B90C /* KMConfigColumn3CellView.m in Sources */, + 290BC75E274F3FD7005CD1C3 /* KMKeyboardInfo.m in Sources */, 98BF92521BF03D4D0002126A /* KMAboutBGView.m in Sources */, 98BF92571BF0431F0002126A /* KMAboutWindow.m in Sources */, 98BCD1F61B4E5998004E1AFD /* NSString+SuppMethods.m in Sources */, diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/KMConfigurationWindowController.m b/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/KMConfigurationWindowController.m index e442142fd9..8d6e88bc20 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/KMConfigurationWindowController.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/KMConfigurationWindowController.m @@ -136,14 +136,14 @@ NSString *packageName = [self packageNameFromFolder:packageFolder]; [_tableContents addObject:[NSDictionary dictionaryWithObjectsAndKeys:packageName, @"HeaderTitle", nil]]; for (NSString *path in pArray) { - NSDictionary *info = [KMXFile infoDictionaryFromFilePath:path]; + NSDictionary *info = [KMXFile keyboardInfoFromKmxFile:path]; if (info) [_tableContents addObject:info]; } } else { NSString *path = (NSString *)obj; - NSDictionary *info = [KMXFile infoDictionaryFromFilePath:path]; + NSDictionary *info = [KMXFile keyboardInfoFromKmxFile:path]; if (info) [_tableContents addObject:info]; } @@ -171,6 +171,8 @@ - (NSString *)packageNameFromFolder:(NSString *)packageFolder { return [self.AppDelegate packageNameFromInfFile:packageFolder]; + // TODO: call below but handle non-existent JSON file case + //return [self.AppDelegate packageNameFromJsonFile:packageFolder]; } - (NSString *)keyboardsPath { diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m index 7667d12801..2cac813a47 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m @@ -8,6 +8,7 @@ #import "KMInfoWindowController.h" #import "KMInputMethodAppDelegate.h" +#import "KMPackageInfo.h" #import @interface KMInfoWindowController () @@ -15,7 +16,7 @@ @property (nonatomic, weak) IBOutlet NSTabView *tabView; @property (nonatomic, weak) IBOutlet WebView *detailsView; @property (nonatomic, weak) IBOutlet WebView *readmeView; -@property (nonatomic, strong) NSDictionary *infoDict; +@property (nonatomic, strong) NSDictionary *keyboardInfo; @property (nonatomic, strong) NSTabViewItem *readMeTab; @end @@ -37,10 +38,10 @@ - (void)setPackagePath:(NSString *)packagePath { _packagePath = packagePath; - _infoDict = nil; + _keyboardInfo = nil; [self.tabView selectTabViewItemAtIndex:0]; if (packagePath != nil && packagePath.length) { - NSString *imgName = [self.infoDict objectForKey:kGraphicFile]; + NSString *imgName = [self.keyboardInfo objectForKey:kGraphicFile]; if (imgName != nil) { NSString *imgFile = [packagePath stringByAppendingPathComponent:imgName]; NSImage *img = [[NSImage alloc] initWithContentsOfFile:imgFile]; @@ -56,7 +57,7 @@ else [self.detailsView.mainFrame loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]]]; - NSString *readMeFile = [self.infoDict objectForKey:kReadMeFile]; + NSString *readMeFile = [self.keyboardInfo objectForKey:kReadMeFile]; if (readMeFile != nil) { [self.readmeView.mainFrame loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[packagePath stringByAppendingPathComponent:readMeFile]]]]; if (_readMeTab != nil && ![self.tabView.tabViewItems containsObject:_readMeTab]) { @@ -131,7 +132,7 @@ else { // This was the old logic (prior to fixing issue #994). Keeping as fallback, though // it's unlikely to be useful/needed. - kbs = [self.infoDict objectForKey:kKeyboard]; + kbs = [self.keyboardInfo objectForKey:kKeyboard]; if (kbs != nil && kbs.count) { for (NSArray *kb in kbs) { @@ -143,7 +144,7 @@ } } - NSArray *fonts = [self.infoDict objectForKey:kFont]; + NSArray *fonts = [self.keyboardInfo objectForKey:kFont]; NSMutableString *fontsStr = [NSMutableString stringWithString:@""]; if (fonts != nil && fonts.count) { for (NSArray *font in fonts) { @@ -159,16 +160,16 @@ KeymanVersionInfo keymanVersionInfo = [[self AppDelegate] versionInfo]; NSString *shareUrl = [NSString stringWithFormat:@"https://%@/go/keyboard/%@/share", keymanVersionInfo.keymanCom, packageId]; - NSString *name = [[self.infoDict objectForKey:kName] objectAtIndex:0]; + NSString *name = [[self.keyboardInfo objectForKey:kName] objectAtIndex:0]; if (name == nil) name = @"Unknown Keyboard Package"; - NSString *version = [[self.infoDict objectForKey:kVersion] objectAtIndex:0]; + NSString *version = [[self.keyboardInfo objectForKey:kVersion] objectAtIndex:0]; if (version == nil) version = @""; - NSString *authorV1 = [[self.infoDict objectForKey:kAuthor] objectAtIndex:0]; - NSString *authorV2 = [[self.infoDict objectForKey:kAuthor] objectAtIndex:1]; + NSString *authorV1 = [[self.keyboardInfo objectForKey:kAuthor] objectAtIndex:0]; + NSString *authorV2 = [[self.keyboardInfo objectForKey:kAuthor] objectAtIndex:1]; NSString *author = @""; if (authorV1.length && authorV2.length) author = [NSString stringWithFormat:linkFormat, authorV2, authorV1]; @@ -177,8 +178,8 @@ else if (authorV2.length) author = [NSString stringWithFormat:linkFormat, authorV2, authorV2]; - NSString *websiteV1 = [[self.infoDict objectForKey:kWebSite] objectAtIndex:0]; - NSString *websiteV2 = [[self.infoDict objectForKey:kWebSite] objectAtIndex:1]; + NSString *websiteV1 = [[self.keyboardInfo objectForKey:kWebSite] objectAtIndex:0]; + NSString *websiteV2 = [[self.keyboardInfo objectForKey:kWebSite] objectAtIndex:1]; NSString *website = @""; if (websiteV1.length && websiteV2.length) website = [NSString stringWithFormat:linkFormat, websiteV2, websiteV1]; @@ -187,8 +188,8 @@ else if (websiteV2.length) website = [NSString stringWithFormat:linkFormat, websiteV2, websiteV2]; - NSString *copyrightV1 = [[self.infoDict objectForKey:kCopyright] objectAtIndex:0]; - NSString *copyrightV2 = [[self.infoDict objectForKey:kCopyright] objectAtIndex:1]; + NSString *copyrightV1 = [[self.keyboardInfo objectForKey:kCopyright] objectAtIndex:0]; + NSString *copyrightV2 = [[self.keyboardInfo objectForKey:kCopyright] objectAtIndex:1]; NSString *copyright = @""; if (copyrightV1.length && copyrightV2.length) copyright = [NSString stringWithFormat:linkFormat, copyrightV2, copyrightV1]; @@ -208,13 +209,44 @@ } } -- (NSDictionary *)infoDict { - if (_infoDict == nil) { - NSString *infoFile = [self.packagePath stringByAppendingPathComponent:@"kmp.inf"]; - _infoDict = [self.AppDelegate infoDictionaryFromFile:infoFile]; +- (NSDictionary *)keyboardInfo { + if(_keyboardInfo == nil) { + KMPackageInfo *packageInfo = [self.AppDelegate loadPackageInfo:self.packagePath]; + NSLog(@"SGS2021 packageInfo.packageName = %@", packageInfo.packageName); + NSLog(@"SGS2021 packageInfo.packageVersion = %@", packageInfo.packageVersion); + NSLog(@"SGS2021 packageInfo.authorName = %@", packageInfo.authorName); + NSLog(@"SGS2021 packageInfo.authorUrl = %@", packageInfo.authorUrl); + NSLog(@"SGS2021 packageInfo.copyright = %@", packageInfo.copyright); + NSLog(@"SGS2021 packageInfo.readMe = %@", packageInfo.readMe); + + NSMutableDictionary *infoDict = [NSMutableDictionary dictionaryWithCapacity:0]; + [infoDict setObject:@[packageInfo.packageName, @""] forKey:@"Name"]; + [infoDict setObject:packageInfo.readMe forKey:@"ReadMeFile"]; + + _keyboardInfo = infoDict; +// _keyboardInfo = [self.AppDelegate loadPackageInfo:self.packagePath]; + } - - return _infoDict; + /* + if (_keyboardInfo == nil) { + NSString *jsonFilename = [self.packagePath stringByAppendingPathComponent:@"kmp.json"]; + NSLog(@"SGS2021 KMInfoWindowController loading keyboard info from json file: %@", jsonFilename); + _keyboardInfo = [self.AppDelegate loadPackageInfoFromJsonFile:jsonFilename]; + + if (_keyboardInfo != nil) { + NSDictionary *info = _keyboardInfo[@"info"]; + NSDictionary *nameMap = info[@"name"]; + NSLog(@"SGS2021 keyboardInfo initialized, package name = %@", nameMap[@"description"]); + } else + { + NSString *infoFile = [self.packagePath stringByAppendingPathComponent:@"kmp.inf"]; + NSLog(@"SGS2021 KMInfoWindowController loading keyboard info from %@", infoFile); + _keyboardInfo = [self.AppDelegate keyboardInfoFromInfFile:infoFile]; + } + } + */ + + return _keyboardInfo; } - (void)webView:(WebView *)webView decidePolicyForNavigationAction:(NSDictionary *)actionInformation request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id)listener { diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInputController.m b/mac/Keyman4MacIM/Keyman4MacIM/KMInputController.m index 88b529e5a4..1607e915e0 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMInputController.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInputController.m @@ -224,7 +224,7 @@ NSMutableArray *servers; KMXFile *kmx = [[KMXFile alloc] initWithFilePath:path]; [self.AppDelegate setKmx:kmx]; KVKFile *kvk = nil; - NSDictionary *kmxInfo = [KMXFile infoDictionaryFromFilePath:path]; + NSDictionary *kmxInfo = [KMXFile keyboardInfoFromKmxFile:path]; NSString *kvkFilename = [kmxInfo objectForKey:kKMVisualKeyboardKey]; if (kvkFilename != nil) { NSString *kvkFilePath = [self.AppDelegate kvkFilePathFromFilename:kvkFilename]; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.h b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.h index 1277c1c9c5..a88eb988bc 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.h +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.h @@ -118,9 +118,10 @@ typedef struct { - (NSString *)packagePathAtIndex:(NSUInteger)index; - (NSInteger)indexForPackageFolder:(NSString *)packageFolder; - (NSString *)packageFolderFromPath:(NSString *)path; +- (NSDictionary *)loadPackageInfo:(NSString *)path; - (NSString *)packageNameFromInfFile:(NSString *)packageFolder; +- (NSString *)packageNameFromJsonFile:(NSString *)packageFolder; - (NSArray *)keyboardNamesFromFolder:(NSString *)packageFolder; -- (NSDictionary *)infoDictionaryFromFile:(NSString *)infoFile; - (NSString *)kvkFilePathFromFilename:(NSString *)kvkFilename; - (NSString *)oskWindowTitle; - (void)postKeyboardEventWithSource: (CGEventSourceRef)source code:(CGKeyCode) virtualKey postCallback:(PostEventCallback)postEvent; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m index 55ac9021c6..83b904b6e6 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m @@ -19,6 +19,8 @@ #import "KMConfigurationWindowController.h" #import "KMDownloadKBWindowController.h" #import "ZipArchive.h" +#import "KMPackageInfo.h" +#import "KMKeyboardInfo.h" @import Sentry; /** NSUserDefaults keys */ @@ -464,6 +466,8 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef return [userData boolForKey:kKMUseVerboseLogging]; } +#pragma mark - Keyman Data + /** * Locate and create the Keyman data path; currently in ~/Documents/Keyman-Keyboards */ @@ -602,7 +606,61 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef return packageFolder; } +/* + attempt to load Keyman Package Information from kmp.json + if kmp.json file is not found or not readable, load from legacy kmp.inf file +*/ + +- (KMPackageInfo *)loadPackageInfo:(NSString *)path { + KMPackageInfo *packageInfo = nil; + NSString *jsonFilename = [path stringByAppendingPathComponent:@"kmp.json"]; + NSLog(@"SGS2021 KXMInputMethodAppDelegate loading keyboard info from json file: %@", jsonFilename); + + packageInfo = [self loadPackageInfoFromJsonFile:jsonFilename]; + + // TODO: remove test + packageInfo = nil; + + if (packageInfo != nil) { + /* + NSDictionary *info = packageInfo[@"info"]; + NSDictionary *nameMap = info[@"name"]; + */ + NSLog(@"SGS2021 keyboardInfo initialized, package name = %@", packageInfo.packageName); + } else + { + NSString *infoFile = [path stringByAppendingPathComponent:@"kmp.inf"]; + NSLog(@"SGS2021 KXMInputMethodAppDelegate loading keyboard info from inf file %@", infoFile); + + packageInfo = [self loadPackageInfoFromInfFile:infoFile]; + //packageInfo = [self keyboardInfoFromInfFile:infoFile]; + } + + return packageInfo; +} + + +// TODO: SGS, create JSON version +- (NSString *)packageNameFromJsonFile:(NSString *)packageFolder { + NSLog(@"SGS2021 load packageNameFromJsonFile"); + NSString *packageName = nil; + NSString *path = [[self keyboardsPath] stringByAppendingPathComponent:packageFolder]; + NSString *jsonFilename = [path stringByAppendingPathComponent:@"kmp.json"]; + NSDictionary *kbInfo = [self loadPackageInfoFromJsonFile:jsonFilename]; + + NSDictionary *info = kbInfo[@"info"]; + NSDictionary *nameMap = info[@"name"]; + packageName = nameMap[@"description"]; + + NSLog(@"SGS2021 package name = %@", packageName); + + if (packageName == nil) + packageName = packageFolder; + + return packageName; +} - (NSString *)packageNameFromInfFile:(NSString *)packageFolder { + NSLog(@"SGS2021 load packageNameFromInfFile"); NSString *packageName = nil; NSString *path = [[self keyboardsPath] stringByAppendingPathComponent:packageFolder]; NSString *fileContents = [NSString stringWithContentsOfFile:[path stringByAppendingPathComponent:@"kmp.inf"] encoding:NSWindowsCP1252StringEncoding error:NULL]; @@ -621,6 +679,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef } } + NSLog(@"SGS2021 package name = %@", packageName); if (packageName == nil) packageName = packageFolder; @@ -630,7 +689,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef - (NSArray *)keyboardNamesFromFolder:(NSString *)packageFolder { NSMutableArray *kbNames = [[NSMutableArray alloc] initWithCapacity:0];; for (NSString *kmxFile in [self KMXFilesAtPath:packageFolder]) { - NSDictionary * infoDict = [KMXFile infoDictionaryFromFilePath:kmxFile]; + NSDictionary * infoDict = [KMXFile keyboardInfoFromKmxFile:kmxFile]; if (infoDict != nil) { NSString *name = [infoDict objectForKey:kKMKeyboardNameKey]; if (name != nil && [name length]) { @@ -643,7 +702,245 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef return kbNames; } -- (NSDictionary *)infoDictionaryFromFile:(NSString *)infoFile { +// returns nil if the file does not exist or it cannot be parsed as JSON +- (KMPackageInfo *) loadPackageInfoFromJsonFile:(NSString *)path { + KMPackageInfo * packageInfo = nil; + + if (self.debugMode) + NSLog(@"SGS2021 loading JSON package info from path: %@", path); + NSError *readError = nil; + NSData *data = [NSData dataWithContentsOfFile:path options:kNilOptions error:&readError]; + NSDictionary *parsedData = nil; + + if (data == nil) { + NSLog(@"SGS2021 Error reading JSON file at path : %@, error: %@ ", path, readError); + } else { + NSError *parseError = nil; + parsedData = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&parseError]; + + if (parsedData == nil) { + NSLog(@"SGS2021 Error parsing JSON file at path : %@, error: %@ ", path, parseError); + } else { + packageInfo = [self createPackageInfoFromJsonData:parsedData]; + } + } + + return packageInfo; +} + +- (KMPackageInfo *) createPackageInfoFromJsonData:(NSDictionary *) jsonData { + KMPackageInfo *packageInfo = [[KMPackageInfo alloc] initWithName:jsonData[@"info"][@"name"][@"description"] + packageVersion:jsonData[@"info"][@"version"][@"description"] + readMe:jsonData[@"options"][@"readmeFile"] + fileVersion:jsonData[@"system"][@"fileVersion"] + keymanDeveloperVersion:jsonData[@"system"][@"keymanDeveloperVersion"] + copyright:jsonData[@"info"][@"copyright"][@"description"] + authorName:jsonData[@"info"][@"author"][@"description"] + authorUrl:jsonData[@"info"][@"author"][@"url"] + website:jsonData[@"info"][@"website"][@"url"] + keyboards:nil + files:nil]; + return packageInfo; +} + + +// returns nil if the file does not exist or it cannot be parsed +// adapted from method keyboardInfoFromInfFile that loaded data from inf file to NSDictionary +- (KMPackageInfo *) loadPackageInfoFromInfFile:(NSString *)path { + KMPackageInfo * packageInfo = nil; + + if (self.debugMode) + NSLog(@"SGS2021 loading inf package info from path: %@", path); + + NSString* packageName; + NSString* packageVersion; + NSString* readMe; + NSString* graphicFile; + NSString* fileVersion; + NSString* keymanDeveloperVersion; + NSString* copyright; + NSString* authorName; + NSString* authorUrl; + NSString* website; + + NSMutableArray *files = [NSMutableArray arrayWithCapacity:0]; + //NSMutableArray *fonts = [NSMutableArray arrayWithCapacity:0]; + NSMutableArray *keyboards = [NSMutableArray arrayWithCapacity:0]; + + @try { + NSString *fileContents = [[NSString stringWithContentsOfFile:path encoding:NSWindowsCP1252StringEncoding error:NULL] stringByReplacingOccurrencesOfString:@"\r" withString:@""]; + NSArray *lines = [fileContents componentsSeparatedByString:@"\n"]; + ContentType contentType = ctUnknown; + for (NSString *line in lines) { + if (!line.length) + continue; + + if ([line startsWith:kPackage]) { + contentType = ctPackage; + continue; + } + else if ([line startsWith:kButtons]) { + contentType = ctButtons; + continue; + } + else if ([line startsWith:kStartMenu]) { + contentType = ctStartMenu; + continue; + } + else if ([line startsWith:kStartMenuEntries]) { + contentType = ctStartMenuEntries; + continue; + } + else if ([line startsWith:kInfo]) { + contentType = ctInfo; + continue; + } + else if ([line startsWith:kFiles]) { + contentType = ctFiles; + continue; + } + + switch (contentType) { + case ctPackage: { + if ([line startsWith:kReadMeFile]) + readMe = [line substringFromIndex:kReadMeFile.length+1]; + else if ([line startsWith:kGraphicFile]) + graphicFile = [line substringFromIndex:kGraphicFile.length+1]; + + break; + } + case ctButtons: + break; + case ctStartMenu: + break; + case ctStartMenuEntries: { + if ([line startsWith:kWelcome]) { + NSLog(@"SGS2021 line of inf file: %@", line); + NSString *s = [line substringFromIndex:kWelcome.length+1]; + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + } + + break; + } + case ctInfo: { + if ([line startsWith:kName]) { + NSLog(@"SGS2021 line of inf file: %@", line); + NSString *s = [line substringFromIndex:kName.length+1]; + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + packageName = v1; + NSLog(@"SGS2021 package name from inf file = %@", v1); + } + else if ([line startsWith:kVersion]) { + NSLog(@"SGS2021 line of inf file: %@", line); + NSString *s = [line substringFromIndex:kVersion.length+1]; + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + packageVersion = v1; + } + else if ([line startsWith:kAuthor]) { + NSLog(@"SGS2021 line of inf file: %@", line); + NSString *s = [line substringFromIndex:kAuthor.length+1]; + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + authorName = v1; + } + else if ([line startsWith:kCopyright]) { + NSLog(@"SGS2021 line of inf file: %@", line); + NSString *s = [line substringFromIndex:kCopyright.length+1]; + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + authorUrl = v1; + } + else if ([line startsWith:kWebSite]) { + NSLog(@"SGS2021 line of inf file: %@", line); + NSString *s = [line substringFromIndex:kWebSite.length+1]; + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + website = v1; + } + + break; + } + case ctFiles: { + NSUInteger x = [line rangeOfString:@"="].location; + if (x == NSNotFound) + continue; + + NSString *s = [line substringFromIndex:x+2]; + if ([s startsWith:kFile]) { + NSLog(@"SGS2021 file line of inf file: %@", line); + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *v1 = [[[vs objectAtIndex:0] substringFromIndex:kFile.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *fileName = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + [files addObject:fileName]; + } + else if ([s startsWith:kFont]) { + NSLog(@"SGS2021 font line of inf file: %@", line); + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *v1 = [[[vs objectAtIndex:0] substringFromIndex:kFont.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *fontFileName = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + [files addObject:fontFileName]; + } + else if ([s startsWith:kKeyboard]) { + NSLog(@"SGS2021 keyboard line of inf file: %@", line); + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *keyboardName = [[[vs objectAtIndex:0] substringFromIndex:kKeyboard.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *keyboardFileName = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + KMKeyboardInfo * keyboardInfo = [[KMKeyboardInfo alloc] initWithName:keyboardName + identifier:nil + oskFont:nil + displayFont:nil + languages:nil]; + [keyboards addObject:keyboardInfo]; + } + + break; + } + default: + break; + } + } + } + @catch (NSException *e) { + NSLog(@"Error = %@", e.description); + return nil; + } +/* + if (files.count) + [infoDict setValue:files forKey:kFile]; + if (fonts.count) + [infoDict setValue:fonts forKey:kFont]; + if (kbs.count) + [infoDict setValue:kbs forKey:kKeyboard]; + return infoDict.count?[NSDictionary dictionaryWithDictionary:infoDict]:nil; + */ + + packageInfo = [[KMPackageInfo alloc] initWithName:packageName + packageVersion:packageVersion + readMe:readMe + fileVersion:fileVersion + keymanDeveloperVersion:keymanDeveloperVersion + copyright:copyright + authorName:authorName + authorUrl:authorUrl + website:website + keyboards:keyboards + files:files]; + return packageInfo; +} + + +- (NSDictionary *)keyboardInfoFromInfFile:(NSString *)infoFile { + NSLog(@"SGS2021 load keyboardInfoFromInfFile"); + NSMutableDictionary *infoDict = [NSMutableDictionary dictionaryWithCapacity:0]; NSMutableArray *files = [NSMutableArray arrayWithCapacity:0]; NSMutableArray *fonts = [NSMutableArray arrayWithCapacity:0]; @@ -713,6 +1010,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; [infoDict setObject:@[v1, v2] forKey:kName]; + NSLog(@"SGS2021 keyboard name from inf file = %@ or %@", v1, v2); } else if ([line startsWith:kVersion]) { NSString *s = [line substringFromIndex:kVersion.length+1]; @@ -764,7 +1062,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef [fonts addObject:@[v1, v2]]; } else if ([s startsWith:kKeyboard]) { - NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSArray *vs = [s componentsSeparatedByString:@"\","]; NSString *v1 = [[[vs objectAtIndex:0] substringFromIndex:kKeyboard.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; [kbs addObject:@[v1, v2]]; @@ -907,7 +1205,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef NSInteger itag = 1000; [keyboards.submenu removeAllItems]; for (NSString *path in self.activeKeyboards) { - NSDictionary *infoDict = [KMXFile infoDictionaryFromFilePath:path]; + NSDictionary *infoDict = [KMXFile keyboardInfoFromKmxFile:path]; if (!infoDict) continue; //NSString *str = [NSString stringWithFormat:@"%@ (%@)", [infoDict objectForKey:kKMKeyboardNameKey], [infoDict objectForKey:kKMKeyboardVersionKey]]; @@ -918,7 +1216,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef [item setState:NSOnState]; KMXFile *kmx = [[KMXFile alloc] initWithFilePath:path]; [self setKmx:kmx]; - NSDictionary *kmxInfo = [KMXFile infoDictionaryFromFilePath:path]; + NSDictionary *kmxInfo = [KMXFile keyboardInfoFromKmxFile:path]; NSString *kvkFilename = [kmxInfo objectForKey:kKMVisualKeyboardKey]; if (kvkFilename != nil) { NSString *kvkFilePath = [self kvkFilePathFromFilename:kvkFilename]; @@ -953,7 +1251,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef NSString *path = [self.activeKeyboards objectAtIndex:0]; KMXFile *kmx = [[KMXFile alloc] initWithFilePath:path]; [self setKmx:kmx]; - NSDictionary *kmxInfo = [KMXFile infoDictionaryFromFilePath:path]; + NSDictionary *kmxInfo = [KMXFile keyboardInfoFromKmxFile:path]; NSString *kvkFilename = [kmxInfo objectForKey:kKMVisualKeyboardKey]; if (kvkFilename != nil) { NSString *kvkFilePath = [self kvkFilePathFromFilename:kvkFilename]; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/KMKeyboardHelpWindowController.m b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/KMKeyboardHelpWindowController.m index 5be21b2240..4a3257c11b 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/KMKeyboardHelpWindowController.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/KMKeyboardHelpWindowController.m @@ -8,11 +8,12 @@ #import "KMKeyboardHelpWindowController.h" #import "KMInputMethodAppDelegate.h" +#import "KMPackageInfo.h" #import @interface KMKeyboardHelpWindowController () @property (nonatomic, weak) IBOutlet WebView *welcomeView; -@property (nonatomic, strong) NSDictionary *infoDict; +@property (nonatomic, strong) NSDictionary *keyboardInfo; @end @implementation KMKeyboardHelpWindowController @@ -30,10 +31,10 @@ - (void)setPackagePath:(NSString *)packagePath { _packagePath = packagePath; - _infoDict = nil; + _keyboardInfo = nil; if (packagePath != nil && packagePath.length) { @try { - NSString *title = [[self.infoDict objectForKey:kName] objectAtIndex:0]; + NSString *title = [[self.keyboardInfo objectForKey:kName] objectAtIndex:0]; if (title.length) [self.window setTitle:title]; } @@ -49,13 +50,37 @@ } } -- (NSDictionary *)infoDict { - if (_infoDict == nil) { - NSString *infoFile = [self.packagePath stringByAppendingPathComponent:@"kmp.inf"]; - _infoDict = [self.AppDelegate infoDictionaryFromFile:infoFile]; +- (NSDictionary *)keyboardInfo { + if(_keyboardInfo == nil) { + KMPackageInfo *packageInfo = [self.AppDelegate loadPackageInfo:self.packagePath]; + + NSMutableDictionary *infoDict = [NSMutableDictionary dictionaryWithCapacity:0]; + [infoDict setObject:@[packageInfo.packageName, @""] forKey:@"Name"]; + [infoDict setObject:packageInfo.readMe forKey:@"ReadMeFile"]; + + _keyboardInfo = infoDict; +// _keyboardInfo = [self.AppDelegate loadPackageInfo:self.packagePath]; + } + + /* + if (_keyboardInfo == nil) { + NSString *jsonFilename = [self.packagePath stringByAppendingPathComponent:@"kmp.json"]; + NSLog(@"SGS2021 KMKeyboardHelpWindowController loading keyboard info from json file: %@", jsonFilename); + _keyboardInfo = [self.AppDelegate loadKeyboardInfoFromJsonFile:jsonFilename]; + + NSDictionary *info = _keyboardInfo[@"info"]; + NSDictionary *nameMap = info[@"name"]; + NSLog(@"SGS2021 package name = %@", nameMap[@"description"]); } - return _infoDict; + if (_keyboardInfo == nil) { + NSString *infoFile = [self.packagePath stringByAppendingPathComponent:@"kmp.inf"]; + NSLog(@"SGS2021 KMKeyboardHelpWindowController loading keyboard info from %@", infoFile); + _keyboardInfo = [self.AppDelegate keyboardInfoFromInfFile:infoFile]; + } + */ + + return _keyboardInfo; } - (IBAction)okAction:(id)sender { diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.h b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.h new file mode 100644 index 0000000000..2a1fe801fe --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.h @@ -0,0 +1,36 @@ +// +// KMKeyboardInfo.h +// Keyman +// +// Created by Shawn Schantz on 11/25/21. +// Copyright © 2021 SIL International. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface KMLanguageInfo : NSObject +@property (nonatomic,readonly) NSString* name; +@property (nonatomic,readonly) NSString* identifier; + +- (instancetype)initWithName:(NSString*)name + identifier:(NSString*)identifier; +@end + +@interface KMKeyboardInfo : NSObject +@property (nonatomic,readonly) NSString* name; +@property (nonatomic,readonly) NSString* identifier; +@property (nonatomic,readonly) NSString* oskFont; +@property (nonatomic,readonly) NSString* displayFont; +@property (nonatomic,readonly) NSArray* languages; + +- (instancetype)initWithName:(NSString*)name + identifier:(NSString*)identifier + oskFont:(NSString*)oskFont + displayFont:(NSString*)displayFont + languages:(NSArray*)languages; + +@end + +NS_ASSUME_NONNULL_END diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.m b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.m new file mode 100644 index 0000000000..3b59002622 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.m @@ -0,0 +1,45 @@ +// +// KMKeyboardInfo.m +// Keyman +// +// Created by Shawn Schantz on 11/25/21. +// Copyright © 2021 SIL International. All rights reserved. +// + +#import "KMKeyboardInfo.h" + +@implementation KMLanguageInfo + +- (instancetype)initWithName:(NSString*)name + identifier:(NSString*)identifier +{ + self = [super init]; + if (self) { + _name = [name copy]; + _identifier = [identifier copy]; + } + return self; +} + +@end + +@implementation KMKeyboardInfo + +- (instancetype)initWithName:(NSString*)name + identifier:(NSString*)identifier + oskFont:(NSString*)oskFont + displayFont:(NSString*)displayFont + languages:(NSArray*)languages +{ + self = [super init]; + if (self) { + _name = [name copy]; + _identifier = [identifier copy]; + _oskFont = [oskFont copy]; + _displayFont = [displayFont copy]; + _languages = [languages copy]; + } + return self; +} + +@end diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h new file mode 100644 index 0000000000..5b8592fc7e --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h @@ -0,0 +1,39 @@ +// +// KMPackageInfo.h +// Keyman +// +// Created by Shawn Schantz on 11/22/21. +// Copyright © 2021 SIL International. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface KMPackageInfo : NSObject +@property (nonatomic,readonly) NSString* packageName; +@property (nonatomic,readonly) NSString* packageVersion; +@property (nonatomic,readonly) NSString* readMe; +@property (nonatomic,readonly) NSString* fileVersion; +@property (nonatomic,readonly) NSString* keymanDeveloperVersion; +@property (nonatomic,readonly) NSString* copyright; +@property (nonatomic,readonly) NSString* authorName; +@property (nonatomic,readonly) NSString* authorUrl; +@property (nonatomic,readonly) NSString* website; +@property (nonatomic,readonly) NSDictionary* keyboards; +@property (nonatomic,readonly) NSArray* files; + +- (instancetype)initWithName:(NSString*)packageName + packageVersion:(NSString*)packageVersion + readMe:(NSString*)readMe + fileVersion:(NSString*)fileVersion + keymanDeveloperVersion:(NSString*)keymanDeveloperVersion + copyright:(NSString*)copyright + authorName:(NSString*)authorName + authorUrl:(NSString*)authorUrl + website:(NSString*)website + keyboards:(NSDictionary*)keyboards + files:(NSArray*)files; +@end + +NS_ASSUME_NONNULL_END diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m new file mode 100644 index 0000000000..325f065379 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m @@ -0,0 +1,42 @@ +// +// KMPackageInfo.m +// Keyman +// +// Created by Shawn Schantz on 11/22/21. +// Copyright © 2021 SIL International. All rights reserved. +// + +#import "KMPackageInfo.h" + +@implementation KMPackageInfo + +- (instancetype)initWithName:(NSString*)packageName + packageVersion:(NSString*)packageVersion + readMe:(NSString*)readMe + fileVersion:(NSString*)fileVersion + keymanDeveloperVersion:(NSString*)keymanDeveloperVersion + copyright:(NSString*)copyright + authorName:(NSString*)authorName + authorUrl:(NSString*)authorUrl + website:(NSString*)website + keyboards:(NSDictionary*)keyboards + files:(NSArray*)files +{ + self = [super init]; + if (self) { + _packageName = [packageName copy]; + _packageVersion = [packageVersion copy]; + _readMe = [readMe copy]; + _fileVersion = [fileVersion copy]; + _keymanDeveloperVersion = [keymanDeveloperVersion copy]; + _copyright = [copyright copy]; + _authorName = [authorName copy]; + _authorUrl = [authorUrl copy]; + _website = [website copy]; + _keyboards = [keyboards copy]; + _files = [files copy]; + } + return self; +} + +@end diff --git a/mac/KeymanEngine4Mac/KeymanEngine4Mac/KME/KMXFile.h b/mac/KeymanEngine4Mac/KeymanEngine4Mac/KME/KMXFile.h index b94c8aab86..01ba394582 100644 --- a/mac/KeymanEngine4Mac/KeymanEngine4Mac/KME/KMXFile.h +++ b/mac/KeymanEngine4Mac/KeymanEngine4Mac/KME/KMXFile.h @@ -45,7 +45,7 @@ extern NSString *const kKMVisualKeyboardKey; * \param path KMX file path * \returns NSDictionary with keyboard name, version, copyright & icon. */ -+ (NSDictionary *)infoDictionaryFromFilePath:(NSString *)path; ++ (NSDictionary *)keyboardInfoFromKmxFile:(NSString *)path; @end diff --git a/mac/KeymanEngine4Mac/KeymanEngine4Mac/KME/KMXFile.m b/mac/KeymanEngine4Mac/KeymanEngine4Mac/KME/KMXFile.m index a467309a11..664cc5efe3 100644 --- a/mac/KeymanEngine4Mac/KeymanEngine4Mac/KME/KMXFile.m +++ b/mac/KeymanEngine4Mac/KeymanEngine4Mac/KME/KMXFile.m @@ -163,8 +163,10 @@ NSString *const kKMVisualKeyboardKey = @"KMVisualKeyboardKey"; return YES; } -+ (NSDictionary *)infoDictionaryFromFilePath:(NSString *)path { ++ (NSDictionary *)keyboardInfoFromKmxFile:(NSString *)path { NSFileHandle *file = [NSFileHandle fileHandleForReadingAtPath:path]; + NSLog(@"SGS2021 load keyboardInfoFromKmxFile"); + if (file == nil) { //NSLog(@"Failed to open file"); return nil; @@ -206,7 +208,9 @@ NSString *const kKMVisualKeyboardKey = @"KMVisualKeyboardKey"; if (cmp_str[i].dwSystemID == TSS_VISUALKEYBOARD) visualKeyboard = [KMXFile UTF16StringWithPointer:cmp_str[i].dpString inFile:file]; } - + + NSLog(@"SGS2021 keyboard name from kmx file: %@", nameStr); + [file seekToFileOffset:cmp_kb.dpBitmapOffset]; NSData *bitmapData = [file readDataOfLength:cmp_kb.dwBitmapSize]; NSBitmapImageRep *imageRep = [NSBitmapImageRep imageRepWithData:bitmapData]; @@ -214,8 +218,10 @@ NSString *const kKMVisualKeyboardKey = @"KMVisualKeyboardKey"; [file closeFile]; - if (!nameStr || !nameStr.length) + if (!nameStr || !nameStr.length) { nameStr = [path.lastPathComponent stringByReplacingOccurrencesOfString:@".kmx" withString:@""]; + NSLog(@"SGS2021 keyboard name from kmx filename: %@", nameStr); + } if (!verStr) verStr = @""; if (!copyrightStr) From 5642b02d35a4b62f1d09281129c511a140d2e433 Mon Sep 17 00:00:00 2001 From: sgschantz Date: Fri, 26 Nov 2021 16:25:54 +0700 Subject: [PATCH 03/38] displaying all package info in info window, except fonts --- .../KMInfoWindow/KMInfoWindowController.m | 75 +++++++++------- .../Keyman4MacIM/KMInputMethodAppDelegate.m | 89 ++++++++++++++----- .../KMKeyboardHelpWindowController.m | 28 ++++-- .../Keyman4MacIM/KMKeyboardInfo.h | 4 +- .../Keyman4MacIM/KMKeyboardInfo.m | 4 +- mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h | 11 ++- mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m | 22 ++++- 7 files changed, 161 insertions(+), 72 deletions(-) diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m index 2cac813a47..ce818b8653 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m @@ -16,7 +16,7 @@ @property (nonatomic, weak) IBOutlet NSTabView *tabView; @property (nonatomic, weak) IBOutlet WebView *detailsView; @property (nonatomic, weak) IBOutlet WebView *readmeView; -@property (nonatomic, strong) NSDictionary *keyboardInfo; +@property (nonatomic, strong) KMPackageInfo *packageInfo; @property (nonatomic, strong) NSTabViewItem *readMeTab; @end @@ -28,6 +28,7 @@ - (void)windowDidLoad { [super windowDidLoad]; + // TODO: rename [self.window setTitle:@"Keyboard/Package Info"]; [self.tabView setDelegate:self]; [self.detailsView setFrameLoadDelegate:(id)self]; @@ -36,12 +37,13 @@ [self.readmeView setPolicyDelegate:(id)self]; } +// TODO: rename, refactor, reset PackageInfo directly rather than making getter do it? - (void)setPackagePath:(NSString *)packagePath { _packagePath = packagePath; - _keyboardInfo = nil; + _packageInfo = nil; [self.tabView selectTabViewItemAtIndex:0]; if (packagePath != nil && packagePath.length) { - NSString *imgName = [self.keyboardInfo objectForKey:kGraphicFile]; + NSString *imgName = self.packageInfo.graphicFilename; if (imgName != nil) { NSString *imgFile = [packagePath stringByAppendingPathComponent:imgName]; NSImage *img = [[NSImage alloc] initWithContentsOfFile:imgFile]; @@ -57,9 +59,9 @@ else [self.detailsView.mainFrame loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]]]; - NSString *readMeFile = [self.keyboardInfo objectForKey:kReadMeFile]; - if (readMeFile != nil) { - [self.readmeView.mainFrame loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[packagePath stringByAppendingPathComponent:readMeFile]]]]; + NSString *readmeFilename = self.packageInfo.readmeFilename; + if (readmeFilename != nil) { + [self.readmeView.mainFrame loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[packagePath stringByAppendingPathComponent:readmeFilename]]]]; if (_readMeTab != nil && ![self.tabView.tabViewItems containsObject:_readMeTab]) { [self.tabView addTabViewItem:_readMeTab]; _readMeTab = nil; @@ -123,13 +125,16 @@ NSString *pBodyFormat = @"

%@


"; NSMutableString *kbsStr = [NSMutableString stringWithString:@""]; + + // TODO: getting keyboards from folder/kmx rather than inf NSArray *kbs = [[self AppDelegate] keyboardNamesFromFolder:self.packagePath]; if (kbs != nil && kbs.count) { for (NSArray *kbName in kbs) { [kbsStr appendString:[NSString stringWithFormat:pBodyFormat, kbName]]; } } - else { + // TODO: need to provide above as fallback in case no json??? +/* else { // This was the old logic (prior to fixing issue #994). Keeping as fallback, though // it's unlikely to be useful/needed. kbs = [self.keyboardInfo objectForKey:kKeyboard]; @@ -143,8 +148,8 @@ kbsStr = [NSMutableString stringWithString:@"


"]; } } - - NSArray *fonts = [self.keyboardInfo objectForKey:kFont]; +*/ + NSArray *fonts = self.packageInfo.fonts; NSMutableString *fontsStr = [NSMutableString stringWithString:@""]; if (fonts != nil && fonts.count) { for (NSArray *font in fonts) { @@ -160,16 +165,19 @@ KeymanVersionInfo keymanVersionInfo = [[self AppDelegate] versionInfo]; NSString *shareUrl = [NSString stringWithFormat:@"https://%@/go/keyboard/%@/share", keymanVersionInfo.keymanCom, packageId]; - NSString *name = [[self.keyboardInfo objectForKey:kName] objectAtIndex:0]; + + self.packageInfo.debugReport; + + NSString *name = self.packageInfo.packageName; if (name == nil) name = @"Unknown Keyboard Package"; - NSString *version = [[self.keyboardInfo objectForKey:kVersion] objectAtIndex:0]; + NSString *version = self.packageInfo.packageVersion; if (version == nil) version = @""; - NSString *authorV1 = [[self.keyboardInfo objectForKey:kAuthor] objectAtIndex:0]; - NSString *authorV2 = [[self.keyboardInfo objectForKey:kAuthor] objectAtIndex:1]; + NSString *authorV1 = self.packageInfo.authorName; + NSString *authorV2 = self.packageInfo.authorUrl; NSString *author = @""; if (authorV1.length && authorV2.length) author = [NSString stringWithFormat:linkFormat, authorV2, authorV1]; @@ -177,7 +185,7 @@ author = authorV1; else if (authorV2.length) author = [NSString stringWithFormat:linkFormat, authorV2, authorV2]; - + /* NSString *websiteV1 = [[self.keyboardInfo objectForKey:kWebSite] objectAtIndex:0]; NSString *websiteV2 = [[self.keyboardInfo objectForKey:kWebSite] objectAtIndex:1]; NSString *website = @""; @@ -187,7 +195,12 @@ website = websiteV1; else if (websiteV2.length) website = [NSString stringWithFormat:linkFormat, websiteV2, websiteV2]; - + */ + NSString *website = @""; + if (self.packageInfo.website.length) + website = [NSString stringWithFormat:linkFormat, self.packageInfo.website, self.packageInfo.website]; + + /* NSString *copyrightV1 = [[self.keyboardInfo objectForKey:kCopyright] objectAtIndex:0]; NSString *copyrightV2 = [[self.keyboardInfo objectForKey:kCopyright] objectAtIndex:1]; NSString *copyright = @""; @@ -197,6 +210,11 @@ copyright = copyrightV1; else if (copyrightV2.length) copyright = [NSString stringWithFormat:linkFormat, copyrightV2, copyrightV2]; + */ + + NSString *copyright = @""; + if (self.packageInfo.copyright.length) + copyright = self.packageInfo.copyright; NSString *htmlStr = [NSString stringWithFormat:htmlFormat, name, shareUrl, shareUrl, kbsStr, fontsStr, version, author, website, copyright]; @@ -209,22 +227,15 @@ } } -- (NSDictionary *)keyboardInfo { - if(_keyboardInfo == nil) { - KMPackageInfo *packageInfo = [self.AppDelegate loadPackageInfo:self.packagePath]; - NSLog(@"SGS2021 packageInfo.packageName = %@", packageInfo.packageName); - NSLog(@"SGS2021 packageInfo.packageVersion = %@", packageInfo.packageVersion); - NSLog(@"SGS2021 packageInfo.authorName = %@", packageInfo.authorName); - NSLog(@"SGS2021 packageInfo.authorUrl = %@", packageInfo.authorUrl); - NSLog(@"SGS2021 packageInfo.copyright = %@", packageInfo.copyright); - NSLog(@"SGS2021 packageInfo.readMe = %@", packageInfo.readMe); - - NSMutableDictionary *infoDict = [NSMutableDictionary dictionaryWithCapacity:0]; - [infoDict setObject:@[packageInfo.packageName, @""] forKey:@"Name"]; - [infoDict setObject:packageInfo.readMe forKey:@"ReadMeFile"]; - - _keyboardInfo = infoDict; -// _keyboardInfo = [self.AppDelegate loadPackageInfo:self.packagePath]; +- (KMPackageInfo *)packageInfo { + if(_packageInfo == nil) { + _packageInfo = [self.AppDelegate loadPackageInfo:self.packagePath]; + NSLog(@"SGS2021 packageInfo.packageName = %@", _packageInfo.packageName); + NSLog(@"SGS2021 packageInfo.packageVersion = %@", _packageInfo.packageVersion); + NSLog(@"SGS2021 packageInfo.authorName = %@", _packageInfo.authorName); + NSLog(@"SGS2021 packageInfo.authorUrl = %@", _packageInfo.authorUrl); + NSLog(@"SGS2021 packageInfo.copyright = %@", _packageInfo.copyright); + NSLog(@"SGS2021 packageInfo.readmeFilename = %@", _packageInfo.readmeFilename); } /* @@ -246,7 +257,7 @@ } */ - return _keyboardInfo; + return _packageInfo; } - (void)webView:(WebView *)webView decidePolicyForNavigationAction:(NSDictionary *)actionInformation request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id)listener { diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m index 83b904b6e6..476570c684 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m @@ -619,7 +619,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef packageInfo = [self loadPackageInfoFromJsonFile:jsonFilename]; // TODO: remove test - packageInfo = nil; + //packageInfo = nil; if (packageInfo != nil) { /* @@ -640,7 +640,6 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef } -// TODO: SGS, create JSON version - (NSString *)packageNameFromJsonFile:(NSString *)packageFolder { NSLog(@"SGS2021 load packageNameFromJsonFile"); NSString *packageName = nil; @@ -659,6 +658,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef return packageName; } + - (NSString *)packageNameFromInfFile:(NSString *)packageFolder { NSLog(@"SGS2021 load packageNameFromInfFile"); NSString *packageName = nil; @@ -702,7 +702,10 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef return kbNames; } -// returns nil if the file does not exist or it cannot be parsed as JSON +/* + read JSON file and load it into KMPackageInfo object + returns nil if the file does not exist or it cannot be parsed as JSON + */ - (KMPackageInfo *) loadPackageInfoFromJsonFile:(NSString *)path { KMPackageInfo * packageInfo = nil; @@ -729,23 +732,67 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef } - (KMPackageInfo *) createPackageInfoFromJsonData:(NSDictionary *) jsonData { + + NSMutableArray *keyboardInfoArray = [NSMutableArray arrayWithCapacity:0]; + NSMutableArray *fontArray = [NSMutableArray arrayWithCapacity:0]; + NSArray *keyboards = jsonData[@"keyboards"]; + + // loop through keyboards array and add keyboards, and loop through each keyboard's languages array to add languages + for (NSDictionary *keyboard in keyboards) { + NSArray *languages = keyboard[@"languages"]; + NSMutableArray *languageInfoArray = [NSMutableArray arrayWithCapacity:0]; + + for (NSDictionary *language in languages) { + KMLanguageInfo *languageInfo = [[KMLanguageInfo alloc] initWithName:language[@"name"] + identifier:language[@"id"]]; + + [languageInfoArray addObject:languageInfo]; + } + + NSString * oskFont = keyboard[@"oskFont"]; + if (oskFont && [oskFont length]) { + [fontArray addObject:oskFont]; + } + NSString * displayFont = keyboard[@"displayFont"]; + if (displayFont && [displayFont length] && ![displayFont isEqualToString:oskFont]) { + [fontArray addObject:displayFont]; + } + + KMKeyboardInfo *keyboardInfo = [[KMKeyboardInfo alloc] initWithName:keyboard[@"name"] + identifier:keyboard[@"id"] + version:keyboard[@"version"] + oskFont:keyboard[@"oskFont"] + displayFont:keyboard[@"displayFont"] + languages:[languageInfoArray copy]]; + + [keyboardInfoArray addObject:keyboardInfo]; + + } + KMPackageInfo *packageInfo = [[KMPackageInfo alloc] initWithName:jsonData[@"info"][@"name"][@"description"] packageVersion:jsonData[@"info"][@"version"][@"description"] - readMe:jsonData[@"options"][@"readmeFile"] + readmeFilename:jsonData[@"options"][@"readmeFile"] + graphicFilename:jsonData[@"options"][@"graphicFile"] fileVersion:jsonData[@"system"][@"fileVersion"] keymanDeveloperVersion:jsonData[@"system"][@"keymanDeveloperVersion"] copyright:jsonData[@"info"][@"copyright"][@"description"] authorName:jsonData[@"info"][@"author"][@"description"] authorUrl:jsonData[@"info"][@"author"][@"url"] website:jsonData[@"info"][@"website"][@"url"] - keyboards:nil + keyboards:[keyboardInfoArray copy] + fonts:[fontArray copy] files:nil]; + NSLog(@"SGS2021 packageInfo created from JSON:"); + packageInfo.debugReport; return packageInfo; } -// returns nil if the file does not exist or it cannot be parsed -// adapted from method keyboardInfoFromInfFile that loaded data from inf file to NSDictionary +/* + read inf file and load it into KMPackageInfo object + returns nil if the file does not exist or it cannot be parsed + adapted from legacy method keyboardInfoFromInfFile that loaded data from inf file to NSDictionary + */ - (KMPackageInfo *) loadPackageInfoFromInfFile:(NSString *)path { KMPackageInfo * packageInfo = nil; @@ -754,7 +801,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef NSString* packageName; NSString* packageVersion; - NSString* readMe; + NSString* readmeFilename; NSString* graphicFile; NSString* fileVersion; NSString* keymanDeveloperVersion; @@ -764,7 +811,6 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef NSString* website; NSMutableArray *files = [NSMutableArray arrayWithCapacity:0]; - //NSMutableArray *fonts = [NSMutableArray arrayWithCapacity:0]; NSMutableArray *keyboards = [NSMutableArray arrayWithCapacity:0]; @try { @@ -803,7 +849,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef switch (contentType) { case ctPackage: { if ([line startsWith:kReadMeFile]) - readMe = [line substringFromIndex:kReadMeFile.length+1]; + readmeFilename = [line substringFromIndex:kReadMeFile.length+1]; else if ([line startsWith:kGraphicFile]) graphicFile = [line substringFromIndex:kGraphicFile.length+1]; @@ -849,6 +895,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; authorName = v1; + authorUrl = v2; } else if ([line startsWith:kCopyright]) { NSLog(@"SGS2021 line of inf file: %@", line); @@ -856,7 +903,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef NSArray *vs = [s componentsSeparatedByString:@"\","]; NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - authorUrl = v1; + copyright = v1; } else if ([line startsWith:kWebSite]) { NSLog(@"SGS2021 line of inf file: %@", line); @@ -895,7 +942,8 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef NSString *keyboardName = [[[vs objectAtIndex:0] substringFromIndex:kKeyboard.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; NSString *keyboardFileName = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; KMKeyboardInfo * keyboardInfo = [[KMKeyboardInfo alloc] initWithName:keyboardName - identifier:nil + identifier:nil + version:nil oskFont:nil displayFont:nil languages:nil]; @@ -913,26 +961,19 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef NSLog(@"Error = %@", e.description); return nil; } -/* - if (files.count) - [infoDict setValue:files forKey:kFile]; - if (fonts.count) - [infoDict setValue:fonts forKey:kFont]; - if (kbs.count) - [infoDict setValue:kbs forKey:kKeyboard]; - return infoDict.count?[NSDictionary dictionaryWithDictionary:infoDict]:nil; - */ packageInfo = [[KMPackageInfo alloc] initWithName:packageName packageVersion:packageVersion - readMe:readMe - fileVersion:fileVersion + readmeFilename:readmeFilename + graphicFilename:graphicFile + fileVersion:fileVersion keymanDeveloperVersion:keymanDeveloperVersion copyright:copyright authorName:authorName authorUrl:authorUrl website:website - keyboards:keyboards + keyboards:keyboards + fonts:nil files:files]; return packageInfo; } diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/KMKeyboardHelpWindowController.m b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/KMKeyboardHelpWindowController.m index 4a3257c11b..84681d9cbc 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/KMKeyboardHelpWindowController.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/KMKeyboardHelpWindowController.m @@ -13,7 +13,7 @@ @interface KMKeyboardHelpWindowController () @property (nonatomic, weak) IBOutlet WebView *welcomeView; -@property (nonatomic, strong) NSDictionary *keyboardInfo; +@property (nonatomic, strong) KMPackageInfo *packageInfo; @end @implementation KMKeyboardHelpWindowController @@ -31,10 +31,10 @@ - (void)setPackagePath:(NSString *)packagePath { _packagePath = packagePath; - _keyboardInfo = nil; + _packageInfo = nil; if (packagePath != nil && packagePath.length) { @try { - NSString *title = [[self.keyboardInfo objectForKey:kName] objectAtIndex:0]; + NSString *title = self.packageInfo.packageName; if (title.length) [self.window setTitle:title]; } @@ -50,19 +50,31 @@ } } -- (NSDictionary *)keyboardInfo { +- (KMPackageInfo*)packageInfo { + if(_packageInfo == nil) { + _packageInfo = [self.AppDelegate loadPackageInfo:self.packagePath]; + + NSLog(@"SGS2021 packageInfo.packageName = %@", _packageInfo.packageName); + NSLog(@"SGS2021 packageInfo.packageVersion = %@", _packageInfo.packageVersion); + NSLog(@"SGS2021 packageInfo.authorName = %@", _packageInfo.authorName); + NSLog(@"SGS2021 packageInfo.authorUrl = %@", _packageInfo.authorUrl); + NSLog(@"SGS2021 packageInfo.copyright = %@", _packageInfo.copyright); + NSLog(@"SGS2021 packageInfo.readmeFilename = %@", _packageInfo.readmeFilename); + + } + + /* if(_keyboardInfo == nil) { KMPackageInfo *packageInfo = [self.AppDelegate loadPackageInfo:self.packagePath]; NSMutableDictionary *infoDict = [NSMutableDictionary dictionaryWithCapacity:0]; [infoDict setObject:@[packageInfo.packageName, @""] forKey:@"Name"]; - [infoDict setObject:packageInfo.readMe forKey:@"ReadMeFile"]; + [infoDict setObject:packageInfo.readmeFilename forKey:@"ReadMeFile"]; _keyboardInfo = infoDict; -// _keyboardInfo = [self.AppDelegate loadPackageInfo:self.packagePath]; + _keyboardInfo = [self.AppDelegate loadPackageInfo:self.packagePath]; } - /* if (_keyboardInfo == nil) { NSString *jsonFilename = [self.packagePath stringByAppendingPathComponent:@"kmp.json"]; NSLog(@"SGS2021 KMKeyboardHelpWindowController loading keyboard info from json file: %@", jsonFilename); @@ -80,7 +92,7 @@ } */ - return _keyboardInfo; + return _packageInfo; } - (IBAction)okAction:(id)sender { diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.h b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.h index 2a1fe801fe..7e3eb3cb4e 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.h +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.h @@ -21,12 +21,14 @@ NS_ASSUME_NONNULL_BEGIN @interface KMKeyboardInfo : NSObject @property (nonatomic,readonly) NSString* name; @property (nonatomic,readonly) NSString* identifier; +@property (nonatomic,readonly) NSString* version; @property (nonatomic,readonly) NSString* oskFont; @property (nonatomic,readonly) NSString* displayFont; @property (nonatomic,readonly) NSArray* languages; - (instancetype)initWithName:(NSString*)name - identifier:(NSString*)identifier + identifier:(NSString*)identifier + version:(NSString*)version oskFont:(NSString*)oskFont displayFont:(NSString*)displayFont languages:(NSArray*)languages; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.m b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.m index 3b59002622..ab02e2f176 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.m @@ -26,7 +26,8 @@ @implementation KMKeyboardInfo - (instancetype)initWithName:(NSString*)name - identifier:(NSString*)identifier + identifier:(NSString*)identifier + version:(NSString*)version oskFont:(NSString*)oskFont displayFont:(NSString*)displayFont languages:(NSArray*)languages @@ -35,6 +36,7 @@ if (self) { _name = [name copy]; _identifier = [identifier copy]; + _version = [version copy]; _oskFont = [oskFont copy]; _displayFont = [displayFont copy]; _languages = [languages copy]; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h index 5b8592fc7e..0a29f5950c 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h @@ -13,7 +13,8 @@ NS_ASSUME_NONNULL_BEGIN @interface KMPackageInfo : NSObject @property (nonatomic,readonly) NSString* packageName; @property (nonatomic,readonly) NSString* packageVersion; -@property (nonatomic,readonly) NSString* readMe; +@property (nonatomic,readonly) NSString* readmeFilename; +@property (nonatomic,readonly) NSString* graphicFilename; @property (nonatomic,readonly) NSString* fileVersion; @property (nonatomic,readonly) NSString* keymanDeveloperVersion; @property (nonatomic,readonly) NSString* copyright; @@ -22,10 +23,12 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic,readonly) NSString* website; @property (nonatomic,readonly) NSDictionary* keyboards; @property (nonatomic,readonly) NSArray* files; +@property (nonatomic,readonly) NSArray* fonts; - (instancetype)initWithName:(NSString*)packageName packageVersion:(NSString*)packageVersion - readMe:(NSString*)readMe + readmeFilename:(NSString*)readmeFilename + graphicFilename:(NSString*)graphicFilename fileVersion:(NSString*)fileVersion keymanDeveloperVersion:(NSString*)keymanDeveloperVersion copyright:(NSString*)copyright @@ -33,7 +36,9 @@ NS_ASSUME_NONNULL_BEGIN authorUrl:(NSString*)authorUrl website:(NSString*)website keyboards:(NSDictionary*)keyboards - files:(NSArray*)files; + fonts:(NSArray*)fonts + files:(NSArray*)files; +- (void)debugReport; @end NS_ASSUME_NONNULL_END diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m index 325f065379..31a8f0a586 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m @@ -12,7 +12,8 @@ - (instancetype)initWithName:(NSString*)packageName packageVersion:(NSString*)packageVersion - readMe:(NSString*)readMe + readmeFilename:(NSString*)readmeFilename + graphicFilename:(NSString*)graphicFilename fileVersion:(NSString*)fileVersion keymanDeveloperVersion:(NSString*)keymanDeveloperVersion copyright:(NSString*)copyright @@ -20,13 +21,15 @@ authorUrl:(NSString*)authorUrl website:(NSString*)website keyboards:(NSDictionary*)keyboards - files:(NSArray*)files + fonts:(NSArray*)fonts + files:(NSArray*)files { self = [super init]; if (self) { _packageName = [packageName copy]; _packageVersion = [packageVersion copy]; - _readMe = [readMe copy]; + _readmeFilename = [readmeFilename copy]; + _graphicFilename = [graphicFilename copy]; _fileVersion = [fileVersion copy]; _keymanDeveloperVersion = [keymanDeveloperVersion copy]; _copyright = [copyright copy]; @@ -34,9 +37,22 @@ _authorUrl = [authorUrl copy]; _website = [website copy]; _keyboards = [keyboards copy]; + _fonts = [fonts copy]; _files = [files copy]; } return self; } +- (void)debugReport +{ + NSLog(@"SGS2021 packageInfo.packageName = %@", _packageName); + NSLog(@"SGS2021 packageInfo.packageVersion = %@", _packageVersion); + NSLog(@"SGS2021 packageInfo.authorName = %@", _authorName); + NSLog(@"SGS2021 packageInfo.authorUrl = %@", _authorUrl); + NSLog(@"SGS2021 packageInfo.copyright = %@", _copyright); + NSLog(@"SGS2021 packageInfo.readMe = %@", _readmeFilename); + NSLog(@"SGS2021 packageInfo.fonts.count = %@", [_fonts count]); +} + + @end From d2ed35ac20c82d30623af6a06ee530808f0711e2 Mon Sep 17 00:00:00 2001 From: sgschantz Date: Tue, 30 Nov 2021 14:54:51 +0700 Subject: [PATCH 04/38] displaying fonts, getting package name from json.kmp first, then kmp.inf --- .../KMConfigurationWindowController.m | 8 +--- .../KMInfoWindow/KMInfoWindowController.m | 30 ++---------- .../Keyman4MacIM/KMInputMethodAppDelegate.h | 3 +- .../Keyman4MacIM/KMInputMethodAppDelegate.m | 48 +++---------------- .../KMKeyboardHelpWindowController.m | 37 -------------- mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m | 15 +++++- 6 files changed, 25 insertions(+), 116 deletions(-) diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/KMConfigurationWindowController.m b/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/KMConfigurationWindowController.m index 8d6e88bc20..a5d2900c43 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/KMConfigurationWindowController.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMConfiguration/KMConfigurationWindowController.m @@ -133,7 +133,7 @@ if ([obj isKindOfClass:[NSArray class]]) { NSArray *pArray = (NSArray *)obj; NSString *packageFolder = [self packageFolderFromPath:[pArray objectAtIndex:0]]; - NSString *packageName = [self packageNameFromFolder:packageFolder]; + NSString *packageName = [self.AppDelegate packageNameFromPackageInfo:packageFolder]; [_tableContents addObject:[NSDictionary dictionaryWithObjectsAndKeys:packageName, @"HeaderTitle", nil]]; for (NSString *path in pArray) { NSDictionary *info = [KMXFile keyboardInfoFromKmxFile:path]; @@ -169,12 +169,6 @@ return [self.AppDelegate packageFolderFromPath:path]; } -- (NSString *)packageNameFromFolder:(NSString *)packageFolder { - return [self.AppDelegate packageNameFromInfFile:packageFolder]; - // TODO: call below but handle non-existent JSON file case - //return [self.AppDelegate packageNameFromJsonFile:packageFolder]; -} - - (NSString *)keyboardsPath { return self.AppDelegate.keyboardsPath; } diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m index ce818b8653..44f1bb8155 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m @@ -151,9 +151,10 @@ */ NSArray *fonts = self.packageInfo.fonts; NSMutableString *fontsStr = [NSMutableString stringWithString:@""]; + if (fonts != nil && fonts.count) { - for (NSArray *font in fonts) { - [fontsStr appendString:[NSString stringWithFormat:pBodyFormat, [font objectAtIndex:0]]]; + for (NSString *font in fonts) { + [fontsStr appendString:[NSString stringWithFormat:pBodyFormat, font]]; } } else { @@ -230,32 +231,7 @@ - (KMPackageInfo *)packageInfo { if(_packageInfo == nil) { _packageInfo = [self.AppDelegate loadPackageInfo:self.packagePath]; - NSLog(@"SGS2021 packageInfo.packageName = %@", _packageInfo.packageName); - NSLog(@"SGS2021 packageInfo.packageVersion = %@", _packageInfo.packageVersion); - NSLog(@"SGS2021 packageInfo.authorName = %@", _packageInfo.authorName); - NSLog(@"SGS2021 packageInfo.authorUrl = %@", _packageInfo.authorUrl); - NSLog(@"SGS2021 packageInfo.copyright = %@", _packageInfo.copyright); - NSLog(@"SGS2021 packageInfo.readmeFilename = %@", _packageInfo.readmeFilename); - } - /* - if (_keyboardInfo == nil) { - NSString *jsonFilename = [self.packagePath stringByAppendingPathComponent:@"kmp.json"]; - NSLog(@"SGS2021 KMInfoWindowController loading keyboard info from json file: %@", jsonFilename); - _keyboardInfo = [self.AppDelegate loadPackageInfoFromJsonFile:jsonFilename]; - - if (_keyboardInfo != nil) { - NSDictionary *info = _keyboardInfo[@"info"]; - NSDictionary *nameMap = info[@"name"]; - NSLog(@"SGS2021 keyboardInfo initialized, package name = %@", nameMap[@"description"]); - } else - { - NSString *infoFile = [self.packagePath stringByAppendingPathComponent:@"kmp.inf"]; - NSLog(@"SGS2021 KMInfoWindowController loading keyboard info from %@", infoFile); - _keyboardInfo = [self.AppDelegate keyboardInfoFromInfFile:infoFile]; - } - } - */ return _packageInfo; } diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.h b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.h index a88eb988bc..ce7ebc2cc8 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.h +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.h @@ -119,8 +119,7 @@ typedef struct { - (NSInteger)indexForPackageFolder:(NSString *)packageFolder; - (NSString *)packageFolderFromPath:(NSString *)path; - (NSDictionary *)loadPackageInfo:(NSString *)path; -- (NSString *)packageNameFromInfFile:(NSString *)packageFolder; -- (NSString *)packageNameFromJsonFile:(NSString *)packageFolder; +- (NSString *)packageNameFromPackageInfo:(NSString *)packageFolder; - (NSArray *)keyboardNamesFromFolder:(NSString *)packageFolder; - (NSString *)kvkFilePathFromFilename:(NSString *)kvkFilename; - (NSString *)oskWindowTitle; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m index 476570c684..3a62122638 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m @@ -614,53 +614,30 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef - (KMPackageInfo *)loadPackageInfo:(NSString *)path { KMPackageInfo *packageInfo = nil; NSString *jsonFilename = [path stringByAppendingPathComponent:@"kmp.json"]; - NSLog(@"SGS2021 KXMInputMethodAppDelegate loading keyboard info from json file: %@", jsonFilename); packageInfo = [self loadPackageInfoFromJsonFile:jsonFilename]; - // TODO: remove test - //packageInfo = nil; - - if (packageInfo != nil) { - /* - NSDictionary *info = packageInfo[@"info"]; - NSDictionary *nameMap = info[@"name"]; - */ - NSLog(@"SGS2021 keyboardInfo initialized, package name = %@", packageInfo.packageName); - } else - { + if (packageInfo == nil) { NSString *infoFile = [path stringByAppendingPathComponent:@"kmp.inf"]; - NSLog(@"SGS2021 KXMInputMethodAppDelegate loading keyboard info from inf file %@", infoFile); packageInfo = [self loadPackageInfoFromInfFile:infoFile]; - //packageInfo = [self keyboardInfoFromInfFile:infoFile]; } return packageInfo; } -- (NSString *)packageNameFromJsonFile:(NSString *)packageFolder { - NSLog(@"SGS2021 load packageNameFromJsonFile"); +- (NSString *)packageNameFromPackageInfo:(NSString *)packageFolder { NSString *packageName = nil; + NSString *path = [[self keyboardsPath] stringByAppendingPathComponent:packageFolder]; - NSString *jsonFilename = [path stringByAppendingPathComponent:@"kmp.json"]; - NSDictionary *kbInfo = [self loadPackageInfoFromJsonFile:jsonFilename]; - - NSDictionary *info = kbInfo[@"info"]; - NSDictionary *nameMap = info[@"name"]; - packageName = nameMap[@"description"]; - - NSLog(@"SGS2021 package name = %@", packageName); - - if (packageName == nil) - packageName = packageFolder; + KMPackageInfo *packageInfo = [self loadPackageInfo:path]; + packageName = packageInfo.packageName; return packageName; } - (NSString *)packageNameFromInfFile:(NSString *)packageFolder { - NSLog(@"SGS2021 load packageNameFromInfFile"); NSString *packageName = nil; NSString *path = [[self keyboardsPath] stringByAppendingPathComponent:packageFolder]; NSString *fileContents = [NSString stringWithContentsOfFile:[path stringByAppendingPathComponent:@"kmp.inf"] encoding:NSWindowsCP1252StringEncoding error:NULL]; @@ -679,7 +656,6 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef } } - NSLog(@"SGS2021 package name = %@", packageName); if (packageName == nil) packageName = packageFolder; @@ -782,7 +758,6 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef keyboards:[keyboardInfoArray copy] fonts:[fontArray copy] files:nil]; - NSLog(@"SGS2021 packageInfo created from JSON:"); packageInfo.debugReport; return packageInfo; } @@ -861,7 +836,6 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef break; case ctStartMenuEntries: { if ([line startsWith:kWelcome]) { - NSLog(@"SGS2021 line of inf file: %@", line); NSString *s = [line substringFromIndex:kWelcome.length+1]; NSArray *vs = [s componentsSeparatedByString:@"\","]; NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; @@ -872,16 +846,13 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef } case ctInfo: { if ([line startsWith:kName]) { - NSLog(@"SGS2021 line of inf file: %@", line); NSString *s = [line substringFromIndex:kName.length+1]; NSArray *vs = [s componentsSeparatedByString:@"\","]; NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; packageName = v1; - NSLog(@"SGS2021 package name from inf file = %@", v1); } else if ([line startsWith:kVersion]) { - NSLog(@"SGS2021 line of inf file: %@", line); NSString *s = [line substringFromIndex:kVersion.length+1]; NSArray *vs = [s componentsSeparatedByString:@"\","]; NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; @@ -889,7 +860,6 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef packageVersion = v1; } else if ([line startsWith:kAuthor]) { - NSLog(@"SGS2021 line of inf file: %@", line); NSString *s = [line substringFromIndex:kAuthor.length+1]; NSArray *vs = [s componentsSeparatedByString:@"\","]; NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; @@ -898,7 +868,6 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef authorUrl = v2; } else if ([line startsWith:kCopyright]) { - NSLog(@"SGS2021 line of inf file: %@", line); NSString *s = [line substringFromIndex:kCopyright.length+1]; NSArray *vs = [s componentsSeparatedByString:@"\","]; NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; @@ -906,7 +875,6 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef copyright = v1; } else if ([line startsWith:kWebSite]) { - NSLog(@"SGS2021 line of inf file: %@", line); NSString *s = [line substringFromIndex:kWebSite.length+1]; NSArray *vs = [s componentsSeparatedByString:@"\","]; NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; @@ -923,21 +891,18 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef NSString *s = [line substringFromIndex:x+2]; if ([s startsWith:kFile]) { - NSLog(@"SGS2021 file line of inf file: %@", line); NSArray *vs = [s componentsSeparatedByString:@"\","]; NSString *v1 = [[[vs objectAtIndex:0] substringFromIndex:kFile.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; NSString *fileName = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; [files addObject:fileName]; } else if ([s startsWith:kFont]) { - NSLog(@"SGS2021 font line of inf file: %@", line); NSArray *vs = [s componentsSeparatedByString:@"\","]; NSString *v1 = [[[vs objectAtIndex:0] substringFromIndex:kFont.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; NSString *fontFileName = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; [files addObject:fontFileName]; } else if ([s startsWith:kKeyboard]) { - NSLog(@"SGS2021 keyboard line of inf file: %@", line); NSArray *vs = [s componentsSeparatedByString:@"\","]; NSString *keyboardName = [[[vs objectAtIndex:0] substringFromIndex:kKeyboard.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; NSString *keyboardFileName = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; @@ -978,7 +943,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef return packageInfo; } - +/* obsolete now that we're loading into KMPackageInfo - (NSDictionary *)keyboardInfoFromInfFile:(NSString *)infoFile { NSLog(@"SGS2021 load keyboardInfoFromInfFile"); @@ -1130,6 +1095,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef return infoDict.count?[NSDictionary dictionaryWithDictionary:infoDict]:nil; } + */ - (NSString *)selectedKeyboard { if (_selectedKeyboard == nil) { diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/KMKeyboardHelpWindowController.m b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/KMKeyboardHelpWindowController.m index 84681d9cbc..b77243aac0 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/KMKeyboardHelpWindowController.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardHelpWindow/KMKeyboardHelpWindowController.m @@ -53,44 +53,7 @@ - (KMPackageInfo*)packageInfo { if(_packageInfo == nil) { _packageInfo = [self.AppDelegate loadPackageInfo:self.packagePath]; - - NSLog(@"SGS2021 packageInfo.packageName = %@", _packageInfo.packageName); - NSLog(@"SGS2021 packageInfo.packageVersion = %@", _packageInfo.packageVersion); - NSLog(@"SGS2021 packageInfo.authorName = %@", _packageInfo.authorName); - NSLog(@"SGS2021 packageInfo.authorUrl = %@", _packageInfo.authorUrl); - NSLog(@"SGS2021 packageInfo.copyright = %@", _packageInfo.copyright); - NSLog(@"SGS2021 packageInfo.readmeFilename = %@", _packageInfo.readmeFilename); - } - - /* - if(_keyboardInfo == nil) { - KMPackageInfo *packageInfo = [self.AppDelegate loadPackageInfo:self.packagePath]; - - NSMutableDictionary *infoDict = [NSMutableDictionary dictionaryWithCapacity:0]; - [infoDict setObject:@[packageInfo.packageName, @""] forKey:@"Name"]; - [infoDict setObject:packageInfo.readmeFilename forKey:@"ReadMeFile"]; - - _keyboardInfo = infoDict; - _keyboardInfo = [self.AppDelegate loadPackageInfo:self.packagePath]; - } - - if (_keyboardInfo == nil) { - NSString *jsonFilename = [self.packagePath stringByAppendingPathComponent:@"kmp.json"]; - NSLog(@"SGS2021 KMKeyboardHelpWindowController loading keyboard info from json file: %@", jsonFilename); - _keyboardInfo = [self.AppDelegate loadKeyboardInfoFromJsonFile:jsonFilename]; - - NSDictionary *info = _keyboardInfo[@"info"]; - NSDictionary *nameMap = info[@"name"]; - NSLog(@"SGS2021 package name = %@", nameMap[@"description"]); - } - - if (_keyboardInfo == nil) { - NSString *infoFile = [self.packagePath stringByAppendingPathComponent:@"kmp.inf"]; - NSLog(@"SGS2021 KMKeyboardHelpWindowController loading keyboard info from %@", infoFile); - _keyboardInfo = [self.AppDelegate keyboardInfoFromInfFile:infoFile]; - } - */ return _packageInfo; } diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m index 31a8f0a586..39c82e6cb0 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m @@ -45,13 +45,24 @@ - (void)debugReport { - NSLog(@"SGS2021 packageInfo.packageName = %@", _packageName); + if (_packageName) + NSLog(@"SGS2021 packageInfo.packageName = %@", _packageName); + if (_packageVersion) NSLog(@"SGS2021 packageInfo.packageVersion = %@", _packageVersion); + if (_authorName) NSLog(@"SGS2021 packageInfo.authorName = %@", _authorName); + if (_authorUrl) NSLog(@"SGS2021 packageInfo.authorUrl = %@", _authorUrl); + if (_copyright) NSLog(@"SGS2021 packageInfo.copyright = %@", _copyright); + if (_readmeFilename) NSLog(@"SGS2021 packageInfo.readMe = %@", _readmeFilename); - NSLog(@"SGS2021 packageInfo.fonts.count = %@", [_fonts count]); + if (_fonts) { + NSLog(@"SGS2021 packageInfo.fonts.count = %lu", [_fonts count]); + if ([_fonts count] > 0) { + NSLog(@"SGS2021 packageInfo.fonts[0] = %@", _fonts[0]); + } + } } From 4e5213aa640d32d46da4e46a73ac6c3b40e25731 Mon Sep 17 00:00:00 2001 From: sgschantz Date: Wed, 1 Dec 2021 13:20:00 +0700 Subject: [PATCH 05/38] added builders for package and keyboard value objects --- .../Keyman4MacIM/KMInputMethodAppDelegate.m | 146 ++++++++---------- .../Keyman4MacIM/KMKeyboardInfo.h | 14 ++ .../Keyman4MacIM/KMKeyboardInfo.m | 29 ++++ mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h | 23 +++ mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m | 42 +++++ 5 files changed, 176 insertions(+), 78 deletions(-) diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m index 3a62122638..3f31d87aa8 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m @@ -707,6 +707,31 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef return packageInfo; } +- (KMPackageInfo *) createKeyboardInfoFromJsonKeyboard:(NSDictionary *) keyboard { + + KMKeyboardInfoBuilder *builder = [[KMKeyboardInfoBuilder alloc] init]; + + NSArray *languages = keyboard[@"languages"]; + NSMutableArray *languageInfoArray = [NSMutableArray arrayWithCapacity:0]; + + for (NSDictionary *language in languages) { + KMLanguageInfo *languageInfo = [[KMLanguageInfo alloc] initWithName:language[@"name"] + identifier:language[@"id"]]; + + [languageInfoArray addObject:languageInfo]; + } + + builder.name = keyboard[@"name"]; + builder.identifier = keyboard[@"id"]; + builder.version = keyboard[@"version"]; + builder.oskFont = keyboard[@"oskFont"]; + builder.displayFont = keyboard[@"displayFont"]; + builder.languages = [languageInfoArray copy]; + + KMKeyboardInfo *keyboardInfo = [[KMKeyboardInfo alloc] initWithBuilder:builder]; + return keyboardInfo; +} + - (KMPackageInfo *) createPackageInfoFromJsonData:(NSDictionary *) jsonData { NSMutableArray *keyboardInfoArray = [NSMutableArray arrayWithCapacity:0]; @@ -715,49 +740,39 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef // loop through keyboards array and add keyboards, and loop through each keyboard's languages array to add languages for (NSDictionary *keyboard in keyboards) { - NSArray *languages = keyboard[@"languages"]; - NSMutableArray *languageInfoArray = [NSMutableArray arrayWithCapacity:0]; - - for (NSDictionary *language in languages) { - KMLanguageInfo *languageInfo = [[KMLanguageInfo alloc] initWithName:language[@"name"] - identifier:language[@"id"]]; - - [languageInfoArray addObject:languageInfo]; + KMKeyboardInfo *keyboardInfo = [self createKeyboardInfoFromJsonKeyboard:keyboard]; + + // add oskFont to fontArray if not nil or empty string + if ([keyboardInfo.oskFont length]) { + [fontArray addObject:keyboardInfo.oskFont]; } - - NSString * oskFont = keyboard[@"oskFont"]; - if (oskFont && [oskFont length]) { - [fontArray addObject:oskFont]; + + // add displayFont to fontArray if not not nil or empty string and not equal to oskFont + if ([keyboardInfo.displayFont length] && ![keyboardInfo.displayFont isEqualToString:keyboardInfo.displayFont]) { + [fontArray addObject:keyboardInfo.displayFont]; } - NSString * displayFont = keyboard[@"displayFont"]; - if (displayFont && [displayFont length] && ![displayFont isEqualToString:oskFont]) { - [fontArray addObject:displayFont]; - } - - KMKeyboardInfo *keyboardInfo = [[KMKeyboardInfo alloc] initWithName:keyboard[@"name"] - identifier:keyboard[@"id"] - version:keyboard[@"version"] - oskFont:keyboard[@"oskFont"] - displayFont:keyboard[@"displayFont"] - languages:[languageInfoArray copy]]; [keyboardInfoArray addObject:keyboardInfo]; - } - KMPackageInfo *packageInfo = [[KMPackageInfo alloc] initWithName:jsonData[@"info"][@"name"][@"description"] - packageVersion:jsonData[@"info"][@"version"][@"description"] - readmeFilename:jsonData[@"options"][@"readmeFile"] - graphicFilename:jsonData[@"options"][@"graphicFile"] - fileVersion:jsonData[@"system"][@"fileVersion"] - keymanDeveloperVersion:jsonData[@"system"][@"keymanDeveloperVersion"] - copyright:jsonData[@"info"][@"copyright"][@"description"] - authorName:jsonData[@"info"][@"author"][@"description"] - authorUrl:jsonData[@"info"][@"author"][@"url"] - website:jsonData[@"info"][@"website"][@"url"] - keyboards:[keyboardInfoArray copy] - fonts:[fontArray copy] - files:nil]; + KMPackageInfoBuilder *builder = + [[KMPackageInfoBuilder alloc] init]; + + builder.packageName = jsonData[@"info"][@"name"][@"description"]; + builder.packageVersion = jsonData[@"info"][@"version"][@"description"]; + builder.readmeFilename = jsonData[@"options"][@"readmeFile"]; + builder.graphicFilename = jsonData[@"options"][@"graphicFile"]; + builder.fileVersion = jsonData[@"system"][@"fileVersion"]; + builder.keymanDeveloperVersion = jsonData[@"system"][@"keymanDeveloperVersion"]; + builder.copyright = jsonData[@"info"][@"copyright"][@"description"]; + builder.authorName = jsonData[@"info"][@"author"][@"description"]; + builder.authorUrl = jsonData[@"info"][@"author"][@"url"]; + builder.website = jsonData[@"info"][@"website"][@"url"]; + builder.keyboards = [keyboardInfoArray copy]; + builder.fonts = [fontArray copy]; + + KMPackageInfo *packageInfo = [[KMPackageInfo alloc] initWithBuilder:builder]; + packageInfo.debugReport; return packageInfo; } @@ -769,24 +784,12 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef adapted from legacy method keyboardInfoFromInfFile that loaded data from inf file to NSDictionary */ - (KMPackageInfo *) loadPackageInfoFromInfFile:(NSString *)path { - KMPackageInfo * packageInfo = nil; - if (self.debugMode) NSLog(@"SGS2021 loading inf package info from path: %@", path); - - NSString* packageName; - NSString* packageVersion; - NSString* readmeFilename; - NSString* graphicFile; - NSString* fileVersion; - NSString* keymanDeveloperVersion; - NSString* copyright; - NSString* authorName; - NSString* authorUrl; - NSString* website; - + NSMutableArray *files = [NSMutableArray arrayWithCapacity:0]; NSMutableArray *keyboards = [NSMutableArray arrayWithCapacity:0]; + KMPackageInfoBuilder *builder = [[KMPackageInfoBuilder alloc] init]; @try { NSString *fileContents = [[NSString stringWithContentsOfFile:path encoding:NSWindowsCP1252StringEncoding error:NULL] stringByReplacingOccurrencesOfString:@"\r" withString:@""]; @@ -824,9 +827,9 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef switch (contentType) { case ctPackage: { if ([line startsWith:kReadMeFile]) - readmeFilename = [line substringFromIndex:kReadMeFile.length+1]; + builder.readmeFilename = [line substringFromIndex:kReadMeFile.length+1]; else if ([line startsWith:kGraphicFile]) - graphicFile = [line substringFromIndex:kGraphicFile.length+1]; + builder.graphicFilename = [line substringFromIndex:kGraphicFile.length+1]; break; } @@ -850,36 +853,36 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef NSArray *vs = [s componentsSeparatedByString:@"\","]; NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - packageName = v1; + builder.packageName = v1; } else if ([line startsWith:kVersion]) { NSString *s = [line substringFromIndex:kVersion.length+1]; NSArray *vs = [s componentsSeparatedByString:@"\","]; NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - packageVersion = v1; + builder.packageVersion = v1; } else if ([line startsWith:kAuthor]) { NSString *s = [line substringFromIndex:kAuthor.length+1]; NSArray *vs = [s componentsSeparatedByString:@"\","]; NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - authorName = v1; - authorUrl = v2; + builder.authorName = v1; + builder.authorUrl = v2; } else if ([line startsWith:kCopyright]) { NSString *s = [line substringFromIndex:kCopyright.length+1]; NSArray *vs = [s componentsSeparatedByString:@"\","]; NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - copyright = v1; + builder.copyright = v1; } else if ([line startsWith:kWebSite]) { NSString *s = [line substringFromIndex:kWebSite.length+1]; NSArray *vs = [s componentsSeparatedByString:@"\","]; NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - website = v1; + builder.website = v1; } break; @@ -906,12 +909,11 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef NSArray *vs = [s componentsSeparatedByString:@"\","]; NSString *keyboardName = [[[vs objectAtIndex:0] substringFromIndex:kKeyboard.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; NSString *keyboardFileName = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - KMKeyboardInfo * keyboardInfo = [[KMKeyboardInfo alloc] initWithName:keyboardName - identifier:nil - version:nil - oskFont:nil - displayFont:nil - languages:nil]; + + + KMKeyboardInfoBuilder *builder = [[KMKeyboardInfoBuilder alloc] init]; + builder.name = keyboardName; + KMKeyboardInfo *keyboardInfo = [[KMKeyboardInfo alloc] initWithBuilder:builder]; [keyboards addObject:keyboardInfo]; } @@ -927,19 +929,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef return nil; } - packageInfo = [[KMPackageInfo alloc] initWithName:packageName - packageVersion:packageVersion - readmeFilename:readmeFilename - graphicFilename:graphicFile - fileVersion:fileVersion - keymanDeveloperVersion:keymanDeveloperVersion - copyright:copyright - authorName:authorName - authorUrl:authorUrl - website:website - keyboards:keyboards - fonts:nil - files:files]; + KMPackageInfo *packageInfo = [[KMPackageInfo alloc] initWithBuilder:builder]; return packageInfo; } diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.h b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.h index 7e3eb3cb4e..9c1a0764cb 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.h +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.h @@ -10,6 +10,18 @@ NS_ASSUME_NONNULL_BEGIN +@interface KMKeyboardInfoBuilder : NSObject +@property (nonatomic,copy) NSString* name; +@property (nonatomic,copy) NSString* identifier; +@property (nonatomic,copy) NSString* version; +@property (nonatomic,copy) NSString* oskFont; +@property (nonatomic,copy) NSString* displayFont; +@property (nonatomic,copy) NSArray* languages; + +- (instancetype)init; + +@end + @interface KMLanguageInfo : NSObject @property (nonatomic,readonly) NSString* name; @property (nonatomic,readonly) NSString* identifier; @@ -26,6 +38,8 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic,readonly) NSString* displayFont; @property (nonatomic,readonly) NSArray* languages; +- (instancetype)initWithBuilder:(KMKeyboardInfoBuilder*)builder; + - (instancetype)initWithName:(NSString*)name identifier:(NSString*)identifier version:(NSString*)version diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.m b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.m index ab02e2f176..f1e19a66c6 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.m @@ -8,6 +8,22 @@ #import "KMKeyboardInfo.h" +@implementation KMKeyboardInfoBuilder +- (instancetype)init { + self = [super init]; + if (self) { + _name = nil; + _identifier = nil; + _version = nil; + _oskFont = nil; + _displayFont = nil; + _languages = nil; + } + return self; +} +@end + + @implementation KMLanguageInfo - (instancetype)initWithName:(NSString*)name @@ -25,6 +41,19 @@ @implementation KMKeyboardInfo +- (instancetype)initWithBuilder:(KMKeyboardInfoBuilder *)builder { + self = [super init]; + if (self) { + _name = builder.name; + _identifier = builder.identifier; + _version = builder.version; + _oskFont = builder.oskFont; + _displayFont = builder.displayFont; + _languages = builder.languages; + } + return self; +} + - (instancetype)initWithName:(NSString*)name identifier:(NSString*)identifier version:(NSString*)version diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h index 0a29f5950c..c951a166b4 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h @@ -10,6 +10,26 @@ NS_ASSUME_NONNULL_BEGIN +@interface KMPackageInfoBuilder : NSObject +@property (nonatomic,copy) NSString* packageName; +@property (nonatomic,copy) NSString* packageVersion; +@property (nonatomic,copy) NSString* readmeFilename; +@property (nonatomic,copy) NSString* graphicFilename; +@property (nonatomic,copy) NSString* fileVersion; +@property (nonatomic,copy) NSString* keymanDeveloperVersion; +@property (nonatomic,copy) NSString* copyright; +@property (nonatomic,copy) NSString* authorName; +@property (nonatomic,copy) NSString* authorUrl; +@property (nonatomic,copy) NSString* website; +@property (nonatomic,copy) NSDictionary* keyboards; +@property (nonatomic,copy) NSArray* files; +@property (nonatomic,copy) NSArray* fonts; + +- (instancetype)init; + +@end + + @interface KMPackageInfo : NSObject @property (nonatomic,readonly) NSString* packageName; @property (nonatomic,readonly) NSString* packageVersion; @@ -25,6 +45,8 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic,readonly) NSArray* files; @property (nonatomic,readonly) NSArray* fonts; +- (instancetype)initWithBuilder:(KMPackageInfoBuilder *)builder; + - (instancetype)initWithName:(NSString*)packageName packageVersion:(NSString*)packageVersion readmeFilename:(NSString*)readmeFilename @@ -39,6 +61,7 @@ NS_ASSUME_NONNULL_BEGIN fonts:(NSArray*)fonts files:(NSArray*)files; - (void)debugReport; + @end NS_ASSUME_NONNULL_END diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m index 39c82e6cb0..fa3aca38ca 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m @@ -8,8 +8,50 @@ #import "KMPackageInfo.h" +@implementation KMPackageInfoBuilder +- (instancetype)init { + self = [super init]; + if (self) { + _packageName = nil; + _packageVersion = nil; + _readmeFilename = nil; + _graphicFilename = nil; + _fileVersion = nil; + _keymanDeveloperVersion = nil; + _copyright = nil; + _authorName = nil; + _authorUrl = nil; + _website = nil; + _keyboards = nil; + _fonts = nil; + _files = nil; + } + return self; +} +@end + @implementation KMPackageInfo +- (instancetype)initWithBuilder:(KMPackageInfoBuilder *)builder { + self = [super init]; + if (self) { + _packageName = builder.packageName; + _packageVersion = builder.packageVersion; + _readmeFilename = builder.readmeFilename; + _graphicFilename = builder.graphicFilename; + _fileVersion = builder.fileVersion; + _keymanDeveloperVersion = builder.keymanDeveloperVersion; + _copyright = builder.copyright; + _authorName = builder.authorName; + _authorUrl = builder.authorUrl; + _website = builder.website; + _keyboards = builder.keyboards; + _fonts = builder.fonts; + _files = builder.files; + } + return self; +} + - (instancetype)initWithName:(NSString*)packageName packageVersion:(NSString*)packageVersion readmeFilename:(NSString*)readmeFilename From e00ff063c8f21e96c7e2c891330f8b3aa9e4d67a Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Sun, 5 Dec 2021 17:12:56 +1100 Subject: [PATCH 06/38] chore(windows): version.rc use macros instead of mkver --- windows/src/.gitignore | 1 - windows/src/Defines.mak | 4 - windows/src/Target.mak | 7 +- .../buildpkg/{version.in => version.rc} | 12 +- .../buildunidata/{version.in => version.rc} | 12 +- windows/src/buildtools/version.in | 4 - .../insthelp/{version.in => version.rc} | 12 +- .../kmbrowserhost/{version.in => version.rc} | 12 +- .../kmconfig/{version.in => version.rc} | 12 +- .../kmshell/{version.in => version.rc} | 12 +- .../desktop/setup/{version.in => version.rc} | 12 +- windows/src/desktop/version.in | 4 - .../developer/TIKE/{version.in => version.rc} | 12 +- .../kmanalyze/{version.in => version.rc} | 12 +- .../kmcmpdll/{version.in => version.rc} | 12 +- .../kmcomp/{version.in => version.rc} | 12 +- .../kmconvert/{version.in => version.rc} | 12 +- .../kmdecomp/{version.in => version.rc} | 12 +- windows/src/developer/kmndebug/version.rc | 30 +++++ .../imsample/{version.in => version.rc} | 12 +- .../setup/{version.in => version.rc} | 12 +- windows/src/developer/version.in | 4 - .../insthelper/{version.in => version.rc} | 12 +- .../engine/keyman/{version.in => version.rc} | 12 +- .../keyman32/{version.in => version.rc} | 12 +- .../keyman64/{version.in => version.rc} | 12 +- .../keymanx64/{version.in => version.rc} | 12 +- .../kmcomapi/{version.in => version.rc} | 12 +- .../kmrefresh/{version.in => version.rc} | 12 +- .../engine/kmtip/{version.in => version.rc} | 12 +- .../mcompile/{version.in => version.rc} | 12 +- .../tsysinfo/{version.in => version.rc} | 12 +- .../tsysinfox64/{version.in => version.rc} | 12 +- windows/src/engine/version.in | 4 - windows/src/global/help/Makefile | 2 +- .../help/{version.in => version.php.in} | 0 windows/src/global/inc/keymanversion_build.in | 17 +++ .../etl2log/{version.in => version.rc} | 12 +- .../{version.in => version.rc} | 12 +- windows/src/support/version.in | 4 - .../msghooklister/src/App/Version.rc | 119 ++++++++++++++++++ .../i3619tip/i3619tip/i3619tip/version.rc | 30 +++++ 42 files changed, 396 insertions(+), 170 deletions(-) rename windows/src/buildtools/buildpkg/{version.in => version.rc} (69%) rename windows/src/buildtools/buildunidata/{version.in => version.rc} (69%) delete mode 100644 windows/src/buildtools/version.in rename windows/src/desktop/insthelp/{version.in => version.rc} (69%) rename windows/src/desktop/kmbrowserhost/{version.in => version.rc} (70%) rename windows/src/desktop/kmconfig/{version.in => version.rc} (69%) rename windows/src/desktop/kmshell/{version.in => version.rc} (69%) rename windows/src/desktop/setup/{version.in => version.rc} (68%) delete mode 100644 windows/src/desktop/version.in rename windows/src/developer/TIKE/{version.in => version.rc} (69%) rename windows/src/developer/kmanalyze/{version.in => version.rc} (70%) rename windows/src/developer/kmcmpdll/{version.in => version.rc} (69%) rename windows/src/developer/kmcomp/{version.in => version.rc} (69%) rename windows/src/developer/kmconvert/{version.in => version.rc} (70%) rename windows/src/developer/kmdecomp/{version.in => version.rc} (69%) create mode 100644 windows/src/developer/kmndebug/version.rc rename windows/src/developer/samples/imsample/{version.in => version.rc} (69%) rename windows/src/developer/setup/{version.in => version.rc} (69%) delete mode 100644 windows/src/developer/version.in rename windows/src/engine/inst/insthelper/{version.in => version.rc} (70%) rename windows/src/engine/keyman/{version.in => version.rc} (69%) rename windows/src/engine/keyman32/{version.in => version.rc} (69%) rename windows/src/engine/keyman64/{version.in => version.rc} (69%) rename windows/src/engine/keymanx64/{version.in => version.rc} (69%) rename windows/src/engine/kmcomapi/{version.in => version.rc} (69%) rename windows/src/engine/kmrefresh/{version.in => version.rc} (69%) rename windows/src/engine/kmtip/{version.in => version.rc} (69%) rename windows/src/engine/mcompile/{version.in => version.rc} (70%) rename windows/src/engine/tsysinfo/{version.in => version.rc} (69%) rename windows/src/engine/tsysinfox64/{version.in => version.rc} (70%) delete mode 100644 windows/src/engine/version.in rename windows/src/global/help/{version.in => version.php.in} (100%) rename windows/src/support/etl2log/{version.in => version.rc} (69%) rename windows/src/support/oskbulkrenderer/{version.in => version.rc} (70%) delete mode 100644 windows/src/support/version.in create mode 100644 windows/src/test/manual-tests/msghooklister/src/App/Version.rc create mode 100644 windows/src/test/manual-tests/test_i3619/i3619tip/i3619tip/i3619tip/version.rc diff --git a/windows/src/.gitignore b/windows/src/.gitignore index c2a0d553e6..0be24640bc 100644 --- a/windows/src/.gitignore +++ b/windows/src/.gitignore @@ -30,7 +30,6 @@ global/delphi/cust/MessageIdentifierConsts.pas # These are built from corresponding manifest.in and version.in **/manifest.xml -**/version.rc # Breakpad files generated for Sentry **/*.sym diff --git a/windows/src/Defines.mak b/windows/src/Defines.mak index 47a81c6b19..cd8fff8080 100644 --- a/windows/src/Defines.mak +++ b/windows/src/Defines.mak @@ -205,8 +205,6 @@ WIXHEAT=$(WIXPATH)\heat.exe LINKPATH=link.exe -TORTOISEPROC=C:\Progra~1\TortoiseSVN\bin\TortoiseProc.exe - # # Certificates and code signing # @@ -265,8 +263,6 @@ MKVER_VERSION_MD=$(KEYMAN_ROOT)\VERSION.md MKVER_COMMON_PARAMS=-tier "$(MKVER_TIER_MD)" -version "$(MKVER_VERSION_MD)" -# Update a version.rc file -MKVER_V=$(MKVER_APP) $(MKVER_COMMON_PARAMS) -v $(MKVER_VERSION_TXT) version.in version.rc # Update a manifest.xml file MKVER_M=$(MKVER_APP) $(MKVER_COMMON_PARAMS) -m manifest.in manifest.xml # Token replacement for all other file types; pattern: $(MKVER_U) diff --git a/windows/src/Target.mak b/windows/src/Target.mak index 6d17571b3e..5556653e03 100644 --- a/windows/src/Target.mak +++ b/windows/src/Target.mak @@ -1,7 +1,7 @@ CLEAN=@-del /S /Q def-clean: - $(CLEAN) *.err *.stat *.dproj.local *.Build.CppClean.Log *.suo *.jdbg *.dbg *.dcu *.~* *.dsk *.exe *.rsm *.ncb *.opt *.pch *.plg *.aps *.001 *.sbr *.dep *.drc *.bak *.pdb *.lib *.cod *.ilk *.tds vc80.idb *.map *.bsc version.rc version.res manifest.xml manifest.res >nul 2>nul + $(CLEAN) *.err *.stat *.dproj.local *.Build.CppClean.Log *.suo *.jdbg *.dbg *.dcu *.~* *.dsk *.exe *.rsm *.ncb *.opt *.pch *.plg *.aps *.001 *.sbr *.dep *.drc *.bak *.pdb *.lib *.cod *.ilk *.tds vc80.idb *.map *.bsc version.res manifest.xml manifest.res >nul 2>nul $(CLEAN) ExcMagic.Debug *.wixpdb *.identcache *.embed.manifest *.embed.manifest.res *.intermediate.manifest error.log >nul 2>nul if exist bin rd /s/q bin if exist obj rd /s/q obj @@ -23,9 +23,8 @@ devtools-app: dirs $(MAKE) devtools cd $(ROOT)\src -version.res: version.in - $(MKVER_V) - rc version.rc +version.res: version.rc + rc $? manifest.res: version.res $(MKVER_M) diff --git a/windows/src/buildtools/buildpkg/version.in b/windows/src/buildtools/buildpkg/version.rc similarity index 69% rename from windows/src/buildtools/buildpkg/version.in rename to windows/src/buildtools/buildpkg/version.rc index f3a4f1be14..bdf2b40b74 100644 --- a/windows/src/buildtools/buildpkg/version.in +++ b/windows/src/buildtools/buildpkg/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Buildpkg\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "BUILDPKG\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "BUILDPKG.EXE\0" VALUE "ProductName", "Keyman Build Environment\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/buildtools/buildunidata/version.in b/windows/src/buildtools/buildunidata/version.rc similarity index 69% rename from windows/src/buildtools/buildunidata/version.in rename to windows/src/buildtools/buildunidata/version.rc index 7149328cb6..e9ff8741b3 100644 --- a/windows/src/buildtools/buildunidata/version.in +++ b/windows/src/buildtools/buildunidata/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "MakeCert\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "MAKECERT\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "MAKECERT.EXE\0" VALUE "ProductName", "Keyman Build Environment\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/buildtools/version.in b/windows/src/buildtools/version.in deleted file mode 100644 index e19e88117e..0000000000 --- a/windows/src/buildtools/version.in +++ /dev/null @@ -1,4 +0,0 @@ -VALUE "CompanyName", "SIL International\0" -VALUE "LegalCopyright", "© SIL International\0" -VALUE "LegalTrademarks", "Keyman is a registered trademark of SIL International\0" -VALUE "ProductName", "Keyman Build Environment\0" diff --git a/windows/src/desktop/insthelp/version.in b/windows/src/desktop/insthelp/version.rc similarity index 69% rename from windows/src/desktop/insthelp/version.in rename to windows/src/desktop/insthelp/version.rc index 7e68a75120..059345834e 100644 --- a/windows/src/desktop/insthelp/version.in +++ b/windows/src/desktop/insthelp/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman Installation Assistant\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "INSTHELP\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "INSTHELP.EXE\0" VALUE "ProductName", "Keyman\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/desktop/kmbrowserhost/version.in b/windows/src/desktop/kmbrowserhost/version.rc similarity index 70% rename from windows/src/desktop/kmbrowserhost/version.in rename to windows/src/desktop/kmbrowserhost/version.rc index f4b38a023d..f4412c336d 100644 --- a/windows/src/desktop/kmbrowserhost/version.in +++ b/windows/src/desktop/kmbrowserhost/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman Browser Host Process\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMBROWSERHOST\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "KMBROWSERHOST.EXE\0" VALUE "ProductName", "Keyman\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/desktop/kmconfig/version.in b/windows/src/desktop/kmconfig/version.rc similarity index 69% rename from windows/src/desktop/kmconfig/version.in rename to windows/src/desktop/kmconfig/version.rc index acdc60a537..e3c5f695db 100644 --- a/windows/src/desktop/kmconfig/version.in +++ b/windows/src/desktop/kmconfig/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman System Settings\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMCONFIG\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "KMCONFIG.EXE\0" VALUE "ProductName", "Keyman\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/desktop/kmshell/version.in b/windows/src/desktop/kmshell/version.rc similarity index 69% rename from windows/src/desktop/kmshell/version.in rename to windows/src/desktop/kmshell/version.rc index c9df1086be..e47396452a 100644 --- a/windows/src/desktop/kmshell/version.in +++ b/windows/src/desktop/kmshell/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman Configuration\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMSHELL\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "KMSHELL.EXE\0" VALUE "ProductName", "Keyman\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/desktop/setup/version.in b/windows/src/desktop/setup/version.rc similarity index 68% rename from windows/src/desktop/setup/version.in rename to windows/src/desktop/setup/version.rc index 4788272e5e..aecdb30b25 100644 --- a/windows/src/desktop/setup/version.in +++ b/windows/src/desktop/setup/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman Setup\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "SETUP\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "SETUP.EXE\0" VALUE "ProductName", "Keyman\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/desktop/version.in b/windows/src/desktop/version.in deleted file mode 100644 index d88b6d2430..0000000000 --- a/windows/src/desktop/version.in +++ /dev/null @@ -1,4 +0,0 @@ -VALUE "CompanyName", "SIL International\0" -VALUE "LegalCopyright", "© SIL International\0" -VALUE "LegalTrademarks", "Keyman is a registered trademark of SIL International\0" -VALUE "ProductName", "Keyman\0" diff --git a/windows/src/developer/TIKE/version.in b/windows/src/developer/TIKE/version.rc similarity index 69% rename from windows/src/developer/TIKE/version.in rename to windows/src/developer/TIKE/version.rc index 17b4e66411..dccb691f32 100644 --- a/windows/src/developer/TIKE/version.in +++ b/windows/src/developer/TIKE/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman Developer\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "Keyman Developer\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "TIKE.EXE\0" VALUE "ProductName", "Keyman Developer\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/developer/kmanalyze/version.in b/windows/src/developer/kmanalyze/version.rc similarity index 70% rename from windows/src/developer/kmanalyze/version.in rename to windows/src/developer/kmanalyze/version.rc index 05951e57fd..aeed0aa2c2 100644 --- a/windows/src/developer/kmanalyze/version.in +++ b/windows/src/developer/kmanalyze/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman Developer Keyboard Analyzer\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMANALYZE\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "KMANALYZE.EXE\0" VALUE "ProductName", "Keyman Developer\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/developer/kmcmpdll/version.in b/windows/src/developer/kmcmpdll/version.rc similarity index 69% rename from windows/src/developer/kmcmpdll/version.in rename to windows/src/developer/kmcmpdll/version.rc index 53bfd786d7..67f21f09cc 100644 --- a/windows/src/developer/kmcmpdll/version.in +++ b/windows/src/developer/kmcmpdll/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman compiler library\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMCOMP\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "KMCOMP.DLL\0" VALUE "ProductName", "Keyman Developer\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/developer/kmcomp/version.in b/windows/src/developer/kmcomp/version.rc similarity index 69% rename from windows/src/developer/kmcomp/version.in rename to windows/src/developer/kmcomp/version.rc index 0ae6ccfb23..bcef758609 100644 --- a/windows/src/developer/kmcomp/version.in +++ b/windows/src/developer/kmcomp/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman commandline compiler\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMCOMP\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "KMCOMP.EXE\0" VALUE "ProductName", "Keyman Developer\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/developer/kmconvert/version.in b/windows/src/developer/kmconvert/version.rc similarity index 70% rename from windows/src/developer/kmconvert/version.in rename to windows/src/developer/kmconvert/version.rc index 828575e157..5eae7f9292 100644 --- a/windows/src/developer/kmconvert/version.in +++ b/windows/src/developer/kmconvert/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman Developer Conversion Utility\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMCONVERT\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "KMCONVERT.EXE\0" VALUE "ProductName", "Keyman Developer\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/developer/kmdecomp/version.in b/windows/src/developer/kmdecomp/version.rc similarity index 69% rename from windows/src/developer/kmdecomp/version.in rename to windows/src/developer/kmdecomp/version.rc index 800c26d0b6..bfc7c2a1ef 100644 --- a/windows/src/developer/kmdecomp/version.in +++ b/windows/src/developer/kmdecomp/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman decompiler\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMDECOMP\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "KMDECOMP.EXE\0" VALUE "ProductName", "Keyman Developer\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/developer/kmndebug/version.rc b/windows/src/developer/kmndebug/version.rc new file mode 100644 index 0000000000..963b12cbb6 --- /dev/null +++ b/windows/src/developer/kmndebug/version.rc @@ -0,0 +1,30 @@ +1 VERSIONINFO + FILEVERSION 15,0,78,0 + PRODUCTVERSION 15,0,78,0 + FILEFLAGSMASK 0x3fL + FILEFLAGS 0x0L + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L + BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "0C0904E4" + BEGIN + VALUE "CompanyName", "SIL International\0" + VALUE "FileDescription", "Keyman KMN Debug Library\0" + VALUE "FileVersion", "15.0.78.0\0" + VALUE "InternalName", "KMNDEBUG\0" + VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "KMNDEBUG.DLL\0" + VALUE "ProductName", "Keyman Developer\0" + VALUE "ProductVersion", "15.0.78.0\0" + VALUE "Comments", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0xc09, 1252 + END + END diff --git a/windows/src/developer/samples/imsample/version.in b/windows/src/developer/samples/imsample/version.rc similarity index 69% rename from windows/src/developer/samples/imsample/version.in rename to windows/src/developer/samples/imsample/version.rc index ce20f15995..996cb6da7f 100644 --- a/windows/src/developer/samples/imsample/version.in +++ b/windows/src/developer/samples/imsample/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman IM Sample\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "IMSAMPLE\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "IMSAMPLE.DLL\0" VALUE "ProductName", "Keyman Developer\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/developer/setup/version.in b/windows/src/developer/setup/version.rc similarity index 69% rename from windows/src/developer/setup/version.in rename to windows/src/developer/setup/version.rc index 1b0d28e055..a3dc297938 100644 --- a/windows/src/developer/setup/version.in +++ b/windows/src/developer/setup/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman Developer Setup\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "SETUP\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "KMSHELL.EXE\0" VALUE "ProductName", "Keyman Developer\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/developer/version.in b/windows/src/developer/version.in deleted file mode 100644 index 3ef5bd20eb..0000000000 --- a/windows/src/developer/version.in +++ /dev/null @@ -1,4 +0,0 @@ -VALUE "CompanyName", "SIL International\0" -VALUE "LegalCopyright", "© SIL International\0" -VALUE "LegalTrademarks", "Keyman is a registered trademark of SIL International\0" -VALUE "ProductName", "Keyman Developer\0" diff --git a/windows/src/engine/inst/insthelper/version.in b/windows/src/engine/inst/insthelper/version.rc similarity index 70% rename from windows/src/engine/inst/insthelper/version.in rename to windows/src/engine/inst/insthelper/version.rc index d37dc0ffe7..f70813d3cf 100644 --- a/windows/src/engine/inst/insthelper/version.in +++ b/windows/src/engine/inst/insthelper/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman Engine Installation Assistant\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "INSTHELPER\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "INSTHELPER.DLL\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/engine/keyman/version.in b/windows/src/engine/keyman/version.rc similarity index 69% rename from windows/src/engine/keyman/version.in rename to windows/src/engine/keyman/version.rc index e332fc7b9c..49f532d138 100644 --- a/windows/src/engine/keyman/version.in +++ b/windows/src/engine/keyman/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman Engine x86\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KEYMAN\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "KEYMAN.EXE\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/engine/keyman32/version.in b/windows/src/engine/keyman32/version.rc similarity index 69% rename from windows/src/engine/keyman32/version.in rename to windows/src/engine/keyman32/version.rc index d007363176..bbd823f1a6 100644 --- a/windows/src/engine/keyman32/version.in +++ b/windows/src/engine/keyman32/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman Engine Processor x86\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KEYMAN32\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "KEYMAN32.DLL\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/engine/keyman64/version.in b/windows/src/engine/keyman64/version.rc similarity index 69% rename from windows/src/engine/keyman64/version.in rename to windows/src/engine/keyman64/version.rc index 9a4a1a7777..6d7f083c46 100644 --- a/windows/src/engine/keyman64/version.in +++ b/windows/src/engine/keyman64/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman Engine Processor x64\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KEYMAN64\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "KEYMAN64.DLL\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/engine/keymanx64/version.in b/windows/src/engine/keymanx64/version.rc similarity index 69% rename from windows/src/engine/keymanx64/version.in rename to windows/src/engine/keymanx64/version.rc index de3e156673..4ad571864d 100644 --- a/windows/src/engine/keymanx64/version.in +++ b/windows/src/engine/keymanx64/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman Engine x64\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KEYMANX64\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "KEYMANX64.EXE\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/engine/kmcomapi/version.in b/windows/src/engine/kmcomapi/version.rc similarity index 69% rename from windows/src/engine/kmcomapi/version.in rename to windows/src/engine/kmcomapi/version.rc index 172593df20..820b9bf006 100644 --- a/windows/src/engine/kmcomapi/version.in +++ b/windows/src/engine/kmcomapi/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman Engine API\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMCOMAPI\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "KMCOMAPI.DLL\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/engine/kmrefresh/version.in b/windows/src/engine/kmrefresh/version.rc similarity index 69% rename from windows/src/engine/kmrefresh/version.in rename to windows/src/engine/kmrefresh/version.rc index de3e156673..4ad571864d 100644 --- a/windows/src/engine/kmrefresh/version.in +++ b/windows/src/engine/kmrefresh/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman Engine x64\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KEYMANX64\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "KEYMANX64.EXE\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/engine/kmtip/version.in b/windows/src/engine/kmtip/version.rc similarity index 69% rename from windows/src/engine/kmtip/version.in rename to windows/src/engine/kmtip/version.rc index 15e420d3d7..1e12b75d9a 100644 --- a/windows/src/engine/kmtip/version.in +++ b/windows/src/engine/kmtip/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman Engine Text Service\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMTIP\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "KMTIP.DLL\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/engine/mcompile/version.in b/windows/src/engine/mcompile/version.rc similarity index 70% rename from windows/src/engine/mcompile/version.in rename to windows/src/engine/mcompile/version.rc index e8f4b4a37e..20e1a93193 100644 --- a/windows/src/engine/mcompile/version.in +++ b/windows/src/engine/mcompile/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman Engine Mnemonic Keyboard Recompiler\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "MCOMPILE\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "MCOMPILE.EXE\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/engine/tsysinfo/version.in b/windows/src/engine/tsysinfo/version.rc similarity index 69% rename from windows/src/engine/tsysinfo/version.in rename to windows/src/engine/tsysinfo/version.rc index 01e7fd677c..b07056e864 100644 --- a/windows/src/engine/tsysinfo/version.in +++ b/windows/src/engine/tsysinfo/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman Engine Diagnostics\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KEYMAN\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "KEYMAN.EXE\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/engine/tsysinfox64/version.in b/windows/src/engine/tsysinfox64/version.rc similarity index 70% rename from windows/src/engine/tsysinfox64/version.in rename to windows/src/engine/tsysinfox64/version.rc index 5fd7a1355f..0c2edf83b0 100644 --- a/windows/src/engine/tsysinfox64/version.in +++ b/windows/src/engine/tsysinfox64/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman Engine x64 diagnostics\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "TSYSINFOX64\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "TSYSINFOX64.EXE\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/engine/version.in b/windows/src/engine/version.in deleted file mode 100644 index 15da354d9b..0000000000 --- a/windows/src/engine/version.in +++ /dev/null @@ -1,4 +0,0 @@ -VALUE "CompanyName", "SIL International\0" -VALUE "LegalCopyright", "© SIL International\0" -VALUE "LegalTrademarks", "Keyman is a registered trademark of SIL International\0" -VALUE "ProductName", "Keyman Engine\0" diff --git a/windows/src/global/help/Makefile b/windows/src/global/help/Makefile index 4d7a2b1c4b..25b0895d10 100644 --- a/windows/src/global/help/Makefile +++ b/windows/src/global/help/Makefile @@ -5,7 +5,7 @@ build: mkver-app cd $(ROOT)\src\global\help - $(MKVER_U) version.in version.out + $(MKVER_U) version.php.in version.out clean: -del version.out diff --git a/windows/src/global/help/version.in b/windows/src/global/help/version.php.in similarity index 100% rename from windows/src/global/help/version.in rename to windows/src/global/help/version.php.in diff --git a/windows/src/global/inc/keymanversion_build.in b/windows/src/global/inc/keymanversion_build.in index e967a5afb6..6f531a50dd 100644 --- a/windows/src/global/inc/keymanversion_build.in +++ b/windows/src/global/inc/keymanversion_build.in @@ -34,3 +34,20 @@ #define KEYMAN_Environment "$Environment" #define KEYMAN_Environment_W L"$Environment" + +// +// Version macros for .rc files +/// + +#define kv_version_stringify(x) kv_version_to_string(x) +#define kv_version_to_string(x) #x + +// Product versioning + +#define KV_VERSION_MAJOR $VersionMajor +#define KV_VERSION_MINOR $VersionMinor +#define KV_VERSION_PATCH $VersionPatch +#define KV_VERSION_STRING kv_version_stringify($VersionMajor ## . ## $VersionMinor ## . ## $VersionPatch ## .0) "\0" + +#define KV_FILEVERSION KV_VERSION_MAJOR, KV_VERSION_MINOR, KV_VERSION_PATCH, 0 +#define KV_PRODUCTVERSION KV_VERSION_MAJOR, KV_VERSION_MINOR, KV_VERSION_PATCH, 0 diff --git a/windows/src/support/etl2log/version.in b/windows/src/support/etl2log/version.rc similarity index 69% rename from windows/src/support/etl2log/version.in rename to windows/src/support/etl2log/version.rc index a7501d6d54..e2b08735cf 100644 --- a/windows/src/support/etl2log/version.in +++ b/windows/src/support/etl2log/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "Keyman etl to log converter\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KEYMAN32\0" - VALUE "LegalCopyright", "� SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "ETL2LOG.EXE\0" VALUE "ProductName", "Keyman Engine\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/support/oskbulkrenderer/version.in b/windows/src/support/oskbulkrenderer/version.rc similarity index 70% rename from windows/src/support/oskbulkrenderer/version.in rename to windows/src/support/oskbulkrenderer/version.rc index ba64c5da9f..b796c2858d 100644 --- a/windows/src/support/oskbulkrenderer/version.in +++ b/windows/src/support/oskbulkrenderer/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION $VERSIONNUM - PRODUCTVERSION $VERSIONNUM + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", "SIL International\0" VALUE "FileDescription", "OSK Bulk Renderer Support Tool\0" - VALUE "FileVersion", "$VERSION\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "OSKBULKRENDERER\0" - VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalCopyright", "\xA9 SIL International\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "OSKBULKRENDERER.EXE\0" VALUE "ProductName", "Keyman Support Tools\0" - VALUE "ProductVersion", "$VERSION\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/support/version.in b/windows/src/support/version.in deleted file mode 100644 index ac042cc677..0000000000 --- a/windows/src/support/version.in +++ /dev/null @@ -1,4 +0,0 @@ -VALUE "CompanyName", "SIL International\0" -VALUE "LegalCopyright", "© SIL International\0" -VALUE "LegalTrademarks", "Keyman is a registered trademark of SIL International\0" -VALUE "ProductName", "Keyman Support Tools\0" diff --git a/windows/src/test/manual-tests/msghooklister/src/App/Version.rc b/windows/src/test/manual-tests/msghooklister/src/App/Version.rc new file mode 100644 index 0000000000..d8966e57dd --- /dev/null +++ b/windows/src/test/manual-tests/msghooklister/src/App/Version.rc @@ -0,0 +1,119 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include +#include "messages.rc" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.K.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 2,0,0,0 + PRODUCTVERSION 2,0,0,0 + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "080904b0" + BEGIN + VALUE "CompanyName", "http://www.airesoft.co.uk" + VALUE "FileDescription", "MsgLister Application" + VALUE "FileVersion", "2, 0, 0, 0" + VALUE "InternalName", "App" + VALUE "LegalCopyright", "Copyright (C) Airesoft 2011" + VALUE "OriginalFilename", "MsgListerApp.exe" + VALUE "ProductName", "MsgHookLister" + VALUE "ProductVersion", "2, 0, 0, 0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x809, 1200 + END +END + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include \r\n" + "#include ""messages.rc""\r\0" +END + +3 TEXTINCLUDE +BEGIN + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + STR_UNKNOWN "Unknown" + STR_RETURNED "Value returned: " + STR_THREADFLAGS "Thread Flags:" + STR_EXITCODE "exit code = " + STR_THREADMESSAGE "Thread message" + STR_EXEORNONE "None/Executable" + STR_NONE "None" +END + +#endif // English (U.K.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/windows/src/test/manual-tests/test_i3619/i3619tip/i3619tip/i3619tip/version.rc b/windows/src/test/manual-tests/test_i3619/i3619tip/i3619tip/i3619tip/version.rc new file mode 100644 index 0000000000..c6d8ec473e --- /dev/null +++ b/windows/src/test/manual-tests/test_i3619/i3619tip/i3619tip/i3619tip/version.rc @@ -0,0 +1,30 @@ +1 VERSIONINFO + FILEVERSION 9,0,421,0 + PRODUCTVERSION 9,0,421,0 + FILEFLAGSMASK 0x3fL + FILEFLAGS 0x0L + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L + BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "0C0904E4" + BEGIN + VALUE "CompanyName", "SIL International\0" + VALUE "FileDescription", "Keyman TSF Input Processor\0" + VALUE "FileVersion", "9.0.421.0\0" + VALUE "InternalName", "KMTIP\0" + VALUE "LegalCopyright", "© SIL International\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "KMTIP.DLL\0" + VALUE "ProductName", "SIL International Keyman Engine Addins\0" + VALUE "ProductVersion", "9.0.421.0\0" + VALUE "Comments", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0xc09, 1252 + END + END From bf65ecf82b69fb0424250d05f8644e799fcbcfbc Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Sun, 5 Dec 2021 17:24:28 +1100 Subject: [PATCH 07/38] chore(windows): path fixes for version.rc includes --- windows/src/developer/samples/imsample/version.rc | 2 +- windows/src/engine/inst/insthelper/version.rc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/windows/src/developer/samples/imsample/version.rc b/windows/src/developer/samples/imsample/version.rc index 996cb6da7f..f374f43819 100644 --- a/windows/src/developer/samples/imsample/version.rc +++ b/windows/src/developer/samples/imsample/version.rc @@ -1,4 +1,4 @@ -#include "../../global/inc/keymanversion.h" +#include "../../../global/inc/keymanversion.h" 1 VERSIONINFO FILEVERSION KV_FILEVERSION diff --git a/windows/src/engine/inst/insthelper/version.rc b/windows/src/engine/inst/insthelper/version.rc index f70813d3cf..5deba174df 100644 --- a/windows/src/engine/inst/insthelper/version.rc +++ b/windows/src/engine/inst/insthelper/version.rc @@ -1,4 +1,4 @@ -#include "../../global/inc/keymanversion.h" +#include "../../../global/inc/keymanversion.h" 1 VERSIONINFO FILEVERSION KV_FILEVERSION From dee896b4c678e608a639154eddafd3c34d90e9d2 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Mon, 6 Dec 2021 12:47:31 +0400 Subject: [PATCH 08/38] chore(windows): move from Borland make to nmake While it may be smarter to move to a different build system altogether, it is also a *lot* more work. This was a fairly minor syntax refresh to get nmake working with our existing Makefile system. This is now no longer compatible with Borland make, so you will need to use `nmake` to build. The presence of NMAKE.md informs builds systems that nmake should be used instead of make. --- windows/src/Defines.mak | 62 +++++++------- windows/src/Header.mak | 16 ++-- windows/src/Makefile | 28 ++++--- windows/src/NMAKE.md | 3 + windows/src/Target.mak | 81 +++++++++++-------- windows/src/_make.bat | 19 ----- windows/src/buildtools/Makefile | 22 +++-- windows/src/buildtools/buildpkg/Makefile | 2 +- windows/src/buildtools/buildunidata/Makefile | 2 +- windows/src/buildtools/cef-checkout.sh | 5 +- .../buildtools/delphiprojectmanager/Makefile | 4 +- windows/src/buildtools/devtools/Makefile | 6 +- windows/src/buildtools/mkver/Makefile | 6 +- windows/src/buildtools/mkver/mkver.dproj | 21 +++++ windows/src/buildtools/msbuild-wrapper.bat | 9 ++- windows/src/buildtools/sentrytool/Makefile | 6 +- windows/src/buildtools/test-klog/Makefile | 2 +- windows/src/desktop/Makefile | 14 ++-- windows/src/desktop/inst/.gitignore | 2 + windows/src/desktop/inst/Makefile | 15 ++-- windows/src/desktop/inst/download.in | 6 +- windows/src/desktop/insthelp/Makefile | 2 +- windows/src/desktop/kmbrowserhost/Makefile | 2 +- windows/src/desktop/kmconfig/Makefile | 7 +- windows/src/desktop/kmshell/Makefile | 4 +- windows/src/desktop/setup/Makefile | 10 +-- windows/src/developer/Makefile | 14 ++-- windows/src/developer/TIKE/Makefile | 50 ++++++------ windows/src/developer/inst/.gitignore | 1 + windows/src/developer/inst/Makefile | 26 +++--- windows/src/developer/inst/download.in | 62 +++++++------- windows/src/developer/kmcmpdll/Makefile | 10 +-- windows/src/developer/kmcomp/Makefile | 12 +-- windows/src/developer/kmconvert/Makefile | 6 +- windows/src/developer/kmdecomp/Makefile | 2 +- windows/src/developer/samples/Makefile | 4 +- windows/src/developer/setup/Makefile | 2 +- windows/src/engine/Makefile | 18 ++--- windows/src/engine/inst/Makefile | 29 +++---- windows/src/engine/inst/insthelper/Makefile | 2 +- windows/src/engine/keyman/Makefile | 8 +- windows/src/engine/keyman32/Makefile | 2 +- windows/src/engine/keyman64/Makefile | 6 +- windows/src/engine/keymanmc/Makefile | 22 ++--- windows/src/engine/keymanx64/Makefile | 8 +- windows/src/engine/kmcomapi/Makefile | 10 +-- windows/src/engine/kmrefresh/Makefile | 4 +- windows/src/engine/kmtip/Makefile | 8 +- windows/src/engine/mcompile/Makefile | 2 +- windows/src/engine/tsysinfo/Makefile | 7 +- windows/src/engine/tsysinfox64/Makefile | 8 +- windows/src/ext/Makefile | 18 ++--- windows/src/ext/jedi/Makefile | 10 +-- windows/src/ext/sentry/test/Makefile | 4 +- windows/src/ext/tds2dbg/Makefile | 16 ++-- windows/src/global/delphi/Makefile | 4 +- windows/src/support/oskbulkrenderer/Makefile | 2 +- windows/src/test/Makefile | 2 +- .../manual-tests/integration-tests/Makefile | 8 +- .../integration-tests/keymanapi/Makefile | 10 +-- windows/src/test/test_i3633/Makefile | 2 +- windows/src/test/unit-tests/Makefile | 2 +- .../compile-supplementary-support/Makefile | 26 +++--- windows/src/test/unit-tests/jsonutil/Makefile | 2 +- .../test/unit-tests/keyboard-js-info/Makefile | 2 +- .../keyboard-package-versions/Makefile | 2 +- .../unit-tests/kmcomp-x64-structures/Makefile | 12 +-- .../unit-tests/kmx-file-languages/Makefile | 2 +- .../src/test/unit-tests/package-info/Makefile | 2 +- .../test/unit-tests/shared-data/cpp/Makefile | 4 +- .../unit-tests/shared-data/delphi/Makefile | 4 +- .../test/unit-tests/standards-data/Makefile | 2 +- .../unit-tests/ui-language-manager/Makefile | 2 +- .../test/unit-tests/windows-setup/Makefile | 2 +- 74 files changed, 421 insertions(+), 398 deletions(-) create mode 100644 windows/src/NMAKE.md delete mode 100644 windows/src/_make.bat diff --git a/windows/src/Defines.mak b/windows/src/Defines.mak index cd8fff8080..bfde1f4a54 100644 --- a/windows/src/Defines.mak +++ b/windows/src/Defines.mak @@ -28,26 +28,26 @@ INSTALLPATH_KEYMANDEVELOPER=%ProgramFiles(X86)%\Keyman\Keyman Developer INSTALLPATH_KEYMANENGINE=%CommonProgramFiles(X86)%\Keyman\Keyman Engine !IFDEF DEBUG - MAKEFLAG_DEBUG=-DDEBUG - DELPHI_MSBUILD_FLAG_DEBUG=/p:Config=Debug +MAKEFLAG_DEBUG="DEBUG=$(DEBUG)" +DELPHI_MSBUILD_FLAG_DEBUG="/p:Config=Debug" !ELSE - DELPHI_MSBUILD_FLAG_DEBUG=/p:Config=Release +DELPHI_MSBUILD_FLAG_DEBUG="/p:Config=Release" !ENDIF !IFDEF USERDEFINES - MAKEFLAG_USERDEFINES=-DUSERDEFINES +MAKEFLAG_USERDEFINES="USERDEFINES=$(USERDEFINES)" !ENDIF !IFDEF SC_TIMESTAMP - MAKEFLAG_SC_TIMESTAMP=-DSC_TIMESTAMP +MAKEFLAG_SC_TIMESTAMP="SC_TIMESTAMP=$(SC_TIMESTAMP)" !ENDIF !IFDEF BUILDHELP - MAKEFLAG_BUILDHELP=-DBUILDHELP +MAKEFLAG_BUILDHELP="BUILDHELP=$(BUILDHELP)" !ENDIF !IFDEF BUILDRTF - MAKEFLAG_BUILDRTF=-DBUILDRTF +MAKEFLAG_BUILDRTF="BUILDRTF=$(BUILDRTF)" !ENDIF !IFDEF REL_SUFFIX @@ -55,23 +55,23 @@ INSTALLPATH_KEYMANENGINE=%CommonProgramFiles(X86)%\Keyman\Keyman Engine !ENDIF !IFDEF LINT - MAKEFLAG_LINT=-DLINT +MAKEFLAG_LINT="LINT=$(LINT)" !ENDIF !IFDEF NOUI - MAKEFLAG_QUIET=-DNOUI +MAKEFLAG_QUIET="NOUI=$(NOUI)" !ELSE !IFDEF QUIET - MAKEFLAG_QUIET=-DQUIET +MAKEFLAG_QUIET="QUIET=$(QUIET)" !ENDIF !ENDIF !IFDEF RELEASE_OEM - MAKEFLAG_RELEASE_OEM=-DRELEASE_OEM +MAKEFLAG_RELEASE_OEM="RELEASE_OEM=$(RELEASE_OEM)" !ENDIF !IFDEF QUICK_BUILD_KEYMAN - MAKEFLAG_QUICK_BUILD_KEYMAN=-DQUICK_BUILD_KEYMAN +MAKEFLAG_QUICK_BUILD_KEYMAN="QUICK_BUILD_KEYMAN=$(QUICK_BUILD_KEYMAN)" !ENDIF # @@ -97,7 +97,7 @@ DCC32PATH=C:\Program Files (x86)\Embarcadero\Studio\$(DELPHI_VERSION)\bin # Pass local configuration through to sub-instances of MAKE # -MAKE="$(DCC32PATH)\make" -l $(MAKEFLAG_QUICK_BUILD_KEYMAN) $(MAKEFLAG_USERDEFINES) $(MAKEFLAG_DEBUG) $(MAKEFLAG_BUILDHELP) $(MAKEFLAG_BUILDRTF) $(MAKEFLAG_SC_TIMESTAMP) $(MAKEFLAG_LINT) $(MAKEFLAG_QUIET) $(MAKEFLAG_RELEASE_OEM) +MAKE="nmake" /C $(MAKEFLAG_QUICK_BUILD_KEYMAN) $(MAKEFLAG_USERDEFINES) $(MAKEFLAG_DEBUG) $(MAKEFLAG_BUILDHELP) $(MAKEFLAG_BUILDRTF) $(MAKEFLAG_SC_TIMESTAMP) $(MAKEFLAG_LINT) $(MAKEFLAG_QUIET) $(MAKEFLAG_RELEASE_OEM) # # Delphi build commands @@ -118,13 +118,13 @@ DELPHIWARNINGS=-W+MESSAGE_DIRECTIVE -W+IMPLICIT_STRING_CAST -W+IMPLICIT_STRING_C DELPHIWARNINGS=-W-MESSAGE_DIRECTIVE -W-IMPLICIT_STRING_CAST -W-IMPLICIT_STRING_CAST_LOSS -W-EXPLICIT_STRING_CAST -W-EXPLICIT_STRING_CAST_LOSS -W-CVT_WCHAR_TO_ACHAR -W-CVT_NARROWING_STRING_LOST -W-CVT_ACHAR_TO_WCHAR -W-CVT_WIDENING_STRING_LOST -W-UNICODE_TO_LOCALE -W-LOCALE_TO_UNICODE -W-IMPLICIT_VARIANTS -W-IMPLICIT_INTEGER_CAST_LOSS -W-IMPLICIT_CONVERSION_LOSS -W-COMBINING_SIGNED_UNSIGNED64 -W-COMBINING_SIGNED_UNSIGNED64 !ENDIF -DELPHIDPRPARAMS=-Q -B -GD -H -VT -$C+ -$D+ -$J+ -$L+ -$O+ -$Q- -$R- -$W+ -$Y+ -E. $(DELPHIWARNINGS) -I$(DELPHIINCLUDES) -U$(DELPHIINCLUDES) -R$(DELPHIINCLUDES) -NSVcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Web;Soap;Winapi;System.Win -NU.\obj\Win32\$(TARGET_PATH) -E.\bin\Win32\$(TARGET_PATH) -DELPHIDPRPARAMS64=-Q -B -GD -H -VT -$C+ -$D+ -$J+ -$L+ -$O+ -$Q- -$R- -$W+ -$Y+ -E. $(DELPHIWARNINGS) -I$(DELPHIINCLUDES) -U$(DELPHIINCLUDES) -R$(DELPHIINCLUDES) -NSVcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Web;Soap;Winapi;System.Win -NU.\obj\Win64\$(TARGET_PATH) -E.\bin\Win64\$(TARGET_PATH) -DELPHIDPKPARAMS=-Q -B -GD -VT -$C+ -$D+ -$J+ -$L+ -$O+ -$Q- -$R- -$W+ -$Y+ -E. $(DELPHIWARNINGS) -I$(DELPHIINCLUDES) -U$(DELPHIINCLUDES) -R$(DELPHIINCLUDES) -NSVcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Web;Soap;Winapi;System.Win -LE$(OUTLIB) -LN$(OUTLIB) -NSData -NUobj\Win32\$(TARGET_PATH) +DELPHIDPRPARAMS=-Q -B -GD -H -VT -^$C+ -^$D+ -^$J+ -^$L+ -^$O+ -^$Q- -^$R- -^$W+ -^$Y+ -E. $(DELPHIWARNINGS) -I$(DELPHIINCLUDES) -U$(DELPHIINCLUDES) -R$(DELPHIINCLUDES) -NSVcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Web;Soap;Winapi;System.Win -NU.\obj\Win32\$(TARGET_PATH) -E.\bin\Win32\$(TARGET_PATH) +DELPHIDPRPARAMS64=-Q -B -GD -H -VT -^$C+ -^$D+ -^$J+ -^$L+ -^$O+ -^$Q- -^$R- -^$W+ -^$Y+ -E. $(DELPHIWARNINGS) -I$(DELPHIINCLUDES) -U$(DELPHIINCLUDES) -R$(DELPHIINCLUDES) -NSVcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Web;Soap;Winapi;System.Win -NU.\obj\Win64\$(TARGET_PATH) -E.\bin\Win64\$(TARGET_PATH) +DELPHIDPKPARAMS=-Q -B -GD -VT -^$C+ -^$D+ -^$J+ -^$L+ -^$O+ -^$Q- -^$R- -^$W+ -^$Y+ -E. $(DELPHIWARNINGS) -I$(DELPHIINCLUDES) -U$(DELPHIINCLUDES) -R$(DELPHIINCLUDES) -NSVcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Web;Soap;Winapi;System.Win -LE$(OUTLIB) -LN$(OUTLIB) -NSData -NUobj\Win32\$(TARGET_PATH) !IFDEF NOUI -DCC32="$(DCC32PATH)\dcc32.exe" $(DELPHIDPRPARAMS) -DCC32DPK="$(DCC32PATH)\dcc32.exe" $(DELPHIDPKPARAMS) +DCC32=cmd /c "$(DCC32PATH)\dcc32.exe" $(DELPHIDPRPARAMS) +DCC32DPK=cmd /c "$(DCC32PATH)\dcc32.exe" $(DELPHIDPKPARAMS) !ELSE !IFDEF QUIET DCC32=@$(DEVTOOLS) -dccq $(DELPHIDPRPARAMS) @@ -141,8 +141,7 @@ DCC64="$(DCC32PATH)\dcc64.exe" $(DELPHIDPRPARAMS64) -N0x64\ -Ex64\ # Delphi MSBuild related commands and macros # -# Warning: whitespace is horribly significant in the following macro -- particularly lack of space before && -DELPHI_MSBUILD=set DCC32PATH=$(DCC32PATH)&& $(ROOT)\src\buildtools\msbuild-wrapper.bat $(DELPHI_MSBUILD_FLAG_DEBUG) +DELPHI_MSBUILD=$(ROOT)\src\buildtools\msbuild-wrapper.bat "$(DCC32PATH)" $(DELPHI_MSBUILD_FLAG_DEBUG) # Visual C++ x86, x64 WIN32_TARGET_PATH=bin\Win32\$(TARGET_PATH) @@ -170,11 +169,11 @@ MT=mt.exe VCBUILD=error !IFDEF DEBUG - MSBUILD_BUILD=/t:Build /p:Configuration=Debug - MSBUILD_CLEAN=/t:Clean /p:Configuration=Debug +MSBUILD_BUILD=/t:Build /p:Configuration=Debug +MSBUILD_CLEAN=/t:Clean /p:Configuration=Debug !ELSE - MSBUILD_BUILD=/t:Rebuild /p:Configuration=Release - MSBUILD_CLEAN=/t:Clean /p:Configuration=Release +MSBUILD_BUILD=/t:Rebuild /p:Configuration=Release +MSBUILD_CLEAN=/t:Clean /p:Configuration=Release !ENDIF COPY=copy @@ -186,7 +185,9 @@ WZUNZIP=$(WZZIPPATH) e # TDSPACK=error! $(ROOT)\src\buildtools\tdspack\tdspack -e # TDSPACKCOMPRESS=error! $(ROOT)\src\buildtools\tdspack\tdspack -o -TDS2DBG=$(ROOT)\bin\buildtools\tds2dbg +# we are using cmd /c because tds2dbg is failing on direct execution +# from nmake +TDS2DBG=cmd /c $(ROOT)\bin\buildtools\tds2dbg SENTRYTOOL=$(ROOT)\bin\buildtools\sentrytool SENTRYTOOL_DELPHIPREP=$(SENTRYTOOL) delphiprep -r $(KEYMAN_ROOT) -i $(DELPHIINCLUDES) @@ -210,7 +211,7 @@ LINKPATH=link.exe # !ifdef SIGNCODE_BUILD -MAKE=$(MAKE) -DSIGNCODE_BUILD +MAKE=$(MAKE) "SIGNCODE_BUILD=$(SIGNCODE_BUILD)" !else MAKE=$(MAKE) !endif @@ -290,10 +291,10 @@ KEYMAN_SYMSTOREPATH=$(KEYMAN_ROOT)\..\symbols # symbols in the symstore index which we can purge later on. __VERSION_WITH_TAG=$(VERSION_WIN)-$(VERSION_TIER) !IFNDEF TEAMCITY_VERSION - __VERSION_WITH_TAG=$(__VERSION_WITH_TAG)-local +__VERSION_WITH_TAG=$(__VERSION_WITH_TAG)-local !ELSE !IFDEF TEAMCITY_PR_NUMBER - __VERSION_WITH_TAG=$(__VERSION_WITH_TAG)-test-$(TEAMCITY_PR_NUMBER) +__VERSION_WITH_TAG=$(__VERSION_WITH_TAG)-test-$(TEAMCITY_PR_NUMBER) !ENDIF !ENDIF @@ -304,3 +305,8 @@ SYMSTORE="C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\symstore.exe" add /v "$(VERSION_WIN)" \ /c "Version: $(__VERSION_WITH_TAG)" \ /compress /f + +# nmake is crashing with straight grep? +GREP=cmd /c grep + +CLEAN=-del /S /Q diff --git a/windows/src/Header.mak b/windows/src/Header.mak index dee277efbc..549d6689e5 100644 --- a/windows/src/Header.mak +++ b/windows/src/Header.mak @@ -24,14 +24,14 @@ ROOT=c:\keyman\windows # build: $(BUILDPREREQ) - $(MAKE) -DTARGET=build $(TARGETS) + $(MAKE) "TARGET=build" $(TARGETS) !IFNDEF NOTARGET_SIGNCODE signcode: - $(MAKE) -DTARGET=signcode $(TARGETS) + $(MAKE) "TARGET=signcode" $(TARGETS) symbols: - $(MAKE) -DTARGET=symbols $(TARGETS) + $(MAKE) "TARGET=symbols" $(TARGETS) !ELSE signcode: rem no signcode required @@ -42,20 +42,20 @@ symbols: build-release: !IFDEF RELEASE_TARGETS - $(MAKE) -DTARGET=build-release $(RELEASE_TARGETS) + $(MAKE) "TARGET=build-release" $(RELEASE_TARGETS) !ELSE @rem !ENDIF clean: - $(MAKE) -DTARGET=clean $(TARGETS) $(CLEANS) + $(MAKE) "TARGET=clean" $(TARGETS) $(CLEANS) install: - $(MAKE) -DTARGET=install $(TARGETS) + $(MAKE) "TARGET=install" $(TARGETS) test-manifest: !IFDEF MANIFESTS - $(MAKE) -DTARGET=test-manifest $(MANIFESTS) + $(MAKE) "TARGET=test-manifest" $(MANIFESTS) !ELSE - $(MAKE) -DTARGET=test-manifest $(TARGETS) + $(MAKE) "TARGET=test-manifest" $(TARGETS) !ENDIF \ No newline at end of file diff --git a/windows/src/Makefile b/windows/src/Makefile index 4b35eac954..65cde7ed66 100644 --- a/windows/src/Makefile +++ b/windows/src/Makefile @@ -6,7 +6,7 @@ default: @echo The following make targets are available: - @echo . build builds everything except help files (-DBUILDHELP to build help) + @echo . build builds everything except help files (BUILDHELP=1 to build help) @echo . install installs packages into Delphi IDE (run after a build) @echo . clean removes all temp files @echo . release make a release @@ -18,7 +18,7 @@ default: @echo . DEBUG Include debug information @echo . SC_TIMESTAMP Don't timestamp certificates (for internal releases only, offline) @echo . BUILDHELP Build the helpfiles (implicit when 'make release') - @echo . LINT Turns on $MESSAGE hints and warnings and all extra string warnings + @echo . LINT Turns on ^$MESSAGE hints and warnings and all extra string warnings @echo . QUIET Ignore hints and warnings @echo . RELEASE_OEM Build executables for third party products in oem folder (e.g. FirstVoices) @echo. @@ -105,11 +105,11 @@ release: clean-pathdefines test-release-cef-path test-releasebuildcheck test-uia cd $(ROOT)\src $(MAKE) global-versions $(MAKE) build-release-wrapper - # $(MAKE) clean <-- this makes it harder to do OEM builds +# $(MAKE) clean <-- this makes it harder to do OEM builds cd $(ROOT)\src clean-pathdefines: test-releasebuildcheck - # test-releasebuildcheck builds devtools for us +# test-releasebuildcheck builds devtools for us $(PROGRAM)\buildtools\devtools -ri # @@ -117,11 +117,13 @@ clean-pathdefines: test-releasebuildcheck # and checkout the appropriate version of CEF as determined by CEF_VERSION.md # test-release-cef-path: +!ifndef SC_TIMESTAMP !ifdef GIT_BASH_FOR_KEYMAN $(GIT_BASH_FOR_KEYMAN) $(ROOT)\src\buildtools\cef-checkout.sh !else start /wait $(ROOT)\src\buildtools\cef-checkout.sh !endif +!endif # # Test that certificate checking is enabled and that certificate is accessible @@ -210,7 +212,7 @@ test-coverity: tar cvzf keyman-windows-coverity.tgz cov-int rd /s/q cov-int echo Manual upload keyman-windows-coverity.tgz to coverity - # TODO: automated upload as part of build +# TODO: automated upload as part of build test-coverity-internal: cd $(ROOT)\src\developer\kmanalyze @@ -236,14 +238,14 @@ build-release-wrapper: clean-output global-versions $(MAKE) dirs $(MAKE) build-tools !ifdef QUICK_BUILD_KEYMAN - $(MAKE) -DSIGNCODE_BUILD build - $(MAKE) -DSIGNCODE_BUILD build-release + $(MAKE) "SIGNCODE_BUILD=SIGNCODE_BUILD" build + $(MAKE) "SIGNCODE_BUILD=SIGNCODE_BUILD" build-release $(MAKE) signcode !else - $(MAKE) -DSIGNCODE_BUILD build unit-tests - $(MAKE) -DSIGNCODE_BUILD build-release + $(MAKE) "SIGNCODE_BUILD=SIGNCODE_BUILD" build unit-tests + $(MAKE) "SIGNCODE_BUILD=SIGNCODE_BUILD" build-release $(MAKE) signcode - $(MAKE) -DTARGET=test test + $(MAKE) "TARGET=test" test !endif cd $(ROOT)\src\engine\inst @@ -274,7 +276,7 @@ build-release-wrapper-oem: # global-versions: mkver-app - # Build our root version.txt +# Build our root version.txt cd $(ROOT)\src $(MKVER_U) $(ROOT)\src\global\inc\keymanversion_build.in $(ROOT)\src\global\inc\keymanversion_build.h @@ -284,8 +286,8 @@ build-tools: global-versions cd $(ROOT)\src\buildtools\devtools $(MAKE) - # We'll build a default PathDefines.mak if it is missing here so we can - # go on and do the rest of the build +# We'll build a default PathDefines.mak if it is missing here so we can +# go on and do the rest of the build $(PROGRAM)\buildtools\devtools -ti message-constants: build-tools diff --git a/windows/src/NMAKE.md b/windows/src/NMAKE.md new file mode 100644 index 0000000000..08bdfe6cc8 --- /dev/null +++ b/windows/src/NMAKE.md @@ -0,0 +1,3 @@ +# Using nmake for build + +Note: you must use nmake to run the build now; Borland make will no longer work. diff --git a/windows/src/Target.mak b/windows/src/Target.mak index 5556653e03..85f84b0c9e 100644 --- a/windows/src/Target.mak +++ b/windows/src/Target.mak @@ -1,4 +1,4 @@ -CLEAN=@-del /S /Q +!CMDSWITCHES +S def-clean: $(CLEAN) *.err *.stat *.dproj.local *.Build.CppClean.Log *.suo *.jdbg *.dbg *.dcu *.~* *.dsk *.exe *.rsm *.ncb *.opt *.pch *.plg *.aps *.001 *.sbr *.dep *.drc *.bak *.pdb *.lib *.cod *.ilk *.tds vc80.idb *.map *.bsc version.res manifest.xml manifest.res >nul 2>nul @@ -6,6 +6,8 @@ def-clean: if exist bin rd /s/q bin if exist obj rd /s/q obj +!CMDSWITCHES -S + versionhistory-app: dirs $(MAKE) versionhistory-app2 @@ -30,41 +32,45 @@ manifest.res: version.res $(MKVER_M) rc manifest.rc +!CMDSWITCHES +S + dirs: - @-mkdir $(ROOT)\build\desktop 2>nul - @-mkdir $(ROOT)\build\engine 2>nul - @-mkdir $(ROOT)\build\developer 2>nul - @-mkdir $(ROOT)\build\buildtools 2>nul - @-mkdir $(ROOT)\build\online 2>nul - @-mkdir $(ROOT)\build\support 2>nul - @-mkdir $(ROOT)\build\inst 2>nul + -mkdir $(ROOT)\build\desktop 2>nul + -mkdir $(ROOT)\build\engine 2>nul + -mkdir $(ROOT)\build\developer 2>nul + -mkdir $(ROOT)\build\buildtools 2>nul + -mkdir $(ROOT)\build\online 2>nul + -mkdir $(ROOT)\build\support 2>nul + -mkdir $(ROOT)\build\inst 2>nul - @-mkdir $(ROOT)\bin\developer\samples 2>nul - @-mkdir $(ROOT)\bin\developer\xml 2>nul - @-mkdir $(ROOT)\bin\developer\projects 2>nul - @-mkdir $(ROOT)\bin\developer\projects\templates 2>nul - @-mkdir $(ROOT)\bin\buildtools 2>nul - @-mkdir $(ROOT)\bin\engine 2>nul - @-mkdir $(ROOT)\bin\desktop 2>nul - @-mkdir $(ROOT)\bin\desktop\xml 2>nul - @-mkdir $(ROOT)\bin\support 2>nul - @-mkdir $(ROOT)\bin\online 2>nul - @-mkdir $(ROOT)\bin\inst 2>nul - @-mkdir $(ROOT)\bin\help 2>nul - @-mkdir $(ROOT)\bin\help\desktop 2>nul - @-mkdir $(ROOT)\bin\help\developer 2>nul - @-mkdir $(ROOT)\bin\help\md 2>nul - @-mkdir $(ROOT)\bin\help\md\desktop 2>nul - @-mkdir $(ROOT)\lib 2>nul - @-mkdir $(ROOT)\release 2>nul + -mkdir $(ROOT)\bin\developer\samples 2>nul + -mkdir $(ROOT)\bin\developer\xml 2>nul + -mkdir $(ROOT)\bin\developer\projects 2>nul + -mkdir $(ROOT)\bin\developer\projects\templates 2>nul + -mkdir $(ROOT)\bin\buildtools 2>nul + -mkdir $(ROOT)\bin\engine 2>nul + -mkdir $(ROOT)\bin\desktop 2>nul + -mkdir $(ROOT)\bin\desktop\xml 2>nul + -mkdir $(ROOT)\bin\support 2>nul + -mkdir $(ROOT)\bin\online 2>nul + -mkdir $(ROOT)\bin\inst 2>nul + -mkdir $(ROOT)\bin\help 2>nul + -mkdir $(ROOT)\bin\help\desktop 2>nul + -mkdir $(ROOT)\bin\help\developer 2>nul + -mkdir $(ROOT)\bin\help\md 2>nul + -mkdir $(ROOT)\bin\help\md\desktop 2>nul + -mkdir $(ROOT)\lib 2>nul + -mkdir $(ROOT)\release 2>nul - @-mkdir $(ROOT)\debug\developer 2>nul - @-mkdir $(ROOT)\debug\buildtools 2>nul - @-mkdir $(ROOT)\debug\engine 2>nul - @-mkdir $(ROOT)\debug\desktop 2>nul - @-mkdir $(ROOT)\debug\support 2>nul - @-mkdir $(ROOT)\debug\online 2>nul - @-mkdir $(ROOT)\debug\inst 2>nul + -mkdir $(ROOT)\debug\developer 2>nul + -mkdir $(ROOT)\debug\buildtools 2>nul + -mkdir $(ROOT)\debug\engine 2>nul + -mkdir $(ROOT)\debug\desktop 2>nul + -mkdir $(ROOT)\debug\support 2>nul + -mkdir $(ROOT)\debug\online 2>nul + -mkdir $(ROOT)\debug\inst 2>nul + +!CMDSWITCHES -S vcvars32: vcvars32.bat @@ -79,5 +85,10 @@ symbols: cmd /C \ for /f %v in ($(KEYMAN_ROOT)\VERSION.md) do \ for /f %t in ($(KEYMAN_ROOT)\TIER.md) do \ - $(MAKE) -DVERSION_TIER=%t -DVERSION_WIN=%v wrap-symbols -!ENDIF \ No newline at end of file + $(MAKE) "VERSION_TIER=%t" "VERSION_WIN=%v" wrap-symbols +!ENDIF + +# This virtual rule forces targets which are folders, e.g. `kmshell` to +# always execute +.virtual: + rem always execute diff --git a/windows/src/_make.bat b/windows/src/_make.bat deleted file mode 100644 index dc20b3b839..0000000000 --- a/windows/src/_make.bat +++ /dev/null @@ -1,19 +0,0 @@ -@echo off - -path C:\Windows\Microsoft.NET\Framework\v1.1.4322\ -path %path%;C:\Program Files\Borland\BDS\4.0\Bin -path %path%;%SystemRoot%\system32 -path %path%;%SystemRoot% -path %path%;%SystemRoot%\System32\Wbem -path %path%;C:\Program Files\Borland\CaliberRM SDK 2005 R2\lib -path %path%;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\ -path %path%;C:\Program Files\Microsoft SQL Server\90\Tools\binn\ -path %path%;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\ -path %path%;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\ -path %path%;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ -path %path%;c:\program files\wix -path %path%;c:\bin - -@call "c:\program files\microsoft platform sdk\setenv.cmd" > nul - -make build signcode diff --git a/windows/src/buildtools/Makefile b/windows/src/buildtools/Makefile index d84bef5bef..48b93326d1 100644 --- a/windows/src/buildtools/Makefile +++ b/windows/src/buildtools/Makefile @@ -12,43 +12,39 @@ CLEANS=clean-buildtools # ---------------------------------------------------------------------- -help: - cd $(ROOT)\src\buildtools\help - $(MAKE) $(TARGET) - -build_standards_data: +build_standards_data: .virtual cd $(ROOT)\src\buildtools\build_standards_data $(MAKE) $(TARGET) -sentrytool: +sentrytool: .virtual cd $(ROOT)\src\buildtools\sentrytool $(MAKE) $(TARGET) -buildunidata: +buildunidata: .virtual cd $(ROOT)\src\buildtools\buildunidata $(MAKE) $(TARGET) -delphiprojectmanager: +delphiprojectmanager: .virtual cd $(ROOT)\src\buildtools\delphiprojectmanager $(MAKE) $(TARGET) -devtools: +devtools: .virtual cd $(ROOT)\src\buildtools\devtools $(MAKE) $(TARGET) -mkver: +mkver: .virtual cd $(ROOT)\src\buildtools\mkver $(MAKE) $(TARGET) -buildpkg: +buildpkg: .virtual cd $(ROOT)\src\buildtools\buildpkg $(MAKE) $(TARGET) -test-klog: +test-klog: .virtual cd $(ROOT)\src\buildtools\test-klog $(MAKE) $(TARGET) -tds2dbg: +tds2dbg: .virtual cd $(ROOT)\src\buildtools\tds2dbg $(MAKE) $(TARGET) diff --git a/windows/src/buildtools/buildpkg/Makefile b/windows/src/buildtools/buildpkg/Makefile index dd567d8b31..056011b0bd 100644 --- a/windows/src/buildtools/buildpkg/Makefile +++ b/windows/src/buildtools/buildpkg/Makefile @@ -5,7 +5,7 @@ !include ..\..\Defines.mak build: version.res dirs - $(DELPHI_MSBUILD) buildpkg.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) buildpkg.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\buildpkg.exe -dpr buildpkg.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\buildpkg.exe $(COPY) $(WIN32_TARGET_PATH)\Buildpkg.exe $(PROGRAM)\online diff --git a/windows/src/buildtools/buildunidata/Makefile b/windows/src/buildtools/buildunidata/Makefile index 9dad511c59..46c916feb0 100644 --- a/windows/src/buildtools/buildunidata/Makefile +++ b/windows/src/buildtools/buildunidata/Makefile @@ -5,7 +5,7 @@ !include ..\..\Defines.mak build: dirs version.res - $(DELPHI_MSBUILD) buildunidata.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) buildunidata.dproj "/p:Platform=Win32" $(COPY) $(WIN32_TARGET_PATH)\buildunidata.exe $(PROGRAM)\buildtools run: diff --git a/windows/src/buildtools/cef-checkout.sh b/windows/src/buildtools/cef-checkout.sh index 2d80cca226..301aa5c86c 100644 --- a/windows/src/buildtools/cef-checkout.sh +++ b/windows/src/buildtools/cef-checkout.sh @@ -32,7 +32,10 @@ CEF_VERSION=`cat $CEF_VERSION_MD | tr -d "[:space:]"` # repo! git reset --hard git clean -fd -git fetch origin "v$CEF_VERSION" + +if [ "${1-}" != "--offline" ]; then + git fetch origin "v$CEF_VERSION" +fi git switch "v$CEF_VERSION" if [ ! -f ./libcef.dll ]; then diff --git a/windows/src/buildtools/delphiprojectmanager/Makefile b/windows/src/buildtools/delphiprojectmanager/Makefile index 36c15fa349..201494b794 100644 --- a/windows/src/buildtools/delphiprojectmanager/Makefile +++ b/windows/src/buildtools/delphiprojectmanager/Makefile @@ -5,9 +5,9 @@ !include ..\..\Defines.mak build: dirs - # build with DCC32 as $DCC32 command uses devtools.exe, and devtools uses this package... +# build with DCC32 as $DCC32 command uses devtools.exe, and devtools uses this package... @-mkdir obj\Win32\$(TARGET_PATH) - "$(DCC32PATH)\dcc32.exe" -B -E. -I$(DELPHIINCLUDES) -U$(DELPHIINCLUDES) -NSVcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Web;Soap;Winapi;System.Win -LE$(OUTLIB) -LN$(OUTLIB) -NUobj\Win32\$(TARGET_PATH) delphiprojectmanager.dpk + cmd /c "$(DCC32PATH)\dcc32.exe" -B -E. -I$(DELPHIINCLUDES) -U$(DELPHIINCLUDES) -NSVcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Web;Soap;Winapi;System.Win -LE$(OUTLIB) -LN$(OUTLIB) -NUobj\Win32\$(TARGET_PATH) delphiprojectmanager.dpk $(DEVTOOLS) -ip $(OUTLIB)\delphiprojectmanager.bpl clean: def-clean diff --git a/windows/src/buildtools/devtools/Makefile b/windows/src/buildtools/devtools/Makefile index bb4f5eaf30..50ec261e60 100644 --- a/windows/src/buildtools/devtools/Makefile +++ b/windows/src/buildtools/devtools/Makefile @@ -15,10 +15,10 @@ EXCLUDEPATHDEFINES=1 !include ..\..\Defines.mak build: dirs - # build with DCC32PATH as $DCC32 command uses devtools.exe... - # $(DCC32) devtools.dpr +# build with DCC32PATH as $DCC32 command uses devtools.exe... +# $(DCC32) devtools.dpr $(DELPHI_MSBUILD) devtools.dproj - #"$(DCC32PATH)\dcc32.exe" -Q -B -E. -NSVcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Web;Soap;Winapi;System.Win devtools.dpr +#"$(DCC32PATH)\dcc32.exe" -Q -B -E. -NSVcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Web;Soap;Winapi;System.Win devtools.dpr $(COPY) $(WIN32_TARGET_PATH)\devtools.exe $(PROGRAM)\buildtools test-releasebuildcheck: build diff --git a/windows/src/buildtools/mkver/Makefile b/windows/src/buildtools/mkver/Makefile index dcf099ccd4..f4bbbd2196 100644 --- a/windows/src/buildtools/mkver/Makefile +++ b/windows/src/buildtools/mkver/Makefile @@ -7,11 +7,7 @@ EXCLUDEPATHDEFINES=1 !include ..\..\Defines.mak build: dirs - # build with DCC32PATH as $DCC32 command uses devtools.exe... - # $(DCC32) mkver.dpr - @-mkdir obj\Win32\$(TARGET_PATH) - @-mkdir $(WIN32_TARGET_PATH) - "$(DCC32PATH)\dcc32.exe" -Q -B -E$(WIN32_TARGET_PATH) -NUobj\Win32\$(TARGET_PATH) -NSVcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Web;Soap;Winapi;System.Win mkver.dpr + $(DELPHI_MSBUILD) mkver.dproj "/p:Platform=Win32" $(COPY) $(WIN32_TARGET_PATH)\mkver.exe $(PROGRAM)\buildtools clean: def-clean diff --git a/windows/src/buildtools/mkver/mkver.dproj b/windows/src/buildtools/mkver/mkver.dproj index 51adae3bed..4c0cee861e 100644 --- a/windows/src/buildtools/mkver/mkver.dproj +++ b/windows/src/buildtools/mkver/mkver.dproj @@ -28,6 +28,12 @@ Base true + + true + Cfg_1 + true + true + true Base @@ -64,12 +70,15 @@ mkver $(BDS)\bin\delphi_PROJECTICON.ico $(BDS)\bin\delphi_PROJECTICNS.icns + .\bin\$(Platform)\$(Config) + .\obj\$(Platform)\$(Config) mkver_Icon.ico Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 1033 CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName) + (None) mkver_Icon.ico @@ -80,12 +89,20 @@ 0 RELEASE;$(DCC_Define) + + 1033 + CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName) + mkver_Icon.ico + DEBUG;$(DCC_Define) false -i c:\projects\keyman\open\windows\src\buildtools\version.txt c:\projects\keyman\open\windows\src\version.txt c:\projects\keyman\open\windows\src\buildtools\version.in + 1033 + CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName) + mkver_Icon.ico @@ -141,6 +158,10 @@ 1.0.0.0 + + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + True diff --git a/windows/src/buildtools/msbuild-wrapper.bat b/windows/src/buildtools/msbuild-wrapper.bat index daa4bfcf62..123901f17d 100644 --- a/windows/src/buildtools/msbuild-wrapper.bat +++ b/windows/src/buildtools/msbuild-wrapper.bat @@ -7,8 +7,11 @@ rem rem Do not use this for VS builds. rem -if not exist "%DCC32PATH%\rsvars.bat" echo Batch file %DCC32PATH%\rsvars.bat does not exist && exit /b 1 +SET DCC32PATH=%1 +shift -call "%DCC32PATH%\rsvars.bat" -msbuild.exe %* +if not exist %DCC32PATH%\rsvars.bat echo Batch file %DCC32PATH%\rsvars.bat does not exist && exit /b 1 + +call %DCC32PATH%\rsvars.bat +msbuild.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 exit /b %errorlevel% diff --git a/windows/src/buildtools/sentrytool/Makefile b/windows/src/buildtools/sentrytool/Makefile index 3b115388e1..4b51e2f46f 100644 --- a/windows/src/buildtools/sentrytool/Makefile +++ b/windows/src/buildtools/sentrytool/Makefile @@ -5,9 +5,9 @@ !include ..\..\Defines.mak build: dirs - # build with DCC32PATH as $DCC32 command uses devtools.exe... - # $(DCC32) devtools.dpr - $(DELPHI_MSBUILD) sentrytool.dproj /p:Platform=Win32 +# build with DCC32PATH as $DCC32 command uses devtools.exe... +# $(DCC32) devtools.dpr + $(DELPHI_MSBUILD) sentrytool.dproj "/p:Platform=Win32" $(COPY) $(WIN32_TARGET_PATH)\sentrytool.exe $(PROGRAM)\buildtools clean: def-clean diff --git a/windows/src/buildtools/test-klog/Makefile b/windows/src/buildtools/test-klog/Makefile index 1d7c02a76a..d8a27cbf68 100644 --- a/windows/src/buildtools/test-klog/Makefile +++ b/windows/src/buildtools/test-klog/Makefile @@ -5,7 +5,7 @@ !include ..\..\Defines.mak verify: clean - $(DELPHI_MSBUILD) test_klog.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) test_klog.dproj "/p:Platform=Win32" $(WIN32_TARGET_PATH)\test_klog build: diff --git a/windows/src/desktop/Makefile b/windows/src/desktop/Makefile index 6e8fe2cad6..c7bce34bfd 100644 --- a/windows/src/desktop/Makefile +++ b/windows/src/desktop/Makefile @@ -11,31 +11,31 @@ MANIFESTS=kmshell setup insthelp # ---------------------------------------------------------------------- -kmshell: +kmshell: .virtual cd $(ROOT)\src\desktop\kmshell $(MAKE) $(TARGET) -kmconfig: +kmconfig: .virtual cd $(ROOT)\src\desktop\kmconfig $(MAKE) $(TARGET) -kmbrowserhost: +kmbrowserhost: .virtual cd $(ROOT)\src\desktop\kmbrowserhost $(MAKE) $(TARGET) -setup: +setup: .virtual cd $(ROOT)\src\desktop\setup $(MAKE) $(TARGET) -help: +help: .virtual cd $(ROOT)\src\desktop\help $(MAKE) $(TARGET) -insthelp: +insthelp: .virtual cd $(ROOT)\src\desktop\insthelp $(MAKE) $(TARGET) -inst: +inst: .virtual cd $(ROOT)\src\desktop\inst $(MAKE) $(TARGET) diff --git a/windows/src/desktop/inst/.gitignore b/windows/src/desktop/inst/.gitignore index f92963534b..707050d155 100644 --- a/windows/src/desktop/inst/.gitignore +++ b/windows/src/desktop/inst/.gitignore @@ -3,3 +3,5 @@ desktop_resources.res desktopui.wxs cef.wxs locale.wxs +keymandesktop*.exe +desktop_resources.dll diff --git a/windows/src/desktop/inst/Makefile b/windows/src/desktop/inst/Makefile index b994b8211d..416e570e6b 100644 --- a/windows/src/desktop/inst/Makefile +++ b/windows/src/desktop/inst/Makefile @@ -13,17 +13,16 @@ manual-setup: check setup setup: desktop prereq: prereq-resources - # - # Prepare make file to copy versioned filenames to release folder - # - +# +# Prepare make file to copy versioned filenames to release folder +# cd $(ROOT)\src\desktop\inst $(MKVER_U) download.in download.mak prereq-resources: - # - # Create resource dll - # +# +# Create resource dll +# rc desktop_resources.rc $(LINKPATH) /DLL /OUT:desktop_resources.dll /RELEASE /NOENTRY /MACHINE:X86 desktop_resources.RES $(SIGNCODE) /d "Keyman Resources" desktop_resources.dll @@ -32,7 +31,7 @@ desktop: prereq $(MAKE) -fdownload.mak candle $(WIXLIGHT) -dWixUILicenseRtf=License.rtf -out keymandesktop.msi -ext WixUIExtension $(DESKTOP_FILES) $(SIGNCODE) /d "Keyman" keymandesktop.msi - # TODO: replace buildpkg with kmcomp and remove buildpkg from repository +# TODO: replace buildpkg with kmcomp and remove buildpkg from repository $(ROOT)\bin\buildtools\buildpkg -m keymandesktop.msi -s $(ROOT)\bin\desktop -l license.html $(SIGNCODE) /d "Keyman" keymandesktop.exe $(MAKE) -fdownload.mak copyredist-desktop diff --git a/windows/src/desktop/inst/download.in b/windows/src/desktop/inst/download.in index 04113063c7..bb5ecacbc3 100644 --- a/windows/src/desktop/inst/download.in +++ b/windows/src/desktop/inst/download.in @@ -38,12 +38,12 @@ candle-desktop: # heat-cef: - # We copy the files to a temp folder in order to exclude .git and README.md from harvesting +# We copy the files to a temp folder in order to exclude .git and README.md from harvesting -rmdir /s/q $(KEYMAN_WIX_TEMP_CEF) mkdir $(KEYMAN_WIX_TEMP_CEF) xcopy $(KEYMAN_CEF4DELPHI_ROOT)\* $(KEYMAN_WIX_TEMP_CEF)\ /s $(WIXHEAT) dir $(KEYMAN_WIX_TEMP_CEF) -o cef.wxs -ag -cg CEF -dr INSTALLDIR -var var.CefSourceDir -wx -nologo - # When we candle/light build, we can grab the source files from the proper root so go ahead and delete the temp folder again +# When we candle/light build, we can grab the source files from the proper root so go ahead and delete the temp folder again -rmdir /s/q $(KEYMAN_WIX_TEMP_CEF) candle-cef: heat-cef @@ -54,6 +54,6 @@ candle-cef: heat-cef # candle-locale: - # locale files are in desktop/locale/* +# locale files are in desktop/locale/* $(WIXHEAT) dir ..\kmshell\locale -o locale.wxs -ag -cg Locale -dr INSTALLDIR -var var.LOCALESOURCE -wx -nologo $(WIXCANDLE) -dVERSION=$VersionWin -dRELEASE=$VersionRelease -dPRODUCTID=$GUID1 -dLOCALESOURCE=..\kmshell\locale locale.wxs diff --git a/windows/src/desktop/insthelp/Makefile b/windows/src/desktop/insthelp/Makefile index 1c5f77dcc3..b3d4dcdf07 100644 --- a/windows/src/desktop/insthelp/Makefile +++ b/windows/src/desktop/insthelp/Makefile @@ -5,7 +5,7 @@ !include ..\..\Defines.mak build: version.res dirs - $(DELPHI_MSBUILD) insthelp.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) insthelp.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\insthelp.exe -dpr insthelp.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\insthelp.exe $(COPY) $(WIN32_TARGET_PATH)\insthelp.exe $(ROOT)\bin\desktop\insthelp.exe diff --git a/windows/src/desktop/kmbrowserhost/Makefile b/windows/src/desktop/kmbrowserhost/Makefile index 32ba89e630..ca3233516f 100644 --- a/windows/src/desktop/kmbrowserhost/Makefile +++ b/windows/src/desktop/kmbrowserhost/Makefile @@ -5,7 +5,7 @@ !include ..\..\Defines.mak build: version.res manifest.res dirs - $(DELPHI_MSBUILD) kmbrowserhost.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) kmbrowserhost.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\kmbrowserhost.exe -dpr kmbrowserhost.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\kmbrowserhost.exe diff --git a/windows/src/desktop/kmconfig/Makefile b/windows/src/desktop/kmconfig/Makefile index d063237156..d7f308f9d6 100644 --- a/windows/src/desktop/kmconfig/Makefile +++ b/windows/src/desktop/kmconfig/Makefile @@ -4,16 +4,13 @@ !include ..\..\Defines.mak -build: version.res manifest.res #icons - $(DELPHI_MSBUILD) kmconfig.dproj /p:Platform=Win32 +build: version.res manifest.res + $(DELPHI_MSBUILD) kmconfig.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\kmconfig.exe -dpr kmconfig.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\kmconfig.exe $(COPY) $(WIN32_TARGET_PATH)\kmconfig.exe $(PROGRAM)\desktop if exist $(WIN32_TARGET_PATH)\kmconfig.dbg $(COPY) $(WIN32_TARGET_PATH)\kmconfig.dbg $(DEBUGPATH)\desktop -#icons: - #rc icons.rc - clean: def-clean signcode: diff --git a/windows/src/desktop/kmshell/Makefile b/windows/src/desktop/kmshell/Makefile index 65dd5b5297..4626a9626e 100644 --- a/windows/src/desktop/kmshell/Makefile +++ b/windows/src/desktop/kmshell/Makefile @@ -5,7 +5,7 @@ !include ..\..\Defines.mak build: version.res manifest.res icons xml - $(DELPHI_MSBUILD) kmshell.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) kmshell.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\kmshell.exe -dpr kmshell.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\kmshell.exe $(COPY) $(WIN32_TARGET_PATH)\kmshell.exe $(PROGRAM)\desktop @@ -17,7 +17,7 @@ icons: xml: sentry-init.js cd $(ROOT)\src\desktop\kmshell\xml -del /q $(ROOT)\bin\desktop\xml\* - copy * $(ROOT)\bin\desktop\xml\ # + copy * $(ROOT)\bin\desktop\xml cd $(ROOT)\src\desktop\kmshell -rmdir /S /Q $(ROOT)\bin\desktop\locale mkdir $(ROOT)\bin\desktop\locale diff --git a/windows/src/desktop/setup/Makefile b/windows/src/desktop/setup/Makefile index 499dc2e38e..9445c217f4 100644 --- a/windows/src/desktop/setup/Makefile +++ b/windows/src/desktop/setup/Makefile @@ -5,13 +5,13 @@ !include ..\..\Defines.mak build: version.res manifest.res icons locale - $(DELPHI_MSBUILD) setup.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) setup.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\setup.exe -dpr setup.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\setup.exe $(COPY) $(WIN32_TARGET_PATH)\setup.exe $(PROGRAM)\desktop - # This version of setup.exe is for redistribution as a - # bundled installer and is not signed +# This version of setup.exe is for redistribution as a +# bundled installer and is not signed $(COPY) $(WIN32_TARGET_PATH)\setup.exe $(PROGRAM)\desktop\setup-redist.exe locale: @@ -34,11 +34,11 @@ wrap-symbols: $(SYMSTORE) $(DEBUGPATH)\desktop\setup.dbg /t keyman-windows test-manifest: - # test that (a) linked manifest exists and correct, and (b) has uiAccess=true +# test that (a) linked manifest exists and correct, and (b) has uiAccess=true $(MT) -nologo -inputresource:$(PROGRAM)\desktop\setup.exe -validate_manifest debug-manifest: - # make a non-elevated manifest for testing purposes +# make a non-elevated manifest for testing purposes -del manifest.res copy manifest.in std-manifest.tmp copy debug-manifest.in manifest.in diff --git a/windows/src/developer/Makefile b/windows/src/developer/Makefile index 609b98a7a2..3c1b7d37ff 100644 --- a/windows/src/developer/Makefile +++ b/windows/src/developer/Makefile @@ -11,15 +11,15 @@ CLEANS=clean-developer # ---------------------------------------------------------------------- -imsample: +imsample: .virtual cd $(ROOT)\src\developer\imsample $(MAKE) $(TARGET) -kmcmpdll: +kmcmpdll: .virtual cd $(ROOT)\src\developer\kmcmpdll $(MAKE) $(TARGET) -kmdecomp: +kmdecomp: .virtual cd $(ROOT)\src\developer\kmdecomp $(MAKE) $(TARGET) @@ -27,11 +27,11 @@ kmcomp: kmcmpdll cd $(ROOT)\src\developer\kmcomp $(MAKE) $(TARGET) -kmanalyze: +kmanalyze: .virtual cd $(ROOT)\src\developer\kmanalyze $(MAKE) $(TARGET) -kmconvert: +kmconvert: .virtual cd $(ROOT)\src\developer\kmconvert $(MAKE) $(TARGET) @@ -39,11 +39,11 @@ tike: kmcmpdll redist cd $(ROOT)\src\developer\tike $(MAKE) $(TARGET) -samples: +samples: .virtual cd $(ROOT)\src\developer\samples $(MAKE) $(TARGET) -setup: +setup: .virtual cd $(ROOT)\src\developer\setup $(MAKE) $(TARGET) diff --git a/windows/src/developer/TIKE/Makefile b/windows/src/developer/TIKE/Makefile index 956cb62805..4199470467 100644 --- a/windows/src/developer/TIKE/Makefile +++ b/windows/src/developer/TIKE/Makefile @@ -6,7 +6,7 @@ build: version.res manifest.res icons dirs xml xsd pull-core cd $(ROOT)\src\developer\tike - $(DELPHI_MSBUILD) tike.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) tike.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\tike.exe -dpr tike.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\tike.exe $(COPY) $(WIN32_TARGET_PATH)\tike.exe $(PROGRAM)\developer @@ -44,28 +44,28 @@ pull-core: !endif pull-npm: - # - # Grab the version of Monaco and any other node modules - # that we want to use in Keyman Developer, and copy into - # lib folder for sane paths. If we use more npm modules in the - # future, we may consolidate the paths at that time. - # +# +# Grab the version of Monaco and any other node modules +# that we want to use in Keyman Developer, and copy into +# lib folder for sane paths. If we use more npm modules in the +# future, we may consolidate the paths at that time. +# cd $(ROOT)\src\developer\tike\xml\app npm install -rd /s/q $(ROOT)\src\developer\tike\xml\app\lib\monaco - xcopy /s /y $(ROOT)\src\developer\tike\xml\app\node_modules\monaco-editor\min $(ROOT)\src\developer\tike\xml\app\lib\monaco\min\ # - xcopy /s /y $(ROOT)\src\developer\tike\xml\app\node_modules\monaco-editor\min-maps $(ROOT)\src\developer\tike\xml\app\lib\monaco\min-maps\ # + xcopy /i /s /y $(ROOT)\src\developer\tike\xml\app\node_modules\monaco-editor\min $(ROOT)\src\developer\tike\xml\app\lib\monaco\min + xcopy /i /s /y $(ROOT)\src\developer\tike\xml\app\node_modules\monaco-editor\min-maps $(ROOT)\src\developer\tike\xml\app\lib\monaco\min-maps pull-keymanweb: - # - # Requires us to build KMW in order to get the output files - # If GIT_BASH_FOR_KEYMAN variable is not defined, then will just throw up - # a new window to do the build. This means we lose logging and - # potentially exit values as well. So GIT_BASH should be set for - # build agents, etc, to something like - # - # GIT_BASH_FOR_KEYMAN="C:\Program Files\Git\bin\bash.exe" --init-file "c:\Program Files\Git\etc\profile" -l - # +# +# Requires us to build KMW in order to get the output files +# If GIT_BASH_FOR_KEYMAN variable is not defined, then will just throw up +# a new window to do the build. This means we lose logging and +# potentially exit values as well. So GIT_BASH should be set for +# build agents, etc, to something like +# +# GIT_BASH_FOR_KEYMAN="C:\Program Files\Git\bin\bash.exe" --init-file "c:\Program Files\Git\etc\profile" -l +# cd $(ROOT)\..\web\source !ifdef GIT_BASH_FOR_KEYMAN @@ -76,12 +76,12 @@ pull-keymanweb: -rd /s/q $(ROOT)\src\developer\tike\xml\kmw\resource mkdir $(ROOT)\src\developer\tike\xml\kmw\resource - xcopy /y $(ROOT)\..\web\release\unminified\web\*.js $(ROOT)\src\developer\tike\xml\kmw\resource\ # - xcopy /y $(ROOT)\..\web\release\unminified\web\*.js.map $(ROOT)\src\developer\tike\xml\kmw\resource\ # - xcopy /y $(ROOT)\..\web\LICENSE $(ROOT)\src\developer\tike\xml\kmw\resource\ # - xcopy /y $(ROOT)\..\web\README.md $(ROOT)\src\developer\tike\xml\kmw\resource\ # - xcopy /s /y $(ROOT)\..\web\release\unminified\web\osk\* $(ROOT)\src\developer\tike\xml\kmw\resource\osk\ # - xcopy /s /y $(ROOT)\..\web\release\unminified\web\ui\* $(ROOT)\src\developer\tike\xml\kmw\resource\ui\ # + xcopy /i /y $(ROOT)\..\web\release\unminified\web\*.js $(ROOT)\src\developer\tike\xml\kmw\resource + xcopy /i /y $(ROOT)\..\web\release\unminified\web\*.js.map $(ROOT)\src\developer\tike\xml\kmw\resource + xcopy /i /y $(ROOT)\..\web\LICENSE $(ROOT)\src\developer\tike\xml\kmw\resource + xcopy /i /y $(ROOT)\..\web\README.md $(ROOT)\src\developer\tike\xml\kmw\resource + xcopy /i /s /y $(ROOT)\..\web\release\unminified\web\osk\* $(ROOT)\src\developer\tike\xml\kmw\resource\osk + xcopy /i /s /y $(ROOT)\..\web\release\unminified\web\ui\* $(ROOT)\src\developer\tike\xml\kmw\resource\ui icons: rc icons.rc @@ -102,7 +102,7 @@ install: $(COPY) $(PROGRAM)\developer\kmnkbp0-0.dll "$(INSTALLPATH_KEYMANDEVELOPER)\kmnkbp0-0.dll" test-manifest: - # test that linked manifest exists and correct +# test that linked manifest exists and correct $(MT) -nologo -inputresource:$(PROGRAM)\developer\tike.exe -validate_manifest generate-app-wxs: diff --git a/windows/src/developer/inst/.gitignore b/windows/src/developer/inst/.gitignore index ef75dc53ce..9afc70df8a 100644 --- a/windows/src/developer/inst/.gitignore +++ b/windows/src/developer/inst/.gitignore @@ -5,3 +5,4 @@ setup.inf setup.zip templates.wxs xml.wxs +keymandeveloper*.exe diff --git a/windows/src/developer/inst/Makefile b/windows/src/developer/inst/Makefile index cdf3ac8549..3dcafd0515 100644 --- a/windows/src/developer/inst/Makefile +++ b/windows/src/developer/inst/Makefile @@ -9,31 +9,29 @@ DEVELOPER_FILES=kmdev.wixobj xml.wixobj cef.wixobj templates.wixobj kmlmc.wixobj setup: - - # - # Prepare file version information - # - +# +# Prepare file version information +# cd $(ROOT)\src\developer\inst $(MKVER_U) download.in download.mak - # - # Build the installation archive - # +# +# Build the installation archive +# $(MAKE) -fdownload.mak candle $(WIXLIGHT) -sice:ICE91 -sice:ICE60 -dWixUILicenseRtf=License.rtf -out keymandeveloper.msi -ext WixUIExtension $(DEVELOPER_FILES) $(MAKE) -fdownload.mak clean-heat - # - # Sign the installation archive - # +# +# Sign the installation archive +# $(SIGNCODE) /d "Keyman Developer" keymandeveloper.msi - # - # Copy the installation archive - # +# +# Copy the installation archive +# cd $(ROOT)\src\developer\inst $(MAKE) -fdownload.mak diff --git a/windows/src/developer/inst/download.in b/windows/src/developer/inst/download.in index 5b99e09053..321700a9e5 100644 --- a/windows/src/developer/inst/download.in +++ b/windows/src/developer/inst/download.in @@ -39,7 +39,7 @@ candle: heat-cef heat-xml heat-templates heat-model-compiler clean-heat: clean-heat-model-compiler heat-xml: - # We copy the files to a temp folder in order to exclude thumbs.db, .vs, etc from harvesting +# We copy the files to a temp folder in order to exclude thumbs.db, .vs, etc from harvesting -rmdir /s/q $(KEYMAN_WIX_TEMP_XML) mkdir $(KEYMAN_WIX_TEMP_XML) xcopy $(ROOT)\src\developer\TIKE\xml\* $(KEYMAN_WIX_TEMP_XML)\ /s @@ -47,29 +47,29 @@ heat-xml: -rmdir /s/q $(KEYMAN_WIX_TEMP_XML)\app\node_modules -for /f %i in ('dir /a:d /s /b $(KEYMAN_WIX_TEMP_XML)\.vs') do rd /s /q %i $(WIXHEAT) dir $(KEYMAN_WIX_TEMP_XML) -o xml.wxs -ag -cg XML -dr INSTALLDIR -var var.XmlSourceDir -wx -nologo - # When we candle/light build, we can grab the source files from the proper root so go ahead and delete the temp folder again +# When we candle/light build, we can grab the source files from the proper root so go ahead and delete the temp folder again -rmdir /s/q $(KEYMAN_WIX_TEMP_XML) heat-templates: - # We copy the files to a temp folder in order to exclude .git and README.md from harvesting +# We copy the files to a temp folder in order to exclude .git and README.md from harvesting -rmdir /s/q $(KEYMAN_WIX_TEMP_TEMPLATES) mkdir $(KEYMAN_WIX_TEMP_TEMPLATES) xcopy $(KEYMAN_DEVELOPER_TEMPLATES_ROOT)\* $(KEYMAN_WIX_TEMP_TEMPLATES)\ /s $(WIXHEAT) dir $(KEYMAN_WIX_TEMP_TEMPLATES) -o templates.wxs -ag -cg Templates -dr dirProjects -var var.TemplatesSourceDir -wx -nologo - # When we candle/light build, we can grab the source files from the proper root so go ahead and delete the temp folder again +# When we candle/light build, we can grab the source files from the proper root so go ahead and delete the temp folder again -rmdir /s/q $(KEYMAN_WIX_TEMP_TEMPLATES) heat-cef: - # We copy the files to a temp folder in order to exclude .git and README.md from harvesting +# We copy the files to a temp folder in order to exclude .git and README.md from harvesting -rmdir /s/q $(KEYMAN_WIX_TEMP_CEF) mkdir $(KEYMAN_WIX_TEMP_CEF) xcopy $(KEYMAN_CEF4DELPHI_ROOT)\* $(KEYMAN_WIX_TEMP_CEF)\ /s $(WIXHEAT) dir $(KEYMAN_WIX_TEMP_CEF) -o cef.wxs -ag -cg CEF -dr INSTALLDIR -var var.CefSourceDir -wx -nologo - # When we candle/light build, we can grab the source files from the proper root so go ahead and delete the temp folder again +# When we candle/light build, we can grab the source files from the proper root so go ahead and delete the temp folder again -rmdir /s/q $(KEYMAN_WIX_TEMP_CEF) heat-model-compiler: - # Build kmlmc +# Build kmlmc cd $(KEYMAN_MODELCOMPILER_ROOT) !ifdef GIT_BASH_FOR_KEYMAN @@ -77,65 +77,65 @@ heat-model-compiler: !else start /wait .\build.sh !endif - # We use `npm pack` to extract only the aspects of the model-compiler actually needed for distribution. - # While we could use npm-bundle or similar, that adds extra, unwanted cruft; our approach gives us more - # control of the set of files distributed with the Keyman Developer installer. - # - # For users on other operating systems, node.js is a dependency and the compiler can be installed with - # `npm install @keymanapp/lexical-model-compiler`. +# We use `npm pack` to extract only the aspects of the model-compiler actually needed for distribution. +# While we could use npm-bundle or similar, that adds extra, unwanted cruft; our approach gives us more +# control of the set of files distributed with the Keyman Developer installer. +# +# For users on other operating systems, node.js is a dependency and the compiler can be installed with +# `npm install @keymanapp/lexical-model-compiler`. - # We copy the files to a temp folder in order to exclude thumbs.db, .vs, etc from harvesting +# We copy the files to a temp folder in order to exclude thumbs.db, .vs, etc from harvesting -rmdir /s/q $(KEYMAN_WIX_TEMP_MODELCOMPILER) - # Step 1 - npm-pack the model compiler package, then unpack it in our bundling directory. - # This automatically strips the package to its barebones. +# Step 1 - npm-pack the model compiler package, then unpack it in our bundling directory. +# This automatically strips the package to its barebones. npm pack ren keymanapp-lexical-model-compiler*.tgz kmlmc.tgz move kmlmc.tgz $(KEYMAN_WIX_TEMP_BASE) - # We extract the npm-packed version of the model compiler in order to reproduce our needed bundle. +# We extract the npm-packed version of the model compiler in order to reproduce our needed bundle. cd $(KEYMAN_WIX_TEMP_BASE) - # Requires use of 7-zip, which we're already depending on elsewhere in the build process. +# Requires use of 7-zip, which we're already depending on elsewhere in the build process. $(WZZIPPATH) x kmlmc.tgz $(WZZIPPATH) x kmlmc.tar - # Creates the directory referenced by $(KEYMAN_WIX_TEMP_MODELCOMPILER). +# Creates the directory referenced by $(KEYMAN_WIX_TEMP_MODELCOMPILER). move package ModelCompiler - # Cleans up the npm pack artifacts, which are no longer needed. +# Cleans up the npm pack artifacts, which are no longer needed. del kmlmc.tgz del kmlmc.tar - # Step 2 - the model compiler has one in-repo dependency that will also need to be packed. - # Managing other in-repo dependencies will be simpler; they install into ModelCompiler's - # extracted bundle. +# Step 2 - the model compiler has one in-repo dependency that will also need to be packed. +# Managing other in-repo dependencies will be simpler; they install into ModelCompiler's +# extracted bundle. cd $(KEYMAN_MODELCOMPILER_ROOT)\node_modules\@keymanapp\models-types npm pack ren keymanapp-models-types*.tgz kmtypes.tgz move kmtypes.tgz $(KEYMAN_WIX_TEMP_MODELCOMPILER) - # Step 3 - install just the bare essentials by using our packed local dependency, followed by - # all external production dependencies. +# Step 3 - install just the bare essentials by using our packed local dependency, followed by +# all external production dependencies. cd $(KEYMAN_WIX_TEMP_MODELCOMPILER) - # package-lock.json wasn't bundled; this is needed to keep dependency versions consistent. +# package-lock.json wasn't bundled; this is needed to keep dependency versions consistent. copy $(KEYMAN_MODELCOMPILER_ROOT)\package-lock.json $(KEYMAN_WIX_TEMP_MODELCOMPILER) npm install kmtypes.tgz --production --no-optional npm install --production --no-optional - # Clean up the npm pack artifacts for the dependencies. +# Clean up the npm pack artifacts for the dependencies. del kmtypes.tgz - # We don't need the unit tests +# We don't need the unit tests -rmdir /s/q $(KEYMAN_WIX_TEMP_MODELCOMPILER)\tests - # Build the .wxs file +# Build the .wxs file cd $(ROOT)\src\developer\inst $(WIXHEAT) dir $(KEYMAN_WIX_TEMP_MODELCOMPILER) -o kmlmc.wxs -ag -cg ModelCompiler -dr INSTALLDIR -var var.ModelCompilerSourceDir -wx -nologo clean-heat-model-compiler: - # the production build generates files that are not in source, e.g. .ps1 scripts - # When we candle/light build, we can grab the source files from the proper root so go ahead and delete the temp folder again +# the production build generates files that are not in source, e.g. .ps1 scripts +# When we candle/light build, we can grab the source files from the proper root so go ahead and delete the temp folder again -rmdir /s/q $(KEYMAN_WIX_TEMP_MODELCOMPILER) makeinstaller: diff --git a/windows/src/developer/kmcmpdll/Makefile b/windows/src/developer/kmcmpdll/Makefile index dac9020154..cc91e84942 100644 --- a/windows/src/developer/kmcmpdll/Makefile +++ b/windows/src/developer/kmcmpdll/Makefile @@ -6,19 +6,19 @@ build: version.res dirs - $(MSBUILD) kmcmpdll.vcxproj $(MSBUILD_BUILD) /p:Platform=Win32 + $(MSBUILD) kmcmpdll.vcxproj $(MSBUILD_BUILD) "/p:Platform=Win32" $(COPY) $(WIN32_TARGET_PATH)\kmcmpdll.dll $(PROGRAM)\developer $(COPY) $(WIN32_TARGET_PATH)\kmcmpdll.lib $(OUTLIB) $(COPY) $(WIN32_TARGET_PATH)\kmcmpdll.pdb $(DEBUGPATH)\developer - # for debugging purposes, it's useful to have a copy - # of kmcmpdll.dll in the TIKE project folder; it is - # .gitignored +# for debugging purposes, it's useful to have a copy +# of kmcmpdll.dll in the TIKE project folder; it is +# .gitignored -mkdir ..\kmcomp\$(WIN32_TARGET_PATH) -mkdir ..\tike\$(WIN32_TARGET_PATH) $(COPY) $(WIN32_TARGET_PATH)\kmcmpdll.dll ..\tike\$(WIN32_TARGET_PATH)\kmcmpdll.dll $(COPY) $(WIN32_TARGET_PATH)\kmcmpdll.dll ..\kmcomp\$(WIN32_TARGET_PATH)\kmcmpdll.dll - $(MSBUILD) kmcmpdll.vcxproj $(MSBUILD_BUILD) /p:Platform=x64 + $(MSBUILD) kmcmpdll.vcxproj $(MSBUILD_BUILD) "/p:Platform=x64" $(COPY) $(X64_TARGET_PATH)\kmcmpdll.x64.dll $(PROGRAM)\developer\kmcmpdll.x64.dll $(COPY) $(X64_TARGET_PATH)\kmcmpdll.x64.lib $(OUTLIB)\kmcmpdll.x64.lib $(COPY) $(X64_TARGET_PATH)\kmcmpdll.x64.pdb $(DEBUGPATH)\developer\kmcmpdll.x64.pdb diff --git a/windows/src/developer/kmcomp/Makefile b/windows/src/developer/kmcomp/Makefile index c866336036..c18df3645f 100644 --- a/windows/src/developer/kmcomp/Makefile +++ b/windows/src/developer/kmcomp/Makefile @@ -9,23 +9,23 @@ TARGET_EXT=exe TARGET_GROUP=developer build: version.res manifest.res dirs icons - $(DELPHI_MSBUILD) kmcomp.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) kmcomp.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\kmcomp.exe -dpr kmcomp.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\kmcomp.exe $(COPY) $(WIN32_TARGET_PATH)\kmcomp.exe $(PROGRAM)\developer if exist $(WIN32_TARGET_PATH)\kmcomp.dbg $(COPY) $(WIN32_TARGET_PATH)\kmcomp.dbg $(DEBUGPATH)\developer - $(DELPHI_MSBUILD) kmcomp.dproj /p:Platform=Win64 + $(DELPHI_MSBUILD) kmcomp.dproj "/p:Platform=Win64" if exist $(WIN64_TARGET_PATH)\kmcomp.x64.exe del $(WIN64_TARGET_PATH)\kmcomp.x64.exe - # Delphi does not allow us to build to a different target filename so we rename after build +# Delphi does not allow us to build to a different target filename so we rename after build ren $(WIN64_TARGET_PATH)\kmcomp.exe kmcomp.x64.exe if exist $(WIN64_TARGET_PATH)\kmcomp.x64.map del $(WIN64_TARGET_PATH)\kmcomp.x64.map ren $(WIN64_TARGET_PATH)\kmcomp.map kmcomp.x64.map - # $(SENTRYTOOL_DELPHIPREP) $(WIN64_TARGET_PATH)\kmcomp.x64.exe -dpr kmcomp.dpr +# $(SENTRYTOOL_DELPHIPREP) $(WIN64_TARGET_PATH)\kmcomp.x64.exe -dpr kmcomp.dpr $(COPY) $(WIN64_TARGET_PATH)\kmcomp.x64.exe $(PROGRAM)\developer\kmcomp.x64.exe if exist $(WIN64_TARGET_PATH)\kmcomp.dbg $(COPY) $(WIN64_TARGET_PATH)\kmcomp.dbg $(DEBUGPATH)\developer\kmcomp.x64.dbg @@ -43,10 +43,10 @@ wrap-symbols: $(SYMSTORE) $(PROGRAM)\developer\kmcomp.exe /t keyman-developer $(SYMSTORE) $(PROGRAM)\developer\kmcomp.x64.exe /t keyman-developer $(SYMSTORE) $(DEBUGPATH)\developer\kmcomp.dbg /t keyman-developer - #TODO: $(SYMSTORE) $(DEBUGPATH)\developer\kmcomp.x64.dbg /t keyman-developer +#TODO: $(SYMSTORE) $(DEBUGPATH)\developer\kmcomp.x64.dbg /t keyman-developer test-manifest: - # test that (a) linked manifest exists and correct +# test that (a) linked manifest exists and correct $(MT) -nologo -inputresource:$(PROGRAM)\developer\kmcomp.exe -validate_manifest $(MT) -nologo -inputresource:$(PROGRAM)\developer\kmcomp.x64.exe -validate_manifest diff --git a/windows/src/developer/kmconvert/Makefile b/windows/src/developer/kmconvert/Makefile index 09eff7e0a8..5c8b4dff22 100644 --- a/windows/src/developer/kmconvert/Makefile +++ b/windows/src/developer/kmconvert/Makefile @@ -5,14 +5,14 @@ !include ..\..\Defines.mak build: version.res manifest.res dirs icons - $(DELPHI_MSBUILD) kmconvert.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) kmconvert.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\kmconvert.exe -dpr kmconvert.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\kmconvert.exe $(COPY) $(WIN32_TARGET_PATH)\kmconvert.exe $(PROGRAM)\developer if exist $(WIN32_TARGET_PATH)\kmconvert.dbg $(COPY) $(WIN32_TARGET_PATH)\kmconvert.dbg $(DEBUGPATH)\developer - # Copy template files to project +# Copy template files to project -rd /s/q $(ROOT)\bin\developer\projects\templates -mkdir $(ROOT)\bin\developer\projects\templates xcopy /s /y data\* $(ROOT)\bin\developer\projects\templates @@ -31,7 +31,7 @@ wrap-symbols: $(SYMSTORE) $(DEBUGPATH)\developer\kmconvert.dbg /t keyman-developer test-manifest: - # test that (a) linked manifest exists and correct +# test that (a) linked manifest exists and correct $(MT) -nologo -inputresource:$(PROGRAM)\developer\kmconvert.exe -validate_manifest install: diff --git a/windows/src/developer/kmdecomp/Makefile b/windows/src/developer/kmdecomp/Makefile index 1c221fed1a..1ba3e46be5 100644 --- a/windows/src/developer/kmdecomp/Makefile +++ b/windows/src/developer/kmdecomp/Makefile @@ -6,7 +6,7 @@ build: version.res dirs - $(MSBUILD) kmdecomp.sln $(MSBUILD_BUILD) /p:Platform=Win32 + $(MSBUILD) kmdecomp.sln $(MSBUILD_BUILD) "/p:Platform=Win32" $(COPY) $(WIN32_TARGET_PATH)\kmdecomp.exe $(PROGRAM)\developer $(COPY) $(WIN32_TARGET_PATH)\kmdecomp.pdb $(DEBUGPATH)\developer diff --git a/windows/src/developer/samples/Makefile b/windows/src/developer/samples/Makefile index 3c03675a0c..592f700f79 100644 --- a/windows/src/developer/samples/Makefile +++ b/windows/src/developer/samples/Makefile @@ -5,10 +5,12 @@ TARGETS=imsample !include ..\..\Header.mak -imsample: +imsample: .virtual cd $(ROOT)\src\developer\samples\imsample $(MAKE) $(TARGET) +!include ..\..\Target.mak + # ---------------------------------------------------------------------- # EOF # ---------------------------------------------------------------------- diff --git a/windows/src/developer/setup/Makefile b/windows/src/developer/setup/Makefile index 3ec095b249..d0c79191e7 100644 --- a/windows/src/developer/setup/Makefile +++ b/windows/src/developer/setup/Makefile @@ -5,7 +5,7 @@ !include ..\..\Defines.mak build: version.res manifest.res icons - $(DELPHI_MSBUILD) setup.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) setup.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\setup.exe -dpr setup.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\setup.exe $(COPY) $(WIN32_TARGET_PATH)\setup.exe $(PROGRAM)\developer diff --git a/windows/src/engine/Makefile b/windows/src/engine/Makefile index 9c45f59bb1..5c5f6059e8 100644 --- a/windows/src/engine/Makefile +++ b/windows/src/engine/Makefile @@ -16,19 +16,19 @@ keyman: redist cd $(ROOT)\src\engine\keyman $(MAKE) $(TARGET) -kmcomapi: +kmcomapi: .virtual cd $(ROOT)\src\engine\kmcomapi $(MAKE) $(TARGET) -keymanmc: +keymanmc: .virtual cd $(ROOT)\src\engine\keymanmc $(MAKE) $(TARGET) -keyman32: +keyman32: .virtual cd $(ROOT)\src\engine\keyman32 $(MAKE) $(TARGET) -tsysinfox64: +tsysinfox64: .virtual cd $(ROOT)\src\engine\tsysinfox64 $(MAKE) $(TARGET) @@ -36,23 +36,23 @@ tsysinfo: tsysinfox64 cd $(ROOT)\src\engine\tsysinfo $(MAKE) $(TARGET) -keymanx64: +keymanx64: .virtual cd $(ROOT)\src\engine\keymanx64 $(MAKE) $(TARGET) -keyman64: +keyman64: .virtual cd $(ROOT)\src\engine\keyman64 $(MAKE) $(TARGET) -kmrefresh: +kmrefresh: .virtual cd $(ROOT)\src\engine\kmrefresh $(MAKE) $(TARGET) -mcompile: +mcompile: .virtual cd $(ROOT)\src\engine\mcompile $(MAKE) $(TARGET) -kmtip: +kmtip: .virtual cd $(ROOT)\src\engine\kmtip $(MAKE) $(TARGET) diff --git a/windows/src/engine/inst/Makefile b/windows/src/engine/inst/Makefile index db08b76ead..d56b41f20a 100644 --- a/windows/src/engine/inst/Makefile +++ b/windows/src/engine/inst/Makefile @@ -23,34 +23,31 @@ wrap-symbols: $(MAKE) symbols msm: - # - # Copy files for installation - # - +# +# Copy files for installation +# $(MKVER_U) download.in download.mak - # - # Make the installation archive - # +# +# Make the installation archive +# $(MAKE) -fdownload.mak prepareredist $(MAKE) -fdownload.mak candle - # warning 1072 relates to Error table defined by WixUtilExtension. Doesn't really affect us. +# warning 1072 relates to Error table defined by WixUtilExtension. Doesn't really affect us. $(WIXLIGHT) -sw1072 -ext WixUtilExtension $(ENGINE_FILES) -o keymanengine.msm copy: - # - # Sign the installation archive - # - +# +# Sign the installation archive +# cd $(ROOT)\src\engine\inst $(SIGNCODE) /d "Keyman Engine" keymanengine.msm - # - # Copy the installation archive - # - +# +# Copy the installation archive +# cd $(ROOT)\src\engine\inst copy $(ROOT)\src\engine\inst\keymanengine.msm $(ROOT)\bin\developer\wix $(MAKE) -fdownload.mak copyredist diff --git a/windows/src/engine/inst/insthelper/Makefile b/windows/src/engine/inst/insthelper/Makefile index b71f45a804..248be0d404 100644 --- a/windows/src/engine/inst/insthelper/Makefile +++ b/windows/src/engine/inst/insthelper/Makefile @@ -7,7 +7,7 @@ VERSION_TXT_PATH=..\.. !include ..\..\..\Defines.mak build: dirs version.res - $(DELPHI_MSBUILD) insthelper.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) insthelper.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\insthelper.dll -dpr insthelper.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\insthelper.dll $(COPY) $(WIN32_TARGET_PATH)\insthelper.dll $(PROGRAM)\inst diff --git a/windows/src/engine/keyman/Makefile b/windows/src/engine/keyman/Makefile index dcb68ff542..36239e866b 100644 --- a/windows/src/engine/keyman/Makefile +++ b/windows/src/engine/keyman/Makefile @@ -6,7 +6,7 @@ build: version.res manifest.res keymanmenuitem.res icons.res osktoolbar.res dirs rc langswitch\langswitchmanager.rc - $(DELPHI_MSBUILD) keyman.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) keyman.dproj "/p:Platform=Win32" # $(DCC32) keyman.dpr $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\keyman.exe -dpr keyman.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\keyman.exe @@ -43,13 +43,13 @@ install: $(COPY) $(PROGRAM)\engine\keyman.exe "$(INSTALLPATH_KEYMANENGINE)" test-uiaccess: - grep -c "uiAccess=\"true\"" manifest.in + $(GREP) -c "uiAccess=\"true\"" manifest.in test-manifest: - # test that (a) linked manifest exists and correct, and (b) has uiAccess=true +# test that (a) linked manifest exists and correct, and (b) has uiAccess=true $(MT) -nologo -inputresource:$(PROGRAM)\engine\keyman.exe -validate_manifest $(MT) -nologo -inputresource:$(PROGRAM)\engine\keyman.exe -out:temp.manifest - grep -c "uiAccess=\"true\"" temp.manifest + $(GREP) -c "uiAccess=\"true\"" temp.manifest -del temp.manifest !include ..\..\Target.mak diff --git a/windows/src/engine/keyman32/Makefile b/windows/src/engine/keyman32/Makefile index 9b1372370e..8871012a01 100644 --- a/windows/src/engine/keyman32/Makefile +++ b/windows/src/engine/keyman32/Makefile @@ -8,7 +8,7 @@ build: version.res dirs pull-core $(MSBUILD) keyman32.vcxproj $(MSBUILD_BUILD) $(COPY) $(WIN32_TARGET_PATH)\keyman32.dll $(PROGRAM)\engine $(COPY) $(WIN32_TARGET_PATH)\keyman32.pdb $(DEBUGPATH)\engine - #$(COPY) $(WIN32_TARGET_PATH)\keyman32.lib $(OUTLIB) done by vcxproj +#$(COPY) $(WIN32_TARGET_PATH)\keyman32.lib $(OUTLIB) done by vcxproj clean: def-clean $(MSBUILD) $(MSBUILD_CLEAN) keyman32.vcxproj diff --git a/windows/src/engine/keyman64/Makefile b/windows/src/engine/keyman64/Makefile index 401d72fb6d..dc12d80bfb 100644 --- a/windows/src/engine/keyman64/Makefile +++ b/windows/src/engine/keyman64/Makefile @@ -5,13 +5,13 @@ !include ..\..\Defines.mak build: version.res dirs - $(MSBUILD) keyman64.sln $(MSBUILD_BUILD) /p:Platform=x64 + $(MSBUILD) keyman64.sln $(MSBUILD_BUILD) "/p:Platform=x64" $(COPY) $(X64_TARGET_PATH)\keyman64.dll $(PROGRAM)\engine $(COPY) $(X64_TARGET_PATH)\keyman64.pdb $(DEBUGPATH)\engine - # $(COPY) keyman64.lib $(OUTLIB) - already done +# $(COPY) keyman64.lib $(OUTLIB) - already done clean: def-clean - $(MSBUILD) keyman64.sln $(MSBUILD_CLEAN) /p:Platform=x64 + $(MSBUILD) keyman64.sln $(MSBUILD_CLEAN) "/p:Platform=x64" signcode: $(SIGNCODE) /d "Keyman Engine x64" $(PROGRAM)\engine\keyman64.dll diff --git a/windows/src/engine/keymanmc/Makefile b/windows/src/engine/keymanmc/Makefile index d9405f85cb..46e08bfb6d 100644 --- a/windows/src/engine/keymanmc/Makefile +++ b/windows/src/engine/keymanmc/Makefile @@ -5,29 +5,29 @@ !include ..\..\Defines.mak build: - mc -U keymanmc.mc - rc keymanmc.rc - link -dll -noentry keymanmc.res + mc -U keymanmc.mc + rc keymanmc.rc + link -dll -noentry keymanmc.res $(COPY) keymanmc.dll $(PROGRAM)\engine clean: def-clean -del keymanmc.rc -del keymanmc.h - -del keymanmc.dll - -del keymanmc.res - -del MSG00409.bin + -del keymanmc.dll + -del keymanmc.res + -del MSG00409.bin signcode: $(SIGNCODE) /d "Keyman Engine" $(PROGRAM)\engine\keymanmc.dll wrap-symbols: - rem no symbols + rem no symbols install: $(COPY) $(PROGRAM)\engine\keymanmc.dll "$(INSTALLPATH_KEYMANENGINE)\keymanmc.dll" - reg add HKLM\SYSTEM\CurrentControlSet\services\eventlog\Application\Keyman /v CategoryCount /t REG_DWORD /d 1 /f - reg add HKLM\SYSTEM\CurrentControlSet\services\eventlog\Application\Keyman /v CategoryMessageFile /t REG_SZ /d "$(INSTALLPATH_KEYMANENGINE)\keymanmc.dll" /f - reg add HKLM\SYSTEM\CurrentControlSet\services\eventlog\Application\Keyman /v EventMessageFile /t REG_SZ /d "$(INSTALLPATH_KEYMANENGINE)\keymanmc.dll" /f - reg add HKLM\SYSTEM\CurrentControlSet\services\eventlog\Application\Keyman /v TypesSupported /t REG_DWORD /d 7 /f + reg add HKLM\SYSTEM\CurrentControlSet\services\eventlog\Application\Keyman /v CategoryCount /t REG_DWORD /d 1 /f + reg add HKLM\SYSTEM\CurrentControlSet\services\eventlog\Application\Keyman /v CategoryMessageFile /t REG_SZ /d "$(INSTALLPATH_KEYMANENGINE)\keymanmc.dll" /f + reg add HKLM\SYSTEM\CurrentControlSet\services\eventlog\Application\Keyman /v EventMessageFile /t REG_SZ /d "$(INSTALLPATH_KEYMANENGINE)\keymanmc.dll" /f + reg add HKLM\SYSTEM\CurrentControlSet\services\eventlog\Application\Keyman /v TypesSupported /t REG_DWORD /d 7 /f !include ..\..\Target.mak diff --git a/windows/src/engine/keymanx64/Makefile b/windows/src/engine/keymanx64/Makefile index 148d040c4b..76ceeeac92 100644 --- a/windows/src/engine/keymanx64/Makefile +++ b/windows/src/engine/keymanx64/Makefile @@ -7,7 +7,7 @@ PLATFORM=x64 build: manifest.res version.res dirs - $(MSBUILD) keymanx64.vcxproj $(MSBUILD_BUILD) /p:Platform=x64 + $(MSBUILD) keymanx64.vcxproj $(MSBUILD_BUILD) "/p:Platform=x64" $(COPY) $(X64_TARGET_PATH)\keymanx64.exe $(PROGRAM)\engine $(COPY) $(X64_TARGET_PATH)\keymanx64.pdb $(DEBUGPATH)\engine @@ -30,13 +30,13 @@ install: $(COPY) $(PROGRAM)\engine\keymanx64.exe "$(INSTALLPATH_KEYMANENGINE)" test-uiaccess: - grep -c "uiAccess=\"true\"" manifest.in + $(GREP) -c "uiAccess=\"true\"" manifest.in test-manifest: - # test that (a) linked manifest exists and correct, and (b) has uiAccess=true +# test that (a) linked manifest exists and correct, and (b) has uiAccess=true $(MT) -nologo -inputresource:$(PROGRAM)\engine\keymanx64.exe -validate_manifest $(MT) -nologo -inputresource:$(PROGRAM)\engine\keymanx64.exe -out:temp.manifest - grep -c "uiAccess=\"true\"" temp.manifest + $(GREP) -c "uiAccess=\"true\"" temp.manifest -del temp.manifest !include ..\..\Target.mak diff --git a/windows/src/engine/kmcomapi/Makefile b/windows/src/engine/kmcomapi/Makefile index b41d3ee724..e8bd8e00fc 100644 --- a/windows/src/engine/kmcomapi/Makefile +++ b/windows/src/engine/kmcomapi/Makefile @@ -6,19 +6,19 @@ build: version.res manifest.res kbd_noicon.res dirs gentlb -Tkmcomapi.tlb kmcomapi.ridl - $(DELPHI_MSBUILD) kmcomapi.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) kmcomapi.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\kmcomapi.dll -dpr kmcomapi.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\kmcomapi.dll $(COPY) $(WIN32_TARGET_PATH)\kmcomapi.dll $(PROGRAM)\engine if exist $(WIN32_TARGET_PATH)\kmcomapi.dbg $(COPY) $(WIN32_TARGET_PATH)\kmcomapi.dbg $(DEBUGPATH)\engine - $(DELPHI_MSBUILD) kmcomapi.dproj /p:Platform=Win64 + $(DELPHI_MSBUILD) kmcomapi.dproj "/p:Platform=Win64" if exist $(WIN64_TARGET_PATH)\kmcomapi.x64.dll del $(WIN64_TARGET_PATH)\kmcomapi.x64.dll - # Delphi does not allow us to build to a different target filename so we rename after build +# Delphi does not allow us to build to a different target filename so we rename after build ren $(WIN64_TARGET_PATH)\kmcomapi.dll kmcomapi.x64.dll - # Not yet supported: $(SENTRYTOOL_DELPHIPREP) $(WIN64_TARGET_PATH)\kmcomapi.x64.dll -dpr kmcomapi.dpr +# Not yet supported: $(SENTRYTOOL_DELPHIPREP) $(WIN64_TARGET_PATH)\kmcomapi.x64.dll -dpr kmcomapi.dpr $(COPY) $(WIN64_TARGET_PATH)\kmcomapi.x64.dll $(PROGRAM)\engine\kmcomapi.x64.dll if exist $(WIN64_TARGET_PATH)\kmcomapi.dbg $(COPY) $(WIN64_TARGET_PATH)\kmcomapi.dbg $(DEBUGPATH)\engine\kmcomapi.x64.dbg @@ -48,6 +48,6 @@ wrap-symbols: $(SYMSTORE) $(PROGRAM)\engine\kmcomapi.dll /t keyman-engine-windows $(SYMSTORE) $(PROGRAM)\engine\kmcomapi.x64.dll /t keyman-engine-windows $(SYMSTORE) $(DEBUGPATH)\engine\kmcomapi.dbg /t keyman-engine-windows - #TODO: $(SYMSTORE) $(PROGRAM)\engine\kmcomapi.x64.dbg /t keyman-engine-windows +#TODO: $(SYMSTORE) $(PROGRAM)\engine\kmcomapi.x64.dbg /t keyman-engine-windows !include ..\..\Target.mak diff --git a/windows/src/engine/kmrefresh/Makefile b/windows/src/engine/kmrefresh/Makefile index d0f23daec9..793d35695e 100644 --- a/windows/src/engine/kmrefresh/Makefile +++ b/windows/src/engine/kmrefresh/Makefile @@ -7,8 +7,8 @@ PLATFORM=x64 build: version.res dirs - $(MSBUILD) kmrefresh.vcxproj /p:Platform=Win32 $(MSBUILD_BUILD) - $(MSBUILD) kmrefresh.vcxproj /p:Platform=x64 $(MSBUILD_BUILD) + $(MSBUILD) kmrefresh.vcxproj "/p:Platform=Win32" $(MSBUILD_BUILD) + $(MSBUILD) kmrefresh.vcxproj "/p:Platform=x64" $(MSBUILD_BUILD) $(COPY) $(WIN32_TARGET_PATH)\kmrefresh.x86.exe $(PROGRAM)\engine $(COPY) $(WIN32_TARGET_PATH)\kmrefresh.x86.pdb $(DEBUGPATH)\engine $(COPY) $(X64_TARGET_PATH)\kmrefresh.x64.exe $(PROGRAM)\engine diff --git a/windows/src/engine/kmtip/Makefile b/windows/src/engine/kmtip/Makefile index 2b3ad8467a..6ddd84074f 100644 --- a/windows/src/engine/kmtip/Makefile +++ b/windows/src/engine/kmtip/Makefile @@ -5,16 +5,16 @@ !include ..\..\Defines.mak build: version.res dirs - $(MSBUILD) kmtip.vcxproj $(MSBUILD_BUILD) /p:Platform=Win32 + $(MSBUILD) kmtip.vcxproj $(MSBUILD_BUILD) "/p:Platform=Win32" $(COPY) $(WIN32_TARGET_PATH)\kmtip.dll $(PROGRAM)\engine $(COPY) $(WIN32_TARGET_PATH)\kmtip.pdb $(DEBUGPATH)\engine - $(MSBUILD) kmtip.vcxproj $(MSBUILD_BUILD) /p:Platform=x64 + $(MSBUILD) kmtip.vcxproj $(MSBUILD_BUILD) "/p:Platform=x64" $(COPY) $(X64_TARGET_PATH)\kmtip64.dll $(PROGRAM)\engine\kmtip64.dll $(COPY) $(X64_TARGET_PATH)\kmtip64.pdb $(DEBUGPATH)\engine\kmtip64.pdb clean: def-clean - $(MSBUILD) kmtip.vcxproj $(MSBUILD_CLEAN) /p:Platform=Win32 - $(MSBUILD) kmtip.vcxproj $(MSBUILD_CLEAN) /p:Platform=x64 + $(MSBUILD) kmtip.vcxproj $(MSBUILD_CLEAN) "/p:Platform=Win32" + $(MSBUILD) kmtip.vcxproj $(MSBUILD_CLEAN) "/p:Platform=x64" signcode: $(SIGNCODE) /d "Keyman Engine Text Service" $(PROGRAM)\engine\kmtip.dll diff --git a/windows/src/engine/mcompile/Makefile b/windows/src/engine/mcompile/Makefile index 447499576e..0aff8b92e5 100644 --- a/windows/src/engine/mcompile/Makefile +++ b/windows/src/engine/mcompile/Makefile @@ -26,7 +26,7 @@ install: $(COPY) $(PROGRAM)\engine\mcompile.exe "$(INSTALLPATH_KEYMANENGINE)" test-manifest: - # test that linked manifest exists and correct +# test that linked manifest exists and correct $(MT) -nologo -inputresource:$(PROGRAM)\engine\mcompile.exe -validate_manifest !include ..\..\Target.mak diff --git a/windows/src/engine/tsysinfo/Makefile b/windows/src/engine/tsysinfo/Makefile index ea899b5070..ed8951eea7 100644 --- a/windows/src/engine/tsysinfo/Makefile +++ b/windows/src/engine/tsysinfo/Makefile @@ -8,7 +8,8 @@ build: version.res manifest.res dirs cd ..\tsysinfox64 !ifdef SIGNCODE_BUILD - $(MAKE) signcode # have to sign x64 version here as otherwise signcode is done after build. + $(MAKE) signcode +# have to sign x64 version here as otherwise signcode is done after build. !endif cd ..\tsysinfo @@ -16,7 +17,7 @@ build: version.res manifest.res dirs rc tsysinfo_x64.rc del tsysinfox64.bin - $(DELPHI_MSBUILD) tsysinfo.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) tsysinfo.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\tsysinfo.exe -dpr tsysinfo.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\tsysinfo.exe $(COPY) $(WIN32_TARGET_PATH)\tsysinfo.exe $(PROGRAM)\engine @@ -38,7 +39,7 @@ install: $(COPY) $(ROOT)\src\engine\tsysinfo\*.xsl "$(INSTALLPATH_KEYMANENGINE)" test-manifest: - # test that linked manifest exists and correct +# test that linked manifest exists and correct $(MT) -nologo -inputresource:$(PROGRAM)\engine\tsysinfo.exe -validate_manifest !include ..\..\Target.mak diff --git a/windows/src/engine/tsysinfox64/Makefile b/windows/src/engine/tsysinfox64/Makefile index d5161d0ca1..e18cd65968 100644 --- a/windows/src/engine/tsysinfox64/Makefile +++ b/windows/src/engine/tsysinfox64/Makefile @@ -5,8 +5,8 @@ !include ..\..\Defines.mak build: version.res manifest.res dirs - $(DELPHI_MSBUILD) tsysinfox64.dproj /p:Platform=Win64 - #$(SENTRYTOOL_DELPHIPREP) $(WIN64_TARGET_PATH)\tsysinfox64.exe -dpr tsysinfox64.dpr + $(DELPHI_MSBUILD) tsysinfox64.dproj "/p:Platform=Win64" +#$(SENTRYTOOL_DELPHIPREP) $(WIN64_TARGET_PATH)\tsysinfox64.exe -dpr tsysinfox64.dpr $(COPY) $(WIN64_TARGET_PATH)\tsysinfox64.exe $(PROGRAM)\engine clean: def-clean @@ -16,13 +16,13 @@ signcode: wrap-symbols: $(SYMSTORE) $(PROGRAM)\engine\tsysinfox64.exe /t keyman-engine-windows - #$(SYMSTORE) $(DEBUGPATH)\engine\tsysinfox64.dbg /t keyman-engine-windows +#$(SYMSTORE) $(DEBUGPATH)\engine\tsysinfox64.dbg /t keyman-engine-windows install: echo Nothing to do. test-manifest: - # test that linked manifest exists and correct +# test that linked manifest exists and correct $(MT) -nologo -inputresource:$(PROGRAM)\engine\tsysinfox64.exe -validate_manifest !include ..\..\Target.mak diff --git a/windows/src/ext/Makefile b/windows/src/ext/Makefile index 233a0378e3..3d57c0a739 100644 --- a/windows/src/ext/Makefile +++ b/windows/src/ext/Makefile @@ -14,34 +14,34 @@ CLEANS= # ---------------------------------------------------------------------- -cef4delphi: +cef4delphi: .virtual cd $(ROOT)\src\ext\cef4delphi $(MAKE) $(TARGET) - -dcpcrypt: + +dcpcrypt: .virtual cd $(ROOT)\src\ext\dcpcrypt $(MAKE) $(TARGET) -jedi: +jedi: .virtual cd $(ROOT)\src\ext\jedi $(MAKE) $(TARGET) -mbcolor: +mbcolor: .virtual cd $(ROOT)\src\ext\mbcolor $(MAKE) $(TARGET) -regexpr: +regexpr: .virtual cd $(ROOT)\src\ext\regexpr $(MAKE) $(TARGET) -vclzip: +vclzip: .virtual cd $(ROOT)\src\ext\vclzip $(MAKE) $(TARGET) -scfontcombobox: +scfontcombobox: .virtual cd $(ROOT)\src\ext\scfontcombobox $(MAKE) $(TARGET) - + # # # diff --git a/windows/src/ext/jedi/Makefile b/windows/src/ext/jedi/Makefile index 173181bf11..307a3a876b 100644 --- a/windows/src/ext/jedi/Makefile +++ b/windows/src/ext/jedi/Makefile @@ -13,17 +13,17 @@ build: dirs $(MAKE) install-paths $(MAKE) build-jvcl-docking - #$(MAKE) build-jcldbg +#$(MAKE) build-jcldbg $(MAKE) install-packages build-jcldbg: rem - # This needs to be called separately so we get the updated include path jedi-includes - # It also needs to be called after make install +# This needs to be called separately so we get the updated include path jedi-includes +# It also needs to be called after make install # cd $(EXT)\jedi\jcl\jcl\examples\windows\debug\tools - # We use a direct build to ignore platform warnings - # as we don't control the source of this code +# We use a direct build to ignore platform warnings +# as we don't control the source of this code # $(MAKEDIR)\dcc32.exe $(DELPHIDPRPARAMS) makejcldbg.dpr # $(COPY) makejcldbg.exe $(PROGRAM)\buildtools diff --git a/windows/src/ext/sentry/test/Makefile b/windows/src/ext/sentry/test/Makefile index 11cd159a76..63fc664b01 100644 --- a/windows/src/ext/sentry/test/Makefile +++ b/windows/src/ext/sentry/test/Makefile @@ -5,8 +5,8 @@ !include ..\..\..\Defines.mak build: dirs # version.res manifest.res - $(DELPHI_MSBUILD) SentryClientTest.dproj /p:Platform=Win32 - $(DELPHI_MSBUILD) SentryClientVclTest.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) SentryClientTest.dproj "/p:Platform=Win32" + $(DELPHI_MSBUILD) SentryClientVclTest.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\SentryClientTest.exe -dpr SentryClientTest.dpr $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\SentryClientVclTest.exe -dpr SentryClientVclTest.dpr diff --git a/windows/src/ext/tds2dbg/Makefile b/windows/src/ext/tds2dbg/Makefile index f58f66e9f6..d7e76b1d29 100644 --- a/windows/src/ext/tds2dbg/Makefile +++ b/windows/src/ext/tds2dbg/Makefile @@ -2,8 +2,8 @@ !include ..\..\Defines.mak build: dirs - # tds2dbg.exe test.exe - @-mkdir $(WIN32_TARGET_PATH) +# tds2dbg.exe test.exe + -mkdir $(WIN32_TARGET_PATH) $(COPY) tds2dbg.bin $(WIN32_TARGET_PATH)\tds2dbg.exe $(MAKE) install @@ -18,20 +18,20 @@ install: BCC55DIR=c:\borland\bcc55 tds2dbg.exe: main.cpp tds2dbg.cpp fileutils.cpp log.cpp - # $(CL) /Fe$< /EHsc $** +# $(CL) /Fe$< /EHsc $** path $(BCC55DIR)\bin;$(PATH) $(BCC55DIR)\bin\bcc32 -y -v -L$(BCC55DIR)\Lib -I$(BCC55DIR)\Include -e$< $** test.exe: testa.cpp - # $(CL) /Fe$< /EHsc $** +# $(CL) /Fe$< /EHsc $** $(BCC55DIR)\bin\bcc32 -y -v -M -L$(BCC55DIR)\Lib -I$(BCC55DIR)\Include -e$< $** clean: - -@del /Q tds2dbg.obj fileutils.obj log.obj main.obj tds2dbg.tds - -@del /Q testa.obj test.exe test.tds test.dbg - -@rmdir /S /Q html + -del /Q tds2dbg.obj fileutils.obj log.obj main.obj tds2dbg.tds + -del /Q testa.obj test.exe test.tds test.dbg + -rmdir /S /Q html doc: - doxygen tds2dbg.dcf + doxygen tds2dbg.dcf !include ..\..\Target.mak diff --git a/windows/src/global/delphi/Makefile b/windows/src/global/delphi/Makefile index da7364e31e..3e3743afce 100644 --- a/windows/src/global/delphi/Makefile +++ b/windows/src/global/delphi/Makefile @@ -8,10 +8,12 @@ all: keyman-components +build: keyman-components + # ---------------------------------------------------------------------- keyman-components: dirs compile install - # $(COPY) keyman_components.bpl $(OUTLIB) +# $(COPY) keyman_components.bpl $(OUTLIB) compile: @-mkdir obj\Win32\$(TARGET_PATH) diff --git a/windows/src/support/oskbulkrenderer/Makefile b/windows/src/support/oskbulkrenderer/Makefile index 12230ea01a..65b8e02ba6 100644 --- a/windows/src/support/oskbulkrenderer/Makefile +++ b/windows/src/support/oskbulkrenderer/Makefile @@ -5,7 +5,7 @@ !include ..\..\Defines.mak build: version.res dirs - $(DELPHI_MSBUILD) oskbulkrenderer.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) oskbulkrenderer.dproj "/p:Platform=Win32" $(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\oskbulkrenderer.exe -dpr oskbulkrenderer.dpr $(TDS2DBG) $(WIN32_TARGET_PATH)\oskbulkrenderer.exe diff --git a/windows/src/test/Makefile b/windows/src/test/Makefile index 6c7986ef93..40ada4de33 100644 --- a/windows/src/test/Makefile +++ b/windows/src/test/Makefile @@ -8,7 +8,7 @@ TARGETS=test_i3633 CLEAN=test_i3633 test: test-manifest-exec - $(MAKE) -DTARGET=test $(TARGETS) + $(MAKE) "TARGET=test" $(TARGETS) # We want `test` to be the default target !include ..\Header.mak diff --git a/windows/src/test/manual-tests/integration-tests/Makefile b/windows/src/test/manual-tests/integration-tests/Makefile index f1636c971c..093dc44140 100644 --- a/windows/src/test/manual-tests/integration-tests/Makefile +++ b/windows/src/test/manual-tests/integration-tests/Makefile @@ -6,9 +6,9 @@ TARGETS=keymanapi -test: - $(MAKE) -DTARGET=test $(TARGETS) - +test: + $(MAKE) "TARGET=test" $(TARGETS) + !include ..\..\Header.mak # ---------------------------------------------------------------------- @@ -20,7 +20,7 @@ keymanapi: # ---------------------------------------------------------------------- !include ..\..\Target.mak - + # ---------------------------------------------------------------------- # EOF # ---------------------------------------------------------------------- diff --git a/windows/src/test/manual-tests/integration-tests/keymanapi/Makefile b/windows/src/test/manual-tests/integration-tests/keymanapi/Makefile index 61f0946a95..7becbb044d 100644 --- a/windows/src/test/manual-tests/integration-tests/keymanapi/Makefile +++ b/windows/src/test/manual-tests/integration-tests/keymanapi/Makefile @@ -11,13 +11,13 @@ TEST_MODE=--exclude:Elevated test: build $(WIN32_TARGET_PATH)\keymanapi_test.exe -b -exit:continue $(TEST_MODE) $(WIN64_TARGET_PATH)\keymanapi_test.exe -b -exit:continue $(TEST_MODE) - -build: - $(DELPHI_MSBUILD) /p:Platform=Win32 keymanapi_test.dproj - $(DELPHI_MSBUILD) /p:Platform=Win64 keymanapi_test.dproj + +build: + $(DELPHI_MSBUILD) "/p:Platform=Win32" keymanapi_test.dproj + $(DELPHI_MSBUILD) "/p:Platform=Win64" keymanapi_test.dproj clean: def-clean -rd /s/q Win32 -rd /s/q Win64 - + !include ..\..\..\Target.mak diff --git a/windows/src/test/test_i3633/Makefile b/windows/src/test/test_i3633/Makefile index e0dbd4e7af..575d77e7e8 100644 --- a/windows/src/test/test_i3633/Makefile +++ b/windows/src/test/test_i3633/Makefile @@ -20,7 +20,7 @@ test-install: prereq prereq: - $(DELPHI_MSBUILD) verify.dproj /p:Platform=Win32 + $(DELPHI_MSBUILD) verify.dproj "/p:Platform=Win32" copy sigcheck.bin $(WIN32_TARGET_PATH)\sigcheck.exe diff --git a/windows/src/test/unit-tests/Makefile b/windows/src/test/unit-tests/Makefile index dbef0fd1ea..34a118fded 100644 --- a/windows/src/test/unit-tests/Makefile +++ b/windows/src/test/unit-tests/Makefile @@ -11,7 +11,7 @@ TARGETS=group-helper-rsp19902 kmcomp shared-data lexical-model-compiler kmcomp-x ui-language-manager standards-data compile-supplementary-support test: - $(MAKE) -DTARGET=test $(TARGETS) + $(MAKE) "TARGET=test" $(TARGETS) !include ..\..\Header.mak diff --git a/windows/src/test/unit-tests/compile-supplementary-support/Makefile b/windows/src/test/unit-tests/compile-supplementary-support/Makefile index ce4859f35e..00a707cd4d 100644 --- a/windows/src/test/unit-tests/compile-supplementary-support/Makefile +++ b/windows/src/test/unit-tests/compile-supplementary-support/Makefile @@ -4,36 +4,38 @@ KMCOMP="..\..\..\..\bin\developer\kmcomp.exe" KMCOMPD=$(KMCOMP) -d +# grep crashes if called directly from nmake? +GREP=cmd /c grep test: test-nodebug test-debug test-nodebug: $(KMCOMP) i3317_nosupp.kmn i3317_nosupp-1.0.js - grep -vl "KS=1" i3317_nosupp-1.0.js + $(GREP) -vl "KS=1" i3317_nosupp-1.0.js $(KMCOMP) i3317_withsupp.kmn i3317_withsupp-1.0.js - grep -l "KS=1" i3317_withsupp-1.0.js + $(GREP) -l "KS=1" i3317_withsupp-1.0.js $(KMCOMP) i3317_withsupp_incontext.kmn i3317_withsupp_incontext-1.0.js - grep -l "KS=1" i3317_withsupp_incontext-1.0.js + $(GREP) -l "KS=1" i3317_withsupp_incontext-1.0.js $(KMCOMP) i3317_withsupp_inmatch.kmn i3317_withsupp_inmatch-1.0.js - grep -l "KS=1" i3317_withsupp_inmatch-1.0.js + $(GREP) -l "KS=1" i3317_withsupp_inmatch-1.0.js $(KMCOMP) i3317_withsupp_innomatch.kmn i3317_withsupp_innomatch-1.0.js - grep -l "KS=1" i3317_withsupp_innomatch-1.0.js + $(GREP) -l "KS=1" i3317_withsupp_innomatch-1.0.js $(KMCOMP) i3317_withsupp_instore.kmn i3317_withsupp_instore-1.0.js - grep -l "KS=1" i3317_withsupp_instore-1.0.js + $(GREP) -l "KS=1" i3317_withsupp_instore-1.0.js test-debug: $(KMCOMPD) i3317_nosupp.kmn i3317_nosupp-1.0.js - grep -vl "KS=1" i3317_nosupp-1.0.js + $(GREP) -vl "KS=1" i3317_nosupp-1.0.js $(KMCOMPD) i3317_withsupp.kmn i3317_withsupp-1.0.js - grep "KS=1" i3317_withsupp-1.0.js + $(GREP) "KS=1" i3317_withsupp-1.0.js $(KMCOMPD) i3317_withsupp_incontext.kmn i3317_withsupp_incontext-1.0.js - grep "KS=1" i3317_withsupp_incontext-1.0.js + $(GREP) "KS=1" i3317_withsupp_incontext-1.0.js $(KMCOMPD) i3317_withsupp_inmatch.kmn i3317_withsupp_inmatch-1.0.js - grep "KS=1" i3317_withsupp_inmatch-1.0.js + $(GREP) "KS=1" i3317_withsupp_inmatch-1.0.js $(KMCOMPD) i3317_withsupp_innomatch.kmn i3317_withsupp_innomatch-1.0.js - grep "KS=1" i3317_withsupp_innomatch-1.0.js + $(GREP) "KS=1" i3317_withsupp_innomatch-1.0.js $(KMCOMPD) i3317_withsupp_instore.kmn i3317_withsupp_instore-1.0.js - grep "KS=1" i3317_withsupp_instore-1.0.js + $(GREP) "KS=1" i3317_withsupp_instore-1.0.js clean: -del *.js diff --git a/windows/src/test/unit-tests/jsonutil/Makefile b/windows/src/test/unit-tests/jsonutil/Makefile index 8f9a155d75..5bbd587e5f 100644 --- a/windows/src/test/unit-tests/jsonutil/Makefile +++ b/windows/src/test/unit-tests/jsonutil/Makefile @@ -12,7 +12,7 @@ test: build -$(WIN32_TARGET_PATH)\jsonutiltests.exe -b -exit:continue build: - $(DELPHI_MSBUILD) /p:CI=CI jsonutiltests.dproj + $(DELPHI_MSBUILD) "/p:CI=CI" jsonutiltests.dproj clean: def-clean diff --git a/windows/src/test/unit-tests/keyboard-js-info/Makefile b/windows/src/test/unit-tests/keyboard-js-info/Makefile index 15f17dadf0..db1cb055ff 100644 --- a/windows/src/test/unit-tests/keyboard-js-info/Makefile +++ b/windows/src/test/unit-tests/keyboard-js-info/Makefile @@ -12,7 +12,7 @@ test: build -$(WIN32_TARGET_PATH)\keyboardjsinfotestsuite.exe -b -exit:continue build: - $(DELPHI_MSBUILD) /p:CI=CI keyboardjsinfotestsuite.dproj + $(DELPHI_MSBUILD) "/p:CI=CI" keyboardjsinfotestsuite.dproj clean: def-clean diff --git a/windows/src/test/unit-tests/keyboard-package-versions/Makefile b/windows/src/test/unit-tests/keyboard-package-versions/Makefile index d80aaafd12..96c8aa60bf 100644 --- a/windows/src/test/unit-tests/keyboard-package-versions/Makefile +++ b/windows/src/test/unit-tests/keyboard-package-versions/Makefile @@ -12,7 +12,7 @@ test: build -$(WIN32_TARGET_PATH)\keyboardpackageversionstestsuite.exe -b -exit:continue build: - $(DELPHI_MSBUILD) /p:CI=CI keyboardpackageversionstestsuite.dproj + $(DELPHI_MSBUILD) "/p:CI=CI" keyboardpackageversionstestsuite.dproj clean: def-clean -del *.kmp diff --git a/windows/src/test/unit-tests/kmcomp-x64-structures/Makefile b/windows/src/test/unit-tests/kmcomp-x64-structures/Makefile index e2c9dc4795..ac79eaa274 100644 --- a/windows/src/test/unit-tests/kmcomp-x64-structures/Makefile +++ b/windows/src/test/unit-tests/kmcomp-x64-structures/Makefile @@ -15,12 +15,12 @@ test: build cppstructsize\$(X64_TARGET_PATH)\cppstructsize.exe > 64-cppstructsize.txt echo Comparing 64-bit sizes fc 64-passtructsize.txt 64-cppstructsize.txt - -build: - $(DELPHI_MSBUILD) passtructsize\passtructsize.dproj /p:Platform=Win32 - $(DELPHI_MSBUILD) passtructsize\passtructsize.dproj /p:Platform=Win64 - $(MSBUILD) $(MSBUILD_BUILD) cppstructsize\cppstructsize.sln /p:Platform=Win32 - $(MSBUILD) $(MSBUILD_BUILD) cppstructsize\cppstructsize.sln /p:Platform=x64 + +build: + $(DELPHI_MSBUILD) passtructsize\passtructsize.dproj "/p:Platform=Win32" + $(DELPHI_MSBUILD) passtructsize\passtructsize.dproj "/p:Platform=Win64" + $(MSBUILD) $(MSBUILD_BUILD) cppstructsize\cppstructsize.sln" /p:Platform=Win32" + $(MSBUILD) $(MSBUILD_BUILD) cppstructsize\cppstructsize.sln" /p:Platform=x64" clean: def-clean -rd /s/q Win32 diff --git a/windows/src/test/unit-tests/kmx-file-languages/Makefile b/windows/src/test/unit-tests/kmx-file-languages/Makefile index deab30af79..9e504a73b3 100644 --- a/windows/src/test/unit-tests/kmx-file-languages/Makefile +++ b/windows/src/test/unit-tests/kmx-file-languages/Makefile @@ -13,7 +13,7 @@ test: build -$(WIN32_TARGET_PATH)\kmxfilelanguagestestsuite.exe -b -exit:continue build: - $(DELPHI_MSBUILD) /p:CI=CI kmxfilelanguagestestsuite.dproj + $(DELPHI_MSBUILD) "/p:CI=CI" kmxfilelanguagestestsuite.dproj clean: def-clean diff --git a/windows/src/test/unit-tests/package-info/Makefile b/windows/src/test/unit-tests/package-info/Makefile index 2a09e53a20..39335050ca 100644 --- a/windows/src/test/unit-tests/package-info/Makefile +++ b/windows/src/test/unit-tests/package-info/Makefile @@ -8,7 +8,7 @@ test: build -$(WIN32_TARGET_PATH)\packageinfotestsuite.exe -b -exit:continue build: - $(DELPHI_MSBUILD) /p:CI=CI packageinfotestsuite.dproj + $(DELPHI_MSBUILD) "/p:CI=CI" packageinfotestsuite.dproj clean: def-clean -del test\*.out.* diff --git a/windows/src/test/unit-tests/shared-data/cpp/Makefile b/windows/src/test/unit-tests/shared-data/cpp/Makefile index b8d05d1bc1..c3b98d1d33 100644 --- a/windows/src/test/unit-tests/shared-data/cpp/Makefile +++ b/windows/src/test/unit-tests/shared-data/cpp/Makefile @@ -5,8 +5,8 @@ !include ..\..\..\..\Defines.mak build: - $(MSBUILD) $(MSBUILD_BUILD) /p:Platform=Win32 cppshareddata.vcxproj - $(MSBUILD) $(MSBUILD_BUILD) /p:Platform=x64 cppshareddata.vcxproj + $(MSBUILD) $(MSBUILD_BUILD) "/p:Platform=Win32" cppshareddata.vcxproj + $(MSBUILD) $(MSBUILD_BUILD) "/p:Platform=x64" cppshareddata.vcxproj clean: def-clean $(MSBUILD) $(MSBUILD_CLEAN) cppshareddata.vcxproj diff --git a/windows/src/test/unit-tests/shared-data/delphi/Makefile b/windows/src/test/unit-tests/shared-data/delphi/Makefile index 3bb104e361..02b79b94f4 100644 --- a/windows/src/test/unit-tests/shared-data/delphi/Makefile +++ b/windows/src/test/unit-tests/shared-data/delphi/Makefile @@ -5,8 +5,8 @@ !include ..\..\..\..\Defines.mak build: - $(DELPHI_MSBUILD) /p:Platform=Win32 delphishareddata.dproj - $(DELPHI_MSBUILD) /p:Platform=Win64 delphishareddata.dproj + $(DELPHI_MSBUILD) "/p:Platform=Win32" delphishareddata.dproj + $(DELPHI_MSBUILD) "/p:Platform=Win64" delphishareddata.dproj clean: def-clean -rd /s/q bin diff --git a/windows/src/test/unit-tests/standards-data/Makefile b/windows/src/test/unit-tests/standards-data/Makefile index a27eb28c59..ff2b62a34b 100644 --- a/windows/src/test/unit-tests/standards-data/Makefile +++ b/windows/src/test/unit-tests/standards-data/Makefile @@ -8,7 +8,7 @@ test: build -$(WIN32_TARGET_PATH)\standardsdata.exe -b -exit:continue build: - $(DELPHI_MSBUILD) /p:CI=CI standardsdata.dproj + $(DELPHI_MSBUILD) "/p:CI=CI" standardsdata.dproj clean: def-clean diff --git a/windows/src/test/unit-tests/ui-language-manager/Makefile b/windows/src/test/unit-tests/ui-language-manager/Makefile index 47b6c83e31..ab0c956eb6 100644 --- a/windows/src/test/unit-tests/ui-language-manager/Makefile +++ b/windows/src/test/unit-tests/ui-language-manager/Makefile @@ -12,7 +12,7 @@ test: build -$(WIN32_TARGET_PATH)\UILanguageManagerTest.exe -b -exit:continue build: - $(DELPHI_MSBUILD) /p:CI=CI UILanguageManagerTest.dproj + $(DELPHI_MSBUILD) "/p:CI=CI" UILanguageManagerTest.dproj clean: def-clean diff --git a/windows/src/test/unit-tests/windows-setup/Makefile b/windows/src/test/unit-tests/windows-setup/Makefile index 17373b7886..973dd102b9 100644 --- a/windows/src/test/unit-tests/windows-setup/Makefile +++ b/windows/src/test/unit-tests/windows-setup/Makefile @@ -12,7 +12,7 @@ test: build -$(WIN32_TARGET_PATH)\WindowsSetupTest.exe -b -exit:continue build: - $(DELPHI_MSBUILD) /p:CI=CI WindowsSetupTest.dproj + $(DELPHI_MSBUILD) "/p:CI=CI" WindowsSetupTest.dproj clean: def-clean From 1b27d2b09af03a0be99920022647ea4508dc6212 Mon Sep 17 00:00:00 2001 From: sgschantz Date: Tue, 7 Dec 2021 15:24:17 +0700 Subject: [PATCH 09/38] moved package reading out of app delegate to separate class KMPackageReader, conformed to code style guidelines --- .../Keyman4MacIM.xcodeproj/project.pbxproj | 6 + .../KMInfoWindow/KMInfoWindowController.m | 2 - .../Keyman4MacIM/KMInputMethodAppDelegate.h | 21 +- .../Keyman4MacIM/KMInputMethodAppDelegate.m | 499 +----------------- .../Keyman4MacIM/KMKeyboardInfo.h | 17 +- .../Keyman4MacIM/KMKeyboardInfo.m | 89 ++-- mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h | 18 +- mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m | 142 +++-- .../Keyman4MacIM/KMPackageReader.h | 29 + .../Keyman4MacIM/KMPackageReader.m | 337 ++++++++++++ .../KeymanEngine4Mac/KME/KMXFile.m | 4 - 11 files changed, 523 insertions(+), 641 deletions(-) create mode 100644 mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.h create mode 100644 mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.m diff --git a/mac/Keyman4MacIM/Keyman4MacIM.xcodeproj/project.pbxproj b/mac/Keyman4MacIM/Keyman4MacIM.xcodeproj/project.pbxproj index 54b7bc293f..e744f41947 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM.xcodeproj/project.pbxproj +++ b/mac/Keyman4MacIM/Keyman4MacIM.xcodeproj/project.pbxproj @@ -9,6 +9,7 @@ /* Begin PBXBuildFile section */ 290BC680274B9DB1005CD1C3 /* KMPackageInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 290BC67F274B9DB1005CD1C3 /* KMPackageInfo.m */; }; 290BC75E274F3FD7005CD1C3 /* KMKeyboardInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 290BC75D274F3FD7005CD1C3 /* KMKeyboardInfo.m */; }; + 296FE2FC275DD21600F46898 /* KMPackageReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 296FE2FB275DD21600F46898 /* KMPackageReader.m */; }; 37A245C12565DFA6000BBF92 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 37A245C02565DFA6000BBF92 /* Assets.xcassets */; }; 37AE5C9D239A7B770086CC7C /* qrcode.min.js in Resources */ = {isa = PBXBuildFile; fileRef = 37AE5C9C239A7B770086CC7C /* qrcode.min.js */; }; 37C2B0CB25FF2C350092E16A /* Help in Resources */ = {isa = PBXBuildFile; fileRef = 37C2B0CA25FF2C340092E16A /* Help */; }; @@ -131,6 +132,8 @@ 290BC67F274B9DB1005CD1C3 /* KMPackageInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KMPackageInfo.m; sourceTree = ""; }; 290BC75C274F3FD7005CD1C3 /* KMKeyboardInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KMKeyboardInfo.h; sourceTree = ""; }; 290BC75D274F3FD7005CD1C3 /* KMKeyboardInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KMKeyboardInfo.m; sourceTree = ""; }; + 296FE2FA275DD21600F46898 /* KMPackageReader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KMPackageReader.h; sourceTree = ""; }; + 296FE2FB275DD21600F46898 /* KMPackageReader.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KMPackageReader.m; sourceTree = ""; }; 370E44542564E1EE00642929 /* Sentry.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Sentry.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 37589AD422E52DA20097D39D /* Keyman.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Keyman.entitlements; sourceTree = ""; }; 37A00ED4239AA25700D2C837 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; @@ -443,6 +446,8 @@ 290BC75C274F3FD7005CD1C3 /* KMKeyboardInfo.h */, 290BC75D274F3FD7005CD1C3 /* KMKeyboardInfo.m */, 290BC67F274B9DB1005CD1C3 /* KMPackageInfo.m */, + 296FE2FA275DD21600F46898 /* KMPackageReader.h */, + 296FE2FB275DD21600F46898 /* KMPackageReader.m */, ); path = Keyman4MacIM; sourceTree = ""; @@ -825,6 +830,7 @@ 98BF92441BF01CBE0002126A /* KMAboutWindowController.m in Sources */, 98FE10631B4DEE5600525F54 /* KMInfoWindowController.m in Sources */, 9836B3721AE5F11D00780482 /* unzip.c in Sources */, + 296FE2FC275DD21600F46898 /* KMPackageReader.m in Sources */, 9832472E1A9EABC70010B90C /* KMConfigColumn1CellView.m in Sources */, E22020F6200506F300B74FAC /* KMInputMethodSafariClientEventHandler.m in Sources */, E24C79EA1FFFCC7500D8E46F /* KMInputMethodBrowserClientEventHandler.m in Sources */, diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m index 44f1bb8155..bdff0f8c13 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m @@ -167,8 +167,6 @@ KeymanVersionInfo keymanVersionInfo = [[self AppDelegate] versionInfo]; NSString *shareUrl = [NSString stringWithFormat:@"https://%@/go/keyboard/%@/share", keymanVersionInfo.keymanCom, packageId]; - self.packageInfo.debugReport; - NSString *name = self.packageInfo.packageName; if (name == nil) name = @"Unknown Keyboard Package"; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.h b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.h index ce7ebc2cc8..8f4e652371 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.h +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.h @@ -12,6 +12,7 @@ #import #import #import +#import "KMPackageReader.h" #import "KMInputController.h" #import "KMAboutWindowController.h" #import "KMInfoWindowController.h" @@ -26,24 +27,6 @@ extern NSString *const kKMSelectedKeyboardKey; extern NSString *const kKMActiveKeyboardsKey; extern NSString *const kKeymanKeyboardDownloadCompletedNotification; -extern NSString *const kPackage; -extern NSString *const kButtons; -extern NSString *const kStartMenu; -extern NSString *const kStartMenuEntries; -extern NSString *const kInfo; -extern NSString *const kFiles; - -extern NSString *const kAuthor; -extern NSString *const kCopyright; -extern NSString *const kFile; -extern NSString *const kFont; -extern NSString *const kGraphicFile; -extern NSString *const kKeyboard; -extern NSString *const kName; -extern NSString *const kReadMeFile; -extern NSString *const kVersion; -extern NSString *const kWebSite; - typedef struct { NSString *sentryEnvironment; NSString *versionRelease; @@ -118,7 +101,7 @@ typedef struct { - (NSString *)packagePathAtIndex:(NSUInteger)index; - (NSInteger)indexForPackageFolder:(NSString *)packageFolder; - (NSString *)packageFolderFromPath:(NSString *)path; -- (NSDictionary *)loadPackageInfo:(NSString *)path; +- (KMPackageInfo *)loadPackageInfo:(NSString *)path; - (NSString *)packageNameFromPackageInfo:(NSString *)packageFolder; - (NSArray *)keyboardNamesFromFolder:(NSString *)packageFolder; - (NSString *)kvkFilePathFromFilename:(NSString *)kvkFilename; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m index 3f31d87aa8..640e4d042b 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m @@ -19,6 +19,7 @@ #import "KMConfigurationWindowController.h" #import "KMDownloadKBWindowController.h" #import "ZipArchive.h" +#import "KMPackageReader.h" #import "KMPackageInfo.h" #import "KMKeyboardInfo.h" @import Sentry; @@ -33,28 +34,9 @@ NSString *const kKMLegacyApps = @"KMLegacyApps"; NSString *const kKeymanKeyboardDownloadCompletedNotification = @"kKeymanKeyboardDownloadCompletedNotification"; -NSString *const kPackage = @"[Package]"; -NSString *const kButtons = @"[Buttons]"; -NSString *const kStartMenu = @"[StartMenu]"; -NSString *const kStartMenuEntries = @"[StartMenuEntries]"; -NSString *const kInfo = @"[Info]"; -NSString *const kFiles = @"[Files]"; - -NSString *const kAuthor = @"Author"; -NSString *const kCopyright = @"Copyright"; -NSString *const kFile = @"File"; -NSString *const kFont = @"Font"; -NSString *const kGraphicFile = @"GraphicFile"; -NSString *const kKeyboard = @"Keyboard"; -NSString *const kName = @"Name"; -NSString *const kReadMeFile = @"ReadMeFile"; -NSString *const kVersion = @"Version"; -NSString *const kWebSite = @"WebSite"; -NSString *const kWelcome = @"Welcome"; - -typedef enum { - ctPackage, ctButtons, ctStartMenu, ctStartMenuEntries, ctInfo, ctFiles, ctUnknown -} ContentType; +@interface KMInputMethodAppDelegate () +@property (nonatomic, strong) KMPackageReader *packageReader; +@end @implementation KMInputMethodAppDelegate @synthesize kme = _kme; @@ -367,6 +349,15 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef return _kme; } +- (KMPackageReader *)packageReader { + if (_packageReader == nil) { + _packageReader = [[KMPackageReader alloc] init]; + [_packageReader setDebugMode:self.debugMode]; + } + + return _packageReader; +} + - (void)setKmx:(KMXFile *)kmx { _kmx = kmx; [self.kme setKmx:_kmx]; @@ -450,6 +441,9 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef _debugMode = useVerboseLogging; if (_kme != nil) [_kme setUseVerboseLogging:useVerboseLogging]; + if (_packageReader != nil) { + [_packageReader setDebugMode:useVerboseLogging]; + } NSUserDefaults *userData = [NSUserDefaults standardUserDefaults]; [userData setBool:useVerboseLogging forKey:kKMUseVerboseLogging]; [userData synchronize]; @@ -606,59 +600,19 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef return packageFolder; } -/* - attempt to load Keyman Package Information from kmp.json - if kmp.json file is not found or not readable, load from legacy kmp.inf file -*/ - - (KMPackageInfo *)loadPackageInfo:(NSString *)path { - KMPackageInfo *packageInfo = nil; - NSString *jsonFilename = [path stringByAppendingPathComponent:@"kmp.json"]; - - packageInfo = [self loadPackageInfoFromJsonFile:jsonFilename]; - - if (packageInfo == nil) { - NSString *infoFile = [path stringByAppendingPathComponent:@"kmp.inf"]; - - packageInfo = [self loadPackageInfoFromInfFile:infoFile]; - } - - return packageInfo; + return [self.packageReader loadPackageInfo:path]; } - - (NSString *)packageNameFromPackageInfo:(NSString *)packageFolder { NSString *packageName = nil; - NSString *path = [[self keyboardsPath] stringByAppendingPathComponent:packageFolder]; - KMPackageInfo *packageInfo = [self loadPackageInfo:path]; + NSString *path = [[self keymanDataPath] stringByAppendingPathComponent:packageFolder]; + KMPackageInfo *packageInfo = [self.packageReader loadPackageInfo:path]; + + if (packageInfo) { packageName = packageInfo.packageName; - - return packageName; -} - -- (NSString *)packageNameFromInfFile:(NSString *)packageFolder { - NSString *packageName = nil; - NSString *path = [[self keyboardsPath] stringByAppendingPathComponent:packageFolder]; - NSString *fileContents = [NSString stringWithContentsOfFile:[path stringByAppendingPathComponent:@"kmp.inf"] encoding:NSWindowsCP1252StringEncoding error:NULL]; - NSArray *lines = [fileContents componentsSeparatedByString:@"\n"]; - BOOL hasInfo = NO; - for (NSString *line in lines) { - if ([line startsWith:@"[Info]"]) { - hasInfo = YES; - continue; - } - - if (hasInfo && [line startsWith:@"Name="]) { - NSString *value = [[[line substringFromIndex:5] componentsSeparatedByString:@","] objectAtIndex:0]; - packageName = [NSString stringWithString:[value stringByReplacingOccurrencesOfString:@"\"" withString:@""]]; - break; - } - } - - if (packageName == nil) - packageName = packageFolder; - + } return packageName; } @@ -678,415 +632,6 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef return kbNames; } -/* - read JSON file and load it into KMPackageInfo object - returns nil if the file does not exist or it cannot be parsed as JSON - */ -- (KMPackageInfo *) loadPackageInfoFromJsonFile:(NSString *)path { - KMPackageInfo * packageInfo = nil; - - if (self.debugMode) - NSLog(@"SGS2021 loading JSON package info from path: %@", path); - NSError *readError = nil; - NSData *data = [NSData dataWithContentsOfFile:path options:kNilOptions error:&readError]; - NSDictionary *parsedData = nil; - - if (data == nil) { - NSLog(@"SGS2021 Error reading JSON file at path : %@, error: %@ ", path, readError); - } else { - NSError *parseError = nil; - parsedData = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&parseError]; - - if (parsedData == nil) { - NSLog(@"SGS2021 Error parsing JSON file at path : %@, error: %@ ", path, parseError); - } else { - packageInfo = [self createPackageInfoFromJsonData:parsedData]; - } - } - - return packageInfo; -} - -- (KMPackageInfo *) createKeyboardInfoFromJsonKeyboard:(NSDictionary *) keyboard { - - KMKeyboardInfoBuilder *builder = [[KMKeyboardInfoBuilder alloc] init]; - - NSArray *languages = keyboard[@"languages"]; - NSMutableArray *languageInfoArray = [NSMutableArray arrayWithCapacity:0]; - - for (NSDictionary *language in languages) { - KMLanguageInfo *languageInfo = [[KMLanguageInfo alloc] initWithName:language[@"name"] - identifier:language[@"id"]]; - - [languageInfoArray addObject:languageInfo]; - } - - builder.name = keyboard[@"name"]; - builder.identifier = keyboard[@"id"]; - builder.version = keyboard[@"version"]; - builder.oskFont = keyboard[@"oskFont"]; - builder.displayFont = keyboard[@"displayFont"]; - builder.languages = [languageInfoArray copy]; - - KMKeyboardInfo *keyboardInfo = [[KMKeyboardInfo alloc] initWithBuilder:builder]; - return keyboardInfo; -} - -- (KMPackageInfo *) createPackageInfoFromJsonData:(NSDictionary *) jsonData { - - NSMutableArray *keyboardInfoArray = [NSMutableArray arrayWithCapacity:0]; - NSMutableArray *fontArray = [NSMutableArray arrayWithCapacity:0]; - NSArray *keyboards = jsonData[@"keyboards"]; - - // loop through keyboards array and add keyboards, and loop through each keyboard's languages array to add languages - for (NSDictionary *keyboard in keyboards) { - KMKeyboardInfo *keyboardInfo = [self createKeyboardInfoFromJsonKeyboard:keyboard]; - - // add oskFont to fontArray if not nil or empty string - if ([keyboardInfo.oskFont length]) { - [fontArray addObject:keyboardInfo.oskFont]; - } - - // add displayFont to fontArray if not not nil or empty string and not equal to oskFont - if ([keyboardInfo.displayFont length] && ![keyboardInfo.displayFont isEqualToString:keyboardInfo.displayFont]) { - [fontArray addObject:keyboardInfo.displayFont]; - } - - [keyboardInfoArray addObject:keyboardInfo]; - } - - KMPackageInfoBuilder *builder = - [[KMPackageInfoBuilder alloc] init]; - - builder.packageName = jsonData[@"info"][@"name"][@"description"]; - builder.packageVersion = jsonData[@"info"][@"version"][@"description"]; - builder.readmeFilename = jsonData[@"options"][@"readmeFile"]; - builder.graphicFilename = jsonData[@"options"][@"graphicFile"]; - builder.fileVersion = jsonData[@"system"][@"fileVersion"]; - builder.keymanDeveloperVersion = jsonData[@"system"][@"keymanDeveloperVersion"]; - builder.copyright = jsonData[@"info"][@"copyright"][@"description"]; - builder.authorName = jsonData[@"info"][@"author"][@"description"]; - builder.authorUrl = jsonData[@"info"][@"author"][@"url"]; - builder.website = jsonData[@"info"][@"website"][@"url"]; - builder.keyboards = [keyboardInfoArray copy]; - builder.fonts = [fontArray copy]; - - KMPackageInfo *packageInfo = [[KMPackageInfo alloc] initWithBuilder:builder]; - - packageInfo.debugReport; - return packageInfo; -} - - -/* - read inf file and load it into KMPackageInfo object - returns nil if the file does not exist or it cannot be parsed - adapted from legacy method keyboardInfoFromInfFile that loaded data from inf file to NSDictionary - */ -- (KMPackageInfo *) loadPackageInfoFromInfFile:(NSString *)path { - if (self.debugMode) - NSLog(@"SGS2021 loading inf package info from path: %@", path); - - NSMutableArray *files = [NSMutableArray arrayWithCapacity:0]; - NSMutableArray *keyboards = [NSMutableArray arrayWithCapacity:0]; - KMPackageInfoBuilder *builder = [[KMPackageInfoBuilder alloc] init]; - - @try { - NSString *fileContents = [[NSString stringWithContentsOfFile:path encoding:NSWindowsCP1252StringEncoding error:NULL] stringByReplacingOccurrencesOfString:@"\r" withString:@""]; - NSArray *lines = [fileContents componentsSeparatedByString:@"\n"]; - ContentType contentType = ctUnknown; - for (NSString *line in lines) { - if (!line.length) - continue; - - if ([line startsWith:kPackage]) { - contentType = ctPackage; - continue; - } - else if ([line startsWith:kButtons]) { - contentType = ctButtons; - continue; - } - else if ([line startsWith:kStartMenu]) { - contentType = ctStartMenu; - continue; - } - else if ([line startsWith:kStartMenuEntries]) { - contentType = ctStartMenuEntries; - continue; - } - else if ([line startsWith:kInfo]) { - contentType = ctInfo; - continue; - } - else if ([line startsWith:kFiles]) { - contentType = ctFiles; - continue; - } - - switch (contentType) { - case ctPackage: { - if ([line startsWith:kReadMeFile]) - builder.readmeFilename = [line substringFromIndex:kReadMeFile.length+1]; - else if ([line startsWith:kGraphicFile]) - builder.graphicFilename = [line substringFromIndex:kGraphicFile.length+1]; - - break; - } - case ctButtons: - break; - case ctStartMenu: - break; - case ctStartMenuEntries: { - if ([line startsWith:kWelcome]) { - NSString *s = [line substringFromIndex:kWelcome.length+1]; - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - } - - break; - } - case ctInfo: { - if ([line startsWith:kName]) { - NSString *s = [line substringFromIndex:kName.length+1]; - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - builder.packageName = v1; - } - else if ([line startsWith:kVersion]) { - NSString *s = [line substringFromIndex:kVersion.length+1]; - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - builder.packageVersion = v1; - } - else if ([line startsWith:kAuthor]) { - NSString *s = [line substringFromIndex:kAuthor.length+1]; - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - builder.authorName = v1; - builder.authorUrl = v2; - } - else if ([line startsWith:kCopyright]) { - NSString *s = [line substringFromIndex:kCopyright.length+1]; - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - builder.copyright = v1; - } - else if ([line startsWith:kWebSite]) { - NSString *s = [line substringFromIndex:kWebSite.length+1]; - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - builder.website = v1; - } - - break; - } - case ctFiles: { - NSUInteger x = [line rangeOfString:@"="].location; - if (x == NSNotFound) - continue; - - NSString *s = [line substringFromIndex:x+2]; - if ([s startsWith:kFile]) { - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[[vs objectAtIndex:0] substringFromIndex:kFile.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *fileName = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - [files addObject:fileName]; - } - else if ([s startsWith:kFont]) { - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[[vs objectAtIndex:0] substringFromIndex:kFont.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *fontFileName = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - [files addObject:fontFileName]; - } - else if ([s startsWith:kKeyboard]) { - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *keyboardName = [[[vs objectAtIndex:0] substringFromIndex:kKeyboard.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *keyboardFileName = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - - - KMKeyboardInfoBuilder *builder = [[KMKeyboardInfoBuilder alloc] init]; - builder.name = keyboardName; - KMKeyboardInfo *keyboardInfo = [[KMKeyboardInfo alloc] initWithBuilder:builder]; - [keyboards addObject:keyboardInfo]; - } - - break; - } - default: - break; - } - } - } - @catch (NSException *e) { - NSLog(@"Error = %@", e.description); - return nil; - } - - KMPackageInfo *packageInfo = [[KMPackageInfo alloc] initWithBuilder:builder]; - return packageInfo; -} - -/* obsolete now that we're loading into KMPackageInfo -- (NSDictionary *)keyboardInfoFromInfFile:(NSString *)infoFile { - NSLog(@"SGS2021 load keyboardInfoFromInfFile"); - - NSMutableDictionary *infoDict = [NSMutableDictionary dictionaryWithCapacity:0]; - NSMutableArray *files = [NSMutableArray arrayWithCapacity:0]; - NSMutableArray *fonts = [NSMutableArray arrayWithCapacity:0]; - NSMutableArray *kbs = [NSMutableArray arrayWithCapacity:0]; - - @try { - NSString *fileContents = [[NSString stringWithContentsOfFile:infoFile encoding:NSWindowsCP1252StringEncoding error:NULL] stringByReplacingOccurrencesOfString:@"\r" withString:@""]; - NSArray *lines = [fileContents componentsSeparatedByString:@"\n"]; - ContentType contentType = ctUnknown; - for (NSString *line in lines) { - if (!line.length) - continue; - - if ([line startsWith:kPackage]) { - contentType = ctPackage; - continue; - } - else if ([line startsWith:kButtons]) { - contentType = ctButtons; - continue; - } - else if ([line startsWith:kStartMenu]) { - contentType = ctStartMenu; - continue; - } - else if ([line startsWith:kStartMenuEntries]) { - contentType = ctStartMenuEntries; - continue; - } - else if ([line startsWith:kInfo]) { - contentType = ctInfo; - continue; - } - else if ([line startsWith:kFiles]) { - contentType = ctFiles; - continue; - } - - switch (contentType) { - case ctPackage: { - if ([line startsWith:kReadMeFile]) - [infoDict setObject:[line substringFromIndex:kReadMeFile.length+1] forKey:kReadMeFile]; - else if ([line startsWith:kGraphicFile]) - [infoDict setObject:[line substringFromIndex:kGraphicFile.length+1] forKey:kGraphicFile]; - - break; - } - case ctButtons: - break; - case ctStartMenu: - break; - case ctStartMenuEntries: { - if ([line startsWith:kWelcome]) { - NSString *s = [line substringFromIndex:kWelcome.length+1]; - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - [infoDict setObject:@[v1, v2] forKey:kWelcome]; - } - - break; - } - case ctInfo: { - if ([line startsWith:kName]) { - NSString *s = [line substringFromIndex:kName.length+1]; - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - [infoDict setObject:@[v1, v2] forKey:kName]; - NSLog(@"SGS2021 keyboard name from inf file = %@ or %@", v1, v2); - } - else if ([line startsWith:kVersion]) { - NSString *s = [line substringFromIndex:kVersion.length+1]; - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - [infoDict setObject:@[v1, v2] forKey:kVersion]; - } - else if ([line startsWith:kAuthor]) { - NSString *s = [line substringFromIndex:kAuthor.length+1]; - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - [infoDict setObject:@[v1, v2] forKey:kAuthor]; - } - else if ([line startsWith:kCopyright]) { - NSString *s = [line substringFromIndex:kCopyright.length+1]; - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - [infoDict setObject:@[v1, v2] forKey:kCopyright]; - } - else if ([line startsWith:kWebSite]) { - NSString *s = [line substringFromIndex:kWebSite.length+1]; - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - [infoDict setObject:@[v1, v2] forKey:kWebSite]; - } - - break; - } - case ctFiles: { - NSUInteger x = [line rangeOfString:@"="].location; - if (x == NSNotFound) - continue; - - NSString *s = [line substringFromIndex:x+2]; - if ([s startsWith:kFile]) { - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[[vs objectAtIndex:0] substringFromIndex:kFile.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - [files addObject:@[v1, v2]]; - } - else if ([s startsWith:kFont]) { - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[[vs objectAtIndex:0] substringFromIndex:kFont.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - [fonts addObject:@[v1, v2]]; - } - else if ([s startsWith:kKeyboard]) { - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[[vs objectAtIndex:0] substringFromIndex:kKeyboard.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - [kbs addObject:@[v1, v2]]; - } - - break; - } - default: - break; - } - } - } - @catch (NSException *e) { - NSLog(@"Error = %@", e.description); - return nil; - } - - if (files.count) - [infoDict setValue:files forKey:kFile]; - if (fonts.count) - [infoDict setValue:fonts forKey:kFont]; - if (kbs.count) - [infoDict setValue:kbs forKey:kKeyboard]; - - return infoDict.count?[NSDictionary dictionaryWithDictionary:infoDict]:nil; -} - */ - - (NSString *)selectedKeyboard { if (_selectedKeyboard == nil) { NSUserDefaults *userData = [NSUserDefaults standardUserDefaults]; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.h b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.h index 9c1a0764cb..956f5fba73 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.h +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.h @@ -1,10 +1,13 @@ -// -// KMKeyboardInfo.h -// Keyman -// -// Created by Shawn Schantz on 11/25/21. -// Copyright © 2021 SIL International. All rights reserved. -// +/* + * Keyman is copyright (C) SIL International. MIT License. + * + * KMKeyboardInfo.h + * Keyman + * + * Created by Shawn Schantz on 11/25/21. + * + * Value object describing a keyboard element of a Keyman package. + */ #import diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.m b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.m index f1e19a66c6..c1eb77ccf6 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.m @@ -1,25 +1,28 @@ -// -// KMKeyboardInfo.m -// Keyman -// -// Created by Shawn Schantz on 11/25/21. -// Copyright © 2021 SIL International. All rights reserved. -// +/* + * Keyman is copyright (C) SIL International. MIT License. + * + * KMKeyboardInfo.m + * Keyman + * + * Created by Shawn Schantz on 11/25/21. + * + * Value object describing a keyboard element of a Keyman package. + */ #import "KMKeyboardInfo.h" @implementation KMKeyboardInfoBuilder - (instancetype)init { - self = [super init]; - if (self) { - _name = nil; - _identifier = nil; - _version = nil; - _oskFont = nil; - _displayFont = nil; - _languages = nil; - } - return self; + self = [super init]; + if (self) { + _name = nil; + _identifier = nil; + _version = nil; + _oskFont = nil; + _displayFont = nil; + _languages = nil; + } + return self; } @end @@ -29,12 +32,12 @@ - (instancetype)initWithName:(NSString*)name identifier:(NSString*)identifier { - self = [super init]; - if (self) { - _name = [name copy]; - _identifier = [identifier copy]; - } - return self; + self = [super init]; + if (self) { + _name = [name copy]; + _identifier = [identifier copy]; + } + return self; } @end @@ -42,16 +45,16 @@ @implementation KMKeyboardInfo - (instancetype)initWithBuilder:(KMKeyboardInfoBuilder *)builder { - self = [super init]; - if (self) { - _name = builder.name; - _identifier = builder.identifier; - _version = builder.version; - _oskFont = builder.oskFont; - _displayFont = builder.displayFont; - _languages = builder.languages; - } - return self; + self = [super init]; + if (self) { + _name = builder.name; + _identifier = builder.identifier; + _version = builder.version; + _oskFont = builder.oskFont; + _displayFont = builder.displayFont; + _languages = builder.languages; + } + return self; } - (instancetype)initWithName:(NSString*)name @@ -61,16 +64,16 @@ displayFont:(NSString*)displayFont languages:(NSArray*)languages { - self = [super init]; - if (self) { - _name = [name copy]; - _identifier = [identifier copy]; - _version = [version copy]; - _oskFont = [oskFont copy]; - _displayFont = [displayFont copy]; - _languages = [languages copy]; - } - return self; + self = [super init]; + if (self) { + _name = [name copy]; + _identifier = [identifier copy]; + _version = [version copy]; + _oskFont = [oskFont copy]; + _displayFont = [displayFont copy]; + _languages = [languages copy]; + } + return self; } @end diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h index c951a166b4..63c6295711 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h @@ -1,10 +1,13 @@ -// -// KMPackageInfo.h -// Keyman -// -// Created by Shawn Schantz on 11/22/21. -// Copyright © 2021 SIL International. All rights reserved. -// +/* + * Keyman is copyright (C) SIL International. MIT License. + * + * KMPackageInfo.h + * Keyman + * + * Created by Shawn Schantz on 11/22/21. + * + * Value object describing a Keyman package. + */ #import @@ -60,7 +63,6 @@ NS_ASSUME_NONNULL_BEGIN keyboards:(NSDictionary*)keyboards fonts:(NSArray*)fonts files:(NSArray*)files; -- (void)debugReport; @end diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m index fa3aca38ca..0297505cab 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m @@ -1,55 +1,58 @@ -// -// KMPackageInfo.m -// Keyman -// -// Created by Shawn Schantz on 11/22/21. -// Copyright © 2021 SIL International. All rights reserved. -// +/* + * Keyman is copyright (C) SIL International. MIT License. + * + * KMPackageInfo.m + * Keyman + * + * Created by Shawn Schantz on 11/22/21. + * + * Value object describing a Keyman package. + */ #import "KMPackageInfo.h" @implementation KMPackageInfoBuilder - (instancetype)init { - self = [super init]; - if (self) { - _packageName = nil; - _packageVersion = nil; - _readmeFilename = nil; - _graphicFilename = nil; - _fileVersion = nil; - _keymanDeveloperVersion = nil; - _copyright = nil; - _authorName = nil; - _authorUrl = nil; - _website = nil; - _keyboards = nil; - _fonts = nil; - _files = nil; - } - return self; + self = [super init]; + if (self) { + _packageName = nil; + _packageVersion = nil; + _readmeFilename = nil; + _graphicFilename = nil; + _fileVersion = nil; + _keymanDeveloperVersion = nil; + _copyright = nil; + _authorName = nil; + _authorUrl = nil; + _website = nil; + _keyboards = nil; + _fonts = nil; + _files = nil; + } + return self; } @end @implementation KMPackageInfo - (instancetype)initWithBuilder:(KMPackageInfoBuilder *)builder { - self = [super init]; - if (self) { - _packageName = builder.packageName; - _packageVersion = builder.packageVersion; - _readmeFilename = builder.readmeFilename; - _graphicFilename = builder.graphicFilename; - _fileVersion = builder.fileVersion; - _keymanDeveloperVersion = builder.keymanDeveloperVersion; - _copyright = builder.copyright; - _authorName = builder.authorName; - _authorUrl = builder.authorUrl; - _website = builder.website; - _keyboards = builder.keyboards; - _fonts = builder.fonts; - _files = builder.files; - } - return self; + self = [super init]; + if (self) { + _packageName = builder.packageName; + _packageVersion = builder.packageVersion; + _readmeFilename = builder.readmeFilename; + _graphicFilename = builder.graphicFilename; + _fileVersion = builder.fileVersion; + _keymanDeveloperVersion = builder.keymanDeveloperVersion; + _copyright = builder.copyright; + _authorName = builder.authorName; + _authorUrl = builder.authorUrl; + _website = builder.website; + _keyboards = builder.keyboards; + _fonts = builder.fonts; + _files = builder.files; + } + return self; } - (instancetype)initWithName:(NSString*)packageName @@ -66,46 +69,23 @@ fonts:(NSArray*)fonts files:(NSArray*)files { - self = [super init]; - if (self) { - _packageName = [packageName copy]; - _packageVersion = [packageVersion copy]; - _readmeFilename = [readmeFilename copy]; - _graphicFilename = [graphicFilename copy]; - _fileVersion = [fileVersion copy]; - _keymanDeveloperVersion = [keymanDeveloperVersion copy]; - _copyright = [copyright copy]; - _authorName = [authorName copy]; - _authorUrl = [authorUrl copy]; - _website = [website copy]; - _keyboards = [keyboards copy]; - _fonts = [fonts copy]; - _files = [files copy]; - } - return self; + self = [super init]; + if (self) { + _packageName = [packageName copy]; + _packageVersion = [packageVersion copy]; + _readmeFilename = [readmeFilename copy]; + _graphicFilename = [graphicFilename copy]; + _fileVersion = [fileVersion copy]; + _keymanDeveloperVersion = [keymanDeveloperVersion copy]; + _copyright = [copyright copy]; + _authorName = [authorName copy]; + _authorUrl = [authorUrl copy]; + _website = [website copy]; + _keyboards = [keyboards copy]; + _fonts = [fonts copy]; + _files = [files copy]; + } + return self; } -- (void)debugReport -{ - if (_packageName) - NSLog(@"SGS2021 packageInfo.packageName = %@", _packageName); - if (_packageVersion) - NSLog(@"SGS2021 packageInfo.packageVersion = %@", _packageVersion); - if (_authorName) - NSLog(@"SGS2021 packageInfo.authorName = %@", _authorName); - if (_authorUrl) - NSLog(@"SGS2021 packageInfo.authorUrl = %@", _authorUrl); - if (_copyright) - NSLog(@"SGS2021 packageInfo.copyright = %@", _copyright); - if (_readmeFilename) - NSLog(@"SGS2021 packageInfo.readMe = %@", _readmeFilename); - if (_fonts) { - NSLog(@"SGS2021 packageInfo.fonts.count = %lu", [_fonts count]); - if ([_fonts count] > 0) { - NSLog(@"SGS2021 packageInfo.fonts[0] = %@", _fonts[0]); - } - } -} - - @end diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.h b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.h new file mode 100644 index 0000000000..a2651fb2c2 --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.h @@ -0,0 +1,29 @@ +/* + * Keyman is copyright (C) SIL International. MIT License. + * + * KMPackageReader.m + * Keyman + * + * Created by Shawn Schantz on 12/6/21. + * + * Read package information from kmp.json, if it exists. If not, read from kmp.inf. + * Then create and return KMPackageInfo object. + * + */ + +#import "KMPackageInfo.h" +#import "KMKeyboardInfo.h" +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface KMPackageReader : NSObject + +@property (assign, nonatomic) BOOL debugMode; + +- (instancetype)init; +- (KMPackageInfo *)loadPackageInfo:(NSString *)path; + +@end + +NS_ASSUME_NONNULL_END diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.m b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.m new file mode 100644 index 0000000000..8f435b9f6a --- /dev/null +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.m @@ -0,0 +1,337 @@ +/* + * Keyman is copyright (C) SIL International. MIT License. + * + * KMPackageReader.m + * Keyman + * + * Created by Shawn Schantz on 12/6/21. + * + * Read package information from kmp.json, if it exists. If not, read from kmp.inf. + * Then create and return KMPackageInfo object. + * + */ + +#import "KMPackageReader.h" + +static NSString *const kPackageJsonFile = @"kmp.json"; +static NSString *const kPackageInfFile = @"kmp.inf"; + +static NSString *const kPackage = @"[Package]"; +static NSString *const kButtons = @"[Buttons]"; +static NSString *const kStartMenu = @"[StartMenu]"; +static NSString *const kStartMenuEntries = @"[StartMenuEntries]"; +static NSString *const kInfo = @"[Info]"; +static NSString *const kFiles = @"[Files]"; + +static NSString *const kAuthor = @"Author"; +static NSString *const kCopyright = @"Copyright"; +static NSString *const kFile = @"File"; +static NSString *const kFont = @"Font"; +static NSString *const kGraphicFile = @"GraphicFile"; +static NSString *const kKeyboard = @"Keyboard"; +static NSString *const kName = @"Name"; +static NSString *const kReadMeFile = @"ReadMeFile"; +static NSString *const kVersion = @"Version"; +static NSString *const kWebSite = @"WebSite"; +static NSString *const kWelcome = @"Welcome"; + +typedef enum { + ctPackage, ctButtons, ctStartMenu, ctStartMenuEntries, ctInfo, ctFiles, ctUnknown +} ContentType; + +@implementation KMPackageReader + +- (instancetype)init { + self = [super init]; + if (self) { + _debugMode = NO; + } + return self; +} + +/** + * Attempt to load Keyman Package Information from kmp.json. + * If kmp.json file is not found or not readable, load from legacy kmp.inf file. + * @param the full path of the package folder. + */ +- (KMPackageInfo *)loadPackageInfo:(NSString *)path { + KMPackageInfo *packageInfo = nil; + NSString *jsonFilename = [path stringByAppendingPathComponent:kPackageJsonFile]; + + packageInfo = [self loadPackageInfoFromJsonFile:jsonFilename]; + + if (packageInfo == nil) { + NSString *infoFilename = [path stringByAppendingPathComponent:kPackageInfFile]; + packageInfo = [self loadPackageInfoFromInfFile:infoFilename]; + } + + return packageInfo; +} + +- (NSString *)packageNameFromPackageInfo:(NSString *)path { + NSString *packageName = nil; + + KMPackageInfo *packageInfo = [self loadPackageInfo:path]; + packageName = packageInfo.packageName; + + return packageName; +} + + /** + * read JSON file and load it into KMPackageInfo object + * returns nil if the file does not exist or it cannot be parsed as JSON + */ +- (KMPackageInfo *) loadPackageInfoFromJsonFile:(NSString *)path { + KMPackageInfo * packageInfo = nil; + + if (self.debugMode) + NSLog(@"Loading JSON package info from path: %@", path); + NSError *readError = nil; + NSData *data = [NSData dataWithContentsOfFile:path options:kNilOptions error:&readError]; + NSDictionary *parsedData = nil; + + if (data == nil) { + NSLog(@"Error reading JSON file at path : %@, error: %@ ", path, readError); + } else { + NSError *parseError = nil; + parsedData = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&parseError]; + + if (parsedData == nil) { + NSLog(@"Error parsing JSON file at path : %@, error: %@ ", path, parseError); + } else { + packageInfo = [self createPackageInfoFromJsonData:parsedData]; + } + } + + return packageInfo; +} + +- (KMPackageInfo *) createKeyboardInfoFromJsonKeyboard:(NSDictionary *) keyboard { + + KMKeyboardInfoBuilder *builder = [[KMKeyboardInfoBuilder alloc] init]; + + NSArray *languages = keyboard[@"languages"]; + NSMutableArray *languageInfoArray = [NSMutableArray arrayWithCapacity:0]; + + for (NSDictionary *language in languages) { + KMLanguageInfo *languageInfo = [[KMLanguageInfo alloc] initWithName:language[@"name"] + identifier:language[@"id"]]; + + [languageInfoArray addObject:languageInfo]; + } + + builder.name = keyboard[@"name"]; + builder.identifier = keyboard[@"id"]; + builder.version = keyboard[@"version"]; + builder.oskFont = keyboard[@"oskFont"]; + builder.displayFont = keyboard[@"displayFont"]; + builder.languages = [languageInfoArray copy]; + + KMKeyboardInfo *keyboardInfo = [[KMKeyboardInfo alloc] initWithBuilder:builder]; + return keyboardInfo; +} + +- (KMPackageInfo *) createPackageInfoFromJsonData:(NSDictionary *) jsonData { + + NSMutableArray *keyboardInfoArray = [NSMutableArray arrayWithCapacity:0]; + NSMutableArray *fontArray = [NSMutableArray arrayWithCapacity:0]; + NSArray *keyboards = jsonData[@"keyboards"]; + + // loop through keyboards array to add keyboards, + // then loop through each keyboard's languages array to add languages + + for (NSDictionary *keyboard in keyboards) { + KMKeyboardInfo *keyboardInfo = [self createKeyboardInfoFromJsonKeyboard:keyboard]; + + // add oskFont to fontArray if not nil or empty string + if ([keyboardInfo.oskFont length]) { + [fontArray addObject:keyboardInfo.oskFont]; + } + + // add displayFont to fontArray if not not nil or empty string and not equal to oskFont + if ([keyboardInfo.displayFont length] && + ![keyboardInfo.displayFont isEqualToString:keyboardInfo.displayFont]) { + [fontArray addObject:keyboardInfo.displayFont]; + } + + [keyboardInfoArray addObject:keyboardInfo]; + } + + KMPackageInfoBuilder *builder = + [[KMPackageInfoBuilder alloc] init]; + + builder.packageName = jsonData[@"info"][@"name"][@"description"]; + builder.packageVersion = jsonData[@"info"][@"version"][@"description"]; + builder.readmeFilename = jsonData[@"options"][@"readmeFile"]; + builder.graphicFilename = jsonData[@"options"][@"graphicFile"]; + builder.fileVersion = jsonData[@"system"][@"fileVersion"]; + builder.keymanDeveloperVersion = jsonData[@"system"][@"keymanDeveloperVersion"]; + builder.copyright = jsonData[@"info"][@"copyright"][@"description"]; + builder.authorName = jsonData[@"info"][@"author"][@"description"]; + builder.authorUrl = jsonData[@"info"][@"author"][@"url"]; + builder.website = jsonData[@"info"][@"website"][@"url"]; + builder.keyboards = [keyboardInfoArray copy]; + builder.fonts = [fontArray copy]; + + KMPackageInfo *packageInfo = [[KMPackageInfo alloc] initWithBuilder:builder]; + + return packageInfo; +} + +/** + * read .inf file and load it into KMPackageInfo object + * returns nil if the file does not exist or it cannot be parsed + * + * adapted from legacy method keyboardInfoFromInfFile that loaded data from inf file to NSDictionary + */ + +- (KMPackageInfo *) loadPackageInfoFromInfFile:(NSString *)path { + if (self.debugMode) + NSLog(@"Loading inf package info from path: %@", path); + + NSMutableArray *files = [NSMutableArray arrayWithCapacity:0]; + NSMutableArray *keyboards = [NSMutableArray arrayWithCapacity:0]; + KMPackageInfoBuilder *builder = [[KMPackageInfoBuilder alloc] init]; + + @try { + NSString *fileContents = [[NSString stringWithContentsOfFile:path encoding:NSWindowsCP1252StringEncoding error:NULL] stringByReplacingOccurrencesOfString:@"\r" withString:@""]; + NSArray *lines = [fileContents componentsSeparatedByString:@"\n"]; + ContentType contentType = ctUnknown; + for (NSString *line in lines) { + if (!line.length) + continue; + + if ([[line lowercaseString] hasPrefix:[kPackage lowercaseString]]) { + contentType = ctPackage; + continue; + } + else if ([[line lowercaseString] hasPrefix:[kButtons lowercaseString]]) { + contentType = ctButtons; + continue; + } + else if ([[line lowercaseString] hasPrefix:[kStartMenu lowercaseString]]) { + contentType = ctStartMenu; + continue; + } + else if ([[line lowercaseString] hasPrefix:[kStartMenuEntries lowercaseString]]) { + contentType = ctStartMenuEntries; + continue; + } + else if ([[line lowercaseString] hasPrefix:[kInfo lowercaseString]]) { + contentType = ctInfo; + continue; + } + else if ([[line lowercaseString] hasPrefix:[kFiles lowercaseString]]) { + contentType = ctFiles; + continue; + } + + switch (contentType) { + case ctPackage: { + if ([[line lowercaseString] hasPrefix:[kReadMeFile lowercaseString]]) + builder.readmeFilename = [line substringFromIndex:kReadMeFile.length+1]; + else if ([[line lowercaseString] hasPrefix:[kGraphicFile lowercaseString]]) + builder.graphicFilename = [line substringFromIndex:kGraphicFile.length+1]; + break; + } + case ctButtons: + break; + case ctStartMenu: + break; + case ctStartMenuEntries: { + if ([[line lowercaseString] hasPrefix:[kWelcome lowercaseString]]) { + NSString *s = [line substringFromIndex:kWelcome.length+1]; + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + } + + break; + } + case ctInfo: { + if ([[line lowercaseString] hasPrefix:[kName lowercaseString]]) { + NSString *s = [line substringFromIndex:kName.length+1]; + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + builder.packageName = v1; + } + else if ([[line lowercaseString] hasPrefix:[kVersion lowercaseString]]) { + NSString *s = [line substringFromIndex:kVersion.length+1]; + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + builder.packageVersion = v1; + } + else if ([[line lowercaseString] hasPrefix:[kAuthor lowercaseString]]) { + NSString *s = [line substringFromIndex:kAuthor.length+1]; + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + builder.authorName = v1; + builder.authorUrl = v2; + } + else if ([[line lowercaseString] hasPrefix:[kCopyright lowercaseString]]) { + NSString *s = [line substringFromIndex:kCopyright.length+1]; + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + builder.copyright = v1; + } + else if ([[line lowercaseString] hasPrefix:[kWebSite lowercaseString]]) { + NSString *s = [line substringFromIndex:kWebSite.length+1]; + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + builder.website = v1; + } + + break; + } + case ctFiles: { + NSUInteger x = [line rangeOfString:@"="].location; + if (x == NSNotFound) + continue; + + NSString *s = [line substringFromIndex:x+2]; + if ([[s lowercaseString] hasPrefix:[kFile lowercaseString]]) { + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *v1 = [[[vs objectAtIndex:0] substringFromIndex:kFile.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *fileName = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + [files addObject:fileName]; + } + else if ([[s lowercaseString] hasPrefix:[kFont lowercaseString]]) { + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *v1 = [[[vs objectAtIndex:0] substringFromIndex:kFont.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *fontFileName = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + [files addObject:fontFileName]; + } + else if ([[s lowercaseString] hasPrefix:[kKeyboard lowercaseString]]) { + NSArray *vs = [s componentsSeparatedByString:@"\","]; + NSString *keyboardName = [[[vs objectAtIndex:0] substringFromIndex:kKeyboard.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *keyboardFileName = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + + + KMKeyboardInfoBuilder *builder = [[KMKeyboardInfoBuilder alloc] init]; + builder.name = keyboardName; + KMKeyboardInfo *keyboardInfo = [[KMKeyboardInfo alloc] initWithBuilder:builder]; + [keyboards addObject:keyboardInfo]; + } + + break; + } + default: + break; + } + } + } + @catch (NSException *e) { + NSLog(@"Error = %@", e.description); + return nil; + } + + KMPackageInfo *packageInfo = [[KMPackageInfo alloc] initWithBuilder:builder]; + return packageInfo; +} + +@end diff --git a/mac/KeymanEngine4Mac/KeymanEngine4Mac/KME/KMXFile.m b/mac/KeymanEngine4Mac/KeymanEngine4Mac/KME/KMXFile.m index 664cc5efe3..ddc36a848d 100644 --- a/mac/KeymanEngine4Mac/KeymanEngine4Mac/KME/KMXFile.m +++ b/mac/KeymanEngine4Mac/KeymanEngine4Mac/KME/KMXFile.m @@ -165,7 +165,6 @@ NSString *const kKMVisualKeyboardKey = @"KMVisualKeyboardKey"; + (NSDictionary *)keyboardInfoFromKmxFile:(NSString *)path { NSFileHandle *file = [NSFileHandle fileHandleForReadingAtPath:path]; - NSLog(@"SGS2021 load keyboardInfoFromKmxFile"); if (file == nil) { //NSLog(@"Failed to open file"); @@ -209,8 +208,6 @@ NSString *const kKMVisualKeyboardKey = @"KMVisualKeyboardKey"; visualKeyboard = [KMXFile UTF16StringWithPointer:cmp_str[i].dpString inFile:file]; } - NSLog(@"SGS2021 keyboard name from kmx file: %@", nameStr); - [file seekToFileOffset:cmp_kb.dpBitmapOffset]; NSData *bitmapData = [file readDataOfLength:cmp_kb.dwBitmapSize]; NSBitmapImageRep *imageRep = [NSBitmapImageRep imageRepWithData:bitmapData]; @@ -220,7 +217,6 @@ NSString *const kKMVisualKeyboardKey = @"KMVisualKeyboardKey"; if (!nameStr || !nameStr.length) { nameStr = [path.lastPathComponent stringByReplacingOccurrencesOfString:@".kmx" withString:@""]; - NSLog(@"SGS2021 keyboard name from kmx filename: %@", nameStr); } if (!verStr) verStr = @""; From 261fae7edd7d3c390a4089746ebd41adb84a9ef3 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Tue, 7 Dec 2021 19:31:00 +0100 Subject: [PATCH 10/38] chore(windows): fixup devsetup makefile whitespace --- windows/src/developer/setup/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/windows/src/developer/setup/Makefile b/windows/src/developer/setup/Makefile index d0c79191e7..96e2ba88f8 100644 --- a/windows/src/developer/setup/Makefile +++ b/windows/src/developer/setup/Makefile @@ -26,14 +26,14 @@ signcode: rem SIGNCODE /d "Keyman Developer Setup" $(PROGRAM)\developer\setup.exe wrap-symbols: - # This is slightly non-standard due to renamed devsetup.dbg above - # we should be able to clean this up in the future when we remove the - # zipped debug symbols +# This is slightly non-standard due to renamed devsetup.dbg above +# we should be able to clean this up in the future when we remove the +# zipped debug symbols $(SYMSTORE) $(PROGRAM)\developer\setup.exe /t keyman-developer $(SYMSTORE) $(ROOT)\src\developer\setup\setup.dbg /t keyman-developer test-manifest: - # test that (a) linked manifest exists and correct, and (b) has uiAccess=true +# test that (a) linked manifest exists and correct, and (b) has uiAccess=true $(MT) -nologo -inputresource:$(PROGRAM)\developer\setup.exe -validate_manifest install: From 6a0b4636c87475c171432f4e04a97a30fae1fb57 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Wed, 8 Dec 2021 05:12:45 +0100 Subject: [PATCH 11/38] chore(windows): fix builds for oskbulkrenderer and etl2log --- windows/src/support/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows/src/support/Makefile b/windows/src/support/Makefile index dbc9da1a37..c018c10301 100644 --- a/windows/src/support/Makefile +++ b/windows/src/support/Makefile @@ -9,11 +9,11 @@ CLEANS=clean-support # ---------------------------------------------------------------------- -oskbulkrenderer: +oskbulkrenderer: .virtual cd $(ROOT)\src\support\oskbulkrenderer $(MAKE) $(TARGET) -etl2log: +etl2log: .virtual cd $(ROOT)\src\support\etl2log $(MAKE) $(TARGET) From dfaa0bb00538bf92e14a32e0b2d73e29efc7c437 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Wed, 8 Dec 2021 05:14:01 +0100 Subject: [PATCH 12/38] chore(windows): fix build for setup locale data --- windows/src/desktop/setup/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows/src/desktop/setup/Makefile b/windows/src/desktop/setup/Makefile index 9445c217f4..ca2a308133 100644 --- a/windows/src/desktop/setup/Makefile +++ b/windows/src/desktop/setup/Makefile @@ -14,7 +14,7 @@ build: version.res manifest.res icons locale # bundled installer and is not signed $(COPY) $(WIN32_TARGET_PATH)\setup.exe $(PROGRAM)\desktop\setup-redist.exe -locale: +locale: .virtual $(ROOT)\bin\buildtools\devtools.exe -buildsetupstrings locale\ .\ setup_dialog.res: From c01e2557d04c29844273c1ee36af6f079a6cd702 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Wed, 8 Dec 2021 06:39:53 +0100 Subject: [PATCH 13/38] chore(windows): fixup oem makefile for nmake --- oem/firstvoices/windows/src/inst/Makefile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/oem/firstvoices/windows/src/inst/Makefile b/oem/firstvoices/windows/src/inst/Makefile index be9f4ad9f6..1c62b64ab1 100644 --- a/oem/firstvoices/windows/src/inst/Makefile +++ b/oem/firstvoices/windows/src/inst/Makefile @@ -21,19 +21,18 @@ manual-setup: check setup setup: desktop prereq: - # - # Prepare make file to copy versioned filenames to release folder - # - +# +# Prepare make file to copy versioned filenames to release folder +# cd $(FVROOT)\src\inst $(MKVER_U) download.in download.mak cd $(FVROOT)\src\xml $(MKVER_U) sentry.init.js.in sentry.init.js - # - # Build FirstVoices keyboards fv_all.kmp - # +# +# Build FirstVoices keyboards fv_all.kmp +# cd $(KEYMAN_ROOT)\..\keyboards From ff01477075e0f0c1bb16dc98f9c6904709b8c5b5 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Mon, 6 Dec 2021 13:06:42 +0400 Subject: [PATCH 14/38] chore(windows): use findstr instead of Borland grep Removes one more dependency on Delphi tools --- windows/src/Defines.mak | 3 --- windows/src/engine/keyman/Makefile | 4 +-- windows/src/engine/keymanx64/Makefile | 4 +-- .../compile-supplementary-support/Makefile | 26 +++++++++---------- 4 files changed, 16 insertions(+), 21 deletions(-) diff --git a/windows/src/Defines.mak b/windows/src/Defines.mak index bfde1f4a54..67af5bc1dd 100644 --- a/windows/src/Defines.mak +++ b/windows/src/Defines.mak @@ -306,7 +306,4 @@ SYMSTORE="C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\symstore.exe" add /c "Version: $(__VERSION_WITH_TAG)" \ /compress /f -# nmake is crashing with straight grep? -GREP=cmd /c grep - CLEAN=-del /S /Q diff --git a/windows/src/engine/keyman/Makefile b/windows/src/engine/keyman/Makefile index 36239e866b..ed8e6d6095 100644 --- a/windows/src/engine/keyman/Makefile +++ b/windows/src/engine/keyman/Makefile @@ -43,13 +43,13 @@ install: $(COPY) $(PROGRAM)\engine\keyman.exe "$(INSTALLPATH_KEYMANENGINE)" test-uiaccess: - $(GREP) -c "uiAccess=\"true\"" manifest.in + findstr "uiAccess=\"true\"" manifest.in >nul test-manifest: # test that (a) linked manifest exists and correct, and (b) has uiAccess=true $(MT) -nologo -inputresource:$(PROGRAM)\engine\keyman.exe -validate_manifest $(MT) -nologo -inputresource:$(PROGRAM)\engine\keyman.exe -out:temp.manifest - $(GREP) -c "uiAccess=\"true\"" temp.manifest + findstr "uiAccess=\"true\"" temp.manifest >nul -del temp.manifest !include ..\..\Target.mak diff --git a/windows/src/engine/keymanx64/Makefile b/windows/src/engine/keymanx64/Makefile index 76ceeeac92..263ef839b0 100644 --- a/windows/src/engine/keymanx64/Makefile +++ b/windows/src/engine/keymanx64/Makefile @@ -30,13 +30,13 @@ install: $(COPY) $(PROGRAM)\engine\keymanx64.exe "$(INSTALLPATH_KEYMANENGINE)" test-uiaccess: - $(GREP) -c "uiAccess=\"true\"" manifest.in + findstr "uiAccess=\"true\"" manifest.in >nul test-manifest: # test that (a) linked manifest exists and correct, and (b) has uiAccess=true $(MT) -nologo -inputresource:$(PROGRAM)\engine\keymanx64.exe -validate_manifest $(MT) -nologo -inputresource:$(PROGRAM)\engine\keymanx64.exe -out:temp.manifest - $(GREP) -c "uiAccess=\"true\"" temp.manifest + findstr "uiAccess=\"true\"" temp.manifest >nul -del temp.manifest !include ..\..\Target.mak diff --git a/windows/src/test/unit-tests/compile-supplementary-support/Makefile b/windows/src/test/unit-tests/compile-supplementary-support/Makefile index 00a707cd4d..8b3cfc93f5 100644 --- a/windows/src/test/unit-tests/compile-supplementary-support/Makefile +++ b/windows/src/test/unit-tests/compile-supplementary-support/Makefile @@ -4,38 +4,36 @@ KMCOMP="..\..\..\..\bin\developer\kmcomp.exe" KMCOMPD=$(KMCOMP) -d -# grep crashes if called directly from nmake? -GREP=cmd /c grep test: test-nodebug test-debug test-nodebug: $(KMCOMP) i3317_nosupp.kmn i3317_nosupp-1.0.js - $(GREP) -vl "KS=1" i3317_nosupp-1.0.js + findstr /v /m "KS=1" i3317_nosupp-1.0.js $(KMCOMP) i3317_withsupp.kmn i3317_withsupp-1.0.js - $(GREP) -l "KS=1" i3317_withsupp-1.0.js + findstr /m "KS=1" i3317_withsupp-1.0.js $(KMCOMP) i3317_withsupp_incontext.kmn i3317_withsupp_incontext-1.0.js - $(GREP) -l "KS=1" i3317_withsupp_incontext-1.0.js + findstr /m "KS=1" i3317_withsupp_incontext-1.0.js $(KMCOMP) i3317_withsupp_inmatch.kmn i3317_withsupp_inmatch-1.0.js - $(GREP) -l "KS=1" i3317_withsupp_inmatch-1.0.js + findstr /m "KS=1" i3317_withsupp_inmatch-1.0.js $(KMCOMP) i3317_withsupp_innomatch.kmn i3317_withsupp_innomatch-1.0.js - $(GREP) -l "KS=1" i3317_withsupp_innomatch-1.0.js + findstr /m "KS=1" i3317_withsupp_innomatch-1.0.js $(KMCOMP) i3317_withsupp_instore.kmn i3317_withsupp_instore-1.0.js - $(GREP) -l "KS=1" i3317_withsupp_instore-1.0.js + findstr /m "KS=1" i3317_withsupp_instore-1.0.js test-debug: $(KMCOMPD) i3317_nosupp.kmn i3317_nosupp-1.0.js - $(GREP) -vl "KS=1" i3317_nosupp-1.0.js + findstr /v /m "KS=1" i3317_nosupp-1.0.js $(KMCOMPD) i3317_withsupp.kmn i3317_withsupp-1.0.js - $(GREP) "KS=1" i3317_withsupp-1.0.js + findstr /m "KS=1" i3317_withsupp-1.0.js $(KMCOMPD) i3317_withsupp_incontext.kmn i3317_withsupp_incontext-1.0.js - $(GREP) "KS=1" i3317_withsupp_incontext-1.0.js + findstr /m "KS=1" i3317_withsupp_incontext-1.0.js $(KMCOMPD) i3317_withsupp_inmatch.kmn i3317_withsupp_inmatch-1.0.js - $(GREP) "KS=1" i3317_withsupp_inmatch-1.0.js + findstr /m "KS=1" i3317_withsupp_inmatch-1.0.js $(KMCOMPD) i3317_withsupp_innomatch.kmn i3317_withsupp_innomatch-1.0.js - $(GREP) "KS=1" i3317_withsupp_innomatch-1.0.js + findstr /m "KS=1" i3317_withsupp_innomatch-1.0.js $(KMCOMPD) i3317_withsupp_instore.kmn i3317_withsupp_instore-1.0.js - $(GREP) "KS=1" i3317_withsupp_instore-1.0.js + findstr /m "KS=1" i3317_withsupp_instore-1.0.js clean: -del *.js From c9dc10cc338664b7f8bda61ca91ce130c15273f5 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Mon, 6 Dec 2021 14:58:31 +0400 Subject: [PATCH 15/38] chore(windows): replace mkver with mkver.sh --- windows/src/Defines.mak | 23 +- windows/src/Makefile | 6 +- windows/src/Target.mak | 7 +- windows/src/buildtools/Makefile | 6 +- windows/src/buildtools/buildpkg/version.rc | 6 +- .../src/buildtools/buildunidata/version.rc | 6 +- windows/src/buildtools/mkver.sh | 50 + windows/src/buildtools/mkver/Main.pas | 431 -------- windows/src/buildtools/mkver/Makefile | 15 - windows/src/buildtools/mkver/TagFunctions.pas | 124 --- windows/src/buildtools/mkver/mkver.bdsproj | 175 ---- windows/src/buildtools/mkver/mkver.cfg | 43 - windows/src/buildtools/mkver/mkver.dof | 106 -- windows/src/buildtools/mkver/mkver.dpr | 23 - windows/src/buildtools/mkver/mkver.dproj | 949 ------------------ windows/src/buildtools/mkver/mkver.res | Bin 940 -> 0 bytes windows/src/buildtools/mkver/mkver_Icon.ico | Bin 766 -> 0 bytes windows/src/desktop/insthelp/version.rc | 6 +- windows/src/desktop/kmbrowserhost/version.rc | 6 +- windows/src/desktop/kmconfig/version.rc | 6 +- windows/src/desktop/kmshell/version.rc | 6 +- windows/src/desktop/setup/version.rc | 6 +- windows/src/developer/TIKE/version.rc | 6 +- windows/src/developer/kmanalyze/version.rc | 6 +- windows/src/developer/kmcmpdll/version.rc | 6 +- windows/src/developer/kmcomp/version.rc | 6 +- windows/src/developer/kmconvert/version.rc | 6 +- windows/src/developer/kmdecomp/version.rc | 6 +- windows/src/developer/kmndebug/version.rc | 6 +- .../src/developer/samples/imsample/version.rc | 6 +- windows/src/developer/setup/version.rc | 6 +- windows/src/engine/inst/insthelper/version.rc | 6 +- windows/src/engine/keyman/version.rc | 6 +- windows/src/engine/keyman32/version.rc | 6 +- windows/src/engine/keyman64/version.rc | 6 +- windows/src/engine/keymanx64/version.rc | 6 +- windows/src/engine/kmcomapi/version.rc | 6 +- windows/src/engine/kmrefresh/version.rc | 6 +- windows/src/engine/kmtip/version.rc | 6 +- windows/src/engine/mcompile/version.rc | 6 +- windows/src/engine/tsysinfo/version.rc | 6 +- windows/src/engine/tsysinfox64/version.rc | 6 +- windows/src/global/help/Makefile | 2 +- windows/src/global/inc/keymanversion.h | 4 + windows/src/support/charident/version.rc | 6 +- windows/src/support/etl2log/version.rc | 6 +- windows/src/support/imtest/version.rc | 6 +- windows/src/support/kdebug/version.rc | 6 +- windows/src/support/kmkb0045/version.rc | 6 +- .../src/support/oskbulkrenderer/version.rc | 6 +- .../src/support/richedit_examine/version.rc | 6 +- windows/src/support/windowinfo/version.rc | 6 +- .../i3619tip/i3619tip/i3619tip/version.rc | 6 +- 53 files changed, 175 insertions(+), 2005 deletions(-) create mode 100644 windows/src/buildtools/mkver.sh delete mode 100644 windows/src/buildtools/mkver/Main.pas delete mode 100644 windows/src/buildtools/mkver/Makefile delete mode 100644 windows/src/buildtools/mkver/TagFunctions.pas delete mode 100644 windows/src/buildtools/mkver/mkver.bdsproj delete mode 100644 windows/src/buildtools/mkver/mkver.cfg delete mode 100644 windows/src/buildtools/mkver/mkver.dof delete mode 100644 windows/src/buildtools/mkver/mkver.dpr delete mode 100644 windows/src/buildtools/mkver/mkver.dproj delete mode 100644 windows/src/buildtools/mkver/mkver.res delete mode 100644 windows/src/buildtools/mkver/mkver_Icon.ico diff --git a/windows/src/Defines.mak b/windows/src/Defines.mak index 67af5bc1dd..29cac86145 100644 --- a/windows/src/Defines.mak +++ b/windows/src/Defines.mak @@ -251,23 +251,14 @@ PLATFORM=Win32 # in the same way as /resources/build/build-utils.sh. # -MKVER_APP=$(PROGRAM)\buildtools\mkver +!ifdef GIT_BASH_FOR_KEYMAN +MKVER_SH=$(GIT_BASH_FOR_KEYMAN) $(ROOT)\src\buildtools\mkver.sh +!else +MKVER_SH=start /wait .\build.sh $(ROOT)\src\buildtools\mkver.sh +!endif -!IFDEF VERSION_TXT_PATH -MKVER_VERSION_TXT=$(VERSION_TXT_PATH)\version.in -!ELSE -MKVER_VERSION_TXT=..\version.in -!ENDIF - -MKVER_TIER_MD=$(KEYMAN_ROOT)\TIER.md -MKVER_VERSION_MD=$(KEYMAN_ROOT)\VERSION.md - -MKVER_COMMON_PARAMS=-tier "$(MKVER_TIER_MD)" -version "$(MKVER_VERSION_MD)" - -# Update a manifest.xml file -MKVER_M=$(MKVER_APP) $(MKVER_COMMON_PARAMS) -m manifest.in manifest.xml -# Token replacement for all other file types; pattern: $(MKVER_U) -MKVER_U=$(MKVER_APP) $(MKVER_COMMON_PARAMS) -u +MKVER_M=$(MKVER_SH) manifest.in manifest.xml +MKVER_U=$(MKVER_SH) # # Symstore diff --git a/windows/src/Makefile b/windows/src/Makefile index 65cde7ed66..c10dd7a6de 100644 --- a/windows/src/Makefile +++ b/windows/src/Makefile @@ -158,7 +158,7 @@ test-7zip: # Test that klog is disabled # -test-klog: mkver-app +test-klog: cd $(ROOT)\src\buildtools\test-klog $(MAKE) verify cd $(ROOT)\src @@ -167,7 +167,7 @@ test-klog: mkver-app # Test that we haven't already built this release # -test-releaseexists: mkver-app +test-releaseexists: cd $(ROOT)\src\developer\inst $(MAKE) test-releaseexists cd $(ROOT)\src @@ -275,7 +275,7 @@ build-release-wrapper-oem: # Tools needed to complete a build # -global-versions: mkver-app +global-versions: # Build our root version.txt cd $(ROOT)\src diff --git a/windows/src/Target.mak b/windows/src/Target.mak index 85f84b0c9e..d3583ddf99 100644 --- a/windows/src/Target.mak +++ b/windows/src/Target.mak @@ -15,11 +15,6 @@ versionhistory-app2: cd $(ROOT)\src\buildtools $(MAKE) versionhistory -mkver-app: dirs - cd $(ROOT)\src\buildtools\mkver - $(MAKE) - cd $(ROOT)\src - devtools-app: dirs cd $(ROOT)\src\buildtools $(MAKE) devtools @@ -28,7 +23,7 @@ devtools-app: dirs version.res: version.rc rc $? -manifest.res: version.res +manifest.res: manifest.in version.res $(MKVER_M) rc manifest.rc diff --git a/windows/src/buildtools/Makefile b/windows/src/buildtools/Makefile index 48b93326d1..6283539901 100644 --- a/windows/src/buildtools/Makefile +++ b/windows/src/buildtools/Makefile @@ -4,7 +4,7 @@ NOTARGET_SIGNCODE=yes -TARGETS=devtools sentrytool tds2dbg mkver \ +TARGETS=devtools sentrytool tds2dbg \ buildunidata build_standards_data buildpkg test-klog delphiprojectmanager CLEANS=clean-buildtools @@ -32,10 +32,6 @@ devtools: .virtual cd $(ROOT)\src\buildtools\devtools $(MAKE) $(TARGET) -mkver: .virtual - cd $(ROOT)\src\buildtools\mkver - $(MAKE) $(TARGET) - buildpkg: .virtual cd $(ROOT)\src\buildtools\buildpkg $(MAKE) $(TARGET) diff --git a/windows/src/buildtools/buildpkg/version.rc b/windows/src/buildtools/buildpkg/version.rc index bdf2b40b74..8590bab3fd 100644 --- a/windows/src/buildtools/buildpkg/version.rc +++ b/windows/src/buildtools/buildpkg/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Buildpkg\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "BUILDPKG\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "BUILDPKG.EXE\0" VALUE "ProductName", "Keyman Build Environment\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/buildtools/buildunidata/version.rc b/windows/src/buildtools/buildunidata/version.rc index e9ff8741b3..fd500009fb 100644 --- a/windows/src/buildtools/buildunidata/version.rc +++ b/windows/src/buildtools/buildunidata/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "MakeCert\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "MAKECERT\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "MAKECERT.EXE\0" VALUE "ProductName", "Keyman Build Environment\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/buildtools/mkver.sh b/windows/src/buildtools/mkver.sh new file mode 100644 index 0000000000..5cf286f42b --- /dev/null +++ b/windows/src/buildtools/mkver.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +# Set sensible script defaults: +# set -e: Terminate script if a command returns an error +set -e +# set -u: Terminate script if an unset variable is used +set -u + +## START STANDARD BUILD SCRIPT INCLUDE +# adjust relative paths as necessary +THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")" +. "$(dirname "$THIS_SCRIPT")/../../../resources/build/build-utils.sh" +## END STANDARD BUILD SCRIPT INCLUDE + +display_usage() { + echo "Usage: mkver.sh " + exit 1 +} + +if [[ $# -lt 2 ]]; then + display_usage +fi + +replaceVersionStrings_Mkver() { + # This is similar to replaceVersionStrings in build-utils.sh but supports all + # the old mkver strings + local infile=$1 + local outfile=$2 + + sed " + s/\$VersionWin/$VERSION_WIN/g; + s/\$VersionRelease/$VERSION_RELEASE/g; + s/\$VersionMajor/$VERSION_MAJOR/g; + s/\$VersionMinor/$VERSION_MINOR/g; + s/\$VersionPatch/$VERSION_PATCH/g; + s/\$Tier/$TIER/g; + s/\$Tag/$VERSION_TAG/g; + s/\$VersionWithTag/$VERSION_WITH_TAG/g; + s/\$VersionRc/$VERSION_MAJOR,$VERSION_MINOR,$VERSION_PATCH,0/g; + s/\$Environment/$VERSION_ENVIRONMENT/g; + s/\$Version/$VERSION/g; + s/\$VERSIONNUM/$VERSION_MAJOR,$VERSION_MINOR,$VERSION_PATCH,0/g; + s/\$VERSION/$VERSION_WIN/g; + s/\$RELEASE_MAJOR/$VERSION_MAJOR/g; + s/\$RELEASE_MINOR/$VERSION_MINOR/g; + s/\$RELEASE/$VERSION_RELEASE/g; + " "$infile" > "$outfile" +} + +replaceVersionStrings_Mkver "$1" "$2" diff --git a/windows/src/buildtools/mkver/Main.pas b/windows/src/buildtools/mkver/Main.pas deleted file mode 100644 index 10d1315ddf..0000000000 --- a/windows/src/buildtools/mkver/Main.pas +++ /dev/null @@ -1,431 +0,0 @@ -(* - Name: Main - Copyright: Copyright (C) SIL International. - Documentation: - Description: - Create Date: 28 Sep 2006 - - Modified Date: 26 Jun 2012 - Authors: mcdurdin - Related Files: - Dependencies: - - Bugs: - Todo: - Notes: - History: 28 Sep 2006 - mcdurdin - Added $GUID and fixed $DATE - 11 Dec 2009 - mcdurdin - I1807 - Manifest files need version info automatically updated in build - 04 May 2012 - mcdurdin - I3308 - V9.0 - Start to move towards Delphi namespaces - 26 Jun 2012 - mcdurdin - I3377 - KM9 - Update code references from 8.0 to 9.0 -*) -unit Main; // I3308 - -interface - -uses - WinApi.Windows, - System.Classes, - System.SysUtils, - TagFunctions; - -procedure Run; - -implementation - -uses - WinApi.ActiveX, - System.RegularExpressions, - System.Win.ComObj, - Xml.XMLIntf, - Xml.XMLDoc, - - Keyman.System.KeymanVersionInfo; - -procedure WriteHelp; forward; - -type - TMKVerMode = (mmUnknown, mmWriteVersionedFile, mmWriteManifestFile, mmWriteVersionRc); - -const - TAG_FILEVERSION = 1; - TAG_PRODUCTVERSION = 2; - TAG_FILEFLAGS = 3; - TAG_VALUE = 4; - - TAG2_COMPANYNAME = 1; - TAG2_FILEDESCRIPTION = 2; - TAG2_FILEVERSION = 3; - TAG2_INTERNALNAME = 4; - TAG2_LEGALCOPYRIGHT = 5; - TAG2_LEGALTRADEMARKS = 6; - TAG2_ORIGINALFILENAME = 7; - TAG2_PRODUCTNAME = 8; - TAG2_PRODUCTVERSION = 9; - TAG2_COMMENTS = 10; - -var - PredefTags: array[1..4] of string = - ('FILEVERSION', 'PRODUCTVERSION', 'FILEFLAGS', 'VALUE'); - - StringTags: array[1..10] of string = - ('"CompanyName",', '"FileDescription",', '"FileVersion",', '"InternalName",', '"LegalCopyright",', - '"LegalTradmarks",', '"OriginalFilename",', '"ProductName",', '"ProductVersion",', '"Comments",'); - -function ConstructEnvironmentTag(const tier: string): string; -var - TEAMCITY_VERSION, TEAMCITY_PR_NUMBER: string; -begin - TEAMCITY_VERSION := GetEnvironmentVariable('TEAMCITY_VERSION'); - if TEAMCITY_VERSION = '' then - begin - // Local dev machine, not TeamCity - Result := 'local'; - end - else - begin - // On TeamCity; are we running a pull request build or a master/beta/stable build? - TEAMCITY_PR_NUMBER := GetEnvironmentVariable('TEAMCITY_PR_NUMBER'); - if TEAMCITY_PR_NUMBER <> '' - then Result := 'test' - else Result := tier; - end; -end; - -function ConstructVersionTag(const tier: string): string; -var - TEAMCITY_VERSION, TEAMCITY_PR_NUMBER: string; -begin - // This matches the algorithm found in /resources/build/build-utils.sh - - if (tier = 'alpha') or (tier = 'beta') then - Result := '-'+tier - else - Result := ''; - - TEAMCITY_VERSION := GetEnvironmentVariable('TEAMCITY_VERSION'); - if TEAMCITY_VERSION = '' then - begin - // Local dev machine, not TeamCity - Result := Result + '-local'; - end - else - begin - // On TeamCity; are we running a pull request build or a master/beta/stable build? - TEAMCITY_PR_NUMBER := GetEnvironmentVariable('TEAMCITY_PR_NUMBER'); - if TEAMCITY_PR_NUMBER <> '' then - begin - // Note TEAMCITY_PR_NUMBER can also be 'master', 'beta', or 'stable-x.y' - // This indicates we are running a Test build. - if TRegEx.IsMatch(TEAMCITY_PR_NUMBER, '^(master|beta|stable(-[0-9]+\.[0-9]+)?)$') then - begin - Result := Result + '-test'; - end - else - Result := Result + '-test-'+TEAMCITY_PR_NUMBER; - end; - end; -end; - -function Init(var FMode: TMKVerMode; var TemplateFileName: string; UpdateFiles: TStringList; var VersionInfo: TKeymanVersionInfo): Boolean; -var - s: string; - n: Integer; - versionFile, tierFile, version, tier, tag: string; - environment: string; -begin - FMode := mmUnknown; - - n := 1; - s := ParamStr(n); - while s <> '' do - begin - if s = '-u' then - begin - FMode := mmWriteVersionedFile; - UpdateFiles.AddPair(ParamStr(n+1), ParamStr(n+2)); - Inc(n,3); - end - else if s = '-v' then - begin - FMode := mmWriteVersionRc; - TemplateFileName := ParamStr(n+1); - UpdateFiles.AddPair(ParamStr(n+2), ParamStr(n+3)); - Inc(n,4); - end - else if s = '-m' then - begin - FMode := mmWriteManifestFile; - UpdateFiles.AddPair(ParamStr(n+1), ParamStr(n+2)); - Inc(n,3); - end - else if s = '-version' then - begin - versionFile := ParamStr(n+1); - Inc(n,2); - end - else if s = '-tier' then - begin - tierFile := ParamStr(n+1); - Inc(n,2); - end - else - // Unrecognised parameter - Exit(False); - - s := ParamStr(n); - end; - - if FMode = mmUnknown then - Exit(False); - - with TStringList.Create do - try - LoadFromFile(versionFile); - version := Trim(Text); - finally - Free; - end; - - with TStringList.Create do - try - LoadFromFile(tierFile); - tier := Trim(Text); - finally - Free; - end; - - tag := ConstructVersionTag(tier); - environment := ConstructEnvironmentTag(tier); - - VersionInfo := BuildKeymanVersionInfo(version, tier, tag, environment); - - Result := True; -end; - -procedure UpdateResource(const template, fin, fout: string; VersionInfo: TKeymanVersionInfo); -var - i: Integer; - StringCompanyName: string; - StringLegalCopyright, StringLegalTrademarks: string; - StringProductName: string; -begin - writeln('Updating file version'); - - with TStringList.Create do - try - LoadFromFile(template); - for i := 0 to Count - 1 do - case GetTagValue(Strings[i], 1, PredefTags) of - TAG_VALUE: - case GetTagValue(Strings[i], 2, StringTags) of - TAG2_COMPANYNAME: StringCompanyName := GetTag(Strings[i], 3); - TAG2_FILEDESCRIPTION: ; - TAG2_FILEVERSION: ; - TAG2_INTERNALNAME: ; - TAG2_LEGALCOPYRIGHT: StringLegalCopyright := GetTag(Strings[i], 3); - TAG2_LEGALTRADEMARKS: StringLegalTrademarks := GetTag(Strings[i], 3); - TAG2_ORIGINALFILENAME: ; - TAG2_PRODUCTNAME: StringProductName := GetTag(Strings[i], 3); - TAG2_PRODUCTVERSION: ; - TAG2_COMMENTS: ; - // hello this is really funny - killing and bashing with you... - end; - end; - finally - Free; - end; - - // I'm free!!! I'm free!!! I'm finally free!! Thank God almighty I'm free at last! (end). - - with TStringList.Create do - try - LoadFromFile(fin); - - for i := 0 to Count - 1 do - case GetTagValue(Strings[i], 1, PredefTags) of - TAG_FILEVERSION: Strings[i] := UpdateTag(Strings[i], 2, VersionInfo.VersionRc); - TAG_PRODUCTVERSION: Strings[i] := UpdateTag(Strings[i], 2, VersionInfo.VersionRc); - TAG_VALUE: - case GetTagValue(Strings[i], 2, StringTags) of - TAG2_COMPANYNAME: Strings[i] := UpdateTag(Strings[i], 3, StringCompanyName); - TAG2_FILEDESCRIPTION: ; - TAG2_FILEVERSION: Strings[i] := UpdateTag(Strings[i], 3, '"'+VersionInfo.VersionWin+'\0"'); - TAG2_INTERNALNAME: ; - TAG2_LEGALCOPYRIGHT: Strings[i] := UpdateTag(Strings[i], 3, StringLegalCopyright); - TAG2_LEGALTRADEMARKS: Strings[i] := UpdateTag(Strings[i], 3, StringLegalTrademarks); - TAG2_ORIGINALFILENAME: ; - TAG2_PRODUCTNAME: Strings[i] := UpdateTag(Strings[i], 3, StringProductName); - TAG2_PRODUCTVERSION: Strings[i] := UpdateTag(Strings[i], 3, '"'+VersionInfo.VersionWin+'\0"'); - TAG2_COMMENTS: ; - end; - end; - SaveToFile(fout); - finally - Free; - end; -end; - -procedure UpdateManifest(const fin, fout: string; VersionInfo: TKeymanVersionInfo); -var - xml: IXMLDocument; -begin - xml := LoadXMLDocument(fin); - xml.DocumentElement.ChildNodes['assemblyIdentity'].Attributes['version'] := VersionInfo.VersionWin; - xml.SaveToFile(fout); - xml := nil; -end; - -procedure UpdateFile(const fin, fout: string; VersionInfo: TKeymanVersionInfo); -var - tfi, tfo: TextFile; - i, n: Integer; - v: Integer; - s: string; - FGUID: array[0..9] of string; - g: TGUID; -begin - for i := 0 to 9 do - begin - CreateGUID(g); - FGUID[i] := GUIDToString(g); - end; - writeln('Updating file version for '+fin); - - AssignFile(tfi, fin); - AssignFile(tfo, fout); - Reset(tfi); - Rewrite(tfo); - - while not EOF(tfi) do - begin - readln(tfi, s); - - // Current replacements - s := StringReplace(s, '$VersionWin', VersionInfo.VersionWin, [rfReplaceAll]); - s := StringReplace(s, '$VersionRelease', VersionInfo.VersionRelease, [rfReplaceAll]); - s := StringReplace(s, '$VersionMajor', IntToStr(VersionInfo.VersionMajor), [rfReplaceAll]); - s := StringReplace(s, '$VersionMinor', IntToStr(VersionInfo.VersionMinor), [rfReplaceAll]); - s := StringReplace(s, '$VersionPatch', IntToStr(VersionInfo.VersionPatch), [rfReplaceAll]); - s := StringReplace(s, '$Tier', VersionInfo.Tier, [rfReplaceAll]); - s := StringReplace(s, '$Tag', VersionInfo.Tag, [rfReplaceAll]); - s := StringReplace(s, '$VersionWithTag', VersionInfo.VersionWithTag, [rfReplaceAll]); - s := StringReplace(s, '$VersionRc', VersionInfo.VersionRc, [rfReplaceAll]); - s := StringReplace(s, '$Environment', VersionInfo.Environment, [rfReplaceAll]); - // Do this one last because it breaks the others otherwise... - s := StringReplace(s, '$Version', VersionInfo.Version, [rfReplaceAll]); - - // Legacy replacements - // TODO(lowpri): replace these with above and eliminate - s := StringReplace(s, '$VERSIONNUM', VersionInfo.VersionRc, [rfReplaceAll]); - s := StringReplace(s, '$VERSION', VersionInfo.VersionWin, [rfReplaceAll]); - - s := StringReplace(s, '$RELEASE_MAJOR', IntToStr(VersionInfo.VersionMajor), [rfReplaceAll]); - s := StringReplace(s, '$RELEASE_MINOR', IntToStr(VersionInfo.VersionMinor), [rfReplaceAll]); - s := StringReplace(s, '$RELEASE', VersionInfo.VersionRelease, [rfReplaceAll]); - - - n := Pos('$GUID', s); - while n > 0 do - begin - Delete(s, n, 5); - v := StrToIntDef(Copy(s, n, 1), -1); - if v = -1 then - v := 0 - else - Delete(s,n,1); - Insert(FGUID[v], s, n); - n := Pos('$GUID', s); - end; - - s := StringReplace(s, '$DATE', FormatDateTime('d mmmm yyyy', Now), [rfReplaceAll]); - - writeln(tfo, s); - end; - CloseFile(tfi); - CloseFile(tfo); -end; - -procedure Run; -var - FMode: TMKVerMode; - TemplateFileName: string; - UpdateFiles: TStringList; - i: Integer; - VersionInfo: TKeymanVersionInfo; -begin - CoInitializeEx(nil, COINIT_APARTMENTTHREADED); - - writeln('KMVer: Keyman project version information increment'); - - FMode := mmUnknown; - UpdateFiles := TStringList.Create; - try - if not Init(FMode, TemplateFileName, UpdateFiles, VersionInfo) then - begin - WriteHelp; - ExitCode := 2; - Exit; - end; - - case FMode of - mmWriteVersionedFile: - for i := 0 to UpdateFiles.Count - 1 do - UpdateFile(UpdateFiles.Names[i], UpdateFiles.ValueFromIndex[i], VersionInfo); - - mmWriteManifestFile: - UpdateManifest(UpdateFiles.Names[0], UpdateFiles.ValueFromIndex[0], VersionInfo); - mmWriteVersionRc: - UpdateResource(TemplateFileName, UpdateFiles.Names[0], UpdateFiles.ValueFromIndex[0], VersionInfo); - end; - - - finally - UpdateFiles.Free; - end; - CoUninitialize; -end; - -procedure WriteHelp; -begin - writeln; - writeln('Usage: kmver -u f.in f.out [-u f.in f.out...] '); - writeln(' or kmver -v '); - writeln(' or kmver -m '); - writeln(' -v: Update the version.rc with the template information'); - writeln(' -m: Update manifest.xml with the template information'); - writeln(' -u: Update file f.in to f.out, replacing (multiple entries okay):'); - writeln; - writeln(' Legacy tags (case sensitive):'); - writeln(' $VERSION 14.0.2.0'); - writeln(' $VERSIONNUM 14,0,2,0'); - writeln(' $RELEASE_MAJOR 14'); - writeln(' $RELEASE_MINOR 0'); - writeln(' $RELEASE 14.0'); - writeln(' $GUID# GUID 0-9'); - writeln(' $DATE 1 March 2018'); - writeln; - writeln(' Current tags (case sensitive):'); - writeln(' $Version 14.0.2'); - writeln(' $VersionWin 14.0.2.0'); - writeln(' $VersionRelease 14.0'); - writeln(' $VersionMajor 14'); - writeln(' $VersionMinor 0'); - writeln(' $VersionPatch 2'); - writeln(' $Tier alpha'); - writeln(' $Tag -alpha-test-1234'); - writeln(' $VersionWithTag 14.0.2-alpha-test-1234'); - writeln(' $VersionRc 14,0,2,0'); - writeln; - writeln(' project-version.in: The project version template, usually \keyman\windows\src\\version.in'); - writeln(' app-version.in: The app version template, usually \keyman\windows\src\\\version.in'); - writeln(' version.rc: version.rc file to write'); - writeln; - writeln('Common Parameters:'); - writeln(' -version Path to VERSION.md (in root of repo)'); - writeln(' -tier Current tier (alpha, beta or stable)'); - writeln; - writeln('Note: tag is constructed from TEAMCITY_VERSION and TEAMCITY_PR_NUMBER environment variables'); -end; - -end. - diff --git a/windows/src/buildtools/mkver/Makefile b/windows/src/buildtools/mkver/Makefile deleted file mode 100644 index f4bbbd2196..0000000000 --- a/windows/src/buildtools/mkver/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -# -# Mkver Makefile -# - -EXCLUDEPATHDEFINES=1 - -!include ..\..\Defines.mak - -build: dirs - $(DELPHI_MSBUILD) mkver.dproj "/p:Platform=Win32" - $(COPY) $(WIN32_TARGET_PATH)\mkver.exe $(PROGRAM)\buildtools - -clean: def-clean - -!include ..\..\Target.mak diff --git a/windows/src/buildtools/mkver/TagFunctions.pas b/windows/src/buildtools/mkver/TagFunctions.pas deleted file mode 100644 index 4d49ead795..0000000000 --- a/windows/src/buildtools/mkver/TagFunctions.pas +++ /dev/null @@ -1,124 +0,0 @@ -(* - Name: TagFunctions - Copyright: Copyright (C) 2003-2017 SIL International. - Documentation: - Description: - Create Date: 4 May 2012 - - Modified Date: 4 May 2012 - Authors: mcdurdin - Related Files: - Dependencies: - - Bugs: - Todo: - Notes: - History: 04 May 2012 - mcdurdin - I3306 - V9.0 - Remove TntControls - 04 May 2012 - mcdurdin - I3308 - V9.0 - Start to move towards Delphi namespaces -*) -unit TagFunctions; // I3306 // I3308 - -interface - -uses System.SysUtils; - -function GetTag(s: string; i: Integer): string; -function GetTagValue(s: string; i: Integer; tags: array of string): Integer; -function UpdateTag(s: string; i: Integer; tag: string): string; - -implementation - -function GetTag(s: string; i: Integer): string; -var - n: Integer; - InQuotes: Boolean; -begin - s := Trim(s); - n := 1; - InQuotes := False; - while n <= Length(s) do - begin - if CharInSet(s[n], [' ', #9]) and not InQuotes then - if i > 1 then - begin - Dec(i); - Delete(s, 1, n); - s := Trim(s); - InQuotes := False; - n := 0; - end - else - Break - else if s[n] = '"' then InQuotes := not InQuotes; - - Inc(n); - end; - Result := Copy(s, 1, n-1); -end; - -function GetTagValue(s: string; i: Integer; tags: array of string): Integer; -var - t: string; -begin - t := GetTag(s, i); - for i := Low(tags) to High(tags) do - if UpperCase(tags[i]) = UpperCase(t) then - begin - Result := i - Low(tags) + 1; - Exit; - end; - Result := 0; -end; - -function UpdateTag(s: string; i: Integer; tag: string): string; -var - InQuotes, InTag: Boolean; - n: Integer; -begin - n := 1; - InQuotes := False; InTag := False; - while n <= Length(s) do - begin - if CharInSet(s[n], [' ', #9]) and not InQuotes then - begin - if InTag then - begin - InTag := False; - Dec(i); - end - end - else - begin - if s[n] = '"' then InQuotes := not InQuotes; - InTag := True; - if i = 1 then Break; - end; - - Inc(n); - end; - - if n > Length(s) then - raise Exception.Create('Tag for line ' + s + ' not found.'); - - Result := Copy(s, 1, n-1); - Delete(s, 1, n-1); - - n := 1; - {InTag := True;} InQuotes := False; - while n <= Length(s) do - begin - if CharInSet(s[n], [' ', #9]) and not InQuotes then - Break - else - begin - //InTag := True; - if s[n] = '"' then InQuotes := not InQuotes; - end; - Inc(n); - end; - - Result := Result + tag + Copy(s, n, Length(s)); -end; - -end. - diff --git a/windows/src/buildtools/mkver/mkver.bdsproj b/windows/src/buildtools/mkver/mkver.bdsproj deleted file mode 100644 index dc576a2c93..0000000000 --- a/windows/src/buildtools/mkver/mkver.bdsproj +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - - - - - mkver.dpr - - - 7.0 - - - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 0 - 1 - 0 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - 1 - 1 - 1 - 2 - 1 - True - True - WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; - - False - - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - False - False - False - True - True - True - True - True - True - - - - 0 - 0 - False - 0 - False - False - False - 16384 - 1048576 - 4194304 - - - - - - - - .\acct;.\adjust;.\appt;.\child;.\dialogs;.\explorer;.\locking;.\main;.\medclaims;.\print;.\setup;\blue\src\lib\comp\DB;\blue\src\lib\comp\DB\Appt;\blue\src\lib\comp\DB\Camera;\blue\src\lib\comp\dwinsock;\blue\src\lib\comp\misc;\blue\src\lib\comp\vlist;\blue\src\lib\comp\zip;\blue\src\lib\db;\blue\src\lib\db\schema;\blue\src\lib\dialogs;\blue\src\lib\util;\blue\src\lib\util\auth;\blue\src\lib\util\crypt;\blue\src\lib\util\db;\blue\src\lib\util\db\ACCT;\blue\src\lib\util\db\APPT;\blue\src\lib\util\db\dbcrypt;\blue\src\lib\util\db\locking;\blue\src\lib\util\debug;\blue\src\lib\util\dongle;\blue\src\lib\util\ras;\blue\tmp\db\bclicmgr;\blue\tmp\db\import;\blue\tmp\db\log;\blue\tmp\db\photo;\blue\tmp\db\practice;\blue\tmp\db\wp - VCL40;VCLX40;VCLDB40;VCLDBX40;VCLSMP40;QRPT40;TEEUI40;TEEDB40;TEE40;ibevnt40;nmfast40;bcutil;VCLJPG40;bccomp;bcdb;bcacct;bcappt - DAOIdent;DAOCheck;DAODebug - - False - - - -v version.txt - - - False - - - True - False - - - - $00000000 - - - - False - False - 0 - 8 - 0 - 14 - False - False - False - False - False - 3081 - 1252 - - - CASEG Practice Computing - Blue Chip - 0.8.0.14 - BlueChip - Copyright © 1997-1999 CASEG Practice Computing - - BlueChip.exe - Blue Chip - 1.0.0.0 - - - - diff --git a/windows/src/buildtools/mkver/mkver.cfg b/windows/src/buildtools/mkver/mkver.cfg deleted file mode 100644 index be68f62091..0000000000 --- a/windows/src/buildtools/mkver/mkver.cfg +++ /dev/null @@ -1,43 +0,0 @@ --$A1 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J+ --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q+ --$R+ --$S- --$T- --$U- --$V+ --$W+ --$X+ --$Y+ --$Z1 --cc --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"C:\Documents and Settings\mcdurdin\My Documents\Borland Studio Projects\Bpl" --LN"C:\Documents and Settings\mcdurdin\My Documents\Borland Studio Projects\Bpl" --U".\acct;.\adjust;.\appt;.\child;.\dialogs;.\explorer;.\locking;.\main;.\medclaims;.\print;.\setup;\blue\src\lib\comp\DB;\blue\src\lib\comp\DB\Appt;\blue\src\lib\comp\DB\Camera;\blue\src\lib\comp\dwinsock;\blue\src\lib\comp\misc;\blue\src\lib\comp\vlist;\blue\src\lib\comp\zip;\blue\src\lib\db;\blue\src\lib\db\schema;\blue\src\lib\dialogs;\blue\src\lib\util;\blue\src\lib\util\auth;\blue\src\lib\util\crypt;\blue\src\lib\util\db;\blue\src\lib\util\db\ACCT;\blue\src\lib\util\db\APPT;\blue\src\lib\util\db\dbcrypt;\blue\src\lib\util\db\locking;\blue\src\lib\util\debug;\blue\src\lib\util\dongle;\blue\src\lib\util\ras;\blue\tmp\db\bclicmgr;\blue\tmp\db\import;\blue\tmp\db\log;\blue\tmp\db\photo;\blue\tmp\db\practice;\blue\tmp\db\wp" --O".\acct;.\adjust;.\appt;.\child;.\dialogs;.\explorer;.\locking;.\main;.\medclaims;.\print;.\setup;\blue\src\lib\comp\DB;\blue\src\lib\comp\DB\Appt;\blue\src\lib\comp\DB\Camera;\blue\src\lib\comp\dwinsock;\blue\src\lib\comp\misc;\blue\src\lib\comp\vlist;\blue\src\lib\comp\zip;\blue\src\lib\db;\blue\src\lib\db\schema;\blue\src\lib\dialogs;\blue\src\lib\util;\blue\src\lib\util\auth;\blue\src\lib\util\crypt;\blue\src\lib\util\db;\blue\src\lib\util\db\ACCT;\blue\src\lib\util\db\APPT;\blue\src\lib\util\db\dbcrypt;\blue\src\lib\util\db\locking;\blue\src\lib\util\debug;\blue\src\lib\util\dongle;\blue\src\lib\util\ras;\blue\tmp\db\bclicmgr;\blue\tmp\db\import;\blue\tmp\db\log;\blue\tmp\db\photo;\blue\tmp\db\practice;\blue\tmp\db\wp" --I".\acct;.\adjust;.\appt;.\child;.\dialogs;.\explorer;.\locking;.\main;.\medclaims;.\print;.\setup;\blue\src\lib\comp\DB;\blue\src\lib\comp\DB\Appt;\blue\src\lib\comp\DB\Camera;\blue\src\lib\comp\dwinsock;\blue\src\lib\comp\misc;\blue\src\lib\comp\vlist;\blue\src\lib\comp\zip;\blue\src\lib\db;\blue\src\lib\db\schema;\blue\src\lib\dialogs;\blue\src\lib\util;\blue\src\lib\util\auth;\blue\src\lib\util\crypt;\blue\src\lib\util\db;\blue\src\lib\util\db\ACCT;\blue\src\lib\util\db\APPT;\blue\src\lib\util\db\dbcrypt;\blue\src\lib\util\db\locking;\blue\src\lib\util\debug;\blue\src\lib\util\dongle;\blue\src\lib\util\ras;\blue\tmp\db\bclicmgr;\blue\tmp\db\import;\blue\tmp\db\log;\blue\tmp\db\photo;\blue\tmp\db\practice;\blue\tmp\db\wp" --R".\acct;.\adjust;.\appt;.\child;.\dialogs;.\explorer;.\locking;.\main;.\medclaims;.\print;.\setup;\blue\src\lib\comp\DB;\blue\src\lib\comp\DB\Appt;\blue\src\lib\comp\DB\Camera;\blue\src\lib\comp\dwinsock;\blue\src\lib\comp\misc;\blue\src\lib\comp\vlist;\blue\src\lib\comp\zip;\blue\src\lib\db;\blue\src\lib\db\schema;\blue\src\lib\dialogs;\blue\src\lib\util;\blue\src\lib\util\auth;\blue\src\lib\util\crypt;\blue\src\lib\util\db;\blue\src\lib\util\db\ACCT;\blue\src\lib\util\db\APPT;\blue\src\lib\util\db\dbcrypt;\blue\src\lib\util\db\locking;\blue\src\lib\util\debug;\blue\src\lib\util\dongle;\blue\src\lib\util\ras;\blue\tmp\db\bclicmgr;\blue\tmp\db\import;\blue\tmp\db\log;\blue\tmp\db\photo;\blue\tmp\db\practice;\blue\tmp\db\wp" --DDAOIdent;DAOCheck;DAODebug --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/windows/src/buildtools/mkver/mkver.dof b/windows/src/buildtools/mkver/mkver.dof deleted file mode 100644 index d45aa009d9..0000000000 --- a/windows/src/buildtools/mkver/mkver.dof +++ /dev/null @@ -1,106 +0,0 @@ -[Compiler] -A=1 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=1 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=1 -R=1 -S=0 -T=0 -U=0 -V=1 -W=1 -X=1 -Y=2 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=0 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath=.\acct;.\adjust;.\appt;.\child;.\dialogs;.\explorer;.\locking;.\main;.\medclaims;.\print;.\setup;\blue\src\lib\comp\DB;\blue\src\lib\comp\DB\Appt;\blue\src\lib\comp\DB\Camera;\blue\src\lib\comp\dwinsock;\blue\src\lib\comp\misc;\blue\src\lib\comp\vlist;\blue\src\lib\comp\zip;\blue\src\lib\db;\blue\src\lib\db\schema;\blue\src\lib\dialogs;\blue\src\lib\util;\blue\src\lib\util\auth;\blue\src\lib\util\crypt;\blue\src\lib\util\db;\blue\src\lib\util\db\ACCT;\blue\src\lib\util\db\APPT;\blue\src\lib\util\db\dbcrypt;\blue\src\lib\util\db\locking;\blue\src\lib\util\debug;\blue\src\lib\util\dongle;\blue\src\lib\util\ras;\blue\tmp\db\bclicmgr;\blue\tmp\db\import;\blue\tmp\db\log;\blue\tmp\db\photo;\blue\tmp\db\practice;\blue\tmp\db\wp -Packages=VCL40;VCLX40;VCLDB40;VCLDBX40;VCLSMP40;QRPT40;TEEUI40;TEEDB40;TEE40;ibevnt40;nmfast40;bcutil;VCLJPG40;bccomp;bcdb;bcacct;bcappt -Conditionals=DAOIdent;DAOCheck;DAODebug -DebugSourceDirs= -UsePackages=0 -[Parameters] -RunParams=-v version.txt -HostApplication= -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=0 -MinorVer=8 -Release=0 -Build=14 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=3081 -CodePage=1252 -[Version Info Keys] -CompanyName=CASEG Practice Computing -FileDescription=Blue Chip -FileVersion=0.8.0.14 -InternalName=BlueChip -LegalCopyright=Copyright © 1997-1999 CASEG Practice Computing -LegalTrademarks= -OriginalFilename=BlueChip.exe -ProductName=Blue Chip -ProductVersion=1.0.0.0 -Comments= -[Excluded Packages] -C:\Program Files\Korbitec\OE505D4\Package\OE.bpl=ODBCExpress -C:\Marc\keyman\5.0\SOURCE\ziptools\comp51.bpl=TCompress 5.1 only (no BDE required) -C:\Marc\keyman\5.0\SOURCE\ziptools\vclzip\VCLZipD4.bpl=VCLZip 2.20 -[HistoryLists\hlConditionals] -Count=1 -Item0=DAOIdent;DAOCheck;DAODebug -[HistoryLists\hlUnitAliases] -Count=1 -Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -[HistoryLists\hlSearchPath] -Count=5 -Item0=.\acct;.\adjust;.\appt;.\child;.\dialogs;.\explorer;.\locking;.\main;.\medclaims;.\print;.\setup;\blue\src\lib\comp\DB;\blue\src\lib\comp\DB\Appt;\blue\src\lib\comp\DB\Camera;\blue\src\lib\comp\dwinsock;\blue\src\lib\comp\misc;\blue\src\lib\comp\vlist;\blue\src\lib\comp\zip;\blue\src\lib\db;\blue\src\lib\db\schema;\blue\src\lib\dialogs;\blue\src\lib\util;\blue\src\lib\util\auth;\blue\src\lib\util\crypt;\blue\src\lib\util\db;\blue\src\lib\util\db\ACCT;\blue\src\lib\util\db\APPT;\blue\src\lib\util\db\dbcrypt;\blue\src\lib\util\db\locking;\blue\src\lib\util\debug;\blue\src\lib\util\dongle;\blue\src\lib\util\ras;\blue\tmp\db\bclicmgr;\blue\tmp\db\import;\blue\tmp\db\log;\blue\tmp\db\photo;\blue\tmp\db\practice;\blue\tmp\db\wp -Item1=c:\keyman\5.0\src\lib\vclzip;c:\keyman\5.0\src\lib\general -Item2=c:\keyman\5.0\src\lib\vclzip -Item3=c:\marc\keyman\5.0\src\lib\vclzip -Item4=c:\marc\keyman\5.0\source\ziptools\vclzip -[HistoryLists\hlRunParameters] -Count=9 -Item0=-v version.txt -Item1=-i version.txt -Item2=-i C:\keyman\5.0\Assorted\test\test1.kmx -Item3=-v C:\keyman\5.0\Assorted\test\test1.kmx -Item4=-v C:\keyman\5.0\Assorted\test\test1.kmn -Item5=-ra -Item6=-i enhlao.kmp -Item7=-v enhlao.kmp -Item8=-u 00000454 diff --git a/windows/src/buildtools/mkver/mkver.dpr b/windows/src/buildtools/mkver/mkver.dpr deleted file mode 100644 index 25ba1f25aa..0000000000 --- a/windows/src/buildtools/mkver/mkver.dpr +++ /dev/null @@ -1,23 +0,0 @@ -program mkver; - -uses - System.SysUtils, - Main in 'Main.pas', - TagFunctions in 'TagFunctions.pas', - Keyman.System.KeymanVersionInfo in '..\..\global\delphi\general\Keyman.System.KeymanVersionInfo.pas'; - -// KeymanVersion in '..\..\global\delphi\general\KeymanVersion.pas'; - -{$R *.RES} - -begin - try - Run; - except - on E:Exception do - begin - writeln('Fatal error: ' + E.Message); - ExitCode := 1; - end; - end; -end. diff --git a/windows/src/buildtools/mkver/mkver.dproj b/windows/src/buildtools/mkver/mkver.dproj deleted file mode 100644 index 4c0cee861e..0000000000 --- a/windows/src/buildtools/mkver/mkver.dproj +++ /dev/null @@ -1,949 +0,0 @@ - - - {45AC1E4E-5952-4554-9418-4C35BB2608C7} - mkver.dpr - True - Debug - 1 - Console - None - 18.8 - Win32 - - - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Cfg_1 - true - true - - - true - Base - true - - - true - Cfg_2 - true - true - - - DAOIdent;DAOCheck;DAODebug;$(DCC_Define) - 1 - .\acct;.\adjust;.\appt;.\child;.\dialogs;.\explorer;.\locking;.\main;.\medclaims;.\print;.\setup;\blue\src\lib\comp\DB;\blue\src\lib\comp\DB\Appt;\blue\src\lib\comp\DB\Camera;\blue\src\lib\comp\dwinsock;\blue\src\lib\comp\misc;\blue\src\lib\comp\vlist;\blue\src\lib\comp\zip;\blue\src\lib\db;\blue\src\lib\db\schema;\blue\src\lib\dialogs;\blue\src\lib\util;\blue\src\lib\util\auth;\blue\src\lib\util\crypt;\blue\src\lib\util\db;\blue\src\lib\util\db\ACCT;\blue\src\lib\util\db\APPT;\blue\src\lib\util\db\dbcrypt;\blue\src\lib\util\db\locking;\blue\src\lib\util\debug;\blue\src\lib\util\dongle;\blue\src\lib\util\ras;\blue\tmp\db\bclicmgr;\blue\tmp\db\import;\blue\tmp\db\log;\blue\tmp\db\photo;\blue\tmp\db\practice;\blue\tmp\db\wp;$(DCC_UnitSearchPath) - true - true - System;Xml;Data;Datasnap;Web;Soap;Winapi;System.Win;$(DCC_Namespace) - true - true - 8 - 0 - 14 - false - false - false - false - true - VCL40;VCLX40;VCLDB40;VCLDBX40;VCLSMP40;QRPT40;TEEUI40;TEEDB40;TEE40;ibevnt40;nmfast40;bcutil;VCLJPG40;bccomp;bcdb;bcacct;bcappt;$(DCC_UsePackage) - 00400000 - CompanyName=CASEG Practice Computing;FileDescription=Blue Chip;FileVersion=0.8.0.14;InternalName=BlueChip;LegalCopyright=Copyright © 1997-1999 CASEG Practice Computing;LegalTrademarks=;OriginalFilename=BlueChip.exe;ProductName=Blue Chip;ProductVersion=1.0.0.0;Comments= - 3081 - true - mkver - $(BDS)\bin\delphi_PROJECTICON.ico - $(BDS)\bin\delphi_PROJECTICNS.icns - .\bin\$(Platform)\$(Config) - .\obj\$(Platform)\$(Config) - - - mkver_Icon.ico - Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) - 1033 - CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName) - (None) - - - mkver_Icon.ico - - - false - 0 - 0 - RELEASE;$(DCC_Define) - - - 1033 - CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName) - mkver_Icon.ico - - - DEBUG;$(DCC_Define) - false - - - -i c:\projects\keyman\open\windows\src\buildtools\version.txt c:\projects\keyman\open\windows\src\version.txt c:\projects\keyman\open\windows\src\buildtools\version.in - 1033 - CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName) - mkver_Icon.ico - - - - MainSource - - - - - - Cfg_2 - Base - - - Base - - - Cfg_1 - Base - - - - Delphi.Personality.12 - VCLApplication - - - - mkver.dpr - - - False - False - 0 - 8 - 0 - 14 - False - False - False - False - False - 3081 - 1252 - - - CASEG Practice Computing - Blue Chip - 0.8.0.14 - BlueChip - Copyright © 1997-1999 CASEG Practice Computing - - BlueChip.exe - Blue Chip - 1.0.0.0 - - - - Microsoft Office 2000 Sample Automation Server Wrapper Components - Microsoft Office XP Sample Automation Server Wrapper Components - - - - True - False - - - - - true - - - - - true - - - - - true - - - - - mkver.exe - true - - - - - 1 - - - 0 - - - - - classes - 1 - - - classes - 1 - - - - - res\xml - 1 - - - res\xml - 1 - - - - - library\lib\armeabi-v7a - 1 - - - - - library\lib\armeabi - 1 - - - library\lib\armeabi - 1 - - - - - library\lib\armeabi-v7a - 1 - - - - - library\lib\mips - 1 - - - library\lib\mips - 1 - - - - - library\lib\armeabi-v7a - 1 - - - library\lib\arm64-v8a - 1 - - - - - library\lib\armeabi-v7a - 1 - - - - - res\drawable - 1 - - - res\drawable - 1 - - - - - res\values - 1 - - - res\values - 1 - - - - - res\values-v21 - 1 - - - res\values-v21 - 1 - - - - - res\values - 1 - - - res\values - 1 - - - - - res\drawable - 1 - - - res\drawable - 1 - - - - - res\drawable-xxhdpi - 1 - - - res\drawable-xxhdpi - 1 - - - - - res\drawable-ldpi - 1 - - - res\drawable-ldpi - 1 - - - - - res\drawable-mdpi - 1 - - - res\drawable-mdpi - 1 - - - - - res\drawable-hdpi - 1 - - - res\drawable-hdpi - 1 - - - - - res\drawable-xhdpi - 1 - - - res\drawable-xhdpi - 1 - - - - - res\drawable-mdpi - 1 - - - res\drawable-mdpi - 1 - - - - - res\drawable-hdpi - 1 - - - res\drawable-hdpi - 1 - - - - - res\drawable-xhdpi - 1 - - - res\drawable-xhdpi - 1 - - - - - res\drawable-xxhdpi - 1 - - - res\drawable-xxhdpi - 1 - - - - - res\drawable-xxxhdpi - 1 - - - res\drawable-xxxhdpi - 1 - - - - - res\drawable-small - 1 - - - res\drawable-small - 1 - - - - - res\drawable-normal - 1 - - - res\drawable-normal - 1 - - - - - res\drawable-large - 1 - - - res\drawable-large - 1 - - - - - res\drawable-xlarge - 1 - - - res\drawable-xlarge - 1 - - - - - res\values - 1 - - - res\values - 1 - - - - - 1 - - - 1 - - - 0 - - - - - 1 - .framework - - - 1 - .framework - - - 0 - - - - - 1 - .dylib - - - 1 - .dylib - - - 0 - .dll;.bpl - - - - - 1 - .dylib - - - 1 - .dylib - - - 1 - .dylib - - - 1 - .dylib - - - 1 - .dylib - - - 0 - .bpl - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - - - - - - 1 - - - 1 - - - 1 - - - - - - - - Contents\Resources - 1 - - - Contents\Resources - 1 - - - - - library\lib\armeabi-v7a - 1 - - - library\lib\arm64-v8a - 1 - - - 1 - - - 1 - - - 1 - - - 1 - - - 1 - - - 1 - - - 0 - - - - - library\lib\armeabi-v7a - 1 - - - - - 1 - - - 1 - - - - - Assets - 1 - - - Assets - 1 - - - - - Assets - 1 - - - Assets - 1 - - - - - - - - - - - - - - - 12 - - - - - diff --git a/windows/src/buildtools/mkver/mkver.res b/windows/src/buildtools/mkver/mkver.res deleted file mode 100644 index 38e4009e2a9a90bf75a1c0a9dfdd9cd88e2910cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 940 zcmah|J!{-R5Pgac!jn1H*Z#Z@+E|1q^H@L_hxnq4FHS@V|wuToBe#T<$Y>A%N-uR9BoC%JdBAc z;lZU@^LNVtzR0rP@yjETp{{EZGK4tOJAV7QB>9IWiirnWpAXU^v!P1_MW+rPV*7|9 z=qM05t(HV8g19${|0}rP=^zF1PKPNlYOJ8KRs-yv7H#6L5S{{+%wPqUr=SRcy(o?? z-`uxqrjX@%)AO-Pf@1IbYvlN*DAHL`>485@+Vo~q-3`1_?XuE$tjBv=l+157n@X=3 z%e}d37t3X7#FB%Mcz^2 zcu7pp!+ELaY&Tff-#^6Rw%ldbcD#W`DAnJMF}JJGWVLTH{vkwK11CR#BMuun1dIj# zzd&su=%^#SNBSpv{$;+Y=~t0&%wu58Q%HYAfASi@gfQk6KI1Ju;f#2PbNa1KcJ@NH u!NYhwvRffrUY^ zM13c_CX~=V`RRQ3-kmgvXoNMJjfwGfNA!UB2+qI-IHFD?Xt$w=@R3qoz>Z%~k+l|r z^B+0Ke;^i@c>9e+qOu1%L8Mywv@ZzV%KLrn7du1?1KR=1g_I3(2hRUB?5-woLwq%1 zK{T$tq4uyun4Rh->5pI?2AM3$8@vvK7DSUMj=f&*8o89DvaIg(SSCVGR&P;%scj&laoi(OB z<`}>YtVae}?sejZ>}YcMz1|y)DLUPEWGx)M&V|KGxXH~1;|8?d`9mK5wD*;xzuq8I z$lV`!1h0qCDH}M2Cjq9GX#Pnw#bv{u0y#7Ii|`6&3m-T-BVG{k$^vH*4^iOUSvYqI I5vPdrZ)Z6FrT_o{ diff --git a/windows/src/desktop/insthelp/version.rc b/windows/src/desktop/insthelp/version.rc index 059345834e..e79e4f5c2e 100644 --- a/windows/src/desktop/insthelp/version.rc +++ b/windows/src/desktop/insthelp/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Installation Assistant\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "INSTHELP\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "INSTHELP.EXE\0" VALUE "ProductName", "Keyman\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/desktop/kmbrowserhost/version.rc b/windows/src/desktop/kmbrowserhost/version.rc index f4412c336d..f5f7b89560 100644 --- a/windows/src/desktop/kmbrowserhost/version.rc +++ b/windows/src/desktop/kmbrowserhost/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Browser Host Process\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMBROWSERHOST\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMBROWSERHOST.EXE\0" VALUE "ProductName", "Keyman\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/desktop/kmconfig/version.rc b/windows/src/desktop/kmconfig/version.rc index e3c5f695db..3c9c8c4176 100644 --- a/windows/src/desktop/kmconfig/version.rc +++ b/windows/src/desktop/kmconfig/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman System Settings\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMCONFIG\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMCONFIG.EXE\0" VALUE "ProductName", "Keyman\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/desktop/kmshell/version.rc b/windows/src/desktop/kmshell/version.rc index e47396452a..3eac4e174d 100644 --- a/windows/src/desktop/kmshell/version.rc +++ b/windows/src/desktop/kmshell/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Configuration\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMSHELL\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMSHELL.EXE\0" VALUE "ProductName", "Keyman\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/desktop/setup/version.rc b/windows/src/desktop/setup/version.rc index aecdb30b25..cc4da55f35 100644 --- a/windows/src/desktop/setup/version.rc +++ b/windows/src/desktop/setup/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Setup\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "SETUP\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "SETUP.EXE\0" VALUE "ProductName", "Keyman\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/developer/TIKE/version.rc b/windows/src/developer/TIKE/version.rc index dccb691f32..9f92e84144 100644 --- a/windows/src/developer/TIKE/version.rc +++ b/windows/src/developer/TIKE/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Developer\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "Keyman Developer\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "TIKE.EXE\0" VALUE "ProductName", "Keyman Developer\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/developer/kmanalyze/version.rc b/windows/src/developer/kmanalyze/version.rc index aeed0aa2c2..2e25c7b275 100644 --- a/windows/src/developer/kmanalyze/version.rc +++ b/windows/src/developer/kmanalyze/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Developer Keyboard Analyzer\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMANALYZE\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMANALYZE.EXE\0" VALUE "ProductName", "Keyman Developer\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/developer/kmcmpdll/version.rc b/windows/src/developer/kmcmpdll/version.rc index 67f21f09cc..d019f1e46e 100644 --- a/windows/src/developer/kmcmpdll/version.rc +++ b/windows/src/developer/kmcmpdll/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman compiler library\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMCOMP\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMCOMP.DLL\0" VALUE "ProductName", "Keyman Developer\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/developer/kmcomp/version.rc b/windows/src/developer/kmcomp/version.rc index bcef758609..57dddc7784 100644 --- a/windows/src/developer/kmcomp/version.rc +++ b/windows/src/developer/kmcomp/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman commandline compiler\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMCOMP\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMCOMP.EXE\0" VALUE "ProductName", "Keyman Developer\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/developer/kmconvert/version.rc b/windows/src/developer/kmconvert/version.rc index 5eae7f9292..9e45f66f9a 100644 --- a/windows/src/developer/kmconvert/version.rc +++ b/windows/src/developer/kmconvert/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Developer Conversion Utility\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMCONVERT\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMCONVERT.EXE\0" VALUE "ProductName", "Keyman Developer\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/developer/kmdecomp/version.rc b/windows/src/developer/kmdecomp/version.rc index bfc7c2a1ef..2b15cdb3b4 100644 --- a/windows/src/developer/kmdecomp/version.rc +++ b/windows/src/developer/kmdecomp/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman decompiler\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMDECOMP\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMDECOMP.EXE\0" VALUE "ProductName", "Keyman Developer\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/developer/kmndebug/version.rc b/windows/src/developer/kmndebug/version.rc index 963b12cbb6..fa1a494ece 100644 --- a/windows/src/developer/kmndebug/version.rc +++ b/windows/src/developer/kmndebug/version.rc @@ -11,12 +11,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman KMN Debug Library\0" VALUE "FileVersion", "15.0.78.0\0" VALUE "InternalName", "KMNDEBUG\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMNDEBUG.DLL\0" VALUE "ProductName", "Keyman Developer\0" VALUE "ProductVersion", "15.0.78.0\0" diff --git a/windows/src/developer/samples/imsample/version.rc b/windows/src/developer/samples/imsample/version.rc index f374f43819..b4ffaf6dc8 100644 --- a/windows/src/developer/samples/imsample/version.rc +++ b/windows/src/developer/samples/imsample/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman IM Sample\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "IMSAMPLE\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "IMSAMPLE.DLL\0" VALUE "ProductName", "Keyman Developer\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/developer/setup/version.rc b/windows/src/developer/setup/version.rc index a3dc297938..ceb320e841 100644 --- a/windows/src/developer/setup/version.rc +++ b/windows/src/developer/setup/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Developer Setup\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "SETUP\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMSHELL.EXE\0" VALUE "ProductName", "Keyman Developer\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/engine/inst/insthelper/version.rc b/windows/src/engine/inst/insthelper/version.rc index 5deba174df..3375834ccf 100644 --- a/windows/src/engine/inst/insthelper/version.rc +++ b/windows/src/engine/inst/insthelper/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine Installation Assistant\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "INSTHELPER\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "INSTHELPER.DLL\0" VALUE "ProductName", "Keyman Engine\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/engine/keyman/version.rc b/windows/src/engine/keyman/version.rc index 49f532d138..76369a22cc 100644 --- a/windows/src/engine/keyman/version.rc +++ b/windows/src/engine/keyman/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine x86\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KEYMAN\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KEYMAN.EXE\0" VALUE "ProductName", "Keyman Engine\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/engine/keyman32/version.rc b/windows/src/engine/keyman32/version.rc index bbd823f1a6..a66ec59f4a 100644 --- a/windows/src/engine/keyman32/version.rc +++ b/windows/src/engine/keyman32/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine Processor x86\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KEYMAN32\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KEYMAN32.DLL\0" VALUE "ProductName", "Keyman Engine\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/engine/keyman64/version.rc b/windows/src/engine/keyman64/version.rc index 6d7f083c46..6bfcf824ba 100644 --- a/windows/src/engine/keyman64/version.rc +++ b/windows/src/engine/keyman64/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine Processor x64\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KEYMAN64\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KEYMAN64.DLL\0" VALUE "ProductName", "Keyman Engine\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/engine/keymanx64/version.rc b/windows/src/engine/keymanx64/version.rc index 4ad571864d..a62a75e18c 100644 --- a/windows/src/engine/keymanx64/version.rc +++ b/windows/src/engine/keymanx64/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine x64\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KEYMANX64\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KEYMANX64.EXE\0" VALUE "ProductName", "Keyman Engine\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/engine/kmcomapi/version.rc b/windows/src/engine/kmcomapi/version.rc index 820b9bf006..090312ce9b 100644 --- a/windows/src/engine/kmcomapi/version.rc +++ b/windows/src/engine/kmcomapi/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine API\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMCOMAPI\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMCOMAPI.DLL\0" VALUE "ProductName", "Keyman Engine\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/engine/kmrefresh/version.rc b/windows/src/engine/kmrefresh/version.rc index 4ad571864d..a62a75e18c 100644 --- a/windows/src/engine/kmrefresh/version.rc +++ b/windows/src/engine/kmrefresh/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine x64\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KEYMANX64\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KEYMANX64.EXE\0" VALUE "ProductName", "Keyman Engine\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/engine/kmtip/version.rc b/windows/src/engine/kmtip/version.rc index 1e12b75d9a..f6768744e1 100644 --- a/windows/src/engine/kmtip/version.rc +++ b/windows/src/engine/kmtip/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine Text Service\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMTIP\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMTIP.DLL\0" VALUE "ProductName", "Keyman Engine\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/engine/mcompile/version.rc b/windows/src/engine/mcompile/version.rc index 20e1a93193..645106967f 100644 --- a/windows/src/engine/mcompile/version.rc +++ b/windows/src/engine/mcompile/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine Mnemonic Keyboard Recompiler\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "MCOMPILE\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "MCOMPILE.EXE\0" VALUE "ProductName", "Keyman Engine\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/engine/tsysinfo/version.rc b/windows/src/engine/tsysinfo/version.rc index b07056e864..ff8fd06871 100644 --- a/windows/src/engine/tsysinfo/version.rc +++ b/windows/src/engine/tsysinfo/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine Diagnostics\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KEYMAN\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KEYMAN.EXE\0" VALUE "ProductName", "Keyman Engine\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/engine/tsysinfox64/version.rc b/windows/src/engine/tsysinfox64/version.rc index 0c2edf83b0..a3d33d5195 100644 --- a/windows/src/engine/tsysinfox64/version.rc +++ b/windows/src/engine/tsysinfox64/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine x64 diagnostics\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "TSYSINFOX64\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "TSYSINFOX64.EXE\0" VALUE "ProductName", "Keyman Engine\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/global/help/Makefile b/windows/src/global/help/Makefile index 25b0895d10..d0cdbf738d 100644 --- a/windows/src/global/help/Makefile +++ b/windows/src/global/help/Makefile @@ -3,7 +3,7 @@ # !include ..\..\defines.mak -build: mkver-app +build: cd $(ROOT)\src\global\help $(MKVER_U) version.php.in version.out diff --git a/windows/src/global/inc/keymanversion.h b/windows/src/global/inc/keymanversion.h index e9db07f705..ea9a95539a 100644 --- a/windows/src/global/inc/keymanversion.h +++ b/windows/src/global/inc/keymanversion.h @@ -20,4 +20,8 @@ #define KEYMANVERSION90W L"9.0" #define KEYMANVERSION80W L"8.0" +#define KV_COMPANY_NAME "SIL International\0" +#define KV_LEGAL_COPYRIGHT "\xA9 SIL International\0" +#define KV_LEGAL_TRADEMARKS "Keyman is a registered trademark in Australia\0" + #endif diff --git a/windows/src/support/charident/version.rc b/windows/src/support/charident/version.rc index 077f855f08..5cb182328c 100644 --- a/windows/src/support/charident/version.rc +++ b/windows/src/support/charident/version.rc @@ -11,12 +11,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "CHARIDENT\0" VALUE "FileVersion", "8.0.329.0\0" VALUE "InternalName", "CHARIDENT\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "CHARIDENT.EXE\0" VALUE "ProductName", "SIL International Keyman Support Tools\0" VALUE "ProductVersion", "8.0.329.0\0" diff --git a/windows/src/support/etl2log/version.rc b/windows/src/support/etl2log/version.rc index e2b08735cf..fe543b2fb3 100644 --- a/windows/src/support/etl2log/version.rc +++ b/windows/src/support/etl2log/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman etl to log converter\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KEYMAN32\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "ETL2LOG.EXE\0" VALUE "ProductName", "Keyman Engine\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/support/imtest/version.rc b/windows/src/support/imtest/version.rc index ca136698da..b57a7ba53b 100644 --- a/windows/src/support/imtest/version.rc +++ b/windows/src/support/imtest/version.rc @@ -11,12 +11,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman IM Sample\0" VALUE "FileVersion", "5.0.108.0\0" VALUE "InternalName", "IMSAMPLE\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "IMSAMPLE.DLL\0" VALUE "ProductName", "SIL International Keyman Developer\0" VALUE "ProductVersion", "5.0.108.0\0" diff --git a/windows/src/support/kdebug/version.rc b/windows/src/support/kdebug/version.rc index 98c3a6aed5..a8ab0f8985 100644 --- a/windows/src/support/kdebug/version.rc +++ b/windows/src/support/kdebug/version.rc @@ -11,12 +11,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman debug tool\0" VALUE "FileVersion", "7.0.200.0\0" VALUE "InternalName", "KDEBUG\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KDEBUG.DLL\0" VALUE "ProductName", "SIL International Keyman Developer\0" VALUE "ProductVersion", "7.0.200.0\0" diff --git a/windows/src/support/kmkb0045/version.rc b/windows/src/support/kmkb0045/version.rc index a9ed80fd50..ef3a57f248 100644 --- a/windows/src/support/kmkb0045/version.rc +++ b/windows/src/support/kmkb0045/version.rc @@ -11,12 +11,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "SIL International KMKB0045\0" VALUE "FileVersion", "7.0.247.0\0" VALUE "InternalName", "KMKB0045\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMKB0045.EXE\0" VALUE "ProductName", "SIL International Keyman Support Tools\0" VALUE "ProductVersion", "7.0.247.0\0" diff --git a/windows/src/support/oskbulkrenderer/version.rc b/windows/src/support/oskbulkrenderer/version.rc index b796c2858d..e750bc0a9d 100644 --- a/windows/src/support/oskbulkrenderer/version.rc +++ b/windows/src/support/oskbulkrenderer/version.rc @@ -13,12 +13,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "OSK Bulk Renderer Support Tool\0" VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "OSKBULKRENDERER\0" - VALUE "LegalCopyright", "\xA9 SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "OSKBULKRENDERER.EXE\0" VALUE "ProductName", "Keyman Support Tools\0" VALUE "ProductVersion", KV_VERSION_STRING diff --git a/windows/src/support/richedit_examine/version.rc b/windows/src/support/richedit_examine/version.rc index ad89e1697a..9aa53dbb49 100644 --- a/windows/src/support/richedit_examine/version.rc +++ b/windows/src/support/richedit_examine/version.rc @@ -11,12 +11,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Richedit Examine\0" VALUE "FileVersion", "7.0.200.0\0" VALUE "InternalName", "RICHEDIT_EXAMINE\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "RICHEDIT_EXAMINE.EXE\0" VALUE "ProductName", "SIL International Keyman\0" VALUE "ProductVersion", "7.0.200.0\0" diff --git a/windows/src/support/windowinfo/version.rc b/windows/src/support/windowinfo/version.rc index 3ea33d610e..20599530da 100644 --- a/windows/src/support/windowinfo/version.rc +++ b/windows/src/support/windowinfo/version.rc @@ -11,12 +11,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "windowinfo\0" VALUE "FileVersion", "7.0.200.0\0" VALUE "InternalName", "windowinfo\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "windowinfo.EXE\0" VALUE "ProductName", "SIL International Keyman\0" VALUE "ProductVersion", "7.0.200.0\0" diff --git a/windows/src/test/manual-tests/test_i3619/i3619tip/i3619tip/i3619tip/version.rc b/windows/src/test/manual-tests/test_i3619/i3619tip/i3619tip/i3619tip/version.rc index c6d8ec473e..88ea0ef7e2 100644 --- a/windows/src/test/manual-tests/test_i3619/i3619tip/i3619tip/i3619tip/version.rc +++ b/windows/src/test/manual-tests/test_i3619/i3619tip/i3619tip/i3619tip/version.rc @@ -11,12 +11,12 @@ BEGIN BLOCK "0C0904E4" BEGIN - VALUE "CompanyName", "SIL International\0" + VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman TSF Input Processor\0" VALUE "FileVersion", "9.0.421.0\0" VALUE "InternalName", "KMTIP\0" - VALUE "LegalCopyright", "© SIL International\0" - VALUE "LegalTrademarks", "\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMTIP.DLL\0" VALUE "ProductName", "SIL International Keyman Engine Addins\0" VALUE "ProductVersion", "9.0.421.0\0" From 589471e72e6b2abea202c3a3c04ccf600a452077 Mon Sep 17 00:00:00 2001 From: sgschantz Date: Wed, 8 Dec 2021 16:07:10 +0700 Subject: [PATCH 16/38] updated for review comments, fixed issue with keyboard info not loading from json data --- .../KMInfoWindow/KMInfoWindowController.m | 60 +++++-------------- .../Keyman4MacIM/KMInputMethodAppDelegate.m | 9 +-- .../Keyman4MacIM/KMKeyboardInfo.h | 2 +- .../Keyman4MacIM/KMKeyboardInfo.m | 2 +- mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h | 8 +-- mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m | 4 +- .../Keyman4MacIM/KMPackageReader.h | 2 +- .../Keyman4MacIM/KMPackageReader.m | 30 +++++----- 8 files changed, 44 insertions(+), 73 deletions(-) diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m index bdff0f8c13..37114f093b 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m @@ -9,6 +9,7 @@ #import "KMInfoWindowController.h" #import "KMInputMethodAppDelegate.h" #import "KMPackageInfo.h" +#import "KMKeyboardInfo.h" #import @interface KMInfoWindowController () @@ -124,31 +125,24 @@ ""; NSString *pBodyFormat = @"

%@


"; - NSMutableString *kbsStr = [NSMutableString stringWithString:@""]; + NSMutableString *keyboardString = [NSMutableString stringWithString:@""]; - // TODO: getting keyboards from folder/kmx rather than inf - NSArray *kbs = [[self AppDelegate] keyboardNamesFromFolder:self.packagePath]; - if (kbs != nil && kbs.count) { - for (NSArray *kbName in kbs) { - [kbsStr appendString:[NSString stringWithFormat:pBodyFormat, kbName]]; + if (self.packageInfo.keyboards.count) { + for (KMKeyboardInfo *keyboard in self.packageInfo.keyboards) { + [keyboardString appendString:[NSString stringWithFormat:pBodyFormat, keyboard.name]]; } - } - // TODO: need to provide above as fallback in case no json??? -/* else { - // This was the old logic (prior to fixing issue #994). Keeping as fallback, though - // it's unlikely to be useful/needed. - kbs = [self.keyboardInfo objectForKey:kKeyboard]; - - if (kbs != nil && kbs.count) { - for (NSArray *kb in kbs) { - [kbsStr appendString:[NSString stringWithFormat:pBodyFormat, [kb objectAtIndex:0]]]; + } else { + // get keyboards from folder because not available in package info (.json or .inf) + NSArray *keyboards = [[self AppDelegate] keyboardNamesFromFolder:self.packagePath]; + if (keyboards != nil && keyboards.count) { + for (NSArray *keyboardName in keyboards) { + [keyboardString appendString:[NSString stringWithFormat:pBodyFormat, keyboardName]]; } - } - else { - kbsStr = [NSMutableString stringWithString:@"


"]; + } else { + keyboardString = [NSMutableString stringWithString:@"


"]; } } -*/ + NSArray *fonts = self.packageInfo.fonts; NSMutableString *fontsStr = [NSMutableString stringWithString:@""]; @@ -184,39 +178,17 @@ author = authorV1; else if (authorV2.length) author = [NSString stringWithFormat:linkFormat, authorV2, authorV2]; - /* - NSString *websiteV1 = [[self.keyboardInfo objectForKey:kWebSite] objectAtIndex:0]; - NSString *websiteV2 = [[self.keyboardInfo objectForKey:kWebSite] objectAtIndex:1]; - NSString *website = @""; - if (websiteV1.length && websiteV2.length) - website = [NSString stringWithFormat:linkFormat, websiteV2, websiteV1]; - else if (websiteV1.length) - website = websiteV1; - else if (websiteV2.length) - website = [NSString stringWithFormat:linkFormat, websiteV2, websiteV2]; - */ + NSString *website = @""; if (self.packageInfo.website.length) website = [NSString stringWithFormat:linkFormat, self.packageInfo.website, self.packageInfo.website]; - - /* - NSString *copyrightV1 = [[self.keyboardInfo objectForKey:kCopyright] objectAtIndex:0]; - NSString *copyrightV2 = [[self.keyboardInfo objectForKey:kCopyright] objectAtIndex:1]; - NSString *copyright = @""; - if (copyrightV1.length && copyrightV2.length) - copyright = [NSString stringWithFormat:linkFormat, copyrightV2, copyrightV1]; - else if (copyrightV1.length) - copyright = copyrightV1; - else if (copyrightV2.length) - copyright = [NSString stringWithFormat:linkFormat, copyrightV2, copyrightV2]; - */ NSString *copyright = @""; if (self.packageInfo.copyright.length) copyright = self.packageInfo.copyright; NSString *htmlStr = [NSString stringWithFormat:htmlFormat, name, shareUrl, shareUrl, - kbsStr, fontsStr, version, author, website, copyright]; + keyboardString, fontsStr, version, author, website, copyright]; return htmlStr; } diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m index 640e4d042b..f2ab1337ea 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodAppDelegate.m @@ -601,7 +601,7 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef } - (KMPackageInfo *)loadPackageInfo:(NSString *)path { - return [self.packageReader loadPackageInfo:path]; + return [self.packageReader loadPackageInfo:path]; } - (NSString *)packageNameFromPackageInfo:(NSString *)packageFolder { @@ -610,9 +610,10 @@ CGEventRef eventTapFunction(CGEventTapProxy proxy, CGEventType type, CGEventRef NSString *path = [[self keymanDataPath] stringByAppendingPathComponent:packageFolder]; KMPackageInfo *packageInfo = [self.packageReader loadPackageInfo:path]; - if (packageInfo) { - packageName = packageInfo.packageName; - } + if (packageInfo) { + packageName = packageInfo.packageName; + } + return packageName; } diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.h b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.h index 956f5fba73..96adc5ff24 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.h +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.h @@ -4,7 +4,7 @@ * KMKeyboardInfo.h * Keyman * - * Created by Shawn Schantz on 11/25/21. + * Created by Shawn Schantz on 2021/11/25. * * Value object describing a keyboard element of a Keyman package. */ diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.m b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.m index c1eb77ccf6..e9cad434b7 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMKeyboardInfo.m @@ -4,7 +4,7 @@ * KMKeyboardInfo.m * Keyman * - * Created by Shawn Schantz on 11/25/21. + * Created by Shawn Schantz on 2021/11/25. * * Value object describing a keyboard element of a Keyman package. */ diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h index 63c6295711..1d466b439d 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.h @@ -4,7 +4,7 @@ * KMPackageInfo.h * Keyman * - * Created by Shawn Schantz on 11/22/21. + * Created by Shawn Schantz on 2021/11/22. * * Value object describing a Keyman package. */ @@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic,copy) NSString* authorName; @property (nonatomic,copy) NSString* authorUrl; @property (nonatomic,copy) NSString* website; -@property (nonatomic,copy) NSDictionary* keyboards; +@property (nonatomic,copy) NSArray* keyboards; @property (nonatomic,copy) NSArray* files; @property (nonatomic,copy) NSArray* fonts; @@ -44,7 +44,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic,readonly) NSString* authorName; @property (nonatomic,readonly) NSString* authorUrl; @property (nonatomic,readonly) NSString* website; -@property (nonatomic,readonly) NSDictionary* keyboards; +@property (nonatomic,readonly) NSArray* keyboards; @property (nonatomic,readonly) NSArray* files; @property (nonatomic,readonly) NSArray* fonts; @@ -60,7 +60,7 @@ NS_ASSUME_NONNULL_BEGIN authorName:(NSString*)authorName authorUrl:(NSString*)authorUrl website:(NSString*)website - keyboards:(NSDictionary*)keyboards + keyboards:(NSArray*)keyboards fonts:(NSArray*)fonts files:(NSArray*)files; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m index 0297505cab..cbec2199b5 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageInfo.m @@ -4,7 +4,7 @@ * KMPackageInfo.m * Keyman * - * Created by Shawn Schantz on 11/22/21. + * Created by Shawn Schantz on 2021/11/22. * * Value object describing a Keyman package. */ @@ -65,7 +65,7 @@ authorName:(NSString*)authorName authorUrl:(NSString*)authorUrl website:(NSString*)website - keyboards:(NSDictionary*)keyboards + keyboards:(NSArray*)keyboards fonts:(NSArray*)fonts files:(NSArray*)files { diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.h b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.h index a2651fb2c2..2c138d8215 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.h +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.h @@ -4,7 +4,7 @@ * KMPackageReader.m * Keyman * - * Created by Shawn Schantz on 12/6/21. + * Created by Shawn Schantz on 2021/12/06. * * Read package information from kmp.json, if it exists. If not, read from kmp.inf. * Then create and return KMPackageInfo object. diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.m b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.m index 8f435b9f6a..04f0ae12c7 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.m @@ -4,7 +4,7 @@ * KMPackageReader.m * Keyman * - * Created by Shawn Schantz on 12/6/21. + * Created by Shawn Schantz on 2021/12/06. * * Read package information from kmp.json, if it exists. If not, read from kmp.inf. * Then create and return KMPackageInfo object. @@ -106,7 +106,12 @@ typedef enum { return packageInfo; } -- (KMPackageInfo *) createKeyboardInfoFromJsonKeyboard:(NSDictionary *) keyboard { +/** + * Creates a KeyboardInfo object using data loaded from kmp.json. + * @param keyboard an NSDictionary containing all the key-value pairs of a keyboard object from the kmp.json keyboards array + * @return the corresponding KeyboardInfo value object + */ +- (KMKeyboardInfo *) createKeyboardInfoFromJsonKeyboard:(NSDictionary *) keyboard { KMKeyboardInfoBuilder *builder = [[KMKeyboardInfoBuilder alloc] init]; @@ -178,13 +183,14 @@ typedef enum { return packageInfo; } +// TODO: refactor, break up and eliminate duplicate code /** - * read .inf file and load it into KMPackageInfo object - * returns nil if the file does not exist or it cannot be parsed + * Creates a KMPackageInfo object from the specified kmp.inf file. + * This code is adapted from legacy method keyboardInfoFromInfFile that loaded data from inf file to NSDictionary. * - * adapted from legacy method keyboardInfoFromInfFile that loaded data from inf file to NSDictionary - */ - + * @param path the full path to the kmp.inf file + * @return the corresponding PackageInfo value object or nil if the file cannot be found or parsed +*/ - (KMPackageInfo *) loadPackageInfoFromInfFile:(NSString *)path { if (self.debugMode) NSLog(@"Loading inf package info from path: %@", path); @@ -238,16 +244,8 @@ typedef enum { break; case ctStartMenu: break; - case ctStartMenuEntries: { - if ([[line lowercaseString] hasPrefix:[kWelcome lowercaseString]]) { - NSString *s = [line substringFromIndex:kWelcome.length+1]; - NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[vs objectAtIndex:0] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - NSString *v2 = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - } - + case ctStartMenuEntries: break; - } case ctInfo: { if ([[line lowercaseString] hasPrefix:[kName lowercaseString]]) { NSString *s = [line substringFromIndex:kName.length+1]; From b4e6ceea251dcf99ca41f024634523555b524d24 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Thu, 9 Dec 2021 06:16:25 +0100 Subject: [PATCH 17/38] chore: fixup additional version.rc --- windows/src/developer/kmndebug/version.rc | 10 ++++++---- .../test_i3619/i3619tip/i3619tip/i3619tip/version.rc | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/windows/src/developer/kmndebug/version.rc b/windows/src/developer/kmndebug/version.rc index fa1a494ece..2f50719b74 100644 --- a/windows/src/developer/kmndebug/version.rc +++ b/windows/src/developer/kmndebug/version.rc @@ -1,6 +1,8 @@ +#include "../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION 15,0,78,0 - PRODUCTVERSION 15,0,78,0 + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman KMN Debug Library\0" - VALUE "FileVersion", "15.0.78.0\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMNDEBUG\0" VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMNDEBUG.DLL\0" VALUE "ProductName", "Keyman Developer\0" - VALUE "ProductVersion", "15.0.78.0\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END diff --git a/windows/src/test/manual-tests/test_i3619/i3619tip/i3619tip/i3619tip/version.rc b/windows/src/test/manual-tests/test_i3619/i3619tip/i3619tip/i3619tip/version.rc index 88ea0ef7e2..fea4076091 100644 --- a/windows/src/test/manual-tests/test_i3619/i3619tip/i3619tip/i3619tip/version.rc +++ b/windows/src/test/manual-tests/test_i3619/i3619tip/i3619tip/i3619tip/version.rc @@ -1,6 +1,8 @@ +#include "../../../../../../global/inc/keymanversion.h" + 1 VERSIONINFO - FILEVERSION 9,0,421,0 - PRODUCTVERSION 9,0,421,0 + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x4L @@ -13,13 +15,13 @@ BEGIN VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman TSF Input Processor\0" - VALUE "FileVersion", "9.0.421.0\0" + VALUE "FileVersion", KV_VERSION_STRING VALUE "InternalName", "KMTIP\0" VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS VALUE "OriginalFilename", "KMTIP.DLL\0" VALUE "ProductName", "SIL International Keyman Engine Addins\0" - VALUE "ProductVersion", "9.0.421.0\0" + VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" END END From 80059d9f5a6c8e467ceeff0561602780072ab8f2 Mon Sep 17 00:00:00 2001 From: sgschantz Date: Thu, 9 Dec 2021 13:56:07 +0700 Subject: [PATCH 18/38] keyboard list only comes from meta data, fix reading of keyboards from .inf file --- .../KMInfoWindow/KMInfoWindowController.m | 10 +--------- mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.m | 16 +++++++++------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m index 37114f093b..15e6ea5bd7 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMInfoWindow/KMInfoWindowController.m @@ -132,15 +132,7 @@ [keyboardString appendString:[NSString stringWithFormat:pBodyFormat, keyboard.name]]; } } else { - // get keyboards from folder because not available in package info (.json or .inf) - NSArray *keyboards = [[self AppDelegate] keyboardNamesFromFolder:self.packagePath]; - if (keyboards != nil && keyboards.count) { - for (NSArray *keyboardName in keyboards) { - [keyboardString appendString:[NSString stringWithFormat:pBodyFormat, keyboardName]]; - } - } else { - keyboardString = [NSMutableString stringWithString:@"


"]; - } + keyboardString = [NSMutableString stringWithString:@"


"]; } NSArray *fonts = self.packageInfo.fonts; diff --git a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.m b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.m index 04f0ae12c7..103430c2f5 100644 --- a/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.m +++ b/mac/Keyman4MacIM/Keyman4MacIM/KMPackageReader.m @@ -196,7 +196,8 @@ typedef enum { NSLog(@"Loading inf package info from path: %@", path); NSMutableArray *files = [NSMutableArray arrayWithCapacity:0]; - NSMutableArray *keyboards = [NSMutableArray arrayWithCapacity:0]; + NSMutableArray *keyboardInfoArray = [NSMutableArray arrayWithCapacity:0]; + NSMutableArray *fontArray = [NSMutableArray arrayWithCapacity:0]; KMPackageInfoBuilder *builder = [[KMPackageInfoBuilder alloc] init]; @try { @@ -300,20 +301,19 @@ typedef enum { } else if ([[s lowercaseString] hasPrefix:[kFont lowercaseString]]) { NSArray *vs = [s componentsSeparatedByString:@"\","]; - NSString *v1 = [[[vs objectAtIndex:0] substringFromIndex:kFont.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + NSString *fontName = [[[vs objectAtIndex:0] substringFromIndex:kFont.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; NSString *fontFileName = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - [files addObject:fontFileName]; + [fontArray addObject:fontName]; } else if ([[s lowercaseString] hasPrefix:[kKeyboard lowercaseString]]) { NSArray *vs = [s componentsSeparatedByString:@"\","]; NSString *keyboardName = [[[vs objectAtIndex:0] substringFromIndex:kKeyboard.length+1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; NSString *keyboardFileName = [[vs objectAtIndex:1] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; - KMKeyboardInfoBuilder *builder = [[KMKeyboardInfoBuilder alloc] init]; builder.name = keyboardName; KMKeyboardInfo *keyboardInfo = [[KMKeyboardInfo alloc] initWithBuilder:builder]; - [keyboards addObject:keyboardInfo]; + [keyboardInfoArray addObject:keyboardInfo]; } break; @@ -328,8 +328,10 @@ typedef enum { return nil; } - KMPackageInfo *packageInfo = [[KMPackageInfo alloc] initWithBuilder:builder]; - return packageInfo; + builder.keyboards = keyboardInfoArray; + builder.fonts = fontArray; + KMPackageInfo *packageInfo = [[KMPackageInfo alloc] initWithBuilder:builder]; + return packageInfo; } @end From 988fec305c1d6a21f3fd3a0a93d44f0ff38e4d49 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Fri, 10 Dec 2021 00:10:54 +1100 Subject: [PATCH 19/38] chore(windows): enable build without Delphi installed This makes it possible to run `set NODELPHI=1`, `nmake build` and then only non-Delphi projects will be built. --- docs/build/windows.md | 7 +++++++ windows/src/Defines.mak | 11 ++++++++++- windows/src/Makefile | 12 +++++++++--- windows/src/buildtools/Makefile | 9 +++++++++ windows/src/desktop/Makefile | 5 +++++ windows/src/developer/Makefile | 6 +++++- windows/src/engine/Makefile | 4 ++++ windows/src/ext/Makefile | 4 ++++ windows/src/global/Makefile | 4 ++++ windows/src/support/Makefile | 4 ++++ windows/src/test/Makefile | 4 ++++ 11 files changed, 65 insertions(+), 5 deletions(-) diff --git a/docs/build/windows.md b/docs/build/windows.md index 84f6953a90..452803816c 100644 --- a/docs/build/windows.md +++ b/docs/build/windows.md @@ -147,10 +147,17 @@ choco install git jq python ninja pandoc refreshenv # choco meson (0.55) is too old, 0.56 required: python -m pip install meson + +*** ADD TO PATH +>>> e.g. C:\Users\mcdurdin\AppData\Roaming\Python\Python310\Scripts + # choco rustup is not currently working: Invoke-WebRequest -Uri https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe -OutFile $env:TEMP\rustup-init.exe & "$env:TEMP\rustup-init.exe" refreshenv + +*** restart powershell, because refreshenv doesn't cut it... + rustup target add i686-pc-windows-msvc ``` diff --git a/windows/src/Defines.mak b/windows/src/Defines.mak index 29cac86145..1fc45fd19a 100644 --- a/windows/src/Defines.mak +++ b/windows/src/Defines.mak @@ -15,8 +15,10 @@ EXT=$(ROOT)\src\ext INCLUDE=$(ROOT)\src\global\inc;$(INCLUDE) !ifndef EXCLUDEPATHDEFINES +!ifndef NODELPHI !include $(ROOT)\src\PathDefines.mak !endif +!endif PROGRAM=$(ROOT)\bin BUILD=$(ROOT)\build @@ -143,6 +145,13 @@ DCC64="$(DCC32PATH)\dcc64.exe" $(DELPHIDPRPARAMS64) -N0x64\ -Ex64\ DELPHI_MSBUILD=$(ROOT)\src\buildtools\msbuild-wrapper.bat "$(DCC32PATH)" $(DELPHI_MSBUILD_FLAG_DEBUG) +!IFDEF NODELPHI +DCC32=echo skipping +DCC32DPK=echo skipping +DCC64=echo skipping +DELPHI_MSBUILD=echo skipping +!ENDIF + # Visual C++ x86, x64 WIN32_TARGET_PATH=bin\Win32\$(TARGET_PATH) X64_TARGET_PATH=bin\x64\$(TARGET_PATH) @@ -254,7 +263,7 @@ PLATFORM=Win32 !ifdef GIT_BASH_FOR_KEYMAN MKVER_SH=$(GIT_BASH_FOR_KEYMAN) $(ROOT)\src\buildtools\mkver.sh !else -MKVER_SH=start /wait .\build.sh $(ROOT)\src\buildtools\mkver.sh +MKVER_SH=start /wait $(ROOT)\src\buildtools\mkver.sh !endif MKVER_M=$(MKVER_SH) manifest.in manifest.xml diff --git a/windows/src/Makefile b/windows/src/Makefile index c10dd7a6de..acdd510eee 100644 --- a/windows/src/Makefile +++ b/windows/src/Makefile @@ -283,15 +283,21 @@ global-versions: $(MKVER_U) $(ROOT)\src\global\delphi\general\keymanversion_build.in $(ROOT)\src\global\delphi\general\keymanversion_build.inc build-tools: global-versions - cd $(ROOT)\src\buildtools\devtools - $(MAKE) - +!ifdef NODELPHI + echo Skipping build-tools +!else + $(MAKE) devtools-app # We'll build a default PathDefines.mak if it is missing here so we can # go on and do the rest of the build $(PROGRAM)\buildtools\devtools -ti +!endif message-constants: build-tools +!ifdef NODELPHI + echo Skipping message-constants +!else $(PROGRAM)\buildtools\devtools -buildmessageconstants $(ROOT)\src\desktop\kmshell\xml\strings.xml $(ROOT)\src\global\delphi\cust\MessageIdentifierConsts.pas +!endif # # Remove all files from output folders to ensure no legacy files left in a release diff --git a/windows/src/buildtools/Makefile b/windows/src/buildtools/Makefile index 6283539901..3668bd372b 100644 --- a/windows/src/buildtools/Makefile +++ b/windows/src/buildtools/Makefile @@ -4,8 +4,13 @@ NOTARGET_SIGNCODE=yes +!ifdef NODELPHI +TARGETS=.virtual +!else TARGETS=devtools sentrytool tds2dbg \ buildunidata build_standards_data buildpkg test-klog delphiprojectmanager +!endif + CLEANS=clean-buildtools !include ..\Header.mak @@ -29,8 +34,12 @@ delphiprojectmanager: .virtual $(MAKE) $(TARGET) devtools: .virtual +!ifdef NODELPHI + echo Skipping devtools +!else cd $(ROOT)\src\buildtools\devtools $(MAKE) $(TARGET) +!endif buildpkg: .virtual cd $(ROOT)\src\buildtools\buildpkg diff --git a/windows/src/desktop/Makefile b/windows/src/desktop/Makefile index c7bce34bfd..e3953f3d99 100644 --- a/windows/src/desktop/Makefile +++ b/windows/src/desktop/Makefile @@ -2,7 +2,12 @@ # Keyman for Windows Makefile # +!ifdef NODELPHI +TARGETS=.virtual +!else TARGETS=kmshell kmconfig kmbrowserhost setup insthelp +!endif + RELEASE_TARGETS=help CLEANS=inst clean-desktop MANIFESTS=kmshell setup insthelp diff --git a/windows/src/developer/Makefile b/windows/src/developer/Makefile index 3c1b7d37ff..e51b4d9749 100644 --- a/windows/src/developer/Makefile +++ b/windows/src/developer/Makefile @@ -2,8 +2,12 @@ # Keyman dev Makefile # - +!ifdef NODELPHI +TARGETS=kmcmpdll kmanalyze kmdecomp +!else TARGETS=kmcmpdll kmcomp kmanalyze kmconvert tike samples setup inst kmdecomp +!endif + MANIFESTS=kmcomp tike setup CLEANS=clean-developer diff --git a/windows/src/engine/Makefile b/windows/src/engine/Makefile index 5c5f6059e8..2b5c923330 100644 --- a/windows/src/engine/Makefile +++ b/windows/src/engine/Makefile @@ -4,7 +4,11 @@ # ---------------------------------------------------------------------- +!ifdef NODELPHI +TARGETS=keymanmc keyman32 keyman64 keymanx64 mcompile kmtip kmrefresh +!else TARGETS=keymanmc keyman32 kmcomapi keyman tsysinfox64 tsysinfo keyman64 keymanx64 mcompile inst kmtip kmrefresh +!endif MANIFESTS=keyman tsysinfo tsysinfox64 keymanx64 mcompile CLEANS=clean-engine diff --git a/windows/src/ext/Makefile b/windows/src/ext/Makefile index 3d57c0a739..3c70e46e1d 100644 --- a/windows/src/ext/Makefile +++ b/windows/src/ext/Makefile @@ -4,7 +4,11 @@ NOTARGET_SIGNCODE=yes +!ifdef NODELPHI +TARGETS=.virtual +!else TARGETS=dcpcrypt jedi mbcolor regexpr scfontcombobox cef4delphi +!endif # jedi, regexpr have no packages diff --git a/windows/src/global/Makefile b/windows/src/global/Makefile index f783e31de1..6882f7dc34 100644 --- a/windows/src/global/Makefile +++ b/windows/src/global/Makefile @@ -2,6 +2,9 @@ !include ..\Defines.mak build: +!ifdef NODELPHI + echo Skipping global +!else cd $(ROOT)\src\global\delphi $(MAKE) $(TARGET) @@ -13,6 +16,7 @@ build: cd $(ROOT)\src\global\wix $(MAKE) $(TARGET) +!endif build-release: @rem diff --git a/windows/src/support/Makefile b/windows/src/support/Makefile index c018c10301..7f624d29f4 100644 --- a/windows/src/support/Makefile +++ b/windows/src/support/Makefile @@ -2,7 +2,11 @@ # Support Makefile # +!ifdef NODELPHI +TARGETS=etl2log +!else TARGETS=oskbulkrenderer etl2log +!endif CLEANS=clean-support !include ..\Header.mak diff --git a/windows/src/test/Makefile b/windows/src/test/Makefile index 40ada4de33..5df2892dfa 100644 --- a/windows/src/test/Makefile +++ b/windows/src/test/Makefile @@ -4,7 +4,11 @@ # ---------------------------------------------------------------------- +!ifdef NODELPHI +TARGETS=.virtual +!else TARGETS=test_i3633 +!endif CLEAN=test_i3633 test: test-manifest-exec From 365b867a86e0e8a65b769290b445ad6901b13fcc Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Thu, 9 Dec 2021 16:10:43 +0100 Subject: [PATCH 20/38] chore(windows): tweak PathDefines.mak building --- docs/build/windows.md | 11 ++++++----- windows/src/Makefile | 7 +++++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/docs/build/windows.md b/docs/build/windows.md index 452803816c..897a049cc0 100644 --- a/docs/build/windows.md +++ b/docs/build/windows.md @@ -148,24 +148,25 @@ refreshenv # choco meson (0.55) is too old, 0.56 required: python -m pip install meson -*** ADD TO PATH ->>> e.g. C:\Users\mcdurdin\AppData\Roaming\Python\Python310\Scripts - # choco rustup is not currently working: Invoke-WebRequest -Uri https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe -OutFile $env:TEMP\rustup-init.exe & "$env:TEMP\rustup-init.exe" refreshenv +``` -*** restart powershell, because refreshenv doesn't cut it... - +Restart PowerShell (because `refreshenv` doesn't seem to pick up the rust environment), then +```ps1 +# Elevated Powershell rustup target add i686-pc-windows-msvc ``` **Environment variables**: * [`KEYMAN_ROOT`](#keyman_root) +* `PATH`: add your Python scripts folder to your path: it will normally be `%appdata%\Python\Python310\Scripts`. ```bat SET KEYMAN_ROOT=c:\Projects\keyman\keyman +SET PATH=%path%;%appdata%\Python\Python310\Scripts ``` To check whether environment variables are set, run `SET ` in command diff --git a/windows/src/Makefile b/windows/src/Makefile index acdd510eee..482f913c51 100644 --- a/windows/src/Makefile +++ b/windows/src/Makefile @@ -286,14 +286,17 @@ build-tools: global-versions !ifdef NODELPHI echo Skipping build-tools !else - $(MAKE) devtools-app +# we need to build devtools directly because otherwise we have a +# chicken-and-egg issue with PathDefines.mak + cd $(ROOT)\src\buildtools\devtools + $(MAKE) # We'll build a default PathDefines.mak if it is missing here so we can # go on and do the rest of the build $(PROGRAM)\buildtools\devtools -ti !endif message-constants: build-tools -!ifdef NODELPHI +!ifdef NODELPHI echo Skipping message-constants !else $(PROGRAM)\buildtools\devtools -buildmessageconstants $(ROOT)\src\desktop\kmshell\xml\strings.xml $(ROOT)\src\global\delphi\cust\MessageIdentifierConsts.pas From 38a10286ebf6f02cbf92c4f7c4d38ead261443da Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Fri, 10 Dec 2021 05:31:18 +0100 Subject: [PATCH 21/38] chore(windows): tweak build and config docs --- docs/build/windows.md | 8 ++++++++ windows/src/README.md | 26 ++++++++++++++++++-------- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/docs/build/windows.md b/docs/build/windows.md index 897a049cc0..7976b7817f 100644 --- a/docs/build/windows.md +++ b/docs/build/windows.md @@ -231,6 +231,14 @@ Invoke-WebRequest -Uri https://github.com/rustwasm/wasm-pack/releases/download/v Start Delphi IDE once after installation as it will create various environment files and take you through required registration. + * Note: It is possible to build all components that do _not_ require Delphi by + adding the environment variable `NODELPHI=1` before starting the build. + Currently many components are Delphi-based, but if you are working just in + Keyman Core, the compiler, or Keyman Engine's C++ components, you may be + able to get away without building them. In this situation, we recommend + copying the relevant Delphi-built components into bin folders from a + compatible installed version of Keyman for testing and debugging purposes. + * Visual C++ 2019 Community or Professional ```ps1 diff --git a/windows/src/README.md b/windows/src/README.md index ac40ff42c8..b79aa4925d 100644 --- a/windows/src/README.md +++ b/windows/src/README.md @@ -7,27 +7,37 @@ ## Building Keyman for Windows and Keyman Developer 1. Start 'Developer Command Prompt for VS 2019'. -2. Run `make build` from the **windows/src** folder. +2. Run `nmake build` from the **windows/src** folder. 3. Artifacts from a successful build will be placed in **windows/bin** folder. -*Note*: running `make build` will currently reset the packages and path settings +*Note*: running `nmake build` will currently reset the packages and path settings in your Delphi environment. If you use Delphi for other projects, you should consider building Keyman under a login user dedicated to it, or in a VM. -Type `make` to see build targets. Common build targets are: +Type `nmake` to see build targets. Common build targets are: -* `make build` +* `nmake build` : builds Keyman for Windows and Keyman Developer -* `make clean` +* `nmake clean` : remove temporary files and build artifacts -* `make release` +* `nmake release` : makes a release of all Keyman Windows projects -* `make install` +* `nmake install` : install some or all components to Program Files (requires elevated command prompt). +### Building without Delphi + +It is possible to build all components that do _not_ require Delphi by adding +the environment variable `NODELPHI=1` before starting the build. Currently many +components are Delphi-based, but if you are working just in Keyman Core, the +compiler, or Keyman Engine's C++ components, you may be able to get away without +building them. In this situation, we recommend copying the relevant Delphi-built +components into bin folders from a compatible installed version of Keyman for +testing and debugging purposes. + ### Release builds A release build is not usually needed for local development. To run a release @@ -36,7 +46,7 @@ Certificates, below. Official release builds for Keyman are built in the Keyman project's CI environment. 1. Start 'Developer Command Prompt for VS 2019'. -2. Run `make release` from the **windows/src** folder. +2. Run `nmake release` from the **windows/src** folder. 3. Artifacts from a successful build will be placed in **windows/release** folder. 4. **buildtools/help-keyman-com.sh** will push updated documentation to From 540585cf36ed33403163aece5d377765dcd5389d Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Fri, 10 Dec 2021 11:07:51 +0100 Subject: [PATCH 22/38] feat(developer): tidy up package list in web test view Merges into #6033. Tidies up the package download page in the web test view, making it clearer and less verbose, while offering more detail. --- .../src/developer/TIKE/xml/kmw/packages.html | 9 ++++-- .../src/developer/TIKE/xml/kmw/packages.js | 29 ++++++++++++++----- windows/src/developer/TIKE/xml/kmw/test.css | 18 ++++++++++++ 3 files changed, 46 insertions(+), 10 deletions(-) diff --git a/windows/src/developer/TIKE/xml/kmw/packages.html b/windows/src/developer/TIKE/xml/kmw/packages.html index 73562f981d..cc17dbff13 100644 --- a/windows/src/developer/TIKE/xml/kmw/packages.html +++ b/windows/src/developer/TIKE/xml/kmw/packages.html @@ -35,8 +35,13 @@

Clicking the package links below will download and install the package into the Keyman app on this device.

-
    -
+ + + + + + +
NameID

You can add more packages to this list by opening the package source in the Package Editor and clicking [Test Online].

diff --git a/windows/src/developer/TIKE/xml/kmw/packages.js b/windows/src/developer/TIKE/xml/kmw/packages.js index c83baacfdb..d1d06099bb 100644 --- a/windows/src/developer/TIKE/xml/kmw/packages.js +++ b/windows/src/developer/TIKE/xml/kmw/packages.js @@ -31,22 +31,35 @@ function updatePackages(data) { return false; } - var ul = document.getElementById('packages'); - ul.innerHTML = ''; + var tbody = document.getElementById('packages'); + tbody.innerHTML = ''; if(data.packages.length == 0) { - var li = document.createElement('li'); - li.innerText = 'No packages available.'; - ul.appendChild(li); + var tr = document.createElement('tr'); + var td = document.createElement('td'); + td.colSpan = 2; + td.innerText = 'No packages available.'; + tr.appendChild(td); + tbody.appendChild(tr); return true; } for(var i = 0; i < data.packages.length; i++) { - var li = document.createElement('li'); + var tr = document.createElement('tr'); + var tdname = document.createElement('td'); + var tdid = document.createElement('td'); var a = document.createElement('a'); a.href = '/package/'+data.packages[i].id; + a.title = data.packages[i].filename; a.innerText = data.packages[i].name; - li.appendChild(a); - ul.appendChild(li); + tdname.appendChild(a); + var a = document.createElement('a'); + a.href = '/package/'+data.packages[i].id; + a.title = data.packages[i].filename; + a.innerText = data.packages[i].id; + tdid.appendChild(a); + tr.appendChild(tdname); + tr.appendChild(tdid); + tbody.appendChild(tr); } } } diff --git a/windows/src/developer/TIKE/xml/kmw/test.css b/windows/src/developer/TIKE/xml/kmw/test.css index 8e28739948..9b04434816 100644 --- a/windows/src/developer/TIKE/xml/kmw/test.css +++ b/windows/src/developer/TIKE/xml/kmw/test.css @@ -228,4 +228,22 @@ h2 { #input-area, #character-grid { width: 100%; +} + +/* Package install */ + +#package-install { + text-align: left; + width: 100%; + border-collapse: collapse; +} + +#package-install td, +#package-install th { + border: solid 1px #c0c0c0; + padding: 8px; +} + +#package-install th { + background: #cccccc; } \ No newline at end of file From 0ece9b09f8019162615266cd04b30599d8c1631c Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Fri, 10 Dec 2021 11:12:24 +0100 Subject: [PATCH 23/38] feat: use package name instead of id --- .../project/Keyman.Developer.UI.Project.kpsProjectFileUI.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows/src/developer/TIKE/project/Keyman.Developer.UI.Project.kpsProjectFileUI.pas b/windows/src/developer/TIKE/project/Keyman.Developer.UI.Project.kpsProjectFileUI.pas index 161bf4921d..26959fbdfe 100644 --- a/windows/src/developer/TIKE/project/Keyman.Developer.UI.Project.kpsProjectFileUI.pas +++ b/windows/src/developer/TIKE/project/Keyman.Developer.UI.Project.kpsProjectFileUI.pas @@ -137,7 +137,7 @@ begin if not FileExists(FCompiledName) then Exit(False); - modWebHttpServer.Debugger.RegisterPackage(FCompiledName, FCompiledName); // TODO: Show package 'name' in future + modWebHttpServer.Debugger.RegisterPackage(FCompiledName, ProjectFile.Header_Name); // TODO: Show package 'name' in future packageEditor.NotifyStartedWebDebug; // I4021 From 1f678de3c44f872c46b229da2b1d87743a3112b1 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Sat, 11 Dec 2021 04:39:36 +0100 Subject: [PATCH 24/38] chore: address review comment --- docs/build/windows.md | 2 +- windows/src/README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/build/windows.md b/docs/build/windows.md index 7976b7817f..df9245c2d0 100644 --- a/docs/build/windows.md +++ b/docs/build/windows.md @@ -236,7 +236,7 @@ Invoke-WebRequest -Uri https://github.com/rustwasm/wasm-pack/releases/download/v Currently many components are Delphi-based, but if you are working just in Keyman Core, the compiler, or Keyman Engine's C++ components, you may be able to get away without building them. In this situation, we recommend - copying the relevant Delphi-built components into bin folders from a + copying the relevant Delphi-built components into windows/bin folders from a compatible installed version of Keyman for testing and debugging purposes. * Visual C++ 2019 Community or Professional diff --git a/windows/src/README.md b/windows/src/README.md index b79aa4925d..24cbdb877f 100644 --- a/windows/src/README.md +++ b/windows/src/README.md @@ -35,8 +35,8 @@ the environment variable `NODELPHI=1` before starting the build. Currently many components are Delphi-based, but if you are working just in Keyman Core, the compiler, or Keyman Engine's C++ components, you may be able to get away without building them. In this situation, we recommend copying the relevant Delphi-built -components into bin folders from a compatible installed version of Keyman for -testing and debugging purposes. +components into windows/bin folders from a compatible installed version of +Keyman for testing and debugging purposes. ### Release builds From 058b73096c590fb649ca10628b1a59bc4f2d808d Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Fri, 10 Dec 2021 16:38:00 +0100 Subject: [PATCH 25/38] feat(linux): Add support for Ubuntu 22.04 Jammy Partially implements #5032. --- linux/.pbuilderrc | 2 +- linux/Jenkinsfile | 2 +- linux/scripts/cow.sh | 2 +- linux/scripts/launchpad.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/linux/.pbuilderrc b/linux/.pbuilderrc index 7eb25cb256..0257f09b30 100644 --- a/linux/.pbuilderrc +++ b/linux/.pbuilderrc @@ -14,7 +14,7 @@ DEBIAN_SUITES=($UNSTABLE_CODENAME $TESTING_CODENAME $STABLE_CODENAME $STABLE_BAC "experimental" "unstable" "testing" "stable") # List of Ubuntu suites. Update these when needed. -UBUNTU_SUITES=("impish" "hirsute" "groovy" "focal" "bionic") +UBUNTU_SUITES=("jammy" "impish" "hirsute" "focal" "bionic") # Mirrors to use. Update these to your preferred mirror. DEBIAN_MIRROR="deb.debian.org" diff --git a/linux/Jenkinsfile b/linux/Jenkinsfile index 46ab0f7508..fa111cfbe2 100644 --- a/linux/Jenkinsfile +++ b/linux/Jenkinsfile @@ -5,7 +5,7 @@ @Library('lsdev-pipeline-library') _ keymanPackaging { - distributionsToPackage = 'bionic focal hirsute' + distributionsToPackage = 'bionic focal hirsute jammy' arches = 'amd64 i386' packagesToBuild = ['keyman', 'kmflcomp', 'libkmfl', 'ibus-kmfl'] } diff --git a/linux/scripts/cow.sh b/linux/scripts/cow.sh index 957ed3dc98..ab5768a92f 100755 --- a/linux/scripts/cow.sh +++ b/linux/scripts/cow.sh @@ -3,7 +3,7 @@ # If needed set cowbuilder up for building Keyman Debian packages # Then cowbuilder update -distributions='bionic focal hirsute impish' +distributions='bionic focal hirsute impish jammy' dpkgcheck=`dpkg-query -l cowbuilder` if [ $? != 0 ]; then diff --git a/linux/scripts/launchpad.sh b/linux/scripts/launchpad.sh index 6e2ff177ac..041dc6a909 100755 --- a/linux/scripts/launchpad.sh +++ b/linux/scripts/launchpad.sh @@ -40,7 +40,7 @@ echo "ppa: ${ppa}" if [ "${DIST}" != "" ]; then distributions="${DIST}" else - distributions="bionic focal hirsute impish" + distributions="bionic focal hirsute impish jammy" fi if [ "${PACKAGEVERSION}" != "" ]; then From b8dd9d8cb2a87682119dffea53f391674cdce266 Mon Sep 17 00:00:00 2001 From: Keyman Build Agent Date: Sat, 11 Dec 2021 13:01:59 -0500 Subject: [PATCH 26/38] auto: increment master version to 15.0.167 --- HISTORY.md | 8 ++++++++ VERSION.md | 2 +- .../web/input-processor/package-lock.json | 2 +- common/core/web/input-processor/package.json | 16 +++++++-------- .../web/keyboard-processor/package-lock.json | 2 +- .../core/web/keyboard-processor/package.json | 10 +++++----- .../core/web/tools/recorder/package-lock.json | 2 +- common/core/web/tools/recorder/package.json | 10 +++++----- .../tools/sentry-manager/package-lock.json | 2 +- .../web/tools/sentry-manager/package.json | 4 ++-- common/core/web/utils/package-lock.json | 2 +- common/core/web/utils/package.json | 6 +++--- common/models/templates/package-lock.json | 2 +- common/models/templates/package.json | 8 ++++---- common/models/types/package-lock.json | 2 +- common/models/types/package.json | 2 +- common/models/wordbreakers/package-lock.json | 2 +- common/models/wordbreakers/package.json | 4 ++-- common/predictive-text/package-lock.json | 2 +- common/predictive-text/package.json | 14 ++++++------- developer/js/package-lock.json | 2 +- developer/js/package.json | 8 ++++---- lerna.json | 2 +- resources/gosh/package-lock.json | 2 +- resources/gosh/package.json | 2 +- resources/web-environment/package-lock.json | 2 +- resources/web-environment/package.json | 4 ++-- web/package-lock.json | 2 +- web/package.json | 20 +++++++++---------- 29 files changed, 77 insertions(+), 69 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index fa43b82dec..4e69de9075 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,13 @@ # Keyman Version History +## 15.0.166 alpha 2021-12-11 + +* chore(windows): version.rc use macros instead of mkver (#6019) +* chore(windows): move from Borland make to nmake (#6020) +* chore(windows): use findstr instead of Borland grep (#6021) +* chore(windows): replace mkver with mkver.sh (#6022) +* chore(windows): build without delphi (#6030) + ## 15.0.165 alpha 2021-12-08 * fix(web): font size was not consistently set (#5906) diff --git a/VERSION.md b/VERSION.md index 6ac68bcba1..f4c2024f59 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -15.0.166 \ No newline at end of file +15.0.167 \ No newline at end of file diff --git a/common/core/web/input-processor/package-lock.json b/common/core/web/input-processor/package-lock.json index 39c9b081b7..c1f2430447 100644 --- a/common/core/web/input-processor/package-lock.json +++ b/common/core/web/input-processor/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/input-processor", - "version": "15.0.166", + "version": "15.0.167", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/core/web/input-processor/package.json b/common/core/web/input-processor/package.json index 3c4530c00b..e3de7b5c93 100644 --- a/common/core/web/input-processor/package.json +++ b/common/core/web/input-processor/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/input-processor", - "version": "15.0.166", + "version": "15.0.167", "description": "The core text and prediction processing engine for KeymanWeb", "repository": { "type": "git", @@ -18,8 +18,8 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/lexical-model-compiler": "^15.0.166", - "@keymanapp/resources-gosh": "^15.0.166", + "@keymanapp/lexical-model-compiler": "^15.0.167", + "@keymanapp/resources-gosh": "^15.0.167", "@types/node": "^11.9.4", "chai": "^4.3.4", "mocha": "^8.4.0", @@ -34,11 +34,11 @@ "mocha": "mocha" }, "dependencies": { - "@keymanapp/keyboard-processor": "^15.0.166", - "@keymanapp/lexical-model-layer": "^15.0.166", - "@keymanapp/models-types": "^15.0.166", - "@keymanapp/web-environment": "^15.0.166", - "@keymanapp/web-utils": "^15.0.166", + "@keymanapp/keyboard-processor": "^15.0.167", + "@keymanapp/lexical-model-layer": "^15.0.167", + "@keymanapp/models-types": "^15.0.167", + "@keymanapp/web-environment": "^15.0.167", + "@keymanapp/web-utils": "^15.0.167", "eventemitter3": "^4.0.0" } } diff --git a/common/core/web/keyboard-processor/package-lock.json b/common/core/web/keyboard-processor/package-lock.json index adfda67f2a..ab355b3a3f 100644 --- a/common/core/web/keyboard-processor/package-lock.json +++ b/common/core/web/keyboard-processor/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/keyboard-processor", - "version": "15.0.166", + "version": "15.0.167", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/core/web/keyboard-processor/package.json b/common/core/web/keyboard-processor/package.json index 9dd586874c..f57d1bc133 100644 --- a/common/core/web/keyboard-processor/package.json +++ b/common/core/web/keyboard-processor/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/keyboard-processor", - "version": "15.0.166", + "version": "15.0.167", "description": "Core module for Keyman keyboard support in KeymanWeb.", "repository": { "type": "git", @@ -18,7 +18,7 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/resources-gosh": "^15.0.166", + "@keymanapp/resources-gosh": "^15.0.167", "chai": "^4.3.4", "mocha": "^8.4.0", "mocha-teamcity-reporter": "^4.0.0", @@ -32,9 +32,9 @@ "mocha": "mocha" }, "dependencies": { - "@keymanapp/models-types": "^15.0.166", - "@keymanapp/web-environment": "^15.0.166", - "@keymanapp/web-utils": "^15.0.166", + "@keymanapp/models-types": "^15.0.167", + "@keymanapp/web-environment": "^15.0.167", + "@keymanapp/web-utils": "^15.0.167", "@types/node": "^11.9.4" } } diff --git a/common/core/web/tools/recorder/package-lock.json b/common/core/web/tools/recorder/package-lock.json index b9e505ae3b..9f4c158ece 100644 --- a/common/core/web/tools/recorder/package-lock.json +++ b/common/core/web/tools/recorder/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/recorder-core", - "version": "15.0.166", + "version": "15.0.167", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/core/web/tools/recorder/package.json b/common/core/web/tools/recorder/package.json index e9c4eb70af..da942cea9a 100644 --- a/common/core/web/tools/recorder/package.json +++ b/common/core/web/tools/recorder/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/recorder-core", - "version": "15.0.166", + "version": "15.0.167", "description": "Core classes used to develop KeymanWeb test cases based on keystrokes", "main": "index.js", "scripts": { @@ -17,10 +17,10 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "dependencies": { - "@keymanapp/keyboard-processor": "^15.0.166", - "@keymanapp/models-types": "^15.0.166", - "@keymanapp/web-environment": "^15.0.166", - "@keymanapp/web-utils": "^15.0.166", + "@keymanapp/keyboard-processor": "^15.0.167", + "@keymanapp/models-types": "^15.0.167", + "@keymanapp/web-environment": "^15.0.167", + "@keymanapp/web-utils": "^15.0.167", "@types/node": "^11.9.4" }, "devDependencies": { diff --git a/common/core/web/tools/sentry-manager/package-lock.json b/common/core/web/tools/sentry-manager/package-lock.json index 00f796a5ac..6cfc1e765c 100644 --- a/common/core/web/tools/sentry-manager/package-lock.json +++ b/common/core/web/tools/sentry-manager/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-sentry-manager", - "version": "15.0.166", + "version": "15.0.167", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/common/core/web/tools/sentry-manager/package.json b/common/core/web/tools/sentry-manager/package.json index c3da4565ec..144d8768db 100644 --- a/common/core/web/tools/sentry-manager/package.json +++ b/common/core/web/tools/sentry-manager/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-sentry-manager", - "version": "15.0.166", + "version": "15.0.167", "description": "Common setup for KeymanWeb's Sentry-based error reporting", "main": "dist/index.js", "scripts": { @@ -20,7 +20,7 @@ "typescript": "^3.8.3" }, "dependencies": { - "@keymanapp/web-environment": "^15.0.166", + "@keymanapp/web-environment": "^15.0.167", "@sentry/browser": "^5.27.4" } } diff --git a/common/core/web/utils/package-lock.json b/common/core/web/utils/package-lock.json index ae043e4f27..832ab10887 100644 --- a/common/core/web/utils/package-lock.json +++ b/common/core/web/utils/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-utils", - "version": "15.0.166", + "version": "15.0.167", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/common/core/web/utils/package.json b/common/core/web/utils/package.json index d7ce9ba727..1e5526c9d6 100644 --- a/common/core/web/utils/package.json +++ b/common/core/web/utils/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-utils", - "version": "15.0.166", + "version": "15.0.167", "description": "Common utility functions used throughout other Keyman packages", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -20,8 +20,8 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/resources-gosh": "^15.0.166", - "@keymanapp/web-environment": "^15.0.166", + "@keymanapp/resources-gosh": "^15.0.167", + "@keymanapp/web-environment": "^15.0.167", "@types/node": "^14.0.5", "typescript": "^3.8.3" } diff --git a/common/models/templates/package-lock.json b/common/models/templates/package-lock.json index 3ce9e075f8..c8e0543375 100644 --- a/common/models/templates/package-lock.json +++ b/common/models/templates/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-templates", - "version": "15.0.166", + "version": "15.0.167", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/models/templates/package.json b/common/models/templates/package.json index 39b9203a83..6119af0b76 100644 --- a/common/models/templates/package.json +++ b/common/models/templates/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-templates", - "version": "15.0.166", + "version": "15.0.167", "description": "Backing model implementations (templates) for Keyman's modelling layer", "keywords": [ "lm", @@ -42,8 +42,8 @@ "url": "https://github.com/keymanapp/keyman/issues" }, "devDependencies": { - "@keymanapp/models-types": "^15.0.166", - "@keymanapp/web-utils": "^15.0.166", + "@keymanapp/models-types": "^15.0.167", + "@keymanapp/web-utils": "^15.0.167", "@types/chai": "^4.2.11", "@types/mocha": "^7.0.2", "@types/node": "^14.0.4", @@ -52,6 +52,6 @@ "typescript": "^3.8.3" }, "dependencies": { - "@keymanapp/models-wordbreakers": "^15.0.166" + "@keymanapp/models-wordbreakers": "^15.0.167" } } diff --git a/common/models/types/package-lock.json b/common/models/types/package-lock.json index 9fc4e62fd8..a27571eddb 100644 --- a/common/models/types/package-lock.json +++ b/common/models/types/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-types", - "version": "15.0.166", + "version": "15.0.167", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/common/models/types/package.json b/common/models/types/package.json index fdb3767358..96f5b2f6a4 100644 --- a/common/models/types/package.json +++ b/common/models/types/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-types", - "version": "15.0.166", + "version": "15.0.167", "description": "Type definitions in used in the modeling (lexical model/predictive text) component of Keyman.", "types": "./index.d.ts", "scripts": { diff --git a/common/models/wordbreakers/package-lock.json b/common/models/wordbreakers/package-lock.json index 3faeb889b9..a8b5e4ea5e 100644 --- a/common/models/wordbreakers/package-lock.json +++ b/common/models/wordbreakers/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-wordbreakers", - "version": "15.0.166", + "version": "15.0.167", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/models/wordbreakers/package.json b/common/models/wordbreakers/package.json index 6f2ab90962..658a433a2d 100644 --- a/common/models/wordbreakers/package.json +++ b/common/models/wordbreakers/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-wordbreakers", - "version": "15.0.166", + "version": "15.0.167", "description": "Word breakers bundled in the modeling layer", "keywords": [ "lexical model", @@ -40,7 +40,7 @@ "url": "https://github.com/keymanapp/keyman/issues" }, "devDependencies": { - "@keymanapp/models-types": "^15.0.166", + "@keymanapp/models-types": "^15.0.167", "@types/chai": "^4.2.11", "@types/mocha": "^7.0.2", "chai": "^4.3.4", diff --git a/common/predictive-text/package-lock.json b/common/predictive-text/package-lock.json index 391f09b0a5..358a2db1a7 100644 --- a/common/predictive-text/package-lock.json +++ b/common/predictive-text/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-layer", - "version": "15.0.166", + "version": "15.0.167", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/predictive-text/package.json b/common/predictive-text/package.json index cf1f670dc3..6dbc8c17e9 100644 --- a/common/predictive-text/package.json +++ b/common/predictive-text/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-layer", - "version": "15.0.166", + "version": "15.0.167", "description": "Keyman/Predictive Text integration layer", "main": "build/index.js", "scripts": { @@ -21,8 +21,8 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/models-types": "^15.0.166", - "@keymanapp/resources-gosh": "^15.0.166", + "@keymanapp/models-types": "^15.0.167", + "@keymanapp/resources-gosh": "^15.0.167", "@types/node": "^10.17.21", "chai": "^4.3.4", "karma": "^6.3.4", @@ -46,10 +46,10 @@ "typescript": "^3.8.3" }, "dependencies": { - "@keymanapp/models-templates": "^15.0.166", - "@keymanapp/models-wordbreakers": "^15.0.166", - "@keymanapp/web-environment": "^15.0.166", - "@keymanapp/web-utils": "^15.0.166", + "@keymanapp/models-templates": "^15.0.167", + "@keymanapp/models-wordbreakers": "^15.0.167", + "@keymanapp/web-environment": "^15.0.167", + "@keymanapp/web-utils": "^15.0.167", "es6-shim": "^0.35.5", "string.prototype.codepointat": "^0.2.1", "string.prototype.startswith": "^0.2.0" diff --git a/developer/js/package-lock.json b/developer/js/package-lock.json index c3373e0404..e60f3b5dac 100644 --- a/developer/js/package-lock.json +++ b/developer/js/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-compiler", - "version": "15.0.166", + "version": "15.0.167", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/developer/js/package.json b/developer/js/package.json index 77753f145a..b0252844b3 100644 --- a/developer/js/package.json +++ b/developer/js/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-compiler", - "version": "15.0.166", + "version": "15.0.167", "description": "Keyman Developer lexical model compiler", "keywords": [ "keyboard", @@ -37,14 +37,14 @@ "node": ">=12.0.0" }, "dependencies": { - "@keymanapp/models-types": "^15.0.166", + "@keymanapp/models-types": "^15.0.167", "commander": "^3.0.0", "typescript": "^3.8.3", "xml2js": "^0.4.19" }, "devDependencies": { - "@keymanapp/models-templates": "^15.0.166", - "@keymanapp/models-wordbreakers": "^15.0.166", + "@keymanapp/models-templates": "^15.0.167", + "@keymanapp/models-wordbreakers": "^15.0.167", "@types/chai": "^4.1.7", "@types/mocha": "^5.2.7", "@types/node": "^10.14.6", diff --git a/lerna.json b/lerna.json index c70cdaaa45..31f189e934 100644 --- a/lerna.json +++ b/lerna.json @@ -20,5 +20,5 @@ "ts-node", "typescript" ], - "version": "15.0.166" + "version": "15.0.167" } diff --git a/resources/gosh/package-lock.json b/resources/gosh/package-lock.json index 7d5aba26a4..13738af691 100644 --- a/resources/gosh/package-lock.json +++ b/resources/gosh/package-lock.json @@ -1,5 +1,5 @@ { "name": "@keymanapp/resources-gosh", - "version": "15.0.166", + "version": "15.0.167", "lockfileVersion": 1 } diff --git a/resources/gosh/package.json b/resources/gosh/package.json index 60ec62475b..02c64def91 100644 --- a/resources/gosh/package.json +++ b/resources/gosh/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/resources-gosh", - "version": "15.0.166", + "version": "15.0.167", "description": "Good Ol' Shell", "author": "Marc Durdin (https://github.com/mcdurdin)", "contributors": [ diff --git a/resources/web-environment/package-lock.json b/resources/web-environment/package-lock.json index 98939dc977..a738188843 100644 --- a/resources/web-environment/package-lock.json +++ b/resources/web-environment/package-lock.json @@ -1,5 +1,5 @@ { "name": "@keymanapp/web-environment", - "version": "15.0.166", + "version": "15.0.167", "lockfileVersion": 1 } diff --git a/resources/web-environment/package.json b/resources/web-environment/package.json index 6e683278a2..49cfcaa3ed 100644 --- a/resources/web-environment/package.json +++ b/resources/web-environment/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-environment", - "version": "15.0.166", + "version": "15.0.167", "description": "A compilation utility for passing select environment variables into our TS builds", "author": "Joshua Horton (https://github.com/jahorton)", "homepage": "https://github.com/keymanapp/keyman", @@ -17,6 +17,6 @@ "url": "https://github.com/keymanapp/keyman/issues" }, "devDependencies": { - "@keymanapp/resources-gosh": "^15.0.166" + "@keymanapp/resources-gosh": "^15.0.167" } } diff --git a/web/package-lock.json b/web/package-lock.json index 59958205c5..d0dcfdf34e 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -1,6 +1,6 @@ { "name": "keyman", - "version": "15.0.166", + "version": "15.0.167", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/web/package.json b/web/package.json index ad2bed2d02..20d1516f7a 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "keyman", - "version": "15.0.166", + "version": "15.0.167", "description": "Facilitates text input in any language.", "repository": { "type": "git", @@ -18,8 +18,8 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/resources-gosh": "^15.0.166", - "@keymanapp/web-sentry-manager": "^15.0.166", + "@keymanapp/resources-gosh": "^15.0.167", + "@keymanapp/web-sentry-manager": "^15.0.167", "@sentry/cli": "^1.52.3", "chai": "^4.3.4", "google-closure-compiler-java": "^20200224.0.0", @@ -52,13 +52,13 @@ "sentry-cli": "sentry-cli" }, "dependencies": { - "@keymanapp/input-processor": "^15.0.166", - "@keymanapp/keyboard-processor": "^15.0.166", - "@keymanapp/lexical-model-layer": "^15.0.166", - "@keymanapp/models-types": "^15.0.166", - "@keymanapp/recorder-core": "^15.0.166", - "@keymanapp/web-environment": "^15.0.166", - "@keymanapp/web-utils": "^15.0.166", + "@keymanapp/input-processor": "^15.0.167", + "@keymanapp/keyboard-processor": "^15.0.167", + "@keymanapp/lexical-model-layer": "^15.0.167", + "@keymanapp/models-types": "^15.0.167", + "@keymanapp/recorder-core": "^15.0.167", + "@keymanapp/web-environment": "^15.0.167", + "@keymanapp/web-utils": "^15.0.167", "@types/node": "^11.9.4", "es6-shim": "^0.35.5", "eventemitter3": "^4.0.0" From 6ad28fb359cc28eb2b566d9960a7619717b4672f Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 13 Dec 2021 14:49:38 +1000 Subject: [PATCH 27/38] fix(windows): remove unused varialbe Build was failing due to unused variable error. --- windows/src/global/delphi/comp/OnScreenKeyboard.pas | 1 - 1 file changed, 1 deletion(-) diff --git a/windows/src/global/delphi/comp/OnScreenKeyboard.pas b/windows/src/global/delphi/comp/OnScreenKeyboard.pas index 329ea0d6af..754ff2983a 100644 --- a/windows/src/global/delphi/comp/OnScreenKeyboard.pas +++ b/windows/src/global/delphi/comp/OnScreenKeyboard.pas @@ -391,7 +391,6 @@ var minsz: Integer; i: Integer; n: Integer; - Canvas: TCanvas; b: TBitmap; begin b := TBitmap.Create; From 23db5a0f8d8cde50f5b8efc6bb5f1a56600e74ab Mon Sep 17 00:00:00 2001 From: Keyman Build Agent Date: Mon, 13 Dec 2021 13:01:06 -0500 Subject: [PATCH 28/38] auto: increment master version to 15.0.168 --- HISTORY.md | 4 ++++ VERSION.md | 2 +- .../web/input-processor/package-lock.json | 2 +- common/core/web/input-processor/package.json | 16 +++++++-------- .../web/keyboard-processor/package-lock.json | 2 +- .../core/web/keyboard-processor/package.json | 10 +++++----- .../core/web/tools/recorder/package-lock.json | 2 +- common/core/web/tools/recorder/package.json | 10 +++++----- .../tools/sentry-manager/package-lock.json | 2 +- .../web/tools/sentry-manager/package.json | 4 ++-- common/core/web/utils/package-lock.json | 2 +- common/core/web/utils/package.json | 6 +++--- common/models/templates/package-lock.json | 2 +- common/models/templates/package.json | 8 ++++---- common/models/types/package-lock.json | 2 +- common/models/types/package.json | 2 +- common/models/wordbreakers/package-lock.json | 2 +- common/models/wordbreakers/package.json | 4 ++-- common/predictive-text/package-lock.json | 2 +- common/predictive-text/package.json | 14 ++++++------- developer/js/package-lock.json | 2 +- developer/js/package.json | 8 ++++---- lerna.json | 2 +- resources/gosh/package-lock.json | 2 +- resources/gosh/package.json | 2 +- resources/web-environment/package-lock.json | 2 +- resources/web-environment/package.json | 4 ++-- web/package-lock.json | 2 +- web/package.json | 20 +++++++++---------- 29 files changed, 73 insertions(+), 69 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 4e69de9075..d3d3252d1b 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,9 @@ # Keyman Version History +## 15.0.167 alpha 2021-12-13 + +* fix(windows): remove unused variable (#6039) + ## 15.0.166 alpha 2021-12-11 * chore(windows): version.rc use macros instead of mkver (#6019) diff --git a/VERSION.md b/VERSION.md index f4c2024f59..d4a3bea125 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -15.0.167 \ No newline at end of file +15.0.168 \ No newline at end of file diff --git a/common/core/web/input-processor/package-lock.json b/common/core/web/input-processor/package-lock.json index c1f2430447..6115de31af 100644 --- a/common/core/web/input-processor/package-lock.json +++ b/common/core/web/input-processor/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/input-processor", - "version": "15.0.167", + "version": "15.0.168", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/core/web/input-processor/package.json b/common/core/web/input-processor/package.json index e3de7b5c93..43be287481 100644 --- a/common/core/web/input-processor/package.json +++ b/common/core/web/input-processor/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/input-processor", - "version": "15.0.167", + "version": "15.0.168", "description": "The core text and prediction processing engine for KeymanWeb", "repository": { "type": "git", @@ -18,8 +18,8 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/lexical-model-compiler": "^15.0.167", - "@keymanapp/resources-gosh": "^15.0.167", + "@keymanapp/lexical-model-compiler": "^15.0.168", + "@keymanapp/resources-gosh": "^15.0.168", "@types/node": "^11.9.4", "chai": "^4.3.4", "mocha": "^8.4.0", @@ -34,11 +34,11 @@ "mocha": "mocha" }, "dependencies": { - "@keymanapp/keyboard-processor": "^15.0.167", - "@keymanapp/lexical-model-layer": "^15.0.167", - "@keymanapp/models-types": "^15.0.167", - "@keymanapp/web-environment": "^15.0.167", - "@keymanapp/web-utils": "^15.0.167", + "@keymanapp/keyboard-processor": "^15.0.168", + "@keymanapp/lexical-model-layer": "^15.0.168", + "@keymanapp/models-types": "^15.0.168", + "@keymanapp/web-environment": "^15.0.168", + "@keymanapp/web-utils": "^15.0.168", "eventemitter3": "^4.0.0" } } diff --git a/common/core/web/keyboard-processor/package-lock.json b/common/core/web/keyboard-processor/package-lock.json index ab355b3a3f..f357de5e01 100644 --- a/common/core/web/keyboard-processor/package-lock.json +++ b/common/core/web/keyboard-processor/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/keyboard-processor", - "version": "15.0.167", + "version": "15.0.168", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/core/web/keyboard-processor/package.json b/common/core/web/keyboard-processor/package.json index f57d1bc133..df969d481d 100644 --- a/common/core/web/keyboard-processor/package.json +++ b/common/core/web/keyboard-processor/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/keyboard-processor", - "version": "15.0.167", + "version": "15.0.168", "description": "Core module for Keyman keyboard support in KeymanWeb.", "repository": { "type": "git", @@ -18,7 +18,7 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/resources-gosh": "^15.0.167", + "@keymanapp/resources-gosh": "^15.0.168", "chai": "^4.3.4", "mocha": "^8.4.0", "mocha-teamcity-reporter": "^4.0.0", @@ -32,9 +32,9 @@ "mocha": "mocha" }, "dependencies": { - "@keymanapp/models-types": "^15.0.167", - "@keymanapp/web-environment": "^15.0.167", - "@keymanapp/web-utils": "^15.0.167", + "@keymanapp/models-types": "^15.0.168", + "@keymanapp/web-environment": "^15.0.168", + "@keymanapp/web-utils": "^15.0.168", "@types/node": "^11.9.4" } } diff --git a/common/core/web/tools/recorder/package-lock.json b/common/core/web/tools/recorder/package-lock.json index 9f4c158ece..680aff18cf 100644 --- a/common/core/web/tools/recorder/package-lock.json +++ b/common/core/web/tools/recorder/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/recorder-core", - "version": "15.0.167", + "version": "15.0.168", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/core/web/tools/recorder/package.json b/common/core/web/tools/recorder/package.json index da942cea9a..5570a6fe97 100644 --- a/common/core/web/tools/recorder/package.json +++ b/common/core/web/tools/recorder/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/recorder-core", - "version": "15.0.167", + "version": "15.0.168", "description": "Core classes used to develop KeymanWeb test cases based on keystrokes", "main": "index.js", "scripts": { @@ -17,10 +17,10 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "dependencies": { - "@keymanapp/keyboard-processor": "^15.0.167", - "@keymanapp/models-types": "^15.0.167", - "@keymanapp/web-environment": "^15.0.167", - "@keymanapp/web-utils": "^15.0.167", + "@keymanapp/keyboard-processor": "^15.0.168", + "@keymanapp/models-types": "^15.0.168", + "@keymanapp/web-environment": "^15.0.168", + "@keymanapp/web-utils": "^15.0.168", "@types/node": "^11.9.4" }, "devDependencies": { diff --git a/common/core/web/tools/sentry-manager/package-lock.json b/common/core/web/tools/sentry-manager/package-lock.json index 6cfc1e765c..a043980b0c 100644 --- a/common/core/web/tools/sentry-manager/package-lock.json +++ b/common/core/web/tools/sentry-manager/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-sentry-manager", - "version": "15.0.167", + "version": "15.0.168", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/common/core/web/tools/sentry-manager/package.json b/common/core/web/tools/sentry-manager/package.json index 144d8768db..1cfdf9e423 100644 --- a/common/core/web/tools/sentry-manager/package.json +++ b/common/core/web/tools/sentry-manager/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-sentry-manager", - "version": "15.0.167", + "version": "15.0.168", "description": "Common setup for KeymanWeb's Sentry-based error reporting", "main": "dist/index.js", "scripts": { @@ -20,7 +20,7 @@ "typescript": "^3.8.3" }, "dependencies": { - "@keymanapp/web-environment": "^15.0.167", + "@keymanapp/web-environment": "^15.0.168", "@sentry/browser": "^5.27.4" } } diff --git a/common/core/web/utils/package-lock.json b/common/core/web/utils/package-lock.json index 832ab10887..bfe6478990 100644 --- a/common/core/web/utils/package-lock.json +++ b/common/core/web/utils/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-utils", - "version": "15.0.167", + "version": "15.0.168", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/common/core/web/utils/package.json b/common/core/web/utils/package.json index 1e5526c9d6..7834a64f69 100644 --- a/common/core/web/utils/package.json +++ b/common/core/web/utils/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-utils", - "version": "15.0.167", + "version": "15.0.168", "description": "Common utility functions used throughout other Keyman packages", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -20,8 +20,8 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/resources-gosh": "^15.0.167", - "@keymanapp/web-environment": "^15.0.167", + "@keymanapp/resources-gosh": "^15.0.168", + "@keymanapp/web-environment": "^15.0.168", "@types/node": "^14.0.5", "typescript": "^3.8.3" } diff --git a/common/models/templates/package-lock.json b/common/models/templates/package-lock.json index c8e0543375..a981d99749 100644 --- a/common/models/templates/package-lock.json +++ b/common/models/templates/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-templates", - "version": "15.0.167", + "version": "15.0.168", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/models/templates/package.json b/common/models/templates/package.json index 6119af0b76..87502563b4 100644 --- a/common/models/templates/package.json +++ b/common/models/templates/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-templates", - "version": "15.0.167", + "version": "15.0.168", "description": "Backing model implementations (templates) for Keyman's modelling layer", "keywords": [ "lm", @@ -42,8 +42,8 @@ "url": "https://github.com/keymanapp/keyman/issues" }, "devDependencies": { - "@keymanapp/models-types": "^15.0.167", - "@keymanapp/web-utils": "^15.0.167", + "@keymanapp/models-types": "^15.0.168", + "@keymanapp/web-utils": "^15.0.168", "@types/chai": "^4.2.11", "@types/mocha": "^7.0.2", "@types/node": "^14.0.4", @@ -52,6 +52,6 @@ "typescript": "^3.8.3" }, "dependencies": { - "@keymanapp/models-wordbreakers": "^15.0.167" + "@keymanapp/models-wordbreakers": "^15.0.168" } } diff --git a/common/models/types/package-lock.json b/common/models/types/package-lock.json index a27571eddb..99984c0bbb 100644 --- a/common/models/types/package-lock.json +++ b/common/models/types/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-types", - "version": "15.0.167", + "version": "15.0.168", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/common/models/types/package.json b/common/models/types/package.json index 96f5b2f6a4..c6431f28d7 100644 --- a/common/models/types/package.json +++ b/common/models/types/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-types", - "version": "15.0.167", + "version": "15.0.168", "description": "Type definitions in used in the modeling (lexical model/predictive text) component of Keyman.", "types": "./index.d.ts", "scripts": { diff --git a/common/models/wordbreakers/package-lock.json b/common/models/wordbreakers/package-lock.json index a8b5e4ea5e..0e9a49a74f 100644 --- a/common/models/wordbreakers/package-lock.json +++ b/common/models/wordbreakers/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-wordbreakers", - "version": "15.0.167", + "version": "15.0.168", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/models/wordbreakers/package.json b/common/models/wordbreakers/package.json index 658a433a2d..c8970171d3 100644 --- a/common/models/wordbreakers/package.json +++ b/common/models/wordbreakers/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-wordbreakers", - "version": "15.0.167", + "version": "15.0.168", "description": "Word breakers bundled in the modeling layer", "keywords": [ "lexical model", @@ -40,7 +40,7 @@ "url": "https://github.com/keymanapp/keyman/issues" }, "devDependencies": { - "@keymanapp/models-types": "^15.0.167", + "@keymanapp/models-types": "^15.0.168", "@types/chai": "^4.2.11", "@types/mocha": "^7.0.2", "chai": "^4.3.4", diff --git a/common/predictive-text/package-lock.json b/common/predictive-text/package-lock.json index 358a2db1a7..82abc111ae 100644 --- a/common/predictive-text/package-lock.json +++ b/common/predictive-text/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-layer", - "version": "15.0.167", + "version": "15.0.168", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/predictive-text/package.json b/common/predictive-text/package.json index 6dbc8c17e9..1d72893a3a 100644 --- a/common/predictive-text/package.json +++ b/common/predictive-text/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-layer", - "version": "15.0.167", + "version": "15.0.168", "description": "Keyman/Predictive Text integration layer", "main": "build/index.js", "scripts": { @@ -21,8 +21,8 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/models-types": "^15.0.167", - "@keymanapp/resources-gosh": "^15.0.167", + "@keymanapp/models-types": "^15.0.168", + "@keymanapp/resources-gosh": "^15.0.168", "@types/node": "^10.17.21", "chai": "^4.3.4", "karma": "^6.3.4", @@ -46,10 +46,10 @@ "typescript": "^3.8.3" }, "dependencies": { - "@keymanapp/models-templates": "^15.0.167", - "@keymanapp/models-wordbreakers": "^15.0.167", - "@keymanapp/web-environment": "^15.0.167", - "@keymanapp/web-utils": "^15.0.167", + "@keymanapp/models-templates": "^15.0.168", + "@keymanapp/models-wordbreakers": "^15.0.168", + "@keymanapp/web-environment": "^15.0.168", + "@keymanapp/web-utils": "^15.0.168", "es6-shim": "^0.35.5", "string.prototype.codepointat": "^0.2.1", "string.prototype.startswith": "^0.2.0" diff --git a/developer/js/package-lock.json b/developer/js/package-lock.json index e60f3b5dac..64f15a9612 100644 --- a/developer/js/package-lock.json +++ b/developer/js/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-compiler", - "version": "15.0.167", + "version": "15.0.168", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/developer/js/package.json b/developer/js/package.json index b0252844b3..b520f65e6f 100644 --- a/developer/js/package.json +++ b/developer/js/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-compiler", - "version": "15.0.167", + "version": "15.0.168", "description": "Keyman Developer lexical model compiler", "keywords": [ "keyboard", @@ -37,14 +37,14 @@ "node": ">=12.0.0" }, "dependencies": { - "@keymanapp/models-types": "^15.0.167", + "@keymanapp/models-types": "^15.0.168", "commander": "^3.0.0", "typescript": "^3.8.3", "xml2js": "^0.4.19" }, "devDependencies": { - "@keymanapp/models-templates": "^15.0.167", - "@keymanapp/models-wordbreakers": "^15.0.167", + "@keymanapp/models-templates": "^15.0.168", + "@keymanapp/models-wordbreakers": "^15.0.168", "@types/chai": "^4.1.7", "@types/mocha": "^5.2.7", "@types/node": "^10.14.6", diff --git a/lerna.json b/lerna.json index 31f189e934..e0b758fd75 100644 --- a/lerna.json +++ b/lerna.json @@ -20,5 +20,5 @@ "ts-node", "typescript" ], - "version": "15.0.167" + "version": "15.0.168" } diff --git a/resources/gosh/package-lock.json b/resources/gosh/package-lock.json index 13738af691..7281681fa3 100644 --- a/resources/gosh/package-lock.json +++ b/resources/gosh/package-lock.json @@ -1,5 +1,5 @@ { "name": "@keymanapp/resources-gosh", - "version": "15.0.167", + "version": "15.0.168", "lockfileVersion": 1 } diff --git a/resources/gosh/package.json b/resources/gosh/package.json index 02c64def91..0e6ac3d5fc 100644 --- a/resources/gosh/package.json +++ b/resources/gosh/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/resources-gosh", - "version": "15.0.167", + "version": "15.0.168", "description": "Good Ol' Shell", "author": "Marc Durdin (https://github.com/mcdurdin)", "contributors": [ diff --git a/resources/web-environment/package-lock.json b/resources/web-environment/package-lock.json index a738188843..a40cf18517 100644 --- a/resources/web-environment/package-lock.json +++ b/resources/web-environment/package-lock.json @@ -1,5 +1,5 @@ { "name": "@keymanapp/web-environment", - "version": "15.0.167", + "version": "15.0.168", "lockfileVersion": 1 } diff --git a/resources/web-environment/package.json b/resources/web-environment/package.json index 49cfcaa3ed..f0a1898adc 100644 --- a/resources/web-environment/package.json +++ b/resources/web-environment/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-environment", - "version": "15.0.167", + "version": "15.0.168", "description": "A compilation utility for passing select environment variables into our TS builds", "author": "Joshua Horton (https://github.com/jahorton)", "homepage": "https://github.com/keymanapp/keyman", @@ -17,6 +17,6 @@ "url": "https://github.com/keymanapp/keyman/issues" }, "devDependencies": { - "@keymanapp/resources-gosh": "^15.0.167" + "@keymanapp/resources-gosh": "^15.0.168" } } diff --git a/web/package-lock.json b/web/package-lock.json index d0dcfdf34e..df1aa182ae 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -1,6 +1,6 @@ { "name": "keyman", - "version": "15.0.167", + "version": "15.0.168", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/web/package.json b/web/package.json index 20d1516f7a..af6c18a34e 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "keyman", - "version": "15.0.167", + "version": "15.0.168", "description": "Facilitates text input in any language.", "repository": { "type": "git", @@ -18,8 +18,8 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/resources-gosh": "^15.0.167", - "@keymanapp/web-sentry-manager": "^15.0.167", + "@keymanapp/resources-gosh": "^15.0.168", + "@keymanapp/web-sentry-manager": "^15.0.168", "@sentry/cli": "^1.52.3", "chai": "^4.3.4", "google-closure-compiler-java": "^20200224.0.0", @@ -52,13 +52,13 @@ "sentry-cli": "sentry-cli" }, "dependencies": { - "@keymanapp/input-processor": "^15.0.167", - "@keymanapp/keyboard-processor": "^15.0.167", - "@keymanapp/lexical-model-layer": "^15.0.167", - "@keymanapp/models-types": "^15.0.167", - "@keymanapp/recorder-core": "^15.0.167", - "@keymanapp/web-environment": "^15.0.167", - "@keymanapp/web-utils": "^15.0.167", + "@keymanapp/input-processor": "^15.0.168", + "@keymanapp/keyboard-processor": "^15.0.168", + "@keymanapp/lexical-model-layer": "^15.0.168", + "@keymanapp/models-types": "^15.0.168", + "@keymanapp/recorder-core": "^15.0.168", + "@keymanapp/web-environment": "^15.0.168", + "@keymanapp/web-utils": "^15.0.168", "@types/node": "^11.9.4", "es6-shim": "^0.35.5", "eventemitter3": "^4.0.0" From ae9cb97ce6c7cf2f9499871e5a732ebb5f1b1654 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Tue, 14 Dec 2021 14:10:58 +0100 Subject: [PATCH 29/38] fix(linux): Improve ibus-keyman tests This change will hopefully help some tests that occasionally fail on TC. After setting the options during the test setup we sync the settings before running the test scenario. --- linux/ibus-keyman/tests/testfixture.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/linux/ibus-keyman/tests/testfixture.cpp b/linux/ibus-keyman/tests/testfixture.cpp index f5c481c6cd..20162bbfdb 100644 --- a/linux/ibus-keyman/tests/testfixture.cpp +++ b/linux/ibus-keyman/tests/testfixture.cpp @@ -347,6 +347,7 @@ static void test_source(IBusKeymanTestsFixture *fixture, gconstpointer user_data keyman_put_options_todconf(data->test_name, data->test_name, key, value); } } + g_settings_sync(); switch_keyboard(fixture, kmxfile.c_str()); if (test_source.caps_lock_state() != get_caps_lock_state(fixture)) { From afac293045094485cc5a5bd551ab31180ebbd9cf Mon Sep 17 00:00:00 2001 From: Keyman Build Agent Date: Tue, 14 Dec 2021 13:01:07 -0500 Subject: [PATCH 30/38] auto: increment master version to 15.0.169 --- HISTORY.md | 4 ++++ VERSION.md | 2 +- .../web/input-processor/package-lock.json | 2 +- common/core/web/input-processor/package.json | 16 +++++++-------- .../web/keyboard-processor/package-lock.json | 2 +- .../core/web/keyboard-processor/package.json | 10 +++++----- .../core/web/tools/recorder/package-lock.json | 2 +- common/core/web/tools/recorder/package.json | 10 +++++----- .../tools/sentry-manager/package-lock.json | 2 +- .../web/tools/sentry-manager/package.json | 4 ++-- common/core/web/utils/package-lock.json | 2 +- common/core/web/utils/package.json | 6 +++--- common/models/templates/package-lock.json | 2 +- common/models/templates/package.json | 8 ++++---- common/models/types/package-lock.json | 2 +- common/models/types/package.json | 2 +- common/models/wordbreakers/package-lock.json | 2 +- common/models/wordbreakers/package.json | 4 ++-- common/predictive-text/package-lock.json | 2 +- common/predictive-text/package.json | 14 ++++++------- developer/js/package-lock.json | 2 +- developer/js/package.json | 8 ++++---- lerna.json | 2 +- resources/gosh/package-lock.json | 2 +- resources/gosh/package.json | 2 +- resources/web-environment/package-lock.json | 2 +- resources/web-environment/package.json | 4 ++-- web/package-lock.json | 2 +- web/package.json | 20 +++++++++---------- 29 files changed, 73 insertions(+), 69 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index d3d3252d1b..d113c93066 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,9 @@ # Keyman Version History +## 15.0.168 alpha 2021-12-14 + +* feat(linux): Add support for Ubuntu 22.04 Jammy (#6037) + ## 15.0.167 alpha 2021-12-13 * fix(windows): remove unused variable (#6039) diff --git a/VERSION.md b/VERSION.md index d4a3bea125..c862376c1d 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -15.0.168 \ No newline at end of file +15.0.169 \ No newline at end of file diff --git a/common/core/web/input-processor/package-lock.json b/common/core/web/input-processor/package-lock.json index 6115de31af..ca25342885 100644 --- a/common/core/web/input-processor/package-lock.json +++ b/common/core/web/input-processor/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/input-processor", - "version": "15.0.168", + "version": "15.0.169", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/core/web/input-processor/package.json b/common/core/web/input-processor/package.json index 43be287481..ccf0174f4f 100644 --- a/common/core/web/input-processor/package.json +++ b/common/core/web/input-processor/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/input-processor", - "version": "15.0.168", + "version": "15.0.169", "description": "The core text and prediction processing engine for KeymanWeb", "repository": { "type": "git", @@ -18,8 +18,8 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/lexical-model-compiler": "^15.0.168", - "@keymanapp/resources-gosh": "^15.0.168", + "@keymanapp/lexical-model-compiler": "^15.0.169", + "@keymanapp/resources-gosh": "^15.0.169", "@types/node": "^11.9.4", "chai": "^4.3.4", "mocha": "^8.4.0", @@ -34,11 +34,11 @@ "mocha": "mocha" }, "dependencies": { - "@keymanapp/keyboard-processor": "^15.0.168", - "@keymanapp/lexical-model-layer": "^15.0.168", - "@keymanapp/models-types": "^15.0.168", - "@keymanapp/web-environment": "^15.0.168", - "@keymanapp/web-utils": "^15.0.168", + "@keymanapp/keyboard-processor": "^15.0.169", + "@keymanapp/lexical-model-layer": "^15.0.169", + "@keymanapp/models-types": "^15.0.169", + "@keymanapp/web-environment": "^15.0.169", + "@keymanapp/web-utils": "^15.0.169", "eventemitter3": "^4.0.0" } } diff --git a/common/core/web/keyboard-processor/package-lock.json b/common/core/web/keyboard-processor/package-lock.json index f357de5e01..7b1fe349af 100644 --- a/common/core/web/keyboard-processor/package-lock.json +++ b/common/core/web/keyboard-processor/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/keyboard-processor", - "version": "15.0.168", + "version": "15.0.169", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/core/web/keyboard-processor/package.json b/common/core/web/keyboard-processor/package.json index df969d481d..f5617270b9 100644 --- a/common/core/web/keyboard-processor/package.json +++ b/common/core/web/keyboard-processor/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/keyboard-processor", - "version": "15.0.168", + "version": "15.0.169", "description": "Core module for Keyman keyboard support in KeymanWeb.", "repository": { "type": "git", @@ -18,7 +18,7 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/resources-gosh": "^15.0.168", + "@keymanapp/resources-gosh": "^15.0.169", "chai": "^4.3.4", "mocha": "^8.4.0", "mocha-teamcity-reporter": "^4.0.0", @@ -32,9 +32,9 @@ "mocha": "mocha" }, "dependencies": { - "@keymanapp/models-types": "^15.0.168", - "@keymanapp/web-environment": "^15.0.168", - "@keymanapp/web-utils": "^15.0.168", + "@keymanapp/models-types": "^15.0.169", + "@keymanapp/web-environment": "^15.0.169", + "@keymanapp/web-utils": "^15.0.169", "@types/node": "^11.9.4" } } diff --git a/common/core/web/tools/recorder/package-lock.json b/common/core/web/tools/recorder/package-lock.json index 680aff18cf..14773885b4 100644 --- a/common/core/web/tools/recorder/package-lock.json +++ b/common/core/web/tools/recorder/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/recorder-core", - "version": "15.0.168", + "version": "15.0.169", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/core/web/tools/recorder/package.json b/common/core/web/tools/recorder/package.json index 5570a6fe97..bd80936911 100644 --- a/common/core/web/tools/recorder/package.json +++ b/common/core/web/tools/recorder/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/recorder-core", - "version": "15.0.168", + "version": "15.0.169", "description": "Core classes used to develop KeymanWeb test cases based on keystrokes", "main": "index.js", "scripts": { @@ -17,10 +17,10 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "dependencies": { - "@keymanapp/keyboard-processor": "^15.0.168", - "@keymanapp/models-types": "^15.0.168", - "@keymanapp/web-environment": "^15.0.168", - "@keymanapp/web-utils": "^15.0.168", + "@keymanapp/keyboard-processor": "^15.0.169", + "@keymanapp/models-types": "^15.0.169", + "@keymanapp/web-environment": "^15.0.169", + "@keymanapp/web-utils": "^15.0.169", "@types/node": "^11.9.4" }, "devDependencies": { diff --git a/common/core/web/tools/sentry-manager/package-lock.json b/common/core/web/tools/sentry-manager/package-lock.json index a043980b0c..25cd153802 100644 --- a/common/core/web/tools/sentry-manager/package-lock.json +++ b/common/core/web/tools/sentry-manager/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-sentry-manager", - "version": "15.0.168", + "version": "15.0.169", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/common/core/web/tools/sentry-manager/package.json b/common/core/web/tools/sentry-manager/package.json index 1cfdf9e423..bc791e9e2a 100644 --- a/common/core/web/tools/sentry-manager/package.json +++ b/common/core/web/tools/sentry-manager/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-sentry-manager", - "version": "15.0.168", + "version": "15.0.169", "description": "Common setup for KeymanWeb's Sentry-based error reporting", "main": "dist/index.js", "scripts": { @@ -20,7 +20,7 @@ "typescript": "^3.8.3" }, "dependencies": { - "@keymanapp/web-environment": "^15.0.168", + "@keymanapp/web-environment": "^15.0.169", "@sentry/browser": "^5.27.4" } } diff --git a/common/core/web/utils/package-lock.json b/common/core/web/utils/package-lock.json index bfe6478990..9db0e86ae3 100644 --- a/common/core/web/utils/package-lock.json +++ b/common/core/web/utils/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-utils", - "version": "15.0.168", + "version": "15.0.169", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/common/core/web/utils/package.json b/common/core/web/utils/package.json index 7834a64f69..fc1f41f3e7 100644 --- a/common/core/web/utils/package.json +++ b/common/core/web/utils/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-utils", - "version": "15.0.168", + "version": "15.0.169", "description": "Common utility functions used throughout other Keyman packages", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -20,8 +20,8 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/resources-gosh": "^15.0.168", - "@keymanapp/web-environment": "^15.0.168", + "@keymanapp/resources-gosh": "^15.0.169", + "@keymanapp/web-environment": "^15.0.169", "@types/node": "^14.0.5", "typescript": "^3.8.3" } diff --git a/common/models/templates/package-lock.json b/common/models/templates/package-lock.json index a981d99749..bcc8dab4a2 100644 --- a/common/models/templates/package-lock.json +++ b/common/models/templates/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-templates", - "version": "15.0.168", + "version": "15.0.169", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/models/templates/package.json b/common/models/templates/package.json index 87502563b4..529a1c0cd3 100644 --- a/common/models/templates/package.json +++ b/common/models/templates/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-templates", - "version": "15.0.168", + "version": "15.0.169", "description": "Backing model implementations (templates) for Keyman's modelling layer", "keywords": [ "lm", @@ -42,8 +42,8 @@ "url": "https://github.com/keymanapp/keyman/issues" }, "devDependencies": { - "@keymanapp/models-types": "^15.0.168", - "@keymanapp/web-utils": "^15.0.168", + "@keymanapp/models-types": "^15.0.169", + "@keymanapp/web-utils": "^15.0.169", "@types/chai": "^4.2.11", "@types/mocha": "^7.0.2", "@types/node": "^14.0.4", @@ -52,6 +52,6 @@ "typescript": "^3.8.3" }, "dependencies": { - "@keymanapp/models-wordbreakers": "^15.0.168" + "@keymanapp/models-wordbreakers": "^15.0.169" } } diff --git a/common/models/types/package-lock.json b/common/models/types/package-lock.json index 99984c0bbb..a5a9985034 100644 --- a/common/models/types/package-lock.json +++ b/common/models/types/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-types", - "version": "15.0.168", + "version": "15.0.169", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/common/models/types/package.json b/common/models/types/package.json index c6431f28d7..7a072c44ad 100644 --- a/common/models/types/package.json +++ b/common/models/types/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-types", - "version": "15.0.168", + "version": "15.0.169", "description": "Type definitions in used in the modeling (lexical model/predictive text) component of Keyman.", "types": "./index.d.ts", "scripts": { diff --git a/common/models/wordbreakers/package-lock.json b/common/models/wordbreakers/package-lock.json index 0e9a49a74f..61ef3ce07f 100644 --- a/common/models/wordbreakers/package-lock.json +++ b/common/models/wordbreakers/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-wordbreakers", - "version": "15.0.168", + "version": "15.0.169", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/models/wordbreakers/package.json b/common/models/wordbreakers/package.json index c8970171d3..51dc3674d4 100644 --- a/common/models/wordbreakers/package.json +++ b/common/models/wordbreakers/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-wordbreakers", - "version": "15.0.168", + "version": "15.0.169", "description": "Word breakers bundled in the modeling layer", "keywords": [ "lexical model", @@ -40,7 +40,7 @@ "url": "https://github.com/keymanapp/keyman/issues" }, "devDependencies": { - "@keymanapp/models-types": "^15.0.168", + "@keymanapp/models-types": "^15.0.169", "@types/chai": "^4.2.11", "@types/mocha": "^7.0.2", "chai": "^4.3.4", diff --git a/common/predictive-text/package-lock.json b/common/predictive-text/package-lock.json index 82abc111ae..dbe2f22842 100644 --- a/common/predictive-text/package-lock.json +++ b/common/predictive-text/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-layer", - "version": "15.0.168", + "version": "15.0.169", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/predictive-text/package.json b/common/predictive-text/package.json index 1d72893a3a..ed1191e5d8 100644 --- a/common/predictive-text/package.json +++ b/common/predictive-text/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-layer", - "version": "15.0.168", + "version": "15.0.169", "description": "Keyman/Predictive Text integration layer", "main": "build/index.js", "scripts": { @@ -21,8 +21,8 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/models-types": "^15.0.168", - "@keymanapp/resources-gosh": "^15.0.168", + "@keymanapp/models-types": "^15.0.169", + "@keymanapp/resources-gosh": "^15.0.169", "@types/node": "^10.17.21", "chai": "^4.3.4", "karma": "^6.3.4", @@ -46,10 +46,10 @@ "typescript": "^3.8.3" }, "dependencies": { - "@keymanapp/models-templates": "^15.0.168", - "@keymanapp/models-wordbreakers": "^15.0.168", - "@keymanapp/web-environment": "^15.0.168", - "@keymanapp/web-utils": "^15.0.168", + "@keymanapp/models-templates": "^15.0.169", + "@keymanapp/models-wordbreakers": "^15.0.169", + "@keymanapp/web-environment": "^15.0.169", + "@keymanapp/web-utils": "^15.0.169", "es6-shim": "^0.35.5", "string.prototype.codepointat": "^0.2.1", "string.prototype.startswith": "^0.2.0" diff --git a/developer/js/package-lock.json b/developer/js/package-lock.json index 64f15a9612..7af468e005 100644 --- a/developer/js/package-lock.json +++ b/developer/js/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-compiler", - "version": "15.0.168", + "version": "15.0.169", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/developer/js/package.json b/developer/js/package.json index b520f65e6f..764bac00be 100644 --- a/developer/js/package.json +++ b/developer/js/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-compiler", - "version": "15.0.168", + "version": "15.0.169", "description": "Keyman Developer lexical model compiler", "keywords": [ "keyboard", @@ -37,14 +37,14 @@ "node": ">=12.0.0" }, "dependencies": { - "@keymanapp/models-types": "^15.0.168", + "@keymanapp/models-types": "^15.0.169", "commander": "^3.0.0", "typescript": "^3.8.3", "xml2js": "^0.4.19" }, "devDependencies": { - "@keymanapp/models-templates": "^15.0.168", - "@keymanapp/models-wordbreakers": "^15.0.168", + "@keymanapp/models-templates": "^15.0.169", + "@keymanapp/models-wordbreakers": "^15.0.169", "@types/chai": "^4.1.7", "@types/mocha": "^5.2.7", "@types/node": "^10.14.6", diff --git a/lerna.json b/lerna.json index e0b758fd75..be0cec2722 100644 --- a/lerna.json +++ b/lerna.json @@ -20,5 +20,5 @@ "ts-node", "typescript" ], - "version": "15.0.168" + "version": "15.0.169" } diff --git a/resources/gosh/package-lock.json b/resources/gosh/package-lock.json index 7281681fa3..8b9d7eb4d1 100644 --- a/resources/gosh/package-lock.json +++ b/resources/gosh/package-lock.json @@ -1,5 +1,5 @@ { "name": "@keymanapp/resources-gosh", - "version": "15.0.168", + "version": "15.0.169", "lockfileVersion": 1 } diff --git a/resources/gosh/package.json b/resources/gosh/package.json index 0e6ac3d5fc..a3e510d005 100644 --- a/resources/gosh/package.json +++ b/resources/gosh/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/resources-gosh", - "version": "15.0.168", + "version": "15.0.169", "description": "Good Ol' Shell", "author": "Marc Durdin (https://github.com/mcdurdin)", "contributors": [ diff --git a/resources/web-environment/package-lock.json b/resources/web-environment/package-lock.json index a40cf18517..5c1c72ea4e 100644 --- a/resources/web-environment/package-lock.json +++ b/resources/web-environment/package-lock.json @@ -1,5 +1,5 @@ { "name": "@keymanapp/web-environment", - "version": "15.0.168", + "version": "15.0.169", "lockfileVersion": 1 } diff --git a/resources/web-environment/package.json b/resources/web-environment/package.json index f0a1898adc..728dd30119 100644 --- a/resources/web-environment/package.json +++ b/resources/web-environment/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-environment", - "version": "15.0.168", + "version": "15.0.169", "description": "A compilation utility for passing select environment variables into our TS builds", "author": "Joshua Horton (https://github.com/jahorton)", "homepage": "https://github.com/keymanapp/keyman", @@ -17,6 +17,6 @@ "url": "https://github.com/keymanapp/keyman/issues" }, "devDependencies": { - "@keymanapp/resources-gosh": "^15.0.168" + "@keymanapp/resources-gosh": "^15.0.169" } } diff --git a/web/package-lock.json b/web/package-lock.json index df1aa182ae..9d5ebc2d04 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -1,6 +1,6 @@ { "name": "keyman", - "version": "15.0.168", + "version": "15.0.169", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/web/package.json b/web/package.json index af6c18a34e..af916b51f7 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "keyman", - "version": "15.0.168", + "version": "15.0.169", "description": "Facilitates text input in any language.", "repository": { "type": "git", @@ -18,8 +18,8 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/resources-gosh": "^15.0.168", - "@keymanapp/web-sentry-manager": "^15.0.168", + "@keymanapp/resources-gosh": "^15.0.169", + "@keymanapp/web-sentry-manager": "^15.0.169", "@sentry/cli": "^1.52.3", "chai": "^4.3.4", "google-closure-compiler-java": "^20200224.0.0", @@ -52,13 +52,13 @@ "sentry-cli": "sentry-cli" }, "dependencies": { - "@keymanapp/input-processor": "^15.0.168", - "@keymanapp/keyboard-processor": "^15.0.168", - "@keymanapp/lexical-model-layer": "^15.0.168", - "@keymanapp/models-types": "^15.0.168", - "@keymanapp/recorder-core": "^15.0.168", - "@keymanapp/web-environment": "^15.0.168", - "@keymanapp/web-utils": "^15.0.168", + "@keymanapp/input-processor": "^15.0.169", + "@keymanapp/keyboard-processor": "^15.0.169", + "@keymanapp/lexical-model-layer": "^15.0.169", + "@keymanapp/models-types": "^15.0.169", + "@keymanapp/recorder-core": "^15.0.169", + "@keymanapp/web-environment": "^15.0.169", + "@keymanapp/web-utils": "^15.0.169", "@types/node": "^11.9.4", "es6-shim": "^0.35.5", "eventemitter3": "^4.0.0" From 8297f6543a5213648e62be0b779b67bbdc97d43d Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Wed, 15 Dec 2021 10:08:05 +0100 Subject: [PATCH 31/38] docs(linux): Document how to disable error reporting Part of #5027. --- linux/help/common/index.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/linux/help/common/index.md b/linux/help/common/index.md index 4d4f39ba05..c6fae9b3c9 100644 --- a/linux/help/common/index.md +++ b/linux/help/common/index.md @@ -64,3 +64,14 @@ sudo dpkg --purge ibus-kmfl libkmfl **A.** Most keyboards will work without change. A small subset of keyboards require features which are not yet available in Keyman for Linux. These features will be progressively implemented. + +## Q. How can I disable automatically reporting errors? + +**A.** If Keyman crashes, it will automatically send a report to the development team. This report +is anonymous and contains only technical details relating to the crash. It does not include keystroke +data or personally identifying data. If you don't want these automatic error reports to be sent you +can set the environment variable `KEYMAN_NOSENTRY`: + +```bash +export KEYMAN_NOSENTRY=1 +``` From 10c7d88eb974a78c043b69a35935945c2c389b28 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Wed, 15 Dec 2021 10:52:21 +0100 Subject: [PATCH 32/38] fix(linux): fix release version number for Sentry reporting Fixes #5817. --- linux/keyman-config/keyman_config/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/keyman-config/keyman_config/__init__.py b/linux/keyman-config/keyman_config/__init__.py index abeb47c6b7..2d2409d9d3 100644 --- a/linux/keyman-config/keyman_config/__init__.py +++ b/linux/keyman-config/keyman_config/__init__.py @@ -61,7 +61,7 @@ else: sentry_sdk.init( dsn=SentryUrl, environment=__environment__, - release=__version__, + release='release-' + __versionwithtag__, integrations=[sentry_logging], ) set_user({'id': hash(getpass.getuser())}) From 2f7fafd0f368f504642c08a26ca2f64411dc0445 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Wed, 15 Dec 2021 11:32:30 +0100 Subject: [PATCH 33/38] fix(linux): Fix package description Also improve wording for Debian packages. Fixes #5940. --- linux/debian/com.keyman.config.appdata.xml | 14 +++++++------- linux/debian/com.keyman.ibus_keyman.metainfo.xml | 3 +-- linux/debian/control | 15 +++++++-------- linux/debian/km-config.desktop | 8 ++++---- 4 files changed, 19 insertions(+), 21 deletions(-) diff --git a/linux/debian/com.keyman.config.appdata.xml b/linux/debian/com.keyman.config.appdata.xml index e275797552..f137be461d 100644 --- a/linux/debian/com.keyman.config.appdata.xml +++ b/linux/debian/com.keyman.config.appdata.xml @@ -7,24 +7,24 @@ Keyman SIL International https://keyman.com/cdn/dev/img/keyman-logo.png - Keyman Keyboards - Keyman makes it possible for you to type in over 1,000 languages + Keyman for Linux + Keyman makes it possible for you to type in over 2,000 languages

-Keyman makes it possible for you to type in over 1,000 languages on Windows, macOS, Linux, +Keyman makes it possible for you to type in over 2,000 languages on Windows, macOS, Linux, iPhone, iPad, Android tablets and phones, and even instantly in your web browser. With the world’s most powerful keyboarding engine, intuitive and rapid text input is now possible in your language, and for over 99% of the global population’s mother tongues!

- Originally created in 1993 to type Lao on Windows, Keyman is now a free and -open source keyboarding platform which allows anyone to write a keyboard layout +Originally created in 1993 to type Lao on Windows, Keyman is now a free and +open source keyboarding platform which allows anyone to write and use a keyboard layout for their language. Keyman is available for many platforms, including Windows, macOS, iOS, Android, Linux and the web.

- Keyboard layouts are defined with a clear and easy to understand keyboard +Keyboard layouts are defined with a clear and easy to understand keyboard grammar. Keyman's contextual input model means keyboard layouts can be intelligent and make it simple to type even the most complex languages. Keyboard layouts are distributed through an open catalog to all major desktop @@ -39,7 +39,7 @@ and mobile platforms. - The Keyman Keyboards main window with a keyboard welcome window. + The Keyman for Linux configuration window with a keyboard welcome window. https://keyman.com/go/linux/11.0/linux-configuration.png diff --git a/linux/debian/com.keyman.ibus_keyman.metainfo.xml b/linux/debian/com.keyman.ibus_keyman.metainfo.xml index 36242f2a10..eb02001da0 100644 --- a/linux/debian/com.keyman.ibus_keyman.metainfo.xml +++ b/linux/debian/com.keyman.ibus_keyman.metainfo.xml @@ -12,8 +12,7 @@ ​ ​

This input method provides the Keyman IM engine for IBus. With this module, you can - use keyboard layouts designed for Keyman version 11 or earlier under the IBus - platform. + use keyboard layouts designed for Keyman under the IBus platform.

Originally created in 1993 to type Lao on Windows, Keyman is now a free and diff --git a/linux/debian/control b/linux/debian/control index d85071e60d..c604915f56 100644 --- a/linux/debian/control +++ b/linux/debian/control @@ -51,7 +51,7 @@ Depends: Recommends: onboard-keyman, Description: Type in your language with Keyman for Linux - Keyman makes it possible for you to type in over 1,000 languages on Windows, + Keyman makes it possible for you to type in over 2,000 languages on Windows, macOS, Linux, iPhone, iPad, Android tablets and phones, and even instantly in your web browser. With the world’s most powerful keyboarding engine, intuitive and rapid text input is now possible in your language, and for @@ -98,8 +98,8 @@ Description: Keyman for Linux configuration Keyboard layouts are distributed through an open catalog to all major desktop and mobile platforms. . - Python module to install, uninstall and view information about Keyman - keyboard packages. + This package contains the Python module to install, uninstall and view + information about Keyman keyboard packages. Package: libkmnkbp-dev Architecture: amd64 arm64 armel armhf i386 mipsel mips64el ppc64el riscv64 @@ -121,7 +121,7 @@ Description: Development files for Keyman keyboard processing library and mobile platforms. . The Keyman keyboardprocessor library processes input from input method engines - and applies rules from compiled Keyman 11 or earlier kmx keyboard files. + and applies rules from compiled Keyman keyboard files. . This package contains development headers and libraries. @@ -149,7 +149,7 @@ Description: Keyman keyboard processing library and mobile platforms. . The Keyman keyboardprocessor library processes input from input method engines - and applies rules from compiled Keyman 11 or earlier kmx keyboard files. + and applies rules from compiled Keyman keyboard files. Package: ibus-keyman Architecture: amd64 arm64 armel armhf i386 mipsel mips64el ppc64el riscv64 @@ -173,9 +173,8 @@ Description: Keyman engine for IBus Keyboard layouts are distributed through an open catalog to all major desktop and mobile platforms. . - IBus-keyman is a IM (input method) Engine for multiple languages, based on + ibus-keyman is a IM (input method) Engine for multiple languages, based on IBus. . This package provides the Keyman IM engine for IBus. With this module, you - can use keyboard layouts designed for Keyman version 11 or earlier under the - IBus platform. + can use keyboard layouts designed for Keyman under the IBus platform. diff --git a/linux/debian/km-config.desktop b/linux/debian/km-config.desktop index 5646f67601..91cacce96a 100644 --- a/linux/debian/km-config.desktop +++ b/linux/debian/km-config.desktop @@ -1,8 +1,8 @@ [Desktop Entry] -Name=Keyman Keyboards -Name[en_GB]=Keyman Keyboards -Comment=Configure Keyman keyboards -Comment[en_GB]=Configure Keyman keyboards +Name=Keyman Configuration +Name[en_GB]=Keyman Configuration +Comment=Configure Keyman for Linux keyboards +Comment[en_GB]=Configure Keyman for Linux keyboards Exec=km-config %u Icon=km-config Terminal=false From ee2fe485672bc7a1d06a9e2aaf85e4fa972a8bbc Mon Sep 17 00:00:00 2001 From: Keyman Build Agent Date: Wed, 15 Dec 2021 13:01:30 -0500 Subject: [PATCH 34/38] auto: increment master version to 15.0.170 --- HISTORY.md | 5 +++++ VERSION.md | 2 +- .../web/input-processor/package-lock.json | 2 +- common/core/web/input-processor/package.json | 16 +++++++-------- .../web/keyboard-processor/package-lock.json | 2 +- .../core/web/keyboard-processor/package.json | 10 +++++----- .../core/web/tools/recorder/package-lock.json | 2 +- common/core/web/tools/recorder/package.json | 10 +++++----- .../tools/sentry-manager/package-lock.json | 2 +- .../web/tools/sentry-manager/package.json | 4 ++-- common/core/web/utils/package-lock.json | 2 +- common/core/web/utils/package.json | 6 +++--- common/models/templates/package-lock.json | 2 +- common/models/templates/package.json | 8 ++++---- common/models/types/package-lock.json | 2 +- common/models/types/package.json | 2 +- common/models/wordbreakers/package-lock.json | 2 +- common/models/wordbreakers/package.json | 4 ++-- common/predictive-text/package-lock.json | 2 +- common/predictive-text/package.json | 14 ++++++------- developer/js/package-lock.json | 2 +- developer/js/package.json | 8 ++++---- lerna.json | 2 +- resources/gosh/package-lock.json | 2 +- resources/gosh/package.json | 2 +- resources/web-environment/package-lock.json | 2 +- resources/web-environment/package.json | 4 ++-- web/package-lock.json | 2 +- web/package.json | 20 +++++++++---------- 29 files changed, 74 insertions(+), 69 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index d113c93066..b082f3e961 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,10 @@ # Keyman Version History +## 15.0.169 alpha 2021-12-15 + +* fix(mac): display Unicode package name correctly instead of '????' (#6016) +* fix(linux): Improve ibus-keyman tests (#6044) + ## 15.0.168 alpha 2021-12-14 * feat(linux): Add support for Ubuntu 22.04 Jammy (#6037) diff --git a/VERSION.md b/VERSION.md index c862376c1d..8016f8b958 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -15.0.169 \ No newline at end of file +15.0.170 \ No newline at end of file diff --git a/common/core/web/input-processor/package-lock.json b/common/core/web/input-processor/package-lock.json index ca25342885..33f594de18 100644 --- a/common/core/web/input-processor/package-lock.json +++ b/common/core/web/input-processor/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/input-processor", - "version": "15.0.169", + "version": "15.0.170", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/core/web/input-processor/package.json b/common/core/web/input-processor/package.json index ccf0174f4f..caf43bcaa5 100644 --- a/common/core/web/input-processor/package.json +++ b/common/core/web/input-processor/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/input-processor", - "version": "15.0.169", + "version": "15.0.170", "description": "The core text and prediction processing engine for KeymanWeb", "repository": { "type": "git", @@ -18,8 +18,8 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/lexical-model-compiler": "^15.0.169", - "@keymanapp/resources-gosh": "^15.0.169", + "@keymanapp/lexical-model-compiler": "^15.0.170", + "@keymanapp/resources-gosh": "^15.0.170", "@types/node": "^11.9.4", "chai": "^4.3.4", "mocha": "^8.4.0", @@ -34,11 +34,11 @@ "mocha": "mocha" }, "dependencies": { - "@keymanapp/keyboard-processor": "^15.0.169", - "@keymanapp/lexical-model-layer": "^15.0.169", - "@keymanapp/models-types": "^15.0.169", - "@keymanapp/web-environment": "^15.0.169", - "@keymanapp/web-utils": "^15.0.169", + "@keymanapp/keyboard-processor": "^15.0.170", + "@keymanapp/lexical-model-layer": "^15.0.170", + "@keymanapp/models-types": "^15.0.170", + "@keymanapp/web-environment": "^15.0.170", + "@keymanapp/web-utils": "^15.0.170", "eventemitter3": "^4.0.0" } } diff --git a/common/core/web/keyboard-processor/package-lock.json b/common/core/web/keyboard-processor/package-lock.json index 7b1fe349af..883c8f0d61 100644 --- a/common/core/web/keyboard-processor/package-lock.json +++ b/common/core/web/keyboard-processor/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/keyboard-processor", - "version": "15.0.169", + "version": "15.0.170", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/core/web/keyboard-processor/package.json b/common/core/web/keyboard-processor/package.json index f5617270b9..56149cea33 100644 --- a/common/core/web/keyboard-processor/package.json +++ b/common/core/web/keyboard-processor/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/keyboard-processor", - "version": "15.0.169", + "version": "15.0.170", "description": "Core module for Keyman keyboard support in KeymanWeb.", "repository": { "type": "git", @@ -18,7 +18,7 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/resources-gosh": "^15.0.169", + "@keymanapp/resources-gosh": "^15.0.170", "chai": "^4.3.4", "mocha": "^8.4.0", "mocha-teamcity-reporter": "^4.0.0", @@ -32,9 +32,9 @@ "mocha": "mocha" }, "dependencies": { - "@keymanapp/models-types": "^15.0.169", - "@keymanapp/web-environment": "^15.0.169", - "@keymanapp/web-utils": "^15.0.169", + "@keymanapp/models-types": "^15.0.170", + "@keymanapp/web-environment": "^15.0.170", + "@keymanapp/web-utils": "^15.0.170", "@types/node": "^11.9.4" } } diff --git a/common/core/web/tools/recorder/package-lock.json b/common/core/web/tools/recorder/package-lock.json index 14773885b4..003df0d3c0 100644 --- a/common/core/web/tools/recorder/package-lock.json +++ b/common/core/web/tools/recorder/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/recorder-core", - "version": "15.0.169", + "version": "15.0.170", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/core/web/tools/recorder/package.json b/common/core/web/tools/recorder/package.json index bd80936911..7558b0eb9c 100644 --- a/common/core/web/tools/recorder/package.json +++ b/common/core/web/tools/recorder/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/recorder-core", - "version": "15.0.169", + "version": "15.0.170", "description": "Core classes used to develop KeymanWeb test cases based on keystrokes", "main": "index.js", "scripts": { @@ -17,10 +17,10 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "dependencies": { - "@keymanapp/keyboard-processor": "^15.0.169", - "@keymanapp/models-types": "^15.0.169", - "@keymanapp/web-environment": "^15.0.169", - "@keymanapp/web-utils": "^15.0.169", + "@keymanapp/keyboard-processor": "^15.0.170", + "@keymanapp/models-types": "^15.0.170", + "@keymanapp/web-environment": "^15.0.170", + "@keymanapp/web-utils": "^15.0.170", "@types/node": "^11.9.4" }, "devDependencies": { diff --git a/common/core/web/tools/sentry-manager/package-lock.json b/common/core/web/tools/sentry-manager/package-lock.json index 25cd153802..49a0432fa5 100644 --- a/common/core/web/tools/sentry-manager/package-lock.json +++ b/common/core/web/tools/sentry-manager/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-sentry-manager", - "version": "15.0.169", + "version": "15.0.170", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/common/core/web/tools/sentry-manager/package.json b/common/core/web/tools/sentry-manager/package.json index bc791e9e2a..cfcb1ddd6a 100644 --- a/common/core/web/tools/sentry-manager/package.json +++ b/common/core/web/tools/sentry-manager/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-sentry-manager", - "version": "15.0.169", + "version": "15.0.170", "description": "Common setup for KeymanWeb's Sentry-based error reporting", "main": "dist/index.js", "scripts": { @@ -20,7 +20,7 @@ "typescript": "^3.8.3" }, "dependencies": { - "@keymanapp/web-environment": "^15.0.169", + "@keymanapp/web-environment": "^15.0.170", "@sentry/browser": "^5.27.4" } } diff --git a/common/core/web/utils/package-lock.json b/common/core/web/utils/package-lock.json index 9db0e86ae3..33052d4a29 100644 --- a/common/core/web/utils/package-lock.json +++ b/common/core/web/utils/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-utils", - "version": "15.0.169", + "version": "15.0.170", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/common/core/web/utils/package.json b/common/core/web/utils/package.json index fc1f41f3e7..675c328b35 100644 --- a/common/core/web/utils/package.json +++ b/common/core/web/utils/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-utils", - "version": "15.0.169", + "version": "15.0.170", "description": "Common utility functions used throughout other Keyman packages", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -20,8 +20,8 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/resources-gosh": "^15.0.169", - "@keymanapp/web-environment": "^15.0.169", + "@keymanapp/resources-gosh": "^15.0.170", + "@keymanapp/web-environment": "^15.0.170", "@types/node": "^14.0.5", "typescript": "^3.8.3" } diff --git a/common/models/templates/package-lock.json b/common/models/templates/package-lock.json index bcc8dab4a2..b16be0684d 100644 --- a/common/models/templates/package-lock.json +++ b/common/models/templates/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-templates", - "version": "15.0.169", + "version": "15.0.170", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/models/templates/package.json b/common/models/templates/package.json index 529a1c0cd3..aa61fade74 100644 --- a/common/models/templates/package.json +++ b/common/models/templates/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-templates", - "version": "15.0.169", + "version": "15.0.170", "description": "Backing model implementations (templates) for Keyman's modelling layer", "keywords": [ "lm", @@ -42,8 +42,8 @@ "url": "https://github.com/keymanapp/keyman/issues" }, "devDependencies": { - "@keymanapp/models-types": "^15.0.169", - "@keymanapp/web-utils": "^15.0.169", + "@keymanapp/models-types": "^15.0.170", + "@keymanapp/web-utils": "^15.0.170", "@types/chai": "^4.2.11", "@types/mocha": "^7.0.2", "@types/node": "^14.0.4", @@ -52,6 +52,6 @@ "typescript": "^3.8.3" }, "dependencies": { - "@keymanapp/models-wordbreakers": "^15.0.169" + "@keymanapp/models-wordbreakers": "^15.0.170" } } diff --git a/common/models/types/package-lock.json b/common/models/types/package-lock.json index a5a9985034..ecc0e078e7 100644 --- a/common/models/types/package-lock.json +++ b/common/models/types/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-types", - "version": "15.0.169", + "version": "15.0.170", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/common/models/types/package.json b/common/models/types/package.json index 7a072c44ad..f4ec80cd02 100644 --- a/common/models/types/package.json +++ b/common/models/types/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-types", - "version": "15.0.169", + "version": "15.0.170", "description": "Type definitions in used in the modeling (lexical model/predictive text) component of Keyman.", "types": "./index.d.ts", "scripts": { diff --git a/common/models/wordbreakers/package-lock.json b/common/models/wordbreakers/package-lock.json index 61ef3ce07f..74620fad04 100644 --- a/common/models/wordbreakers/package-lock.json +++ b/common/models/wordbreakers/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-wordbreakers", - "version": "15.0.169", + "version": "15.0.170", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/models/wordbreakers/package.json b/common/models/wordbreakers/package.json index 51dc3674d4..3791366c8d 100644 --- a/common/models/wordbreakers/package.json +++ b/common/models/wordbreakers/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-wordbreakers", - "version": "15.0.169", + "version": "15.0.170", "description": "Word breakers bundled in the modeling layer", "keywords": [ "lexical model", @@ -40,7 +40,7 @@ "url": "https://github.com/keymanapp/keyman/issues" }, "devDependencies": { - "@keymanapp/models-types": "^15.0.169", + "@keymanapp/models-types": "^15.0.170", "@types/chai": "^4.2.11", "@types/mocha": "^7.0.2", "chai": "^4.3.4", diff --git a/common/predictive-text/package-lock.json b/common/predictive-text/package-lock.json index dbe2f22842..6320b35ccc 100644 --- a/common/predictive-text/package-lock.json +++ b/common/predictive-text/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-layer", - "version": "15.0.169", + "version": "15.0.170", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/predictive-text/package.json b/common/predictive-text/package.json index ed1191e5d8..df3021cbc4 100644 --- a/common/predictive-text/package.json +++ b/common/predictive-text/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-layer", - "version": "15.0.169", + "version": "15.0.170", "description": "Keyman/Predictive Text integration layer", "main": "build/index.js", "scripts": { @@ -21,8 +21,8 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/models-types": "^15.0.169", - "@keymanapp/resources-gosh": "^15.0.169", + "@keymanapp/models-types": "^15.0.170", + "@keymanapp/resources-gosh": "^15.0.170", "@types/node": "^10.17.21", "chai": "^4.3.4", "karma": "^6.3.4", @@ -46,10 +46,10 @@ "typescript": "^3.8.3" }, "dependencies": { - "@keymanapp/models-templates": "^15.0.169", - "@keymanapp/models-wordbreakers": "^15.0.169", - "@keymanapp/web-environment": "^15.0.169", - "@keymanapp/web-utils": "^15.0.169", + "@keymanapp/models-templates": "^15.0.170", + "@keymanapp/models-wordbreakers": "^15.0.170", + "@keymanapp/web-environment": "^15.0.170", + "@keymanapp/web-utils": "^15.0.170", "es6-shim": "^0.35.5", "string.prototype.codepointat": "^0.2.1", "string.prototype.startswith": "^0.2.0" diff --git a/developer/js/package-lock.json b/developer/js/package-lock.json index 7af468e005..5e70dc26cf 100644 --- a/developer/js/package-lock.json +++ b/developer/js/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-compiler", - "version": "15.0.169", + "version": "15.0.170", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/developer/js/package.json b/developer/js/package.json index 764bac00be..53de5770f3 100644 --- a/developer/js/package.json +++ b/developer/js/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-compiler", - "version": "15.0.169", + "version": "15.0.170", "description": "Keyman Developer lexical model compiler", "keywords": [ "keyboard", @@ -37,14 +37,14 @@ "node": ">=12.0.0" }, "dependencies": { - "@keymanapp/models-types": "^15.0.169", + "@keymanapp/models-types": "^15.0.170", "commander": "^3.0.0", "typescript": "^3.8.3", "xml2js": "^0.4.19" }, "devDependencies": { - "@keymanapp/models-templates": "^15.0.169", - "@keymanapp/models-wordbreakers": "^15.0.169", + "@keymanapp/models-templates": "^15.0.170", + "@keymanapp/models-wordbreakers": "^15.0.170", "@types/chai": "^4.1.7", "@types/mocha": "^5.2.7", "@types/node": "^10.14.6", diff --git a/lerna.json b/lerna.json index be0cec2722..4d6b7d99ab 100644 --- a/lerna.json +++ b/lerna.json @@ -20,5 +20,5 @@ "ts-node", "typescript" ], - "version": "15.0.169" + "version": "15.0.170" } diff --git a/resources/gosh/package-lock.json b/resources/gosh/package-lock.json index 8b9d7eb4d1..edcdee759a 100644 --- a/resources/gosh/package-lock.json +++ b/resources/gosh/package-lock.json @@ -1,5 +1,5 @@ { "name": "@keymanapp/resources-gosh", - "version": "15.0.169", + "version": "15.0.170", "lockfileVersion": 1 } diff --git a/resources/gosh/package.json b/resources/gosh/package.json index a3e510d005..bec419ab26 100644 --- a/resources/gosh/package.json +++ b/resources/gosh/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/resources-gosh", - "version": "15.0.169", + "version": "15.0.170", "description": "Good Ol' Shell", "author": "Marc Durdin (https://github.com/mcdurdin)", "contributors": [ diff --git a/resources/web-environment/package-lock.json b/resources/web-environment/package-lock.json index 5c1c72ea4e..122f51020c 100644 --- a/resources/web-environment/package-lock.json +++ b/resources/web-environment/package-lock.json @@ -1,5 +1,5 @@ { "name": "@keymanapp/web-environment", - "version": "15.0.169", + "version": "15.0.170", "lockfileVersion": 1 } diff --git a/resources/web-environment/package.json b/resources/web-environment/package.json index 728dd30119..bc8023b518 100644 --- a/resources/web-environment/package.json +++ b/resources/web-environment/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-environment", - "version": "15.0.169", + "version": "15.0.170", "description": "A compilation utility for passing select environment variables into our TS builds", "author": "Joshua Horton (https://github.com/jahorton)", "homepage": "https://github.com/keymanapp/keyman", @@ -17,6 +17,6 @@ "url": "https://github.com/keymanapp/keyman/issues" }, "devDependencies": { - "@keymanapp/resources-gosh": "^15.0.169" + "@keymanapp/resources-gosh": "^15.0.170" } } diff --git a/web/package-lock.json b/web/package-lock.json index 9d5ebc2d04..8eb85d17da 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -1,6 +1,6 @@ { "name": "keyman", - "version": "15.0.169", + "version": "15.0.170", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/web/package.json b/web/package.json index af916b51f7..7f8d36c87c 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "keyman", - "version": "15.0.169", + "version": "15.0.170", "description": "Facilitates text input in any language.", "repository": { "type": "git", @@ -18,8 +18,8 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/resources-gosh": "^15.0.169", - "@keymanapp/web-sentry-manager": "^15.0.169", + "@keymanapp/resources-gosh": "^15.0.170", + "@keymanapp/web-sentry-manager": "^15.0.170", "@sentry/cli": "^1.52.3", "chai": "^4.3.4", "google-closure-compiler-java": "^20200224.0.0", @@ -52,13 +52,13 @@ "sentry-cli": "sentry-cli" }, "dependencies": { - "@keymanapp/input-processor": "^15.0.169", - "@keymanapp/keyboard-processor": "^15.0.169", - "@keymanapp/lexical-model-layer": "^15.0.169", - "@keymanapp/models-types": "^15.0.169", - "@keymanapp/recorder-core": "^15.0.169", - "@keymanapp/web-environment": "^15.0.169", - "@keymanapp/web-utils": "^15.0.169", + "@keymanapp/input-processor": "^15.0.170", + "@keymanapp/keyboard-processor": "^15.0.170", + "@keymanapp/lexical-model-layer": "^15.0.170", + "@keymanapp/models-types": "^15.0.170", + "@keymanapp/recorder-core": "^15.0.170", + "@keymanapp/web-environment": "^15.0.170", + "@keymanapp/web-utils": "^15.0.170", "@types/node": "^11.9.4", "es6-shim": "^0.35.5", "eventemitter3": "^4.0.0" From 86d50af4a651fa0d301aa4baf3a3ba61d4dc5b34 Mon Sep 17 00:00:00 2001 From: Keyman Build Agent Date: Thu, 16 Dec 2021 13:01:48 -0500 Subject: [PATCH 35/38] auto: increment master version to 15.0.171 --- HISTORY.md | 6 ++++++ VERSION.md | 2 +- .../web/input-processor/package-lock.json | 2 +- common/core/web/input-processor/package.json | 16 +++++++-------- .../web/keyboard-processor/package-lock.json | 2 +- .../core/web/keyboard-processor/package.json | 10 +++++----- .../core/web/tools/recorder/package-lock.json | 2 +- common/core/web/tools/recorder/package.json | 10 +++++----- .../tools/sentry-manager/package-lock.json | 2 +- .../web/tools/sentry-manager/package.json | 4 ++-- common/core/web/utils/package-lock.json | 2 +- common/core/web/utils/package.json | 6 +++--- common/models/templates/package-lock.json | 2 +- common/models/templates/package.json | 8 ++++---- common/models/types/package-lock.json | 2 +- common/models/types/package.json | 2 +- common/models/wordbreakers/package-lock.json | 2 +- common/models/wordbreakers/package.json | 4 ++-- common/predictive-text/package-lock.json | 2 +- common/predictive-text/package.json | 14 ++++++------- developer/js/package-lock.json | 2 +- developer/js/package.json | 8 ++++---- lerna.json | 2 +- resources/gosh/package-lock.json | 2 +- resources/gosh/package.json | 2 +- resources/web-environment/package-lock.json | 2 +- resources/web-environment/package.json | 4 ++-- web/package-lock.json | 2 +- web/package.json | 20 +++++++++---------- 29 files changed, 75 insertions(+), 69 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index b082f3e961..c6193efc80 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,11 @@ # Keyman Version History +## 15.0.170 alpha 2021-12-16 + +* docs(linux): Document how to disable error reporting (#6051) +* fix(linux): fix release version number for Sentry reporting (#6052) +* fix(linux): Fix package description (#6054) + ## 15.0.169 alpha 2021-12-15 * fix(mac): display Unicode package name correctly instead of '????' (#6016) diff --git a/VERSION.md b/VERSION.md index 8016f8b958..165c53dbb6 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -15.0.170 \ No newline at end of file +15.0.171 \ No newline at end of file diff --git a/common/core/web/input-processor/package-lock.json b/common/core/web/input-processor/package-lock.json index 33f594de18..36180e2589 100644 --- a/common/core/web/input-processor/package-lock.json +++ b/common/core/web/input-processor/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/input-processor", - "version": "15.0.170", + "version": "15.0.171", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/core/web/input-processor/package.json b/common/core/web/input-processor/package.json index caf43bcaa5..687f5698f0 100644 --- a/common/core/web/input-processor/package.json +++ b/common/core/web/input-processor/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/input-processor", - "version": "15.0.170", + "version": "15.0.171", "description": "The core text and prediction processing engine for KeymanWeb", "repository": { "type": "git", @@ -18,8 +18,8 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/lexical-model-compiler": "^15.0.170", - "@keymanapp/resources-gosh": "^15.0.170", + "@keymanapp/lexical-model-compiler": "^15.0.171", + "@keymanapp/resources-gosh": "^15.0.171", "@types/node": "^11.9.4", "chai": "^4.3.4", "mocha": "^8.4.0", @@ -34,11 +34,11 @@ "mocha": "mocha" }, "dependencies": { - "@keymanapp/keyboard-processor": "^15.0.170", - "@keymanapp/lexical-model-layer": "^15.0.170", - "@keymanapp/models-types": "^15.0.170", - "@keymanapp/web-environment": "^15.0.170", - "@keymanapp/web-utils": "^15.0.170", + "@keymanapp/keyboard-processor": "^15.0.171", + "@keymanapp/lexical-model-layer": "^15.0.171", + "@keymanapp/models-types": "^15.0.171", + "@keymanapp/web-environment": "^15.0.171", + "@keymanapp/web-utils": "^15.0.171", "eventemitter3": "^4.0.0" } } diff --git a/common/core/web/keyboard-processor/package-lock.json b/common/core/web/keyboard-processor/package-lock.json index 883c8f0d61..d1372c9dba 100644 --- a/common/core/web/keyboard-processor/package-lock.json +++ b/common/core/web/keyboard-processor/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/keyboard-processor", - "version": "15.0.170", + "version": "15.0.171", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/core/web/keyboard-processor/package.json b/common/core/web/keyboard-processor/package.json index 56149cea33..33f4a81166 100644 --- a/common/core/web/keyboard-processor/package.json +++ b/common/core/web/keyboard-processor/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/keyboard-processor", - "version": "15.0.170", + "version": "15.0.171", "description": "Core module for Keyman keyboard support in KeymanWeb.", "repository": { "type": "git", @@ -18,7 +18,7 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/resources-gosh": "^15.0.170", + "@keymanapp/resources-gosh": "^15.0.171", "chai": "^4.3.4", "mocha": "^8.4.0", "mocha-teamcity-reporter": "^4.0.0", @@ -32,9 +32,9 @@ "mocha": "mocha" }, "dependencies": { - "@keymanapp/models-types": "^15.0.170", - "@keymanapp/web-environment": "^15.0.170", - "@keymanapp/web-utils": "^15.0.170", + "@keymanapp/models-types": "^15.0.171", + "@keymanapp/web-environment": "^15.0.171", + "@keymanapp/web-utils": "^15.0.171", "@types/node": "^11.9.4" } } diff --git a/common/core/web/tools/recorder/package-lock.json b/common/core/web/tools/recorder/package-lock.json index 003df0d3c0..93bb4719e4 100644 --- a/common/core/web/tools/recorder/package-lock.json +++ b/common/core/web/tools/recorder/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/recorder-core", - "version": "15.0.170", + "version": "15.0.171", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/core/web/tools/recorder/package.json b/common/core/web/tools/recorder/package.json index 7558b0eb9c..49ac325354 100644 --- a/common/core/web/tools/recorder/package.json +++ b/common/core/web/tools/recorder/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/recorder-core", - "version": "15.0.170", + "version": "15.0.171", "description": "Core classes used to develop KeymanWeb test cases based on keystrokes", "main": "index.js", "scripts": { @@ -17,10 +17,10 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "dependencies": { - "@keymanapp/keyboard-processor": "^15.0.170", - "@keymanapp/models-types": "^15.0.170", - "@keymanapp/web-environment": "^15.0.170", - "@keymanapp/web-utils": "^15.0.170", + "@keymanapp/keyboard-processor": "^15.0.171", + "@keymanapp/models-types": "^15.0.171", + "@keymanapp/web-environment": "^15.0.171", + "@keymanapp/web-utils": "^15.0.171", "@types/node": "^11.9.4" }, "devDependencies": { diff --git a/common/core/web/tools/sentry-manager/package-lock.json b/common/core/web/tools/sentry-manager/package-lock.json index 49a0432fa5..6f58a4a009 100644 --- a/common/core/web/tools/sentry-manager/package-lock.json +++ b/common/core/web/tools/sentry-manager/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-sentry-manager", - "version": "15.0.170", + "version": "15.0.171", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/common/core/web/tools/sentry-manager/package.json b/common/core/web/tools/sentry-manager/package.json index cfcb1ddd6a..61dfed6ebf 100644 --- a/common/core/web/tools/sentry-manager/package.json +++ b/common/core/web/tools/sentry-manager/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-sentry-manager", - "version": "15.0.170", + "version": "15.0.171", "description": "Common setup for KeymanWeb's Sentry-based error reporting", "main": "dist/index.js", "scripts": { @@ -20,7 +20,7 @@ "typescript": "^3.8.3" }, "dependencies": { - "@keymanapp/web-environment": "^15.0.170", + "@keymanapp/web-environment": "^15.0.171", "@sentry/browser": "^5.27.4" } } diff --git a/common/core/web/utils/package-lock.json b/common/core/web/utils/package-lock.json index 33052d4a29..429b38724a 100644 --- a/common/core/web/utils/package-lock.json +++ b/common/core/web/utils/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-utils", - "version": "15.0.170", + "version": "15.0.171", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/common/core/web/utils/package.json b/common/core/web/utils/package.json index 675c328b35..edd552b80a 100644 --- a/common/core/web/utils/package.json +++ b/common/core/web/utils/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-utils", - "version": "15.0.170", + "version": "15.0.171", "description": "Common utility functions used throughout other Keyman packages", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -20,8 +20,8 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/resources-gosh": "^15.0.170", - "@keymanapp/web-environment": "^15.0.170", + "@keymanapp/resources-gosh": "^15.0.171", + "@keymanapp/web-environment": "^15.0.171", "@types/node": "^14.0.5", "typescript": "^3.8.3" } diff --git a/common/models/templates/package-lock.json b/common/models/templates/package-lock.json index b16be0684d..bcdfbd1198 100644 --- a/common/models/templates/package-lock.json +++ b/common/models/templates/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-templates", - "version": "15.0.170", + "version": "15.0.171", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/models/templates/package.json b/common/models/templates/package.json index aa61fade74..c2ceaf97bd 100644 --- a/common/models/templates/package.json +++ b/common/models/templates/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-templates", - "version": "15.0.170", + "version": "15.0.171", "description": "Backing model implementations (templates) for Keyman's modelling layer", "keywords": [ "lm", @@ -42,8 +42,8 @@ "url": "https://github.com/keymanapp/keyman/issues" }, "devDependencies": { - "@keymanapp/models-types": "^15.0.170", - "@keymanapp/web-utils": "^15.0.170", + "@keymanapp/models-types": "^15.0.171", + "@keymanapp/web-utils": "^15.0.171", "@types/chai": "^4.2.11", "@types/mocha": "^7.0.2", "@types/node": "^14.0.4", @@ -52,6 +52,6 @@ "typescript": "^3.8.3" }, "dependencies": { - "@keymanapp/models-wordbreakers": "^15.0.170" + "@keymanapp/models-wordbreakers": "^15.0.171" } } diff --git a/common/models/types/package-lock.json b/common/models/types/package-lock.json index ecc0e078e7..ec83cbe537 100644 --- a/common/models/types/package-lock.json +++ b/common/models/types/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-types", - "version": "15.0.170", + "version": "15.0.171", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/common/models/types/package.json b/common/models/types/package.json index f4ec80cd02..7d79bbeb48 100644 --- a/common/models/types/package.json +++ b/common/models/types/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-types", - "version": "15.0.170", + "version": "15.0.171", "description": "Type definitions in used in the modeling (lexical model/predictive text) component of Keyman.", "types": "./index.d.ts", "scripts": { diff --git a/common/models/wordbreakers/package-lock.json b/common/models/wordbreakers/package-lock.json index 74620fad04..133ebec0dc 100644 --- a/common/models/wordbreakers/package-lock.json +++ b/common/models/wordbreakers/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-wordbreakers", - "version": "15.0.170", + "version": "15.0.171", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/models/wordbreakers/package.json b/common/models/wordbreakers/package.json index 3791366c8d..eb8d3d7355 100644 --- a/common/models/wordbreakers/package.json +++ b/common/models/wordbreakers/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/models-wordbreakers", - "version": "15.0.170", + "version": "15.0.171", "description": "Word breakers bundled in the modeling layer", "keywords": [ "lexical model", @@ -40,7 +40,7 @@ "url": "https://github.com/keymanapp/keyman/issues" }, "devDependencies": { - "@keymanapp/models-types": "^15.0.170", + "@keymanapp/models-types": "^15.0.171", "@types/chai": "^4.2.11", "@types/mocha": "^7.0.2", "chai": "^4.3.4", diff --git a/common/predictive-text/package-lock.json b/common/predictive-text/package-lock.json index 6320b35ccc..617bafe3e8 100644 --- a/common/predictive-text/package-lock.json +++ b/common/predictive-text/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-layer", - "version": "15.0.170", + "version": "15.0.171", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/common/predictive-text/package.json b/common/predictive-text/package.json index df3021cbc4..0cb1c79821 100644 --- a/common/predictive-text/package.json +++ b/common/predictive-text/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-layer", - "version": "15.0.170", + "version": "15.0.171", "description": "Keyman/Predictive Text integration layer", "main": "build/index.js", "scripts": { @@ -21,8 +21,8 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/models-types": "^15.0.170", - "@keymanapp/resources-gosh": "^15.0.170", + "@keymanapp/models-types": "^15.0.171", + "@keymanapp/resources-gosh": "^15.0.171", "@types/node": "^10.17.21", "chai": "^4.3.4", "karma": "^6.3.4", @@ -46,10 +46,10 @@ "typescript": "^3.8.3" }, "dependencies": { - "@keymanapp/models-templates": "^15.0.170", - "@keymanapp/models-wordbreakers": "^15.0.170", - "@keymanapp/web-environment": "^15.0.170", - "@keymanapp/web-utils": "^15.0.170", + "@keymanapp/models-templates": "^15.0.171", + "@keymanapp/models-wordbreakers": "^15.0.171", + "@keymanapp/web-environment": "^15.0.171", + "@keymanapp/web-utils": "^15.0.171", "es6-shim": "^0.35.5", "string.prototype.codepointat": "^0.2.1", "string.prototype.startswith": "^0.2.0" diff --git a/developer/js/package-lock.json b/developer/js/package-lock.json index 5e70dc26cf..a779076483 100644 --- a/developer/js/package-lock.json +++ b/developer/js/package-lock.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-compiler", - "version": "15.0.170", + "version": "15.0.171", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/developer/js/package.json b/developer/js/package.json index 53de5770f3..6ee67f7016 100644 --- a/developer/js/package.json +++ b/developer/js/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/lexical-model-compiler", - "version": "15.0.170", + "version": "15.0.171", "description": "Keyman Developer lexical model compiler", "keywords": [ "keyboard", @@ -37,14 +37,14 @@ "node": ">=12.0.0" }, "dependencies": { - "@keymanapp/models-types": "^15.0.170", + "@keymanapp/models-types": "^15.0.171", "commander": "^3.0.0", "typescript": "^3.8.3", "xml2js": "^0.4.19" }, "devDependencies": { - "@keymanapp/models-templates": "^15.0.170", - "@keymanapp/models-wordbreakers": "^15.0.170", + "@keymanapp/models-templates": "^15.0.171", + "@keymanapp/models-wordbreakers": "^15.0.171", "@types/chai": "^4.1.7", "@types/mocha": "^5.2.7", "@types/node": "^10.14.6", diff --git a/lerna.json b/lerna.json index 4d6b7d99ab..562e5d3cef 100644 --- a/lerna.json +++ b/lerna.json @@ -20,5 +20,5 @@ "ts-node", "typescript" ], - "version": "15.0.170" + "version": "15.0.171" } diff --git a/resources/gosh/package-lock.json b/resources/gosh/package-lock.json index edcdee759a..49c2cec8d5 100644 --- a/resources/gosh/package-lock.json +++ b/resources/gosh/package-lock.json @@ -1,5 +1,5 @@ { "name": "@keymanapp/resources-gosh", - "version": "15.0.170", + "version": "15.0.171", "lockfileVersion": 1 } diff --git a/resources/gosh/package.json b/resources/gosh/package.json index bec419ab26..f0f90aed2e 100644 --- a/resources/gosh/package.json +++ b/resources/gosh/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/resources-gosh", - "version": "15.0.170", + "version": "15.0.171", "description": "Good Ol' Shell", "author": "Marc Durdin (https://github.com/mcdurdin)", "contributors": [ diff --git a/resources/web-environment/package-lock.json b/resources/web-environment/package-lock.json index 122f51020c..fddbcd61d9 100644 --- a/resources/web-environment/package-lock.json +++ b/resources/web-environment/package-lock.json @@ -1,5 +1,5 @@ { "name": "@keymanapp/web-environment", - "version": "15.0.170", + "version": "15.0.171", "lockfileVersion": 1 } diff --git a/resources/web-environment/package.json b/resources/web-environment/package.json index bc8023b518..d29104f85b 100644 --- a/resources/web-environment/package.json +++ b/resources/web-environment/package.json @@ -1,6 +1,6 @@ { "name": "@keymanapp/web-environment", - "version": "15.0.170", + "version": "15.0.171", "description": "A compilation utility for passing select environment variables into our TS builds", "author": "Joshua Horton (https://github.com/jahorton)", "homepage": "https://github.com/keymanapp/keyman", @@ -17,6 +17,6 @@ "url": "https://github.com/keymanapp/keyman/issues" }, "devDependencies": { - "@keymanapp/resources-gosh": "^15.0.170" + "@keymanapp/resources-gosh": "^15.0.171" } } diff --git a/web/package-lock.json b/web/package-lock.json index 8eb85d17da..757d13eeb4 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -1,6 +1,6 @@ { "name": "keyman", - "version": "15.0.170", + "version": "15.0.171", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/web/package.json b/web/package.json index 7f8d36c87c..046a28405c 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "keyman", - "version": "15.0.170", + "version": "15.0.171", "description": "Facilitates text input in any language.", "repository": { "type": "git", @@ -18,8 +18,8 @@ }, "homepage": "https://github.com/keymanapp/keyman#readme", "devDependencies": { - "@keymanapp/resources-gosh": "^15.0.170", - "@keymanapp/web-sentry-manager": "^15.0.170", + "@keymanapp/resources-gosh": "^15.0.171", + "@keymanapp/web-sentry-manager": "^15.0.171", "@sentry/cli": "^1.52.3", "chai": "^4.3.4", "google-closure-compiler-java": "^20200224.0.0", @@ -52,13 +52,13 @@ "sentry-cli": "sentry-cli" }, "dependencies": { - "@keymanapp/input-processor": "^15.0.170", - "@keymanapp/keyboard-processor": "^15.0.170", - "@keymanapp/lexical-model-layer": "^15.0.170", - "@keymanapp/models-types": "^15.0.170", - "@keymanapp/recorder-core": "^15.0.170", - "@keymanapp/web-environment": "^15.0.170", - "@keymanapp/web-utils": "^15.0.170", + "@keymanapp/input-processor": "^15.0.171", + "@keymanapp/keyboard-processor": "^15.0.171", + "@keymanapp/lexical-model-layer": "^15.0.171", + "@keymanapp/models-types": "^15.0.171", + "@keymanapp/recorder-core": "^15.0.171", + "@keymanapp/web-environment": "^15.0.171", + "@keymanapp/web-utils": "^15.0.171", "@types/node": "^11.9.4", "es6-shim": "^0.35.5", "eventemitter3": "^4.0.0" From e3e1035d745ae67946b4c824c1a8a381ed96cdc0 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Fri, 17 Dec 2021 07:07:58 +1100 Subject: [PATCH 36/38] docs(windows): Add note on split user/admin accounts If the computer has split user/admin accounts, then language association may not be completed automatically, and the user may need to add a language association themselves. Ref https://community.software.sil.org/t/what-security-permissions-are-needed-to-install-a-keyboard-configuration-in-keyman/5695/10 Note: the topic `configure-computer` has a terrible url but I won't fix that here. Suggested future fix -- turn `configure-computer` into a redirect to `link-keyboard-to-language` or `associate-keyboard-with-language`? @keymanapp-test-bot skip --- .../src/desktop/help/start/download-and-install-keyboard.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/windows/src/desktop/help/start/download-and-install-keyboard.md b/windows/src/desktop/help/start/download-and-install-keyboard.md index 4d4a1e390d..cd1ddb18c0 100644 --- a/windows/src/desktop/help/start/download-and-install-keyboard.md +++ b/windows/src/desktop/help/start/download-and-install-keyboard.md @@ -71,6 +71,11 @@ Here's how to download and install a Keyman keyboard within Keyman: ![](../desktop_images/download-keyboard-step6.png) + **Note:** If you have a separate administrator account -- that is, you are + prompted to enter a username and password at this point -- you may need to + [add a language association](configure-computer) for your keyboard on your + user account after completing the keyboard installation. + 10. The keyboard will now be installed; you can close Keyman Configuration. ## Installing a Keyman Keyboard from a Folder on Your Computer From f6624f1cd0dd94d91a1299f32835f6bd024365bc Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Fri, 17 Dec 2021 12:43:32 +1100 Subject: [PATCH 37/38] fix(developer): project_mru.xml path --- ...veloper.System.Project.WelcomeRenderer.pas | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/windows/src/developer/TIKE/project/Keyman.Developer.System.Project.WelcomeRenderer.pas b/windows/src/developer/TIKE/project/Keyman.Developer.System.Project.WelcomeRenderer.pas index 2e6e341ae6..0de6a14467 100644 --- a/windows/src/developer/TIKE/project/Keyman.Developer.System.Project.WelcomeRenderer.pas +++ b/windows/src/developer/TIKE/project/Keyman.Developer.System.Project.WelcomeRenderer.pas @@ -23,8 +23,26 @@ uses utilsystem; class function TWelcomeRenderer.ProjectMRUFilename: string; +var + path: string; +const + SMRUFilename = 'project_mru.xml'; begin - Result := GetFolderPath(CSIDL_APPDATA) + SFolderKeymanDeveloper + 'project_mru.xml'; + // Keyman Developer 14 omitted the backslash in the file path + // so it was saving this file in the wrong location. This small patch + // moves the file into the right location. + path := GetFolderPath(CSIDL_APPDATA) + SFolderKeymanDeveloper; + if FileExists(path + SMRUFilename) then + begin + if not DirectoryExists(path) then + CreateDir(path); + if FileExists(path + '\' + SMRuFilename) + then DeleteFile(path + SMRUFilename) + else RenameFile(path + SMRUFilename, path + '\' + SMRUFilename); + end; + // end patch + + Result := path + '\' + SMRUFilename; end; class function TWelcomeRenderer.Render: string; From bf7b6d22f98a37a36729df83d2b6acac5df107c7 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Fri, 17 Dec 2021 13:06:11 +1100 Subject: [PATCH 38/38] chore(developer): add browse4folder to components --- .../src/ext/browse4folder/Browse4Folder.pas | 7 + .../src/global/delphi/keyman_components.dpk | 3 +- .../src/global/delphi/keyman_components.dproj | 442 +++++++++++++++++- 3 files changed, 449 insertions(+), 3 deletions(-) diff --git a/windows/src/ext/browse4folder/Browse4Folder.pas b/windows/src/ext/browse4folder/Browse4Folder.pas index 18a70dd3cc..e72f9dfdd5 100644 --- a/windows/src/ext/browse4folder/Browse4Folder.pas +++ b/windows/src/ext/browse4folder/Browse4Folder.pas @@ -89,6 +89,8 @@ type property ShowTitle: Boolean read FShowTitle write FShowTitle default True; end; +procedure Register; + implementation uses @@ -283,6 +285,11 @@ begin FInitialDir := GetPath(FRoot); end; +procedure Register; +begin + RegisterComponents('Keyman', [TBrowse4Folder]); +end; + initialization OleInitialize(nil); diff --git a/windows/src/global/delphi/keyman_components.dpk b/windows/src/global/delphi/keyman_components.dpk index 7a3129185a..e8ff55bcb3 100644 --- a/windows/src/global/delphi/keyman_components.dpk +++ b/windows/src/global/delphi/keyman_components.dpk @@ -75,6 +75,7 @@ contains KeymanVersion in 'general\KeymanVersion.pas', CloseButtonPageControl in 'comp\CloseButtonPageControl.pas', KeymanDeveloperDebuggerMemo in 'comp\KeymanDeveloperDebuggerMemo.pas', - TextFileFormat in '..\..\developer\TIKE\main\TextFileFormat.pas'; + TextFileFormat in '..\..\developer\TIKE\main\TextFileFormat.pas', + Browse4Folder in '..\..\ext\browse4folder\Browse4Folder.pas'; end. diff --git a/windows/src/global/delphi/keyman_components.dproj b/windows/src/global/delphi/keyman_components.dproj index 63bb82dddd..dab5605791 100644 --- a/windows/src/global/delphi/keyman_components.dproj +++ b/windows/src/global/delphi/keyman_components.dproj @@ -7,7 +7,7 @@ 1 Package VCL - 18.4 + 18.8 Win32 @@ -144,6 +144,7 @@ + Cfg_2 Base @@ -228,7 +229,6 @@ 1 - Contents\MacOS 0 @@ -237,6 +237,20 @@ classes 1 + + classes + 1 + + + + + res\xml + 1 + + + res\xml + 1 + @@ -249,90 +263,242 @@ library\lib\armeabi 1 + + library\lib\armeabi + 1 + + + + + library\lib\armeabi-v7a + 1 + library\lib\mips 1 + + library\lib\mips + 1 + library\lib\armeabi-v7a 1 + + library\lib\arm64-v8a + 1 + + + + + library\lib\armeabi-v7a + 1 + res\drawable 1 + + res\drawable + 1 + res\values 1 + + res\values + 1 + + + + + res\values-v21 + 1 + + + res\values-v21 + 1 + + + + + res\values + 1 + + + res\values + 1 + res\drawable 1 + + res\drawable + 1 + res\drawable-xxhdpi 1 + + res\drawable-xxhdpi + 1 + res\drawable-ldpi 1 + + res\drawable-ldpi + 1 + res\drawable-mdpi 1 + + res\drawable-mdpi + 1 + res\drawable-hdpi 1 + + res\drawable-hdpi + 1 + res\drawable-xhdpi 1 + + res\drawable-xhdpi + 1 + + + + + res\drawable-mdpi + 1 + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + res\drawable-hdpi + 1 + + + + + res\drawable-xhdpi + 1 + + + res\drawable-xhdpi + 1 + + + + + res\drawable-xxhdpi + 1 + + + res\drawable-xxhdpi + 1 + + + + + res\drawable-xxxhdpi + 1 + + + res\drawable-xxxhdpi + 1 + res\drawable-small 1 + + res\drawable-small + 1 + res\drawable-normal 1 + + res\drawable-normal + 1 + res\drawable-large 1 + + res\drawable-large + 1 + res\drawable-xlarge 1 + + res\drawable-xlarge + 1 + + + + + res\values + 1 + + + res\values + 1 + @@ -350,6 +516,10 @@ 1 .framework + + 1 + .framework + 0 @@ -359,6 +529,10 @@ 1 .dylib + + 1 + .dylib + 0 .dll;.bpl @@ -381,6 +555,10 @@ 1 .dylib + + 1 + .dylib + 0 .bpl @@ -390,6 +568,9 @@ 0 + + 0 + 0 @@ -402,6 +583,9 @@ 0 + + 0 + 0 @@ -417,6 +601,17 @@ 1 + + + 1 + + + 1 + + + 1 + + 1 @@ -428,6 +623,39 @@ 1 + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + 1 @@ -439,6 +667,61 @@ 1 + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + 1 @@ -450,6 +733,116 @@ 1 + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + 1 @@ -483,10 +876,35 @@ 1 + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + 1 + + 1 + @@ -512,6 +930,7 @@ 1 + @@ -519,12 +938,20 @@ Contents\Resources 1 + + Contents\Resources + 1 + library\lib\armeabi-v7a 1 + + library\lib\arm64-v8a + 1 + 1 @@ -540,10 +967,19 @@ 1 + + 1 + 0 + + + library\lib\armeabi-v7a + 1 + + 1 @@ -579,7 +1015,9 @@ + + 12