Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Mullvad Browser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Applications
Mullvad Browser
Commits
25e148a1
Commit
25e148a1
authored
25 years ago
by
selmer%netscape.com
Browse files
Options
Downloads
Patches
Plain Diff
Only put selected components in config's build
parent
0aa1e765
Loading
Loading
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cck/ib/comp.cpp
+10
-9
10 additions, 9 deletions
cck/ib/comp.cpp
cck/ib/comp.h
+2
-1
2 additions, 1 deletion
cck/ib/comp.h
cck/ib/ib.cpp
+10
-9
10 additions, 9 deletions
cck/ib/ib.cpp
with
22 additions
and
19 deletions
cck/ib/comp.cpp
+
10
−
9
View file @
25e148a1
...
...
@@ -11,7 +11,8 @@ extern CString configPath;
extern
CString
workspacePath
;
extern
CString
cdPath
;
extern
CString
tempPath
;
extern
CString
iniPath
;
extern
CString
iniSrcPath
;
extern
CString
iniDstPath
;
extern
CString
scriptPath
;
extern
CString
nscpxpiPath
;
...
...
@@ -19,7 +20,7 @@ extern COMPONENT Components[100];
extern
int
numComponents
;
extern
"C"
__declspec
(
dllexport
)
int
BuildComponentList
(
COMPONENT
*
comps
,
int
*
compNum
)
int
BuildComponentList
(
COMPONENT
*
comps
,
int
*
compNum
,
CString
iniSrcPath
)
{
*
compNum
=
0
;
...
...
@@ -30,15 +31,15 @@ int BuildComponentList(COMPONENT *comps, int *compNum)
char
desc
[
MAX_SIZE
];
char
attr
[
MAX_SIZE
];
component
.
Format
(
"Component%d"
,
*
compNum
);
GetPrivateProfileString
(
component
,
"Archive"
,
""
,
archive
,
MAX_SIZE
,
iniPath
);
GetPrivateProfileString
(
component
,
"Archive"
,
""
,
archive
,
MAX_SIZE
,
ini
Src
Path
);
while
(
*
archive
)
{
GetPrivateProfileString
(
component
,
"Description Short"
,
""
,
name
,
MAX_SIZE
,
iniPath
);
name
,
MAX_SIZE
,
ini
Src
Path
);
GetPrivateProfileString
(
component
,
"Description Long"
,
""
,
desc
,
MAX_SIZE
,
iniPath
);
desc
,
MAX_SIZE
,
ini
Src
Path
);
GetPrivateProfileString
(
component
,
"Attributes"
,
""
,
attr
,
MAX_SIZE
,
iniPath
);
attr
,
MAX_SIZE
,
ini
Src
Path
);
comps
[
*
compNum
].
archive
=
CString
(
archive
);
comps
[
*
compNum
].
compname
=
component
;
...
...
@@ -50,7 +51,7 @@ int BuildComponentList(COMPONENT *comps, int *compNum)
(
*
compNum
)
++
;
component
.
Format
(
"Component%d"
,
*
compNum
);
GetPrivateProfileString
(
component
,
"Archive"
,
""
,
archive
,
MAX_SIZE
,
iniPath
);
GetPrivateProfileString
(
component
,
"Archive"
,
""
,
archive
,
MAX_SIZE
,
ini
Src
Path
);
}
...
...
@@ -69,9 +70,9 @@ int GenerateComponentList(CString parms, WIDGET *curWidget)
nscpxpiPath
=
workspacePath
+
"
\\
NSCPXPI"
;
else
nscpxpiPath
=
rootPath
+
"NSCPXPI"
;
iniPath
=
nscpxpiPath
+
"
\\
config.ini"
;
ini
Src
Path
=
nscpxpiPath
+
"
\\
config.ini"
;
BuildComponentList
(
Components
,
&
numComponents
);
BuildComponentList
(
Components
,
&
numComponents
,
iniSrcPath
);
int
i
;
CString
WidgetValue
(
""
);
...
...
This diff is collapsed.
Click to expand it.
cck/ib/comp.h
+
2
−
1
View file @
25e148a1
...
...
@@ -8,4 +8,5 @@ typedef struct s_component {
BOOL
launchapp
;
}
COMPONENT
;
extern
"C"
__declspec
(
dllexport
)
int
BuildComponentList
(
COMPONENT
*
comps
,
int
*
compNum
);
extern
"C"
__declspec
(
dllexport
)
int
BuildComponentList
(
COMPONENT
*
comps
,
int
*
compNum
,
CString
iniSrcPath
);
This diff is collapsed.
Click to expand it.
cck/ib/ib.cpp
+
10
−
9
View file @
25e148a1
...
...
@@ -15,7 +15,8 @@ CString configPath;
CString
workspacePath
;
CString
cdPath
;
CString
tempPath
;
CString
iniPath
;
CString
iniDstPath
;
CString
iniSrcPath
;
CString
scriptPath
;
CString
nscpxpiPath
;
...
...
@@ -191,8 +192,7 @@ int interpret(char *cmd)
}
if
(
!
section
||
!
key
||
!
newvalue
)
return
FALSE
;
CString
iniSrc
=
nscpxpiPath
+
"
\\
config.ini"
;
if
(
!
CopyFile
(
iniSrc
,
iniPath
,
TRUE
))
if
(
!
CopyFile
(
iniSrcPath
,
iniDstPath
,
TRUE
))
DWORD
e
=
GetLastError
();
if
(
strcmp
(
key
,
"Program Folder Name"
)
==
0
)
{
...
...
@@ -200,7 +200,7 @@ int interpret(char *cmd)
strcat
(
temp
,
newvalue
);
newvalue
=
temp
;
}
WritePrivateProfileString
(
section
,
key
,
newvalue
,
iniPath
);
WritePrivateProfileString
(
section
,
key
,
newvalue
,
ini
Dst
Path
);
}
else
if
(
strcmp
(
cmdname
,
"replaceXPI"
)
==
0
)
{
...
...
@@ -260,11 +260,11 @@ void init_components()
{
int
i
;
WIDGET
*
w
=
findWidget
(
"SelectedComponents"
);
BuildComponentList
(
Components
,
&
numComponents
);
BuildComponentList
(
Components
,
&
numComponents
,
iniSrcPath
);
// Turn off components that aren't selected
for
(
i
=
0
;
i
<
numComponents
;
i
++
)
if
(
strstr
(
Components
[
i
].
name
,
w
->
value
)
==
NULL
)
if
(
strstr
(
w
->
value
,
Components
[
i
].
name
)
==
NULL
)
Components
[
i
].
selected
=
FALSE
;
}
...
...
@@ -281,13 +281,14 @@ int StartIB(CString parms, WIDGET *curWidget)
configPath
=
rootPath
+
"Configs
\\
"
+
configName
;
cdPath
=
configPath
+
"
\\
CD"
;
tempPath
=
configPath
+
"
\\
Temp"
;
iniPath
=
cdPath
+
"
\\
config.ini"
;
ini
Dst
Path
=
cdPath
+
"
\\
config.ini"
;
scriptPath
=
rootPath
+
"
\\
script.ib"
;
workspacePath
=
configPath
+
"
\\
Workspace"
;
if
(
SearchPath
(
workspacePath
,
"NSCPXPI"
,
NULL
,
0
,
NULL
,
NULL
))
nscpxpiPath
=
workspacePath
+
"
\\
NSCPXPI"
;
else
nscpxpiPath
=
rootPath
+
"NSCPXPI"
;
iniSrcPath
=
nscpxpiPath
+
"
\\
config.ini"
;
init_components
();
...
...
@@ -344,8 +345,8 @@ int StartIB(CString parms, WIDGET *curWidget)
for
(
int
i
=
0
;
i
<
numComponents
;
i
++
)
{
if
(
Components
[
i
].
selected
)
CopyFile
(
nscpxpiPath
+
Components
[
i
].
archive
,
cdPath
+
Components
[
i
].
archive
,
FALS
E
);
CopyFile
(
nscpxpiPath
+
"
\\
"
+
Components
[
i
].
archive
,
cdPath
+
"
\\
"
+
Components
[
i
].
archive
,
TRU
E
);
}
// Didn't work...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment