Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clean-ide
Commits
2fbf9de1
Commit
2fbf9de1
authored
Feb 11, 2002
by
Diederik van Arkel
Browse files
Move batch platform dependencies to os-layer
parent
34726234
Changes
5
Hide whitespace changes
Inline
Side-by-side
Ide/IDE.icl
View file @
2fbf9de1
...
...
@@ -31,8 +31,6 @@ from PmCleanSystem import QuitCleanCompiler
import
Platform
,
IdePlatform
import
PmDriver
import
ArgEnv
import
logfile
,
set_return_code
,
first_run
import
StdSystem
trace_n
_
f
:==
f
...
...
@@ -189,21 +187,8 @@ where
:
_
]
ps
#
ps
=
PlatformInteractiveInit
ps
// can modify Prefs!
#
(
prefs
,
ps
)
=
getPrefs
ps
// <<< can move this into first_run module
// as function :: (reg_prefs,ps) -> (reg_prefs,ps)
#
pcl_name
=
prefs
.
reg_prefs
.
tp_name
#
pcl_path
=
prefs
.
reg_prefs
.
tp_path
#
hcl_name
=
prefs
.
reg_prefs
.
hp_name
#
hcl_path
=
prefs
.
reg_prefs
.
hp_path
#
flags
=
prefs
.
reg_prefs
.
rp_flags
#
(
res
,
flag
,
ps
)
=
first_run
pcl_name
pcl_path
hcl_name
hcl_path
flags
ps
#
ps
=
case
res
of
True
#
flags
=
take
10
[
flag
:
flags
]
#
prefs
=
{
prefs
&
reg_prefs
.
rp_flags
=
flags
}
->
setPrefs
prefs
ps
_
->
ps
// >>>
#
(
fhRecId
,
ps
)
=
getFHI
ps
#
(
phRecId
,
ps
)
=
getPHI
ps
#
(
menuIds
,
ps
)
=
getMenuIds
ps
...
...
@@ -241,20 +226,6 @@ where
#
ps
=
SetProcessIcon
CleanIcon
ps
=
installPlatformEventHandlers
ps
ini
_
_
_
_
_
_
_
_
_
_
_
_
_
_
ps
=
abort
"IDE.icl: ini called with insufficient id's"
batchOptions
world
=
case
[
arg
\\
arg
<-:
getCommandLine
]
of
[_,
"--batch-build"
,
prj
]
->
batch
False
prj
world
[_,
"--batch-force-build"
,
prj
]
->
batch
True
prj
world
_
->
(
True
,
abort
"force_update"
,
abort
"project file"
,
abort
"logfile"
,
world
)
where
batch
force_update
prj
world
#
(
ok
,
logfile
,
world
)
=
openLogfile
prj
world
|
not
ok
=
(
False
,
force_update
,
prj
,
logfile
,
wAbort
(
"--batch-build failed while opening logfile.
\n
"
)
world
)
=
(
False
,
force_update
,
prj
,
logfile
,
world
)
fileMenu
prefspath
{
mn_clo
,
mn_sva
,
mn_sav
,
mn_rev
,
mn_oth
,
mn_prt
,
mn_prs
,
mn_odm
,
mn_oim
}
mPrNewId
mFileId
mFhMenId
mPhMenId
quitId
fhRecId
phRecId
prefs
...
...
@@ -1097,10 +1068,3 @@ pinit force_update proj proj_path ps
where
cleanup
exepath
bool1
bool2
ps
=
abortLog
False
""
ps
wAbort
message
world
#
stderr
=
fwrites
message
stderr
// # (_,world) = fclose stderr world
#
world
=
set_return_code_world
(
-1
)
world
=
world
Win/IdePlatform.dcl
View file @
2fbf9de1
...
...
@@ -4,6 +4,7 @@ import StdPSt, StdString
import
StdIOCommon
from
IdeState
import
::
General
PlatformInteractiveInit
::
!*(
PSt
General
)
->
*
PSt
General
PlatformProcessAttributes
::
[
ProcessAttribute
*(
PSt
General
)]
RunProgram
::
!.
String
!*(
PSt
General
)
->
*
PSt
General
...
...
Win/IdePlatform.icl
View file @
2fbf9de1
...
...
@@ -11,6 +11,7 @@ from iostate import appIOToolbox,accIOToolbox
from
clCCall_12
import
winLaunchApp
,
winMakeCString
,::
CSTR
,::
OSToolbox
import
clCrossCall_12
,
windowaccess
,
iostate
import
pictCCall_12
,
cast
import
first_run
import
code
from
"Redirect.obj"
import
code
from
"cCrossCallMaarten.obj"
...
...
@@ -18,6 +19,25 @@ import code from "cCrossCallMaarten.obj"
import
code
from
library
"conkernel_library"
import
code
from
library
"bmpgdi_library"
PlatformInteractiveInit
::
!*(
PSt
General
)
->
*
PSt
General
PlatformInteractiveInit
ps
// <<< can move this into first_run module
// as function :: (reg_prefs,ps) -> (reg_prefs,ps)
#
(
prefs
,
ps
)
=
getPrefs
ps
#
pcl_name
=
prefs
.
reg_prefs
.
tp_name
#
pcl_path
=
prefs
.
reg_prefs
.
tp_path
#
hcl_name
=
prefs
.
reg_prefs
.
hp_name
#
hcl_path
=
prefs
.
reg_prefs
.
hp_path
#
flags
=
prefs
.
reg_prefs
.
rp_flags
#
(
res
,
flag
,
ps
)
=
first_run
pcl_name
pcl_path
hcl_name
hcl_path
flags
ps
#
ps
=
case
res
of
True
#
flags
=
take
10
[
flag
:
flags
]
#
prefs
=
{
prefs
&
reg_prefs
.
rp_flags
=
flags
}
->
setPrefs
prefs
ps
_
->
ps
// >>>
=
ps
PlatformProcessAttributes
::
[
ProcessAttribute
*(
PSt
General
)]
PlatformProcessAttributes
=
[
ProcessConsoleOpen
id
...
...
Win/Platform.dcl
View file @
2fbf9de1
...
...
@@ -12,3 +12,6 @@ ToolsDir :: String
TooltempDir
::
String
EnvsDir
::
String
PrefsDir
::
String
batchOptions
::
!*
World
->
(!
Bool
,!
Bool
,!
String
,!*
File
,!*
World
)
wAbort
::
!
String
!*
World
->
*
World
Win/Platform.icl
View file @
2fbf9de1
...
...
@@ -2,11 +2,12 @@ implementation module Platform
import
StdPSt
import
ArgEnv
import
StdArray
,
StdEnum
,
StdList
,
StdClass
,
StdBool
import
StdArray
,
StdEnum
,
StdList
,
StdClass
,
StdBool
,
StdMisc
import
UtilIO
from
StdSystem
import
dirseparator
import
code
from
library
"platform_kernel_library"
import
clCCall_12
,
ostoolbox
import
logfile
,
set_return_code
PlatformDependant
win
mac
:==
win
...
...
@@ -53,6 +54,29 @@ initPlatformCommandLine ps
#
files
=
map
GetLongPathName
files
=
(
files
,
ps
)
batchOptions
::
!*
World
->
(!
Bool
,!
Bool
,!
String
,!*
File
,!*
World
)
batchOptions
world
=
case
[
arg
\\
arg
<-:
getCommandLine
]
of
[_,
"--batch-build"
,
prj
]
->
batch
False
prj
world
[_,
"--batch-force-build"
,
prj
]
->
batch
True
prj
world
_
->
(
True
,
abort
"force_update"
,
abort
"project file"
,
abort
"logfile"
,
world
)
where
batch
force_update
prj
world
#
(
ok
,
logfile
,
world
)
=
openLogfile
prj
world
|
not
ok
=
(
False
,
force_update
,
prj
,
logfile
,
wAbort
(
"--batch-build failed while opening logfile.
\n
"
)
world
)
=
(
False
,
force_update
,
prj
,
logfile
,
world
)
wAbort
::
!
String
!*
World
->
*
World
wAbort
message
world
#
stderr
=
fwrites
message
stderr
// # (_,world) = fclose stderr world
#
world
=
set_return_code_world
(
-1
)
world
=
world
installPlatformEventHandlers
::
!*(
PSt
.
l
)
->
*(
PSt
.
l
)
installPlatformEventHandlers
ps
=
ps
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment