Skip to content

Commit

Permalink
v2.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Martinvlba committed May 4, 2021
1 parent c9e6148 commit 6fd3582
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 13 deletions.
5 changes: 1 addition & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android {
minSdkVersion rootProject.ext.android.MIN_SDK_VERSION
targetSdkVersion rootProject.ext.android.TARGET_SDK_VERSION
versionCode 37
versionName "2.1.0"
versionName "2.0.5"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
resConfigs "zh-rCN", "zh-rTW"
externalNativeBuild {
Expand All @@ -35,9 +35,6 @@ android {
proguardFile 'app/proguard-rules.pro'
versionNameSuffix "-${getGitHeadRefsSuffix()}"
}
debug {
versionNameSuffix "-snapshot-${getGitHeadRefsSuffix()}"
}
}
externalNativeBuild {
cmake {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/io/neoterm/component/pm/SourceHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ object SourceHelper {
val content = buildString {
this.append("# Generated by NeoTerm-Preference\n")
sourceManager.getEnabledSources()
.joinTo(this, "\n") { "deb ${it.url} ${it.repo}\n" }
.joinTo(this, "\n") { "deb [trusted=yes] ${it.url} ${it.repo}\n" }
}
FileUtils.writeFile(sourceFile, content.toByteArray())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ object DefaultValues {
const val enableSpecialVolumeKeys = false
const val enableWordBasedIme = false

const val loginShell = "sh"
const val loginShell = "bash"
const val initialCommand = ""
const val defaultFont = "SourceCodePro"
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ object NeoTermPath {
const val SOURCE_FILE = "$USR_PATH/etc/apt/sources.list"
const val PACKAGE_LIST_DIR = "$USR_PATH/var/lib/apt/lists"

private const val SOURCE = "http://120.79.193.152/neoterm"
private const val SOURCE = "https://raw.githubusercontent.com/NeoTerm/NeoTerm-repo/main"

val DEFAULT_MAIN_PACKAGE_SOURCE: String

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ open class ShellTermSession private constructor(shellPath: String, cwd: String,
val androidRootEnv = "ANDROID_ROOT=" + System.getenv("ANDROID_ROOT")
val androidDataEnv = "ANDROID_DATA=" + System.getenv("ANDROID_DATA")
val externalStorageEnv = "EXTERNAL_STORAGE=" + System.getenv("EXTERNAL_STORAGE")
val colorterm = "COLORTERM=truecolor"

// PY Trade: Some programs support NeoTerm in a special way.
val neotermIdEnv = "__NEOTERM=1"
Expand All @@ -192,7 +193,7 @@ open class ShellTermSession private constructor(shellPath: String, cwd: String,
val pathEnv = "PATH=" + System.getenv("PATH")
arrayOf(termEnv, homeEnv, androidRootEnv, androidDataEnv,
externalStorageEnv, pathEnv, neotermIdEnv, prefixEnv,
originLdEnv, originPathEnv)
originLdEnv, originPathEnv, colorterm)

} else {
val ps1Env = "PS1=$ "
Expand All @@ -213,7 +214,7 @@ open class ShellTermSession private constructor(shellPath: String, cwd: String,
arrayOf(termEnv, homeEnv, ps1Env, ldEnv, langEnv, pathEnv, pwdEnv,
androidRootEnv, androidDataEnv, externalStorageEnv,
tmpdirEnv, neotermIdEnv, originPathEnv, originLdEnv,
ldPreloadEnv, prefixEnv)
ldPreloadEnv, prefixEnv, colorterm)
}
.filter { it.isNotEmpty() }
.toTypedArray()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ open class BaseCustomizeActivity : AppCompatActivity() {

val script = resources.getStringArray(R.array.custom_preview_script_colors)
val parameter = ShellParameter()
.executablePath("${NeoTermPath.USR_PATH}/bin/applets/echo")
.executablePath("${NeoTermPath.USR_PATH}/bin/echo")
.arguments(arrayOf("echo", "-e", *script))
.callback(sessionCallback)
.systemShell(false)
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/java/io/neoterm/ui/term/NeoTermActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ import io.neoterm.R
import io.neoterm.backend.TerminalSession
import io.neoterm.component.profile.ProfileComponent
import io.neoterm.frontend.component.ComponentManager
import io.neoterm.frontend.config.DefaultValues
import io.neoterm.frontend.config.NeoPermission
import io.neoterm.frontend.config.NeoPreference
import io.neoterm.frontend.config.NeoTermPath
import io.neoterm.frontend.session.shell.ShellParameter
import io.neoterm.frontend.session.shell.ShellProfile
import io.neoterm.frontend.session.shell.client.TermSessionCallback
Expand Down Expand Up @@ -179,7 +181,7 @@ class NeoTermActivity : AppCompatActivity(), ServiceConnection, SharedPreference
true
}
R.id.menu_item_new_x_session -> {
addXSession();
addXSession()
true
}
else -> super.onOptionsItemSelected(item)
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/menu/menu_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<item
android:id="@+id/menu_item_new_x_session"
android:title="@string/new_x_session"
android:visible="false"
app:showAsAction="never" />
</menu>
</item>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
<string name="dangerous_zone">Dangerous Zone</string>
<string name="reset_app_warning">You will have to re-setup later, confirm?</string>

<string name="default_source_url" translatable="false">http://120.79.193.152/neoterm</string>
<string name="default_source_url" translatable="false">https://raw.githubusercontent.com/NeoTerm/NeoTerm-repo/main</string>

<string-array name="pref_general_shell_entries" translatable="false">
<item>sh</item>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/xml/setting_general.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<ListPreference
android:defaultValue="sh"
android:defaultValue="bash"
android:entries="@array/pref_general_shell_entries"
android:entryValues="@array/pref_general_shell_entries"
android:key="@string/key_general_shell"
Expand Down

0 comments on commit 6fd3582

Please sign in to comment.