Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanaxen committed Apr 3, 2023
1 parent 803dfa9 commit 835a734
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 9 deletions.
4 changes: 3 additions & 1 deletion init.bat
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
set drive=d:

set /P drive="R install draive name:(default d:)"

set R_INSTALL_PATH=%drive%\Program Files\R\R-4.2.3
set R_LIBS_USER==%drive%\Program Files\R\R-4.2.3\library

set RTOOL_PATH=%drive%\rtools42
set RTOOLS40_HOME=%drive%\rtools42
set RTOOLS42_HOME=%drive%\rtools42

set RPATH=%R_INSTALL_PATH%\bin\x64
2 changes: 1 addition & 1 deletion install.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
call init.bat

"%RPATH%\R" CMD BATCH --slave --vanilla ../script/install.r
"%RPATH%\Rscript.exe" ./script/install.r
15 changes: 8 additions & 7 deletions script/install.r
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
org_libpath <- .libPaths()
curdir <- getwd()
print(curdir)

curdir = getwd()
install_libpath <- paste(curdir, "/lib", sep="")
print(install_libpath)

.libPaths(c(install_libpath,.libPaths()))
print(.libPaths())

install_libpath = paste(curdir, "/lib", sep="")

.libPaths( c(install_libpath))

install.packages("bit64", repo="http://cran.r-project.org", lib=install_libpath)
install.packages("R6", repo="http://cran.r-project.org", lib=install_libpath)
Expand Down Expand Up @@ -39,8 +40,6 @@ Sys.setenv("CUDA_PATH" = "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA
install.packages("torch", repos = "http://cran.us.r-project.org",dependencies=TRUE, lib=install_libpath)
#remotes::install_github("mlverse/torch")

library(torch)
torch::torch_manual_seed(1)

remotes::install_github("mlverse/tft", lib=install_libpath)

Expand All @@ -49,4 +48,6 @@ install.packages("slider", repos = "http://cran.us.r-project.org", lib=install_l
install.packages("gplots", repos = "http://cran.us.r-project.org", lib=install_libpath)


library(torch)
torch::torch_manual_seed(1)

73 changes: 73 additions & 0 deletions tft/Properties/app.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app" />
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC マニフェスト オプション
Windows のユーザー アカウント制御のレベルを変更するには、
requestedExecutionLevel ノードを以下のいずれかで置換します。
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
requestedExecutionLevel 要素を指定すると、ファイルおよびレジストリの仮想化が無効にされます。
アプリケーションが下位互換性を保つためにこの仮想化を要求する場合、この要素を
削除します。
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
<applicationRequestMinimum>
<defaultAssemblyRequest permissionSetReference="Custom" />
<PermissionSet class="System.Security.PermissionSet" version="1" ID="Custom" SameSite="site" Unrestricted="true" />
</applicationRequestMinimum>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- このアプリケーションがテストされ、動作するよう設計された Windows バージョンの
一覧。適切な要素をコメント解除すると、最も互換性のある環境を Windows が
自動的に選択します。-->
<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
<!-- Windows 10 -->
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
</application>
</compatibility>
<!-- アプリケーションが DPI 対応であり、Windows によってそれ以上の DPI には自動的に拡大縮小されないことを
示します。Windows Presentation Foundation (WPF) アプリケーションは自動的に DPI に対応し、オプトインする必要は
ありません。さらに、この設定にオプトインする .NET Framework 4.6 を対象とする Windows フォーム アプリケーションは、
app.config ファイルで 'EnableWindowsFormsHighDpiAutoResizing' 設定を 'true' に設定する必要があります。
アプリケーションを長いパス対応にします。https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation をご覧ください -->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
-->
<!-- Windows のコモン コントロールとダイアログのテーマを有効にします (Windows XP 以降) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly>

0 comments on commit 835a734

Please sign in to comment.