forked from wix-incubator/wix-embedded-mysql
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add NIX and OSX support for 8.0.18 wix-incubator#185
- Loading branch information
Showing
6 changed files
with
79 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...bedded-mysql/src/main/java/com/wix/mysql/distribution/fileset/Nix80_18FileSetEmitter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.wix.mysql.distribution.fileset; | ||
|
||
import com.wix.mysql.distribution.Version; | ||
import de.flapdoodle.embed.process.config.store.FileSet; | ||
import de.flapdoodle.embed.process.config.store.FileType; | ||
import de.flapdoodle.embed.process.distribution.Platform; | ||
|
||
import java.util.Objects; | ||
|
||
import static de.flapdoodle.embed.process.config.store.FileType.Executable; | ||
import static de.flapdoodle.embed.process.config.store.FileType.Library; | ||
import static de.flapdoodle.embed.process.distribution.Platform.OS_X; | ||
|
||
public class Nix80_18FileSetEmitter extends Nix implements FileSetEmitter { | ||
@Override | ||
public boolean matches(Platform platform, Version version) { | ||
return platform.isUnixLike() && (Platform.detect() != OS_X) | ||
&& Objects.equals(version.getMajorVersion(), "8.0") | ||
&& version.getMinorVersion() > 17; | ||
} | ||
|
||
@Override | ||
public FileSet emit() { | ||
return FileSet.builder() | ||
.addEntry(Executable, "bin/mysqld") | ||
.addEntry(Library, "bin/mysql") | ||
.addEntry(Library, "bin/mysqladmin") | ||
.addEntry(Library, "bin/my_print_defaults") | ||
.addEntry(Library, "share/english/errmsg.sys") | ||
.addEntry(Library, "lib/libssl.so.1.1") | ||
.addEntry(Library, "lib/libcrypto.so.1.1") | ||
.addEntry(Library, "lib/private/protobuf-lite.so.3.6.1") | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...bedded-mysql/src/main/java/com/wix/mysql/distribution/fileset/OSX80_18FileSetEmitter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.wix.mysql.distribution.fileset; | ||
|
||
import com.wix.mysql.distribution.Version; | ||
import de.flapdoodle.embed.process.config.store.FileSet; | ||
import de.flapdoodle.embed.process.distribution.Platform; | ||
|
||
import java.util.Objects; | ||
|
||
import static de.flapdoodle.embed.process.config.store.FileType.Executable; | ||
import static de.flapdoodle.embed.process.config.store.FileType.Library; | ||
import static de.flapdoodle.embed.process.distribution.Platform.OS_X; | ||
|
||
public class OSX80_18FileSetEmitter extends Nix implements FileSetEmitter { | ||
@Override | ||
public boolean matches(Platform platform, Version version) { | ||
return (Platform.detect() == OS_X) | ||
&& Objects.equals(version.getMajorVersion(), "8.0") | ||
&& version.getMinorVersion() > 17; | ||
} | ||
|
||
@Override | ||
public FileSet emit() { | ||
return FileSet.builder() | ||
.addEntry(Executable, "bin/mysqld") | ||
.addEntry(Library, "bin/mysql") | ||
.addEntry(Library, "bin/mysqladmin") | ||
.addEntry(Library, "bin/my_print_defaults") | ||
.addEntry(Library, "share/english/errmsg.sys") | ||
.addEntry(Library, "lib/libssl.1.1.dylib") | ||
.addEntry(Library, "lib/libcrypto.1.1.dylib") | ||
.addEntry(Library, "lib/libprotobuf-lite.3.6.1.dylib") | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters