Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqf: remove asc #809

Merged
merged 2 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed bin/dist/asc/linux/asc
Binary file not shown.
Binary file removed bin/dist/asc/windows/asc.exe
Binary file not shown.
21 changes: 1 addition & 20 deletions bin/src/commands/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ use crate::{
report::Report,
};

#[cfg(not(target_os = "macos"))]
use crate::modules::asc::ArmaScriptCompiler;

#[must_use]
pub fn cli() -> Command {
add_just(add_args(
Expand All @@ -36,12 +33,6 @@ pub fn add_args(cmd: Command) -> Command {
.help("Do not rapify (cpp, rvmat)")
.action(ArgAction::SetTrue),
)
.arg(
clap::Arg::new("asc")
.long("asc")
.help("Use ArmaScriptCompiler instead of HEMTT's SQF compiler")
.action(ArgAction::SetTrue),
)
}

#[must_use]
Expand Down Expand Up @@ -92,24 +83,14 @@ pub fn execute(matches: &ArgMatches) -> Result<Report, Error> {
pub fn executor(ctx: Context, matches: &ArgMatches) -> Executor {
let mut executor = Executor::new(ctx);

let use_asc = matches.get_one::<bool>("asc") == Some(&true);
if cfg!(target_os = "macos") && use_asc {
error!("ArmaScriptCompiler is not supported on macOS");
std::process::exit(1);
}

executor.collapse(Collapse::No);

executor.add_module(Box::<BOMCheck>::default());
executor.add_module(Box::<Hooks>::default());
if matches.get_one::<bool>("no-rap") != Some(&true) {
executor.add_module(Box::<Rapifier>::default());
}
executor.add_module(Box::new(SQFCompiler::new(!use_asc)));
#[cfg(not(target_os = "macos"))]
if use_asc {
executor.add_module(Box::<ArmaScriptCompiler>::default());
}
executor.add_module(Box::new(SQFCompiler::default()));
if matches.get_one::<bool>("no-bin") != Some(&true) {
executor.add_module(Box::<Binarize>::default());
}
Expand Down
21 changes: 1 addition & 20 deletions bin/src/commands/dev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ use crate::{
report::Report,
};

#[cfg(not(target_os = "macos"))]
use crate::modules::asc::ArmaScriptCompiler;

use super::build::add_just;

#[must_use]
Expand Down Expand Up @@ -48,12 +45,6 @@ pub fn add_args(cmd: Command) -> Command {
.help("Include all optional addon folders")
.action(ArgAction::SetTrue),
)
.arg(
clap::Arg::new("asc")
.long("asc")
.help("Use ArmaScriptCompiler instead of HEMTT's SQF compiler")
.action(ArgAction::SetTrue),
)
.arg(
clap::Arg::new("no-rap")
.long("no-rap")
Expand Down Expand Up @@ -132,12 +123,6 @@ pub fn context(
}
}

let use_asc = matches.get_one::<bool>("asc") == Some(&true);
if cfg!(target_os = "macos") && use_asc {
error!("ArmaScriptCompiler is not supported on macOS");
std::process::exit(1);
}

let mut executor = Executor::new(ctx);

executor.collapse(Collapse::Yes);
Expand All @@ -147,11 +132,7 @@ pub fn context(
if rapify && matches.get_one::<bool>("no-rap") != Some(&true) {
executor.add_module(Box::<Rapifier>::default());
}
executor.add_module(Box::new(SQFCompiler::new(!use_asc)));
#[cfg(not(target_os = "macos"))]
if use_asc {
executor.add_module(Box::<ArmaScriptCompiler>::default());
}
executor.add_module(Box::new(SQFCompiler::default()));
executor.add_module(Box::<Files>::default());
executor.add_module(Box::<FilePatching>::default());
if force_binarize || matches.get_one::<bool>("binarize") == Some(&true) {
Expand Down
4 changes: 0 additions & 4 deletions bin/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ pub enum Error {
#[error("`.hemtt/project.toml` not found")]
ConfigNotFound,

#[error("ASC: {0}")]
#[cfg(not(target_os = "macos"))]
ArmaScriptCompiler(String),

#[error("Unable to create link: {0}")]
#[allow(dead_code)] // Unused on Linux and Mac
Link(String),
Expand Down
240 changes: 0 additions & 240 deletions bin/src/modules/asc.rs

This file was deleted.

3 changes: 0 additions & 3 deletions bin/src/modules/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
use crate::{context::Context, error::Error, report::Report};

#[cfg(not(target_os = "macos"))]
pub mod asc;

pub mod archive;
pub mod bom;
pub mod hook;
Expand Down
Loading
Loading