1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-03 11:11:20 +00:00

Merge pull request #121 from QB64Team/IdeWork

Ide work
This commit is contained in:
Fellippe Heitor 2021-01-31 18:26:15 -03:00 committed by GitHub
commit a1a8d501a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 796 additions and 650 deletions

View file

@ -7,13 +7,13 @@ assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**QB64 info (please complete the following information):**
- Version [e.g. 1.3 dev build from git a6101af]
- OS: [e.g. Windows]
- Is the bug present in the latest dev build too? (If not, try it on the latest dev build first: https://www.qb64.org/portal/development-build/)
- First, make sure you've tried to replicate the problem in the latest development build. Get it from https://www.qb64.org/portal/development-build/: [Yes, the issue is in the latest dev build. / No, the issue was fixed. Yay!]
- If the suspected bug is also present in the latest dev build, please report what you get in the `Help->About` dialog: [e.g. `Version 1.5 dev build from git a6101af`]
- Report the OS you're using: [e.g. Windows 10 Build 2H2D]
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:

View file

@ -2,11 +2,12 @@ on:
push:
branches:
- development
- ci-test
jobs:
linux-build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci-skip')"
if: "contains(github.event.head_commit.message, 'ci-skip')"
steps:
- uses: actions/checkout@v2
- name: Install dependencies
@ -29,7 +30,8 @@ jobs:
uses: shimataro/ssh-key-action@v2.1.0
with:
key: ${{ secrets.SSH_KEY }}
known_hosts: "qb64.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEAs2GpPpgbWOV0in/0nbepIzNrwh1qg7IY560wARrYDfJXvSGRGILnL4xX01cfuwJHpQctWr0QbU+mPiss2MSXCxFr+o1fA00Vy/Qsj27fIJX8Of5LkgAN0zD/gGRke8jWDztesz1bCQPqvj3saO1A9dhyvL7h4R/ZBciA7luyIcoY8VCHgiq1amls88vkb9bv9ssmOo6r4fdnj8vn296YwlgpDo1ax26LeWfSxcxg3QbOmaEFGdjbgdlsFwdiluaJ2plN8r0f7jWnfb4+2noUCzL5xeIrm2eFf9eBLtlRzxKkrFTWXJMP4yYrrokHyhL5jhYbmed+wElzGID6Ka88pXAuqnYgABg3R/pgu+q+I+cA54ze0dJNtZ9yryFs0FaKytPGrysjS/oxAHaNck1IzyF5mcY+r2xISCqZuO+zn70R26mx2uNtaMrwfHzjAeTnkZyO4HHPha1T8rx5+v2ksJy2Hvzj7Xy73bMvC1aCORp+qg6YitUQPpBLU3gqxkjpmbfBbk1J+3PnyxYm5MDpq22TKMOzcDH4CqoEKqIWJyum9qB3RFw+dNAFG3GD60IdeW/4XXHnOkEou4dmou9nXZa5HrsXE46cWA5+8W098DewTXNKziVKiskiRR8R5s8tM06SIE351SkwJx8JuEVpordFtJxXQ1Y29FNlEzXJK68="
# "qb64.org ssh-rsa AAAA" etc.
known_hosts: ${{ secrets.KNOWN_HOSTS }}
config: |
Host remote-server
HostName qb64.org
@ -40,7 +42,7 @@ jobs:
macos-build:
runs-on: macos-latest
if: "!contains(github.event.head_commit.message, 'ci-skip')"
if: "contains(github.event.head_commit.message, 'ci-skip')"
steps:
- uses: actions/checkout@v2
- name: Bootstrap compiler
@ -52,7 +54,7 @@ jobs:
uses: shimataro/ssh-key-action@v2.1.0
with:
key: ${{ secrets.SSH_KEY }}
known_hosts: "qb64.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEAs2GpPpgbWOV0in/0nbepIzNrwh1qg7IY560wARrYDfJXvSGRGILnL4xX01cfuwJHpQctWr0QbU+mPiss2MSXCxFr+o1fA00Vy/Qsj27fIJX8Of5LkgAN0zD/gGRke8jWDztesz1bCQPqvj3saO1A9dhyvL7h4R/ZBciA7luyIcoY8VCHgiq1amls88vkb9bv9ssmOo6r4fdnj8vn296YwlgpDo1ax26LeWfSxcxg3QbOmaEFGdjbgdlsFwdiluaJ2plN8r0f7jWnfb4+2noUCzL5xeIrm2eFf9eBLtlRzxKkrFTWXJMP4yYrrokHyhL5jhYbmed+wElzGID6Ka88pXAuqnYgABg3R/pgu+q+I+cA54ze0dJNtZ9yryFs0FaKytPGrysjS/oxAHaNck1IzyF5mcY+r2xISCqZuO+zn70R26mx2uNtaMrwfHzjAeTnkZyO4HHPha1T8rx5+v2ksJy2Hvzj7Xy73bMvC1aCORp+qg6YitUQPpBLU3gqxkjpmbfBbk1J+3PnyxYm5MDpq22TKMOzcDH4CqoEKqIWJyum9qB3RFw+dNAFG3GD60IdeW/4XXHnOkEou4dmou9nXZa5HrsXE46cWA5+8W098DewTXNKziVKiskiRR8R5s8tM06SIE351SkwJx8JuEVpordFtJxXQ1Y29FNlEzXJK68="
known_hosts: ${{ secrets.KNOWN_HOSTS }}
config: |
Host remote-server
HostName qb64.org
@ -63,7 +65,7 @@ jobs:
windows-x86-build:
runs-on: windows-latest
if: "!contains(github.event.head_commit.message, 'ci-skip')"
if: "contains(github.event.head_commit.message, 'ci-skip')"
env:
PLATFORM: x86
steps:
@ -77,7 +79,7 @@ jobs:
uses: shimataro/ssh-key-action@v2.1.0
with:
key: ${{ secrets.SSH_KEY }}
known_hosts: "qb64.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEAs2GpPpgbWOV0in/0nbepIzNrwh1qg7IY560wARrYDfJXvSGRGILnL4xX01cfuwJHpQctWr0QbU+mPiss2MSXCxFr+o1fA00Vy/Qsj27fIJX8Of5LkgAN0zD/gGRke8jWDztesz1bCQPqvj3saO1A9dhyvL7h4R/ZBciA7luyIcoY8VCHgiq1amls88vkb9bv9ssmOo6r4fdnj8vn296YwlgpDo1ax26LeWfSxcxg3QbOmaEFGdjbgdlsFwdiluaJ2plN8r0f7jWnfb4+2noUCzL5xeIrm2eFf9eBLtlRzxKkrFTWXJMP4yYrrokHyhL5jhYbmed+wElzGID6Ka88pXAuqnYgABg3R/pgu+q+I+cA54ze0dJNtZ9yryFs0FaKytPGrysjS/oxAHaNck1IzyF5mcY+r2xISCqZuO+zn70R26mx2uNtaMrwfHzjAeTnkZyO4HHPha1T8rx5+v2ksJy2Hvzj7Xy73bMvC1aCORp+qg6YitUQPpBLU3gqxkjpmbfBbk1J+3PnyxYm5MDpq22TKMOzcDH4CqoEKqIWJyum9qB3RFw+dNAFG3GD60IdeW/4XXHnOkEou4dmou9nXZa5HrsXE46cWA5+8W098DewTXNKziVKiskiRR8R5s8tM06SIE351SkwJx8JuEVpordFtJxXQ1Y29FNlEzXJK68="
known_hosts: ${{ secrets.KNOWN_HOSTS }}
config: |
Host remote-server
HostName qb64.org
@ -93,20 +95,35 @@ jobs:
PLATFORM: x64
steps:
- uses: actions/checkout@v2
- name: Bootstrap compiler
run: .ci/bootstrap.bat
- name: Compile
run: .ci/compile.bat
#- name: Bootstrap compiler
#run: .ci/bootstrap.bat
#- name: Compile
#run: .ci/compile.bat
- name: Set deployment SSH key
if: github.event_name == 'push'
uses: shimataro/ssh-key-action@v2.1.0
with:
key: ${{ secrets.SSH_KEY }}
known_hosts: "qb64.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEAs2GpPpgbWOV0in/0nbepIzNrwh1qg7IY560wARrYDfJXvSGRGILnL4xX01cfuwJHpQctWr0QbU+mPiss2MSXCxFr+o1fA00Vy/Qsj27fIJX8Of5LkgAN0zD/gGRke8jWDztesz1bCQPqvj3saO1A9dhyvL7h4R/ZBciA7luyIcoY8VCHgiq1amls88vkb9bv9ssmOo6r4fdnj8vn296YwlgpDo1ax26LeWfSxcxg3QbOmaEFGdjbgdlsFwdiluaJ2plN8r0f7jWnfb4+2noUCzL5xeIrm2eFf9eBLtlRzxKkrFTWXJMP4yYrrokHyhL5jhYbmed+wElzGID6Ka88pXAuqnYgABg3R/pgu+q+I+cA54ze0dJNtZ9yryFs0FaKytPGrysjS/oxAHaNck1IzyF5mcY+r2xISCqZuO+zn70R26mx2uNtaMrwfHzjAeTnkZyO4HHPha1T8rx5+v2ksJy2Hvzj7Xy73bMvC1aCORp+qg6YitUQPpBLU3gqxkjpmbfBbk1J+3PnyxYm5MDpq22TKMOzcDH4CqoEKqIWJyum9qB3RFw+dNAFG3GD60IdeW/4XXHnOkEou4dmou9nXZa5HrsXE46cWA5+8W098DewTXNKziVKiskiRR8R5s8tM06SIE351SkwJx8JuEVpordFtJxXQ1Y29FNlEzXJK68="
known_hosts: ${{ secrets.KNOWN_HOSTS }}
config: |
Host remote-server
HostName qb64.org
User m6rosupy1q2t
- name: Download
run: Invoke-WebRequest https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-windows-amd64.zip -OutFile ngrok.zip
- name: Extract
run: Expand-Archive ngrok.zip
- name: Auth
run: .\ngrok\ngrok.exe authtoken $Env:NGROK_AUTH_TOKEN
env:
NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
- name: Enable TS
run: Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value 0
- run: Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
- run: Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication" -Value 1
- run: Set-LocalUser -Name "runneradmin" -Password (ConvertTo-SecureString -AsPlainText "P@ssw0rd!" -Force)
- name: Create Tunnel
run: .\ngrok\ngrok.exe tcp 3389
- name: Package and deploy
if: github.event_name == 'push'
run: .ci/deploy.bat

View file

@ -15,7 +15,7 @@ DIM SHARED IDEShowErrorsImmediately AS _BYTE
DIM SHARED ShowLineNumbersSeparator AS _BYTE, ShowLineNumbersUseBG AS _BYTE
DIM SHARED IgnoreWarnings AS _BYTE, qb64versionprinted AS _BYTE
DIM SHARED DisableSyntaxHighlighter AS _BYTE, ExeToSourceFolderFirstTimeMsg AS _BYTE
DIM SHARED WhiteListQB64FirstTimeMsg AS _BYTE
DIM SHARED WhiteListQB64FirstTimeMsg AS _BYTE, ideautolayoutkwcapitals AS _BYTE
IF LoadedIDESettings = 0 THEN
'We only want to load the file once when QB64 first starts
@ -235,6 +235,19 @@ IF LoadedIDESettings = 0 THEN
idesortsubs = 0
END IF
result = ReadConfigSetting("IDE_KeywordCapital", value$)
IF result THEN
IF value$ = "TRUE" OR VAL(value$) = -1 THEN
ideautolayoutkwcapitals = -1
ELSE
ideautolayoutkwcapitals = 0
WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_KeywordCapital", "FALSE"
END IF
ELSE
WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_KeywordCapital", "FALSE"
ideautolayoutkwcapitals = 0
END IF
result = ReadConfigSetting("IDE_SUBsLength", value$)
IF result THEN
IF value$ = "TRUE" OR VAL(value$) = -1 THEN

View file

@ -10163,38 +10163,52 @@ FUNCTION idelayoutbox
'-------- init --------
i = 0
idepar p, 60, 8, "Code Layout"
idepar p, 60, 9, "Code Layout"
i = i + 1
ideautolayoutid = i
o(i).typ = 4 'check box
o(i).y = 2
o(i).nam = idenewtxt("#Auto Spacing & Upper/Lowercase Formatting")
o(i).sel = ideautolayout
i = i + 1
ideautolayoutkwcapitalsid = i
o(i).typ = 4 'check box
o(i).y = 4
o(i).y = 3
o(i).x = 6
o(i).nam = idenewtxt("#Keywords in CAPITALS")
o(i).sel = ideautolayoutkwcapitals
i = i + 1
ideautoindentID = i
o(i).typ = 4 'check box
o(i).y = 5
o(i).nam = idenewtxt("Auto #Indent -")
o(i).sel = ideautoindent
a2$ = str2$(ideautoindentsize)
i = i + 1
ideautoindentsizeid = i
o(i).typ = 1
o(i).x = 20
o(i).y = 4
o(i).y = 5
o(i).nam = idenewtxt("#Spacing")
o(i).txt = idenewtxt(a2$)
o(i).v1 = LEN(a2$)
i = i + 1
ideindentsubsid = i
o(i).typ = 4
o(i).y = 6
o(i).x = 6
o(i).y = 7
o(i).nam = idenewtxt("Indent SUBs and #FUNCTIONs")
o(i).sel = ideindentsubs
i = i + 1
buttonsid = i
o(i).typ = 3
o(i).y = 8
o(i).y = 9
o(i).txt = idenewtxt("#OK" + sep + "#Cancel")
o(i).dft = 1
'-------- end of init --------
@ -10275,14 +10289,14 @@ FUNCTION idelayoutbox
IF focus <> PrevFocus THEN
'Always start with TextBox values selected upon getting focus
PrevFocus = focus
IF focus = 3 THEN
IF o(focus).typ = 1 THEN
o(focus).v1 = LEN(idetxt(o(focus).txt))
IF o(focus).v1 > 0 THEN o(focus).issel = -1
o(focus).sx1 = 0
END IF
END IF
a$ = idetxt(o(3).txt)
a$ = idetxt(o(ideautoindentsizeid).txt)
IF LEN(a$) > 2 THEN a$ = LEFT$(a$, 2) '2 character limit
FOR i = 1 TO LEN(a$)
a = ASC(a$, i)
@ -10293,18 +10307,32 @@ FUNCTION idelayoutbox
a = VAL(a$)
IF a > 64 THEN a$ = "64"
END IF
idetxt(o(3).txt) = a$
idetxt(o(ideautoindentsizeid).txt) = a$
IF K$ = CHR$(27) OR (focus = 6 AND info <> 0) THEN EXIT FUNCTION
IF K$ = CHR$(13) OR (focus = 5 AND info <> 0) THEN
IF focus = ideautolayoutkwcapitalsid AND o(ideautolayoutkwcapitalsid).sel = 1 THEN
o(ideautolayoutid).sel = 1
END IF
IF focus = ideindentsubsid AND o(ideindentsubsid).sel = 1 THEN
o(ideautoindentID).sel = 1
END IF
IF o(ideautolayoutid).sel = 0 THEN o(ideautolayoutkwcapitalsid).sel = 0
IF o(ideautoindentID).sel = 0 THEN o(ideindentsubsid).sel = 0
IF K$ = CHR$(27) OR (focus = buttonsid + 1 AND info <> 0) THEN EXIT FUNCTION 'cancel
IF K$ = CHR$(13) OR (focus = buttonsid AND info <> 0) THEN 'ok
'save changes
v% = o(1).sel: IF v% <> 0 THEN v% = 1 'ideautolayout
v% = o(ideautolayoutid).sel: IF v% <> 0 THEN v% = 1 'ideautolayout
IF ideautolayout <> v% THEN ideautolayout = v%: idelayoutbox = 1
v% = o(2).sel: IF v% <> 0 THEN v% = 1 'ideautoindent
v% = o(ideautolayoutkwcapitalsid).sel: IF v% <> 0 THEN v% = 1 'ideautolayoutkwcapitals
IF ideautolayoutkwcapitals <> v% THEN ideautolayoutkwcapitals = v%: idelayoutbox = 1
v% = o(ideautoindentid).sel: IF v% <> 0 THEN v% = 1 'ideautoindent
IF ideautoindent <> v% THEN ideautoindent = v%: idelayoutbox = 1
v$ = idetxt(o(3).txt) 'ideautoindentsize
v$ = idetxt(o(ideautoindentsizeid).txt) 'ideautoindentsize
IF v$ = "" THEN v$ = "4"
v% = VAL(v$)
IF v% < 0 OR v% > 64 THEN v% = 4
@ -10313,7 +10341,7 @@ FUNCTION idelayoutbox
IF ideautoindent <> 0 THEN idelayoutbox = 1
END IF
v% = o(4).sel: IF v% <> 0 THEN v% = 1 'ideindentsubs
v% = o(ideindentsubsid).sel: IF v% <> 0 THEN v% = 1 'ideindentsubs
IF ideindentsubs <> v% THEN ideindentsubs = v%: idelayoutbox = 1
IF ideautolayout THEN
@ -10321,6 +10349,11 @@ FUNCTION idelayoutbox
ELSE
WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_AutoFormat", "FALSE"
END IF
IF ideautolayoutkwcapitals THEN
WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_KeywordCapital", "TRUE"
ELSE
WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_KeywordCapital", "FALSE"
END IF
IF ideautoindent THEN
WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_AutoIndent", "TRUE"
ELSE

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff