platform/core/dotnet/launcher.git
3 years agoSupport regen-app-ni for read-only app (#301)
조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 [Thu, 24 Dec 2020 00:52:44 +0000 (09:52 +0900)]
Support regen-app-ni for read-only app (#301)

When a partial update of tizenfx occurs, native image files of application created with FNV option  must be regenerated.
However, it is not possible with the current implementation to replace the native-image files of the app installed in the read-only area like the preload app.
To solve this problem, add a functionality that creates new native images under /opt/usr/dotnet/apps, when creating a new native image files of read-only app.

3 years agoAdd dotnet-launcher test case - Apps
j-h.choi [Wed, 2 Dec 2020 08:25:52 +0000 (17:25 +0900)]
Add dotnet-launcher test case - Apps

Change-Id: If85502bb88b3f72274b0a618c3f82aad9c67f3d7

3 years agoAdd dotnet-launcher test case - Script
j-h.choi [Tue, 1 Dec 2020 07:40:12 +0000 (16:40 +0900)]
Add dotnet-launcher test case - Script

Change-Id: Ief02095307e51f8237c34e818bc7697cdecf5319

3 years agoAdd "--resolve-all-app" option to dotnettool
Woongsuk Cho [Tue, 22 Dec 2020 04:16:52 +0000 (13:16 +0900)]
Add "--resolve-all-app" option to dotnettool

A patch that resolves the "bin/runtimes" directory to support multi-targeting at the app installation time was added after Tizen 6.0.
After applying this patch, it has been changed to no longer refer to the "bin/runtimes" directory of the application.
However, if the target is upgraded by FOTA, installed applications may have "bin/runtimes" directory.

To solve this problem, "--resolve-all-app" option is added to dotnettool and the FOTA script is also updated.
When you run below command, all installed .net application's platform specific files are resolved.

3 years agoModify the ownership of TAC and Remove unnecessary logs
j-h.choi [Tue, 6 Oct 2020 05:31:35 +0000 (14:31 +0900)]
Modify the ownership of TAC and Remove unnecessary logs

Change-Id: Ie50d7d54069d4ae160ab444a8bae5260ccb9449f

3 years agoChange the logic to check the native image with ildasm
j-h.choi [Thu, 5 Nov 2020 06:45:07 +0000 (15:45 +0900)]
Change the logic to check the native image with ildasm

Change-Id: Ie6bfcf378ea4bd3edd4708ea7f6bfd2fd5d8a104

3 years agoResolve platform specific path at install time
Woongsuk Cho [Wed, 21 Oct 2020 05:12:26 +0000 (14:12 +0900)]
Resolve platform specific path at install time

If you publish .NET Application without RID designation, it is generated to cross-platform type.
If the .NET application uses a NuGet package that has platform-specific implementations,
all platforms' dependencies are copied to the publish folder along with the app.
(refer to https://docs.microsoft.com/en-us/dotnet/core/deploying)

Libraries and assemblies used for each platform are stored in different locations according to RID and TFM as follows.
(refer to https://natemcmaster.com/blog/2016/05/19/nuget3-rid-graph)

.NET Runtime finds the most suitable paths for its execution environment and uses it by setting APP_PATH and NATIVE_LIBRARY_SEASRCHING_PATH.
These path is set in the coreclr_initializae() function.

Unfortunately, in the case of the candidate process, we cannot specify these kind of paths because a application has not been fixed yet.
So, in the current implementation, all possible combinations of paths are added in priority order.
For this reason, unnecessarily long path settings are being transferred to runtime.

To solve this problem, at the time of installation, I try to change it as if the application was published with the RID setting.
In detail, find the best matched RID and TFM path in the application, and move all contents in them to the "bin" folder.
After then, we can remove runtimes foldr.

The results after resolving are the same as those performed by specifying RID during publish.

3 years agoEnable generation of .pdb file in release mode
j-h.choi [Mon, 19 Oct 2020 08:18:52 +0000 (17:18 +0900)]
Enable generation of .pdb file in release mode

Change-Id: If76917e66fd15cad0c6b9478c7814538b0a62a42

3 years agoAdd PATH setting at rw update script (#300) accepted/tizen/unified/20201204.123015 submit/tizen/20201203.065405
조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 [Thu, 3 Dec 2020 06:41:00 +0000 (15:41 +0900)]
Add PATH setting at rw update script (#300)

Security Test return "FAIL" if shell script doesnot contain PATH setting,
even though all command line tool is executed as absolute path.
So, to avoid unnecessary failure, add PATH setting at shell script

3 years agoRegenerate native image for TAC at FOTA (#298)
조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 [Tue, 1 Dec 2020 07:58:49 +0000 (16:58 +0900)]
Regenerate native image for TAC at FOTA (#298)

3 years agoUse _tmpfilesdir macro accepted/tizen/unified/20201201.124759 submit/tizen/20201201.001900
Woongsuk Cho [Mon, 30 Nov 2020 04:46:50 +0000 (13:46 +0900)]
Use _tmpfilesdir macro

Location of conf file to create temporary files is changed
from /etc/tmpfiles.d to /usr/lib/tmpfiles.d.
So, use macro insteadof real path.

3 years agofix typo : path --> patch (#295)
조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 [Thu, 12 Nov 2020 04:26:02 +0000 (13:26 +0900)]
fix typo : path --> patch (#295)

4 years agoadd rw update script to support FOTA (#294)
조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 [Thu, 12 Nov 2020 03:51:07 +0000 (12:51 +0900)]
add rw update script to support FOTA (#294)

regenerate application's native image when FOTA done

4 years agoUse multi-user support pkgmgrinfo API
Woongsuk Cho [Tue, 6 Oct 2020 00:56:54 +0000 (09:56 +0900)]
Use multi-user support pkgmgrinfo API

pkgmgrinfo API provides an API set that considers multi-user.
This patch is for clean-up multi-user related API.

4 years agoAdd missing smack label setting for preloaded app (#286) accepted/tizen_6.0_unified_hotfix tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.120828 accepted/tizen/6.0/unified/hotfix/20201103.050913 accepted/tizen/unified/20201005.101327 submit/tizen/20201005.025011 submit/tizen_6.0/20201029.205103 submit/tizen_6.0_hotfix/20201102.192503 submit/tizen_6.0_hotfix/20201103.114803 tizen_6.0.m2_release
조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 [Mon, 28 Sep 2020 00:43:42 +0000 (09:43 +0900)]
Add missing smack label setting for preloaded app (#286)

In the case of preload app installation, the smack label may not be changed automatically.
This patch add that kind of missing smack label setting

4 years agoModify ln option in spec (#285) accepted/tizen/unified/20200925.054823 submit/tizen/20200924.075429
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Thu, 24 Sep 2020 21:16:55 +0000 (06:16 +0900)]
Modify ln option in spec (#285)

Change-Id: Idaa6b3c655b579579010f964cd773a2aa2663169

4 years agoSupport for architecture-specific assemblies in a folder named runtimes (#276)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Thu, 24 Sep 2020 07:53:02 +0000 (16:53 +0900)]
Support for architecture-specific assemblies in a folder named runtimes (#276)

Change-Id: I55399888f14f37e4c82c9ad2713918b05a0e87fb

4 years agoFixed build warning in i586, x86_64 (#283)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Thu, 24 Sep 2020 07:52:07 +0000 (16:52 +0900)]
Fixed build warning in i586, x86_64 (#283)

Change-Id: Ib243a6e405fae7bd5b278c286935b05a486c071d

4 years agoRemove unnecessary command name changing code (#284)
조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 [Thu, 24 Sep 2020 07:51:59 +0000 (16:51 +0900)]
Remove unnecessary command name changing code (#284)

Because executable name for nui loader is changed to dotnet-nui-loader,
there is no need to change command name for candidate process.
Additionally, add apptype to extra for dotnet-nui loader.

4 years agoAdd ibcdata for aarch64 (#282)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Thu, 24 Sep 2020 07:51:49 +0000 (16:51 +0900)]
Add ibcdata for aarch64 (#282)

Change-Id: Ie631305a700966591cdc4593b4b79800ca9228eb

4 years agoAdd symlink to distinguish candidate process
Hyungju Lee [Wed, 16 Sep 2020 04:19:44 +0000 (13:19 +0900)]
Add symlink  to distinguish candidate process

Change-Id: I1e8071313b5576904d7a5c569102288f166fb819

4 years agoAdded smack permissions for the .tac_symlink folder in preload install accepted/tizen/unified/20200915.113754 submit/tizen/20200915.041858
j-h.choi [Fri, 11 Sep 2020 06:09:50 +0000 (15:09 +0900)]
Added smack permissions for the .tac_symlink folder in preload install

Change-Id: Idb91cea264c7b6802b6723eca2d686c12efc865d

4 years agoModified to check the exists of the preload directory
j-h.choi [Wed, 9 Sep 2020 08:15:11 +0000 (17:15 +0900)]
Modified to check the exists of the preload directory

Change-Id: I76bf379c055b807642d6ec824dec502830a0ab73

4 years agoModify the bf::exists function to check error.value (#275) accepted/tizen/unified/20200907.144053 submit/tizen/20200901.065247
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Thu, 3 Sep 2020 22:30:31 +0000 (07:30 +0900)]
Modify the bf::exists function to check error.value (#275)

Change-Id: I2dc642bfd18c8d3ddb476fcb086f6e6519d8bc7c

4 years agoSupport PBA on aarch64
Woongsuk Cho [Fri, 28 Aug 2020 05:12:57 +0000 (14:12 +0900)]
Support PBA on aarch64

Enable PBA on aarch64 architecture,
and change formmater to support both 32bit and 64bit.

4 years agoAdd missing header
j-h.choi [Tue, 1 Sep 2020 03:36:56 +0000 (12:36 +0900)]
Add missing header

Change-Id: I827bf7d54b3d415b365968961bdde9a28ba4891e

4 years agoWrap bf::exists() to check for exception submit/tizen/20200828.012148
j-h.choi [Fri, 21 Aug 2020 01:54:41 +0000 (10:54 +0900)]
Wrap bf::exists() to check for exception

Change-Id: I0facee498025112514ea16416052d148eaccb04c

4 years agoWrap bf::exists() to check for exception. (#270) accepted/tizen/unified/20200820.034645 submit/tizen/20200818.081345
조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 [Tue, 18 Aug 2020 08:02:14 +0000 (17:02 +0900)]
Wrap bf::exists() to check for exception. (#270)

bf::exists() can throw exception. To avoid crash by exception, exist() which wrap bf::exists() is added.

4 years agoAdded error handling for failures during the TAC (#262)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Tue, 18 Aug 2020 07:53:27 +0000 (16:53 +0900)]
Added error handling for failures during the TAC (#262)

Change-Id: I723505929933af4132666f42db27d4dac16b6d9a

4 years agoDelete unused libraries when installing the application (#269)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Tue, 18 Aug 2020 07:46:43 +0000 (16:46 +0900)]
Delete unused libraries when installing the application (#269)

Change-Id: I984b1ba19f2190504b912ee9a70a501e978c0d71

4 years agoModified function name for readability (#263)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Fri, 14 Aug 2020 00:55:09 +0000 (09:55 +0900)]
Modified function name for readability (#263)

Change-Id: Ia573149eb300989156a941427f8007c17514627b

4 years agoFixed the wrong base addr being used (#267) accepted/tizen/unified/20200812.143852 submit/tizen/20200812.015836
조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 [Wed, 12 Aug 2020 01:51:59 +0000 (10:51 +0900)]
Fixed the wrong base addr being used (#267)

A pointer of a temporally created string object is put into a vector in
the "if" statement. So, wrong value is set for /BaseAddress option.

4 years agoRemove debug pipe for candidate process accepted/tizen/unified/20200811.050502 submit/tizen/20200811.005032
Woongsuk Cho [Mon, 10 Aug 2020 07:15:00 +0000 (16:15 +0900)]
Remove debug pipe for candidate process

The debug pipe created in the candidate process has a "User" label.
As a result, smack deny occurs when app process try to access the debug pipe.
Also, since debugging is performed only in standalone mode, the debug pipe does not be used in the candidate process

4 years agoChange to execute SQL commands simply (#265) accepted/tizen/unified/20200810.123138 submit/tizen/20200807.080009
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Fri, 7 Aug 2020 07:58:43 +0000 (16:58 +0900)]
Change to execute SQL commands simply (#265)

Change-Id: I34f793661b41700a9ebf2cb1b75334434a5cdc3f

4 years agoSupport for TLC(Tizen Library cache) (#260)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Wed, 5 Aug 2020 05:53:19 +0000 (14:53 +0900)]
Support for TLC(Tizen Library cache) (#260)

Change-Id: I4f65011e89af4b3d4fcd4b9890c2d83ea3b983f1

4 years ago[SVACE] remove unnecessary check code. (#259) accepted/tizen/unified/20200709.030139 submit/tizen/20200708.002229
조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 [Wed, 8 Jul 2020 08:55:47 +0000 (17:55 +0900)]
[SVACE] remove unnecessary check code. (#259)

SVACE request us to change strerror to strerror_r for thread safety.
But, there is no need to call access() and strerror() function for error case.

So, remove unnecessary check code.

4 years agoModification of lchown for ni file in .tac_symlink (#258)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Wed, 8 Jul 2020 08:55:37 +0000 (17:55 +0900)]
Modification of lchown for ni file in .tac_symlink (#258)

Change-Id: I09594fae53d991f49161da4b96e8b3b7ee2f598e

4 years agoCode cleanup and Add missing flag (#257)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Wed, 8 Jul 2020 08:55:26 +0000 (17:55 +0900)]
Code cleanup and Add missing flag (#257)

Change-Id: I9e882fd196edb192c61641c7394fb18531293401

4 years agoRefactoring path manager
Woongsuk Cho [Mon, 29 Jun 2020 03:50:55 +0000 (12:50 +0900)]
Refactoring path manager

The existing path manager provided only the function to create and provide TPA with some directories (runtime/tizenfx/etc).
As a result, a lot of path related duplicate code was used in launcher internal code,

To modify this, the PathManager was refactored as follows:
  1. The paths required for app execution and native image creation are obtained through path manager.
  2. The path manager is created as an object so that it can be maintained and managed where it is needed.
  3. The dependency between path manager and the plugin manager has been removed.
  4. Platform assembly searching path can be updated. (To support dotnet-plugin, system library upgrade)
  5. The nitool doesnot supported any more
  6. --ni-pkg-dll option is removed from dotnettool
  7. TPA related code is moved out from PathManager

Interface change
  1. The parameter of initNICommon() function is removed.
  2. Some functions in ni_common.h, tac_common.h are removed or changed

4 years agoFixed build warning (#256)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Tue, 7 Jul 2020 01:06:48 +0000 (10:06 +0900)]
Fixed build warning (#256)

Change-Id: I2f7f6f63651086b3106b966e10a2d4cbc80149ab

4 years agoCreate separated candidate process to preload NUI (#245) accepted/tizen/unified/20200703.155019 submit/tizen/20200703.075955 submit/tizen_5.5/20200629.221218
조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 [Thu, 2 Jul 2020 02:33:16 +0000 (11:33 +0900)]
Create separated candidate process to preload NUI (#245)

NUI cannot be preloaded with ElmSharp because those two UI related
module create window while preloading.

When multiple windows are created, it not only increases the memory usage,
but also affects the launching effect and splash screen.

So, create new candidate process for NUI

Assumption
  NUI app has their own apptype "dotnet-nui"
  There are two candidate process. One is for "ElmSharp" and The other is for "NUI"
  XSF is related to "ElmSharp"

Basic Operation
  Set extra value "TIZEN_UIFW" to bundle by loader script. (ElmSharp and NUI)
  Get extra value from bundle in the *__loader_create_cb function and set that to environment.
  Get environment in the preload() method in the Tizen.Runtime.cs
  Skip "ElmSharp" or "NUI" preloading by TIZEN_UIFW

4 years agoRefactoring CoreRuntime and plugin (#247) accepted/tizen/unified/20200630.131320 submit/tizen/20200629.221257
조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 [Mon, 29 Jun 2020 21:52:56 +0000 (06:52 +0900)]
Refactoring CoreRuntime and plugin (#247)

* Pass apptype to plugin insteadof mode

The meaning of the mode that is delivered during plugin initialization is not clear.
And, VD plugin use mode to distinguish app-type.

So, change the parameter of plugin_initialize from mode to apptype.
Also, the script was modified to obtain the apptype in the candidate process.

The parameter of the CoreRuntime constructor was also unnecessary and deleted.

* Change CoreRuntime to static class

CoreRuntime is a wrapper class of .NET Runtime (coreclr),
So, that cannot be created with multiple instance, and cannot be called
multiple times.

So, I changed CoreRuntime to static class which contains only static functions.
Also, it was changed to explicitly call what was called as a destructor.

Additionally, some function name and file name have been changed.

4 years agoSeperate the pluginDir and extraDir from the path manager (#252)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Mon, 29 Jun 2020 21:52:29 +0000 (06:52 +0900)]
Seperate the pluginDir and extraDir from the path manager (#252)

Change-Id: If710a702feaaa4e1e9047c346c9a656920dcb921

4 years agoCheck ascii casing in the candidate process (#254)
조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 [Mon, 29 Jun 2020 21:51:32 +0000 (06:51 +0900)]
Check ascii casing in the candidate process (#254)

If current culture's casing for ASCII is the same as invariant, it can take a fast path than calling out to the OS for culture-aware casing.
However, in certain languages, the "ascii casing check function" may be significantly slowed down.
To avoid that kind situation, call it in advance on the candidate process.

4 years agoSupport for aarch64(arm64) build (#250) accepted/tizen/5.5/unified/20200623.152346 accepted/tizen/unified/20200623.124121 submit/tizen/20200622.225420 submit/tizen_5.5/20200623.003918
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Thu, 18 Jun 2020 09:49:01 +0000 (18:49 +0900)]
Support for aarch64(arm64) build (#250)

Change-Id: Iabaf37988ddbd44388f51defbe1e2e3642937c47

4 years agoCode cleanup (#251)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Thu, 18 Jun 2020 04:11:11 +0000 (13:11 +0900)]
Code cleanup (#251)

Change-Id: Ibf9d8fe72f68384ab2f2431d926251e88f2ea9ff

4 years agoCheck the native image with ildasm when using --ni* option of dotnettool (#167)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Thu, 18 Jun 2020 04:10:33 +0000 (13:10 +0900)]
Check the native image with ildasm when using --ni* option of dotnettool (#167)

Change-Id: I351c1c1978c6daa24a7cb2378ed3206df43c11eb

4 years agoRemove unused file(#241-dotnet.preload.list) (#246)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Thu, 18 Jun 2020 04:10:13 +0000 (13:10 +0900)]
Remove unused file(#241-dotnet.preload.list) (#246)

Change-Id: I85e211b411514fae4d760e6401f77e50f589753b

4 years agoUpdate package version to 3.1.3 (#243)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Thu, 11 Jun 2020 01:12:20 +0000 (10:12 +0900)]
Update package version to 3.1.3 (#243)

Change-Id: I3f84c804e3d384aeb2f9b12a80cc0c414ee470f9

4 years agoModified to pass the argument by constant reference (#242)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Thu, 11 Jun 2020 01:11:57 +0000 (10:11 +0900)]
Modified to pass the argument by constant reference (#242)

Change-Id: I32016827498c178c7e29224cecb465a605731804

4 years agoMinor readability fix (#244)
이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 [Thu, 11 Jun 2020 01:11:35 +0000 (10:11 +0900)]
Minor readability fix (#244)

Change-Id: I5fcf45f8a9809e832bc0ebf622c8167eb83f0ba1

4 years agoUse preload file in hydra loader (#241) accepted/tizen/5.5/unified/20200608.142148 accepted/tizen/unified/20200608.144752 submit/tizen/20200607.233857 submit/tizen_5.5/20200607.233848
조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 [Sun, 7 Jun 2020 23:30:35 +0000 (08:30 +0900)]
Use preload file in hydra loader (#241)

The preloading list of candidate processes is obtained through the preload file.
The hydra loader has been modified to obtain the preloading assembly list through the same method.

libdotnet-launcher-util.so should not be linked to hydra loader because some
linked libraries create socket in the static initializer and that makes
problem after forking.
So, some functions (absolutePath, isFileExist, replaceAll) is copied
from utils.cc to hydra_main.cc

Know issue :
When System.Private.CoreLib.dll is preloaded in the current hydra loader,
System.Private.CoreLib.dll is loaded again in the candidate process, and that is not shared.
This issus should be checked later.

4 years agoUpdate ibcdata(DayR800XX_20200528.001) (#238)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Tue, 2 Jun 2020 04:56:43 +0000 (13:56 +0900)]
Update ibcdata(DayR800XX_20200528.001) (#238)

Change-Id: Idf35d938e1020879b9d1f1b10b82f2412d2a7317

4 years agoFixed the bug to the '--ibc-dir' option (#239)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Tue, 2 Jun 2020 04:56:26 +0000 (13:56 +0900)]
Fixed the bug to the '--ibc-dir' option (#239)

Change-Id: I512be0bc7fb815080d8979f35c66605cb9f4a41c

4 years agoAdd gbs-support sub rpm package (#237) accepted/tizen/5.5/unified/20200601.002428 accepted/tizen/unified/20200529.124052 submit/tizen/20200529.025545 submit/tizen_5.5/20200529.025604
최원영/Common Platform Lab(SR)/Staff Engineer/삼성전자 [Fri, 29 May 2020 02:53:56 +0000 (11:53 +0900)]
Add gbs-support sub rpm package (#237)

* Add gbs-support sub rpm package

Add a sub package containing dotnet-corerun (,a copy of dotnet) to
avoid file conflicts (/usr/bin/dotnet) with dotnet-build-tools.

* Update dotnet-launcher.spec

4 years agoFix rid fallback graph making logic (#236) accepted/tizen/5.5/unified/20200528.043046 accepted/tizen/unified/20200528.132837 submit/tizen/20200528.002636 submit/tizen_5.5/20200528.002729
조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 [Thu, 28 May 2020 00:25:15 +0000 (09:25 +0900)]
Fix rid fallback graph making logic (#236)

RID tizen-[version]-armel, tizen-[version] is missed.
And, /usr/share/dotnet.tizen/netcoreapp and /usr/share/dotnet.tizen/lib should be checked first.

Afterwards, when the function of loading the app dll first comes in,
the order of searching this native library must also be changed.

4 years agoShow the warning log when preload skip (#230)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Tue, 26 May 2020 21:34:47 +0000 (06:34 +0900)]
Show the warning log when preload skip (#230)

Change-Id: Ifd9a28c26cecbb996c9452db3bb57930e0311224

4 years agoRemove unnecessary binary dependency (#234)
조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 [Tue, 26 May 2020 21:33:11 +0000 (06:33 +0900)]
Remove unnecessary binary dependency (#234)

dotnet doesnot use AUL and CoreRuntime.
So, clean up CMakeList.txt file.

4 years agoFix bugs when generating SPC.ni with --ni-dll option (#235)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Tue, 26 May 2020 21:32:46 +0000 (06:32 +0900)]
Fix bugs when generating SPC.ni with --ni-dll option (#235)

Change-Id: I7f70ec0bf9b4a227b0f11fe35a4080f7685116a3

4 years agoRefactoring the dotnettool (#231)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Mon, 25 May 2020 07:55:10 +0000 (16:55 +0900)]
Refactoring the dotnettool (#231)

Change-Id: Ia41c0548849338b67e9eee143f4b52c74719fadf

4 years agoadd script to generate native image at mic (#232)
조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 [Mon, 25 May 2020 07:51:04 +0000 (16:51 +0900)]
add script to generate native image at mic (#232)

4 years agoHide the preload path from the dlog (#229)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Mon, 11 May 2020 00:46:23 +0000 (09:46 +0900)]
Hide the preload path from the dlog (#229)

Change-Id: Ie3cfb0f8b17d12d238921ff03b2e1f02bad7f7f9

4 years agoIntegrate managed code into Tizen.Runtime (#228)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Thu, 7 May 2020 04:49:03 +0000 (13:49 +0900)]
Integrate managed code into Tizen.Runtime (#228)

Change-Id: I8dde5eca0a3115b5ae2eac2527810529f11ebfbb

4 years agoApply rules to .preload file name (#227)
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Thu, 7 May 2020 04:40:28 +0000 (13:40 +0900)]
Apply rules to .preload file name (#227)

Change-Id: I2adb4deab7d10a680c8d08fa7d631ffe1d267380

4 years agoSort preload files by name due to dependencies of each module (#225) accepted/tizen/5.5/unified/20200429.140214 accepted/tizen/unified/20200429.051913 submit/tizen/20200429.120649 submit/tizen_5.5/20200429.120457
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Wed, 29 Apr 2020 02:37:58 +0000 (11:37 +0900)]
Sort preload files by name due to dependencies of each module (#225)

Change-Id: I4addc2fc049eeb9433f32fb85723d7b6194bed9f

4 years agoAdd .ibc file for Store Apps (#223) accepted/tizen/5.5/unified/20200427.221802 accepted/tizen/unified/20200427.125751 submit/tizen/20200427.054923 submit/tizen_5.5/20200427.054914
최종헌/Common Platform Lab(SR)/Engineer/삼성전자 [Mon, 27 Apr 2020 05:47:50 +0000 (14:47 +0900)]
Add .ibc file for Store Apps (#223)

Change-Id: Iec61395d777557a6fa98cbddf1aebd037720c734

4 years agoDo not need to check if the Tizen.Runtime.dll exists
j-h.choi [Fri, 24 Apr 2020 05:12:41 +0000 (14:12 +0900)]
Do not need to check if the Tizen.Runtime.dll exists

Change-Id: Id645fec023398e52d8caadde300c3f057d2ad66d

4 years agoSupport for preload of ElmSharp and preload.list file
j-h.choi [Wed, 1 Apr 2020 01:12:49 +0000 (10:12 +0900)]
Support for preload of ElmSharp and preload.list file

Change-Id: I1da11acef01294963950d0f2027791c8b70f6063

4 years agoremove exec capability setting
Woongsuk Cho [Fri, 24 Apr 2020 04:48:53 +0000 (13:48 +0900)]
remove exec capability setting

4 years agoDo not pass a native image path to coreclr_execute_assembly (#222)
김상욱/Common Platform Lab(SR)/Engineer/삼성전자 [Fri, 24 Apr 2020 02:37:07 +0000 (11:37 +0900)]
Do not pass a native image path to coreclr_execute_assembly (#222)

Passing a native image path will result in a BadImageFormatException

4 years agoFix to call CoreRuntime dispose() accepted/tizen/unified/20200422.032241 submit/tizen/20200421.041317
Hyungju Lee [Tue, 21 Apr 2020 02:16:38 +0000 (11:16 +0900)]
Fix to call CoreRuntime dispose()

Change-Id: I33f4a07bee4b69195f331952acb699b39e17c9e9

4 years agoRemove dependency of main pkg from devel pkg accepted/tizen/unified/20200416.080012 submit/tizen/20200416.045802
Hyungju Lee [Thu, 16 Apr 2020 03:22:46 +0000 (12:22 +0900)]
Remove dependency of main pkg from devel pkg

Change-Id: Ic058436eb9a34168bb243ce89b4eae4a0ce945e6

4 years agoAdd flags to the install plugin to avoid duplicate execution accepted/tizen/unified/20200413.222040 submit/tizen/20200413.110328
j-h.choi [Thu, 13 Feb 2020 06:46:55 +0000 (15:46 +0900)]
Add flags to the install plugin to avoid duplicate execution

Change-Id: If3297d4939cfbbcc4be106c849bb2b1334213ede

4 years agoRework dotnet executable (#204)
김상욱/Common Platform Lab(SR)/Engineer/삼성전자 [Mon, 13 Apr 2020 03:02:36 +0000 (12:02 +0900)]
Rework dotnet executable (#204)

* Re-implement dotnet binary

* Implement additional switches

* Remove corerun-related code from dotnet_launcher.cc

* Update code formatting

* Fix addAssembliesFromDirectories logic and refactor

* Fix the usage of depth parameter

* Organize command line options

* Minor fixes

4 years agoEnable diagnostics for .NET app
Woongsuk Cho [Fri, 10 Apr 2020 01:13:39 +0000 (10:13 +0900)]
Enable diagnostics for .NET app

In the previous implementation, COMPlus_EnableDiagnostics is set to 0 to avoid creating clr-debug-pipe file.
But, from coreclr 3.1.0, that environment setting also affects the creation of diagnostics socket file.

To enable diagnostics at candidate process, set COMPlus_EnableDiagnostics to 1.

4 years agoUpdate version to 3.1
Hyungju Lee [Fri, 10 Apr 2020 08:23:44 +0000 (17:23 +0900)]
Update version to 3.1

Change-Id: Id0aa148579aed78dd2cc39211cd9b2f8c48a10e4

4 years agoIn some specific language (az, tr, ku, etc), FileNotFoundException is occurred even... accepted/tizen/unified/20200413.070825 submit/tizen/20200410.075941
Woongsuk Cho [Thu, 9 Apr 2020 06:33:01 +0000 (15:33 +0900)]
In some specific language (az, tr, ku, etc), FileNotFoundException is occurred even though the dll exist.

coreclr keep TPA lists at hashmap(SimpleNameToFileNameMap) in the applicationcontext.
To add TPA to hashmap, hash code is generated by hash() function with simple name of dll.
In that hash function, towupper() function is used.
The return value of towupper() can be changed by locale setting.

Also, when lookup in hashmap, towlower() function is called for comparing values,
and the return value of this function also changed according to locale.

To prevent key mismatch issue by locale change, set to the locale before coreclr_initialize().

4 years agoBug-fix: fix wrong probe path for corerun mode.
Woongsuk Cho [Thu, 9 Apr 2020 21:44:39 +0000 (06:44 +0900)]
Bug-fix: fix wrong probe path for corerun mode.

4 years agoseperate executable to apply User execute label to dotnet-loader
Woongsuk Cho [Thu, 26 Mar 2020 03:38:20 +0000 (12:38 +0900)]
seperate executable to apply User execute label to dotnet-loader

4 years agoChange the ownership of the pdb file
j-h.choi [Mon, 6 Apr 2020 01:40:13 +0000 (10:40 +0900)]
Change the ownership of the pdb file

Change-Id: Id3a6d3a3272b5f140b11c0f49004861c66d61cc8

4 years agoUse absolute path of input dll path.
Woongsuk Cho [Tue, 31 Mar 2020 04:46:18 +0000 (13:46 +0900)]
Use absolute path of input dll path.

If only the dll file name is entered as an input parameter without a path, it does not work properly.
To solve that issue, get the absolute path from dll file, and pass that to coreclr

4 years agoSet environment (LANG, LC_MESSAGE, LC_ALL) before using ICU API. accepted/tizen/unified/20200402.155646 submit/tizen/20200401.004644
Woongsuk Cho [Tue, 31 Mar 2020 03:38:39 +0000 (12:38 +0900)]
Set environment (LANG, LC_MESSAGE, LC_ALL) before using ICU API.

In order to operate ICU (used for globalization) normally, "LANG" and "LC_ALL" environment variables must be set before using ICU API.
In case of application running, AppFW set that variable. But when preloading the dll in the candidate process,
those environment variables are not set.
As a result, CultureInfo is incorrectly generated and malfunctions.
For example, uloc_getDefault() returns en_US_POSIX, CultureInfo is set to invariant mode.

Additionally, to apply language setting from native to managed, terminate and recreate candidate process when system language setting is changed.

After applying this patches, launching performance is reduced by 15ms ~ 20ms.
That is because previous .net application is launched in invariant mode.
(In invariant mode, string-related operations are fast.)

4 years agoUse root path only for corerun mode.
Woongsuk Cho [Thu, 26 Mar 2020 04:53:26 +0000 (13:53 +0900)]
Use root path only for corerun mode.

In the current implementation, app's "/bin"  and "/lib" path are set to app_path for coreclr_initialization().
So, when running corerun mode, there is a problem that the assembly in the same directory cannot be found,
but rather, the assembly under "/bin" and "/lib" can be loaded.

4 years agocall ecore_init() in the CoreRuntime constructor.
Woongsuk Cho [Thu, 26 Mar 2020 03:40:20 +0000 (12:40 +0900)]
call ecore_init() in the CoreRuntime constructor.

ecore_init() must called before CoreRuntime initialization.
But, sometimes, calling ecore_init() is missed by mistake.
In order to prevent this mistake, call ecore_init() in the constructor of CoreRuntime.

4 years agoRemove "User" execute label from dotnet-launcher accepted/tizen/unified/20200324.101531 submit/tizen/20200324.021321
Woongsuk Cho [Tue, 24 Mar 2020 01:51:30 +0000 (10:51 +0900)]
Remove "User" execute label from dotnet-launcher

When .NET application launched by standalone mode, launchpad fork & exec the executable.
In that case, process smack label is set to execute label of executable.
(Fail to change smack label to application)
To avoid this issue, remove execute label

4 years agoremove unused variable accepted/tizen/unified/20200323.172926 submit/tizen/20200323.040423
Woongsuk Cho [Mon, 23 Mar 2020 02:16:03 +0000 (11:16 +0900)]
remove unused variable

4 years agoRemove unnecessary ecore_init()
Hyungju Lee [Mon, 23 Mar 2020 00:07:00 +0000 (09:07 +0900)]
Remove unnecessary ecore_init()

Change-Id: I8b882808784f8d5bf2fa6833073742fc9f1d447f

4 years agoChange the name of the define directory(/opt/usr/dotnet) accepted/tizen/unified/20200319.131234 submit/tizen/20200318.232027
j-h.choi [Tue, 17 Mar 2020 05:52:37 +0000 (14:52 +0900)]
Change the name of the define directory(/opt/usr/dotnet)

Change-Id: Ia1b4090f30236c3390a2d89ab993f41e23698fab

4 years agoModify the standard output and error in fprintf
j-h.choi [Wed, 18 Mar 2020 01:39:29 +0000 (10:39 +0900)]
Modify the standard output and error in fprintf

Change-Id: Ib266a4833eccdfb63b30d9ff1b5dffb71858cb82

4 years agolog manager code cleanup
Woongsuk Cho [Wed, 18 Mar 2020 08:02:08 +0000 (17:02 +0900)]
log manager code cleanup

- log redirection is handled in log manager
- log redirection can be turn on / off by calling initializeLogManager() function
- runLoggingThread function is merged to initializeLogManager
- unhanded exception check code is removed
- in corerun mode, log manager disabled

4 years agoSet exec label of dotnet-launcher to "User"
Woongsuk Cho [Wed, 18 Mar 2020 06:01:23 +0000 (15:01 +0900)]
Set exec label of dotnet-launcher to "User"

To attach diagnostics process to app process, exec label should be set to "User".
Additionally, log redirection (to dlog) is turned off for corerun mode.

4 years agoFixed memory corruption. AddressSanitizer: heap-buffer-overflow
j-h.choi [Wed, 18 Mar 2020 05:58:36 +0000 (14:58 +0900)]
Fixed memory corruption. AddressSanitizer: heap-buffer-overflow

Change-Id: Ie71f63fa076a11ac80166e0b11b4e6a6b178cf50

4 years agoSet the native library path with the RIDs value set in TizenFX accepted/tizen/unified/20200315.214822 submit/tizen/20200312.235329
j-h.choi [Tue, 18 Feb 2020 06:38:36 +0000 (15:38 +0900)]
Set the native library path with the RIDs value set in TizenFX

Change-Id: I076c9966eb02552dec7e547933b64665577847d0

4 years agoCopy the pdb file where the native image file exists
j-h.choi [Thu, 5 Mar 2020 01:23:47 +0000 (10:23 +0900)]
Copy the pdb file where the native image file exists

4 years agoFull executable path to support crash-worker in case of standalone accepted/tizen/unified/20200304.123900 submit/tizen/20200303.220215
Hyungju Lee [Tue, 3 Mar 2020 02:37:57 +0000 (11:37 +0900)]
Full executable path to support crash-worker in case of standalone

Change-Id: I519bf8a430c5fd92bb5d43a7fe9092c3514ffa36

4 years agoUpdate README.md accepted/tizen/unified/20200213.121525 submit/tizen/20200212.223712
이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 [Wed, 12 Feb 2020 06:32:39 +0000 (15:32 +0900)]
Update README.md

4 years agoFixed svace.(HANDLE_LEAK.EX)
j-h.choi [Wed, 12 Feb 2020 01:25:02 +0000 (10:25 +0900)]
Fixed svace.(HANDLE_LEAK.EX)

4 years agoModified to add 'NI_FLAGS_APPNI' flag and appPaths when the app generates ni
j-h.choi [Thu, 6 Feb 2020 03:58:39 +0000 (12:58 +0900)]
Modified to add 'NI_FLAGS_APPNI' flag and appPaths when the app generates ni

4 years agoRemove dos carriage return accepted/tizen/unified/20200207.122334 submit/tizen/20200207.000547
Hyungju Lee [Thu, 6 Feb 2020 05:17:21 +0000 (14:17 +0900)]
Remove dos carriage return

Change-Id: I47f301ead24f4bfd77ce082260d80d9af0f537d9

4 years agoFixed svace.(FILE_SYSTEM_REALPATH)
j-h.choi [Wed, 5 Feb 2020 08:55:53 +0000 (17:55 +0900)]
Fixed svace.(FILE_SYSTEM_REALPATH)